Sort screenshots based on rules or through individual review.
Project description
Social Arsenal
Sometimes someone is being a clown on the internet. Somewhere on your hard drive is the perfect screenshot to prove to the world that the clown in question is a fool, a hypocrite, a criminal, or worse. But then - horrors - you can't find the screenshot! It has been lost in your vast archive of screenshots of clowns clowning themselves on the internet.
Social Arsenal solves this.
What It Do
It sorts screenshots, PDFs, etc. based on their name and/or their textual contents into folders based on a list of rules. The contents of the tweet/reddit post/whatever are prepended to the filename and the ImageDescription
EXIF tag is set to the OCR text. For example this screenshot of a tweet by a noteworthy cryptocurrency "reporter"[^1] on the eve of FTX's implosion:
Would be renamed from Screen Shot 2023-02-17 at 7.11.37 PM.png
to
Tweet by @lawmaster: "I will say though before this thread gets taken over: 1. I do believe Alameda has the size to easily buy Binance\'s FIT OTC 2. I think the chance of FTX insolvency is near" Screen Shot 2023-02-17 at 7.11.37 PM.png
Quick Start
# Installation with pipx is preferred if you have it but you can also use pip which comes standard
# on almost all systems, especially if you're not a python programmer who is concerned about side
# effects of pip upgrading system python packages.
pipx install screenshots_sorter
# Get help
sort_screenshots -h
# Dry run with default cryptocurrency sort rules (dry runs don't actually move anything, they just show you what)
sort_screenshots
# Execute default cryptocurrency sort rules against ~/Pictures/Screenshots
sort_screenshots --execute
# Sort a different directory of screenshots
sort_screenshots --screenshots-dir /Users/hrollins/Pictures/get_in_the_van/tourphotos --execute
# Sort with custom rules
sort_screenshots --rules-csv /Users/hrollins/my_war.csv --execute
Setup
You may need to install:
- Python TK:
brew install python-tk@3.10
Not required for standard PNG, JPG, etc. images but you may optionally install exiftool
for other file types.
- ExifTool:
brew install exiftool
or download from https://exiftool.org
Usage
The default is to sort cryptocurrency related content but you can define your own CSV of rules with two columns folder
and regex
. The value in folder
specifies the subdirectory to sort into and regex
is the pattern to match against. See the default crypto related configuration for an example. An explanation of regular expressions is beyond the scope of this README but many resources are available to help. if you're not good at regexes just remember that any alphanumeric string is a regex that will match that string. pythex is a great website for testing your regexes.
[^1]: Perhaps notable that the "reporter" in question for years maintained a private list of the blockchain addresses of Sam Bankman-Fried's various scams as part of his commitment to "unrivaled transparency".
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for social_arsenal-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f543033ee2c3303b1a0c1c7f102c6b91ca74bb16caf9d91f28c9f21f0efbd28 |
|
MD5 | 684cbf8ce6244768b6f29edc6f9c339f |
|
BLAKE2b-256 | 7bd02f8e2a7f148b26b6c4ed04e45c2dd71a6e31f2e15af9d448aa7801939b0c |