Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dustinmichels/paradeller
Paradeller is a robo-poet that scours Twitter in search of fodder for paradelle poems
https://github.com/dustinmichels/paradeller
algorithm poem poetry python twitter twitter-api
Last synced: 10 days ago
JSON representation
Paradeller is a robo-poet that scours Twitter in search of fodder for paradelle poems
- Host: GitHub
- URL: https://github.com/dustinmichels/paradeller
- Owner: dustinmichels
- Created: 2019-06-27T21:40:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T03:12:57.000Z (almost 2 years ago)
- Last Synced: 2023-04-24T20:56:25.154Z (over 1 year ago)
- Topics: algorithm, poem, poetry, python, twitter, twitter-api
- Language: Jupyter Notebook
- Size: 9.1 MB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# :black_nib: Paradeller
Paradeller is a robo-poet that scours Twitter in search of fodder for [paradelle poems](http://www.shadowpoetry.com/resources/wip/paradelle.html).
## Setup
### 1) Install [Git Large File Storage](https://git-lfs.github.com/)
```bash
# MacOS
brew install git-lfs# Linux
sudo apt-get install git-lfs
```### 2) Clone Repo
```bash
git clone https://github.com/dustinmichels/paradeller.git
cd paradeller# Initialize large file storage
git lfs install
```### 3) Install Python Dependencies
```bash
# dev
pipenv install --dev
pipenv shell
jupyter labextension install @jupyter-widgets/jupyterlab-manager# prod
pip -r requirements.txt
```### 4) _[Optional]_ Twitter API Keys
If you will be scraping tweets:
- Create Twitter API credentials
- Copy keys template: `cp paradeller/keys.template.py paradeller/keys.py`
- Populate `keys.py` with API credentials## Usage
### Scraping Tweets
Scrape tweets using Tweepy.
```bash
python -m paradeller.scrape
python -m paradeller.scrape 100
```- Optional CLI argument is the number of iterations of `get_tweets` to perform.
- Each iteration will scrape about 100 tweets, filter that collection down, then save to `data/archive.json`.
- Scraper will automatically pause when rate limits are hit and resume when possible.Can easily run with default of 10,000 tweets using:
```bash
./scrape.sh
```### Analyzing Tweets
To search for paradelles in the saved tweets, use `paradeller/run.py`.
```bash
python -m paradeller.run
python -m paradeller.run 1000
```- Optional CLI argument is number of ids to pair off as initial pairs
Can easily run with default of 1,000 ids using:
```bash
./search.sh
```## Dev Notes
To generate `requirements.txt` from `Pipefile`:
```bash
pipenv lock -r > requirements.txt
```