Other memes:
- SoyPhone
Utility functions added:
- Square aspect ratio cropper (square_crop)
- Circle profile pic maker (circle_pfp)
- PIL alpha_composite helper (alpha_comp_prep)
- Text wrapping and bounding helpers
- Tuple adder (tuple_add)
- iPhone timestamp generator for top bar (get_iphone_time_s)
Also added:
- Meme abstract base class (in pseudbot/meme/abc.py)
- Post styling information (in pseudbot/meme/post_styles.py)
You can now run multiple commands on a thread from a single tweet using
the `|` delimiter!
I also renamed bot.py to tweet_bot.py to make future expansion plans
less confusing.
On startup, the code now initializes MEDIA with suitable media files
found in the `media` directory that satisfy Twitter's media file
requirements. The `filetype` Python module has been added as a
dependency to ensure that files in `media` are what they claim to be.
In the bot class I added a new _parse_mention method, broke up the
pasta chain builder method, and added a new recursive _tweet_media
method. The _parse_mention method had to have some `stupid_emoji`
hackery thanks to the way the 🖼 emoji gets encoded in some tweets.
A new fetch-media script has been added along with a new util function
named `download_tweet_media`
See media/README.md for more information on how to use the newly-added
multimedia superpowers.
This commit involves a lot of refactoring that should've been moved to
a separate commit. Some PseudBot methods that don't need to use
PseudBot attributes have been moved to the newly-created `util.py`.
The real_main function and its associated paraphernalia have been moved
to the also newly-created `cli.py`.
All PseudBot internal methods have been prepended with an underscore
(_).
A new method called list_actions has been added. It generates a list
of CLI-callable methods and prints each and its accompanying docstring
to the terminal.
SOCKS proxy support has been added to Pseudbot. The CLI now has a new
`-p` flag that supports fully-qualified SOCKS proxy urls. For example:
$ pseudbot run_bot -p socks5://username:password@host:port/
A user timeline dumper action named `user_timeline` has also been added
to PseudBot. Here's an example of it in action:
$ pseudbot user_timeline -s CheckmarkLs
Now you invoke pseudbot like so:
pseudbot ACTION [OPTIONS]
Config file parameter now defaults to a file named `pseud.json` in
the current working directory. It is now set with the `-c` flag.
The code for picking and building a pasta chain to send has been
moved from the `reply_mentions` method to a new one named
`_send_pasta_chain`.
New logging features have been added. Tweets and their URLs are now printed to
the console's log. Added new keyboard interrupt signal handler that tweets out
a shutdown message with a timestamp.
The bot mostly works. Not exactly happy with the code thus far,
may rewrite in the future. I also am not using the tweepy 2.0 API...
run the bot with:
pseudbot -a run_bot pseud_cfg.json