From 4f8d3e5cf6188df506cdf008bdabf280d5a0dcde Mon Sep 17 00:00:00 2001 From: onewesong Date: Mon, 4 Nov 2019 22:54:56 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E8=A1=8C=E4=BC=A0=E5=8F=82=E8=AE=BE=E7=BD=AE=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E3=80=81=E6=96=87=E7=AB=A0=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\253\240\347\224\237\346\210\220\345\231\250.py" | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git "a/\350\207\252\345\212\250\347\213\227\345\261\201\344\270\215\351\200\232\346\226\207\347\253\240\347\224\237\346\210\220\345\231\250.py" "b/\350\207\252\345\212\250\347\213\227\345\261\201\344\270\215\351\200\232\346\226\207\347\253\240\347\224\237\346\210\220\345\231\250.py" index 2b63bfd94..d0dac4e77 100644 --- "a/\350\207\252\345\212\250\347\213\227\345\261\201\344\270\215\351\200\232\346\226\207\347\253\240\347\224\237\346\210\220\345\231\250.py" +++ "b/\350\207\252\345\212\250\347\213\227\345\261\201\344\270\215\351\200\232\346\226\207\347\253\240\347\224\237\346\210\220\345\231\250.py" @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: UTF-8 -*- -import os, re +import os, re, sys import random,readJSON data = readJSON.读JSON文件("data.json") @@ -39,10 +39,15 @@ def 另起一段(): return xx if __name__ == "__main__": - xx = input("请输入文章主题:") + try: + xx = sys.argv[1] + 文章长度 = int(sys.argv[2]) + except: + xx = input("请输入文章主题:") + 文章长度 = 6000 for x in xx: tmp = str() - while ( len(tmp) < 6000 ) : + while ( len(tmp) < 文章长度 ) : 分支 = random.randint(0,100) if 分支 < 5: tmp += 另起一段() @@ -51,4 +56,4 @@ def 另起一段(): else: tmp += next(下一句废话) tmp = tmp.replace("x",xx) - print(tmp) \ No newline at end of file + print(tmp) From 77ba97dbd8dbbc243195746b1294c6c13c219c25 Mon Sep 17 00:00:00 2001 From: onewesong Date: Mon, 4 Nov 2019 23:25:26 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=87=8F=E5=B0=91=E8=BF=9E=E7=BB=AD?= =?UTF-8?q?=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...226\207\347\253\240\347\224\237\346\210\220\345\231\250.py" | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git "a/\350\207\252\345\212\250\347\213\227\345\261\201\344\270\215\351\200\232\346\226\207\347\253\240\347\224\237\346\210\220\345\231\250.py" "b/\350\207\252\345\212\250\347\213\227\345\261\201\344\270\215\351\200\232\346\226\207\347\253\240\347\224\237\346\210\220\345\231\250.py" index d0dac4e77..b9998e63d 100644 --- "a/\350\207\252\345\212\250\347\213\227\345\261\201\344\270\215\351\200\232\346\226\207\347\253\240\347\224\237\346\210\220\345\231\250.py" +++ "b/\350\207\252\345\212\250\347\213\227\345\261\201\344\270\215\351\200\232\346\226\207\347\253\240\347\224\237\346\210\220\345\231\250.py" @@ -20,7 +20,8 @@ def 洗牌遍历(列表): while True: random.shuffle(池) for 元素 in 池: - yield 元素 + if not tmp.endswith(元素): + yield 元素 下一句废话 = 洗牌遍历(废话) 下一句名人名言 = 洗牌遍历(名人名言) From ea269a1061c73616cc6d19649ad670c91a33a1a7 Mon Sep 17 00:00:00 2001 From: onewesong Date: Fri, 20 Dec 2019 13:27:54 +0800 Subject: [PATCH 3/3] Update index.html --- index.html | 613 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 438 insertions(+), 175 deletions(-) diff --git a/index.html b/index.html index 11b6d3034..8beaa1b2c 100644 --- a/index.html +++ b/index.html @@ -1,219 +1,482 @@ + + + 狗屁不通文章生成器 + + + + + + + +
+
文章生成器
+
+ 主题 + + +
+
+
+
+

请勿将生成的文章用于正规用途

+

声明

+
+
+

+ 网页版 + + @suulnnka +

+

+ 原版 + + @menzi11 +

+
+ + + -
bullshit generator
-
主题
-
-
+