Skip to content

Commit

Permalink
Fix cli
Browse files Browse the repository at this point in the history
  • Loading branch information
Aveek-Saha committed Apr 21, 2022
1 parent 4c39023 commit 1fa4b25
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pip install tweego
## CLI

```
tweego generate-network [OPTIONS]
tweego [OPTIONS]
Options:
-d, --dir PATH Directory to store data
Expand All @@ -26,7 +26,7 @@ Options:
### Example

```
tweego generate -d "dataset" -k "keys.json" -n "github"
tweego -d "dataset" -k "keys.json" -n "github"
```

## API keys format
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name='tweego',
version='0.2.0',
version='1.0.0',
author="Aveek Saha",
author_email="aveek.s98@gmail.com",
url='https://github.com/Aveek-Saha/tweego',
Expand Down
25 changes: 12 additions & 13 deletions tweego.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,18 +297,17 @@ def create_gml(screen_name, limit=5000):


# @click.group()
# @click.version_option()
# def cli():
# """Tweego.
# This is a command line program to generate second order ego networks for Twitter users.
# """

# @click.command()
# @click.option("-d", "--dir", type=click.Path(), help="Directory to store data")
# @click.option("-k", "--keys-file", type=click.Path(exists=True), help="Location of the api keys JSON file")
# @click.option("-n", "--screen-name", type=str, help="The screen name of the ego center user")
# @click.option("-f", "--follower-limit", type=int, help="Number of followers for the second order ego")
def generate(dir, keys_file, screen_name, follower_limit):
@click.command()
@click.option("-d", "--dir", type=click.Path(), help="Directory to store data")
@click.option("-k", "--keys-file", type=click.Path(exists=True), help="Location of the api keys JSON file")
@click.option("-n", "--screen-name", type=str, help="The screen name of the ego center user")
@click.option("-f", "--follower-limit", type=int, help="Number of followers for the second order ego")
@click.version_option()
def cli(dir, keys_file, screen_name, follower_limit):
"""Tweego.
This is a command line program to generate second order ego networks for Twitter users.
"""

global DATA_DIR
global dump_dir
global user_dir
Expand Down Expand Up @@ -349,4 +348,4 @@ def generate(dir, keys_file, screen_name, follower_limit):


# cli.add_command(generate)
generate("dataset", "keys.json", "verified", 10000)
# generate("dataset", "keys.json", "verified", 10000)

0 comments on commit 1fa4b25

Please sign in to comment.