Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加参数输入式版本(直接在.py后面添加一个参数来达到直接输入主题内容(即xx变量的内容)的效果) #134

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions 自动狗屁不通文章生成器.py
Original file line number Diff line number Diff line change
@@ -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")
Expand Down Expand Up @@ -39,7 +39,7 @@ def 另起一段():
return xx

if __name__ == "__main__":
xx = input("请输入文章主题:")
xx = sys.argv[1]
for x in xx:
tmp = str()
while ( len(tmp) < 6000 ) :
Expand All @@ -51,4 +51,4 @@ def 另起一段():
else:
tmp += next(下一句废话)
tmp = tmp.replace("x",xx)
print(tmp)
print(tmp)