this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

twitter-to-sqlite auth -a my-auth.json option

+7 -5
+1 -1
README.md
··· 34 34 Access token: xxx 35 35 Access token secret: xxx 36 36 37 - This will create a file called `auth.json` in your current directory containing the required values. 37 + This will create a file called `auth.json` in your current directory containing the required values. To save the file at a different path or filename, use the `--auth=myauth.json` option. 38 38 39 39 ## Retrieving your Twitter followers 40 40
+6 -4
twitter_to_sqlite/cli.py
··· 12 12 13 13 14 14 @cli.command() 15 - @click.argument( 16 - "auth_path", 15 + @click.option( 16 + "-a", 17 + "--auth", 17 18 type=click.Path(file_okay=True, dir_okay=False, allow_dash=False), 18 19 default="auth.json", 20 + help="Path to save tokens to, defaults to auth.json", 19 21 ) 20 - def auth(auth_path): 22 + def auth(auth): 21 23 "Save authentication credentials to a JSON file" 22 24 click.echo("Create an app here: https://developer.twitter.com/en/apps") 23 25 click.echo("Then navigate to 'Keys and tokens' and paste in the following:") ··· 26 28 api_secret_key = click.prompt("API secret key") 27 29 access_token = click.prompt("Access token") 28 30 access_token_secret = click.prompt("Access token secret") 29 - open(auth_path, "w").write( 31 + open(auth, "w").write( 30 32 json.dumps( 31 33 { 32 34 "api_key": api_key,