-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathcli.py
59 lines (41 loc) · 1.42 KB
/
cli.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import click
from pathlib import Path
import os
from autochart_tv.config import Configuration
from autochart_tv.server import ChartServer
from autochart_tv.repl import start_ac_repl
from autochart_tv.fomo import start_fomodd_api
from autochart_tv.fomo import start_twitter_stock_search
from autochart_tv.top import start_gainers, start_losers
config = Configuration()
@click.group()
def main():
print('test')
@main.command('repl')
def repl():
print('running repl') # arg to change client port here
start_ac_repl()
@main.command('fomodd-api')
def fomodd():
print('running api.fomodd.io/superfiler') # arg to change client port here
print('Helps filter then shit from the shitcoins.')
start_fomodd_api()
@main.command('iex-stock-gainers')
def gainers():
print('running tops gainers from iex') # arg to change client port here
start_gainers()
@main.command('iex-stock-losers')
def losers():
print('running tops losers from iex') # arg to change client port here
start_losers()
@main.command('twitter-stock-scraper')
@click.argument('twitter_profiles')
def twitter_scraper(twitter_profiles):
print(f'search {twitter_profiles} for tickers.')
start_twitter_stock_search(twitter_profiles)
@main.command('server')
def server():
print('running server')
port = config.get_server_setting('port') # arg to change port here
ChartServer.get_server().run(debug=False, port=port)
main()