Skip to content

Commit

Permalink
Rename run.py to run.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshasiregar committed Sep 12, 2020
1 parent 5237896 commit 113c63e
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions run.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
from config import cfg
from main import main
import click


# Click config
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])

@click.command(context_settings=CONTEXT_SETTINGS)
@click.option(
'--threads', '-t',
help='Number of threads',
show_default=True,
type=int,
default=cfg["threads_num"]
)
@click.option(
'--mode', '-m',
help="""The mode to catch the more recent link, using it as a limit. (noisy, stealth)\n
- noisy : it uploads a picture to get the more recent link\n
- stealth : it uses the last link shown on Twitter here : https://prntscr.com/twitter.json\n""",
show_default=True,
type=str,
default="noisy"
)
@click.option(
'--algo', '-a',
help='Algorithm used to generate links. (ascending, descending, random)',
show_default=True,
type=str,
default="descending"
)
@click.option(
'--debug', '-d',
help='Verbose mode, for debugging.',
show_default=True,
is_flag=True
)
@click.option(
'--resume_ro', '-ro',
help="Don't save the resume state, only read it.",
show_default=True,
is_flag=True
)
@click.option(
'--clean', '-c',
type=str,
help="""Clean some things you don't want anymore. (logs, resume, exports)\n
If you want want to specify multiple values, specify them comma-separated and without spaces. Ex: \"--clean logs,exports\""""
)
def start(threads, mode, algo, debug, clean, resume_ro):
main(threads, mode, algo, debug, clean, resume_ro)

if __name__ == '__main__':
start()

0 comments on commit 113c63e

Please sign in to comment.