Skip to content

Commit

Permalink
fix skipping arguments with "" #4
Browse files Browse the repository at this point in the history
  • Loading branch information
Owyn authored Jan 23, 2024
1 parent 808d982 commit 0387d8b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions css2rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,40 +111,40 @@ def css_to_rss(item, depth):
bFixed_main_title = False
bEval_main_title = False
if len(sys.argv) > 2:
if sys.argv[2][0] == '!':
if sys.argv[2] == '' or sys.argv[2][0] == '~':
bDefault_main_title = True
elif sys.argv[2][0] == '!':
sys.argv[2] = sys.argv[2][1:]
bFixed_main_title = True
elif sys.argv[2][0] == '$':
sys.argv[2] = sys.argv[2][1:]
bEval_main_title = True
elif sys.argv[2] == '' or sys.argv[2][0] == '~':
bDefault_main_title = True
else:
bDefault_main_title = True

bDefault_addon_title = False
bFixed_addon_title = False
bEval_addon_title = False
if len(sys.argv) > 5:
if sys.argv[5][0] == '!':
if sys.argv[5] == '' or sys.argv[5][0] == '~':
bDefault_addon_title = True
elif sys.argv[5][0] == '!':
sys.argv[5] = sys.argv[5][1:]
bFixed_addon_title = True
elif len(sys.argv) > 5 and sys.argv[5][0] == '$':
sys.argv[5] = sys.argv[5][1:]
bEval_addon_title = True
elif sys.argv[5] == '' or sys.argv[5][0] == '~':
bDefault_addon_title = True
else:
bDefault_addon_title = True

bDefault_comment = False
bComment_fixed = False
if len(sys.argv) > 3:
if sys.argv[3][0] == '!':
if sys.argv[3] == '' or sys.argv[3][0] == '~':
bDefault_comment = True
elif sys.argv[3][0] == '!':
sys.argv[3] = sys.argv[3][1:]
bComment_fixed = True
elif sys.argv[3] == '' or sys.argv[3][0] == '~':
bDefault_comment = True
else:
bDefault_comment = True

Expand Down

0 comments on commit 0387d8b

Please sign in to comment.