mirror of
https://github.com/adulau/wikirc2text.git
synced 2024-12-22 08:46:02 +00:00
--wait option added
Wait time between two refresh is now an option
This commit is contained in:
parent
2e4f6da143
commit
4568b5b865
1 changed files with 2 additions and 1 deletions
|
@ -32,6 +32,7 @@ parser = OptionParser(usage)
|
|||
parser.add_option("-s", "--state", action="store_true" ,dest="state", help="keep state of existing rcline seen and don't output them", default=False)
|
||||
parser.add_option("-c", "--cleanstate", dest="statesec", help="expire states existing more than number of seconds specified")
|
||||
parser.add_option("-t", "--tail", action="store_true", dest="tail", help="tail-like operation by continuously appending new changes (--state option is enable)", default=False)
|
||||
parser.add_option("-w", "--wait", dest="wait", help="number of seconds to wait before refreshing (default is 60)", default=60)
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
if (options.tail):
|
||||
|
@ -73,7 +74,7 @@ def core ():
|
|||
else:
|
||||
print rcline
|
||||
if x > 1:
|
||||
time.sleep(60)
|
||||
time.sleep(float(options.wait))
|
||||
|
||||
if (options.state):
|
||||
s.close()
|
||||
|
|
Loading…
Reference in a new issue