# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['gogettr', 'gogettr.capabilities']

package_data = \
{'': ['*']}

install_requires = \
['click>=8.0.1,<9.0.0', 'requests>=2.25.1,<3.0.0']

entry_points = \
{'console_scripts': ['gogettr = gogettr.cli:cli']}

setup_kwargs = {
    'name': 'gogettr',
    'version': '0.8.0',
    'description': 'Extraction tool for GETTR, a "non-bias [sic] social network."',
    'long_description': '# GoGettr\n\nGoGettr is an API client for GETTR, a "non-bias [sic] social network." GoGettr is built and maintained by the [Stanford Internet Observatory](https://io.stanford.edu).\n\nThis tool does not currently require any authentication with GETTR; it gathers all its data through publicly accessible endpoints.\n\nCurrently, this tool can:\n\n* Pull posts made on the platform\n* Pull comments made on the platform\n* Pull all top "trending" hashtags\n* Pull all suggested users\n* Pull all "trending" posts (i.e., the posts on the home page)\n* Pull all posts and/or comments of a user on the platform\n* Pull all a user\'s followers\n* Pull all users a particular user follows\n* Pull all comments on a particular post\n* Pull profile information about particular users\n\nGoGettr is designed for academic research, open source intelligence gathering, and data archival. It pulls all of the data from the publicly accessible API.\n\n## Installation\n\nGoGettr is available on PyPI. To install it, simply run `pip install gogettr`. Provided your `pip` is setup correctly, this will make `gogettr` available both as a command and as a Python package. **Note that GoGettr requires Python 3.8 or higher.**\n\n## CLI Playbook\n\n**Pull all posts (starting at id 1, capped at 1m)**\n\n```bash\ngogettr all --max 1000000\n```\n\n**Pull all comments**\n\n```bash\ngogettr all --type comments --max 1000000\n```\n\n**Pull all posts (starting at a particular ID and moving backward through IDs)**\n\n```bash\ngogettr all --rev --last pay8d\n```\n\n**Pull all posts from a user**\n\n```bash\ngogettr user USERNAME --type posts\n```\n\n**Pull all comments from a user**\n\n```bash\ngogettr user USERNAME --type comments\n```\n\n**Pull all likes from a user**\n\n```bash\ngogettr user USERNAME --type likes\n```\n\n**Pull a user\'s information**\n\n```bash\ngogettr user-info USERNAME\n```\n\n## CLI Usage\n\n```text\nUsage: gogettr [OPTIONS] COMMAND [ARGS]...\n\n  GoGettr is an unauthenticated API client for GETTR.\n\nOptions:\n  --version  Show the version and exit.\n  --help     Show this message and exit.\n\nCommands:\n  all             Pull all posts (or comments) sequentially.\n  comments        Pull comments on a specific post.\n  hashtags        Pull the suggested hashtags (the top suggestions are...\n  live            Pull livestream posts.\n  registered      Check if a username is registered.\n  search          Search posts for the given query.\n  suggested       Pull the suggested users (users displayed on the home...\n  trends          Pull all the trends (posts displayed on the home page).\n  user            Pull the posts, likes, or comments made by a user.\n  user-followers  Pull all a user\'s followers.\n  user-following  Pull all users a given user follows.\n  user-info       Pull given user\'s information.\n```\n\n### `all`\n\n```text\nUsage: gogettr all [OPTIONS]\n\n  Pull all posts (or comments) sequentially.\n\n  Note that if iterating chronologically and both max and last are unset, then\n  this command will run forever (as it will iterate through all post IDs to\n  infinity). To prevent this, either specify a max, last post, or iterate\n  reverse chronologically.\n\n  Posts will be pulled in parallel according to the desired number of workers.\n  Out of respect for GETTR\'s servers, avoid setting the number of workers to\n  values over 50.\n\nOptions:\n  --first TEXT             the ID of the first post to pull\n  --last TEXT              the ID of the last post to pull\n  --max INTEGER            the maximum number of posts to pull\n  --rev                    increment reverse chronologically (i.e., from last\n                           to first)\n  --type [posts|comments]\n  --workers INTEGER        the number of threads to run in parallel\n  --help                   Show this message and exit.\n```\n\n### `comments`\n\n```text\nUsage: gogettr comments [OPTIONS] POST_ID\n\n  Pull comments on a specific post.\n\nOptions:\n  --max INTEGER  the maximum number of comments to pull\n  --help         Show this message and exit.\n```\n\n### `hashtags`\n\n```text\nUsage: gogettr hashtags [OPTIONS]\n\n  Pull the suggested hashtags (the top suggestions are displayed on the front\n  page).\n\n  Note that while the first five or so hashtags have expanded information\n  associated with them, later results do not.\n\nOptions:\n  --max INTEGER  the maximum number of hashtags to pull\n  --help         Show this message and exit.\n```\n\n### `registered`\n\n```text\nUsage: gogettr registered [OPTIONS] USERNAME\n\n  Check if a username is registered.\n\nOptions:\n  --help  Show this message and exit.\n```\n\n### `search`\n\n```text\nUsage: gogettr search [OPTIONS] QUERY\n\n  Search posts for the given query.\n\n  This is equivalent to putting the query in the GETTR search box and\n  archiving all the posts that result.\n\nOptions:\n  --max INTEGER  the maximum number of posts to pull\n  --help         Show this message and exit\n```\n\n### `suggested`\n\n```text\nUsage: gogettr suggested [OPTIONS]\n\n  Pull the suggested users (users displayed on the home page).\n\nOptions:\n  --max INTEGER  the maximum number of users to pull\n  --help         Show this message and exit.\n```\n\n### `trends`\n\n```text\nUsage: gogettr trends [OPTIONS]\n\n  Pull all the trends (posts displayed on the home page).\n\nOptions:\n  --max INTEGER  the maximum number of posts to pull\n  --until TEXT   the ID of the earliest post to pull\n  --help         Show this message and exit.\n```\n\n### `user`\n\n```text\nUsage: gogettr user [OPTIONS] USERNAME\n\n  Pull the posts, likes, or comments made by a user.\n\nOptions:\n  --max INTEGER                  the maximum number of activities to pull\n  --until TEXT                   the ID of the earliest activity to pull for\n                                 the user\n  --type [posts|comments|likes]\n  --help                         Show this message and exit.\n```\n\n### `user-followers`\n\n```text\nUsage: gogettr user-followers [OPTIONS] USERNAME\n\n  Pull all a user\'s followers.\n\nOptions:\n  --max INTEGER  the maximum number of users to pull\n  --help         Show this message and exit.\n```\n\n### `user-following`\n\n```text\nUsage: gogettr user-following [OPTIONS] USERNAME\n\n  Pull all users a given user follows.\n\nOptions:\n  --max INTEGER  the maximum number of users to pull\n  --help         Show this message and exit.\n```\n\n### `user-info`\n\n```text\nUsage: gogettr user-info [OPTIONS] USERNAME\n\n  Pull given user\'s information.\n\nOptions:\n  --help  Show this message and exit.\n```\n\n### `live`\n\n```text\nUsage: gogettr live [OPTIONS]\n\n  Pull livestream posts.\n\nOptions:\n  --max INTEGER  the maximum number of livestream entries to pull\n  --help         Show this message and exit.\n```\n\n## Module Usage\n\nYou can use GoGettr as a Python module. For example, here\'s how you would pull all a user\'s posts:\n\n```python\nfrom gogettr import PublicClient\nclient = PublicClient()\nposts = client.user_activity(username="support", type="posts")\n```\n\nFor more examples of using GoGettr as a module, check out the [tests directory](tests/). Note that the API surface can\'t be considered quite stable yet. In the case that Gettr changes their API, GoGettr\'s API may change to match (though with as few public-facing API changes as possible, however).\n\nGoGettr groups related API functionality into the same capabilities; for example, pulling users\' comments, posts, and likes is all done by the same function (inside `user_activity.py`), and pulling followers and following is done by the same function (inside `user_relationships.py`). That means there isn\'t perfect correspondence between the CLI surface and the API surface.\n\n## Development\n\nTo run gogettr in a development environment, you\'ll need [Poetry](https://python-poetry.org). Install the dependencies by running `poetry install`, and then you\'re all set to work on gogettr locally.\n\nTo run the tests, run `poetry run pytest`.\n\nTo access the CLI, run `poetry run gogettr`.\n\nTo package and release a new version on PyPI, simply create a new release tag on GitHub.\n\n## Contributing\n\nContributions are encouraged! For small bug fixes and minor improvements, feel free to just open a PR. For larger changes, please open an issue first so that other contributors can discuss your plan, avoid duplicated work, and ensure it aligns with the goals of the project. Be sure to also follow the [code of conduct](CODE_OF_CONDUCT.md). Thanks!\n\n## Logging\n\nWhen run in CLI mode, GoGettr will log extensive debug information to `gogettr.log` (in the working directory). This log will include every single request GoGettr makes, and every single response GoGettr receives. Because it\'s possible that GoGettr accidentally loses some information when parsing API responses, consider keeping this file around just in case.\n\n## Wishlist\n\nSupport for the following capabilities is planned:\n\n- ...nothing right now! (Got an idea? Submit an issue/PR!)\n',
    'author': 'Stanford Internet Observatory',
    'author_email': 'mccain@stanford.edu',
    'maintainer': None,
    'maintainer_email': None,
    'url': 'https://github.com/stanfordio/gogettr',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'entry_points': entry_points,
    'python_requires': '>=3.8,<4.0',
}


setup(**setup_kwargs)
