screentool.py - Copy images from RetroPie to your PC
-
https://drive.google.com/file/d/1RwekamDYpxLmsTFgbxQGagDVosh2TOXV/view?usp=sharing
Author: Tuncay D.
License: MIT LicenseCompatible: Python 2.7 on Ubuntu 18.04
Note: This tool was created for personal use and will most likely only work in
a Linux environment. It is developed under Python 2 and intended
to be used on a PC.screentool.py is a commandline utility to copy screenshots from RetroPie to
my PC. It searches for the newest image files in a given folder, based on their
reverse-alphabetical filename order. The newest taken screenshots usually have
the highest numbers. I have a dedicated screenshots folder on my RetroPie, where
all emulators save the images to. Once it is connected with Samba on my Ubuntu
PC, I can use the screentool.py to grab them.The script is quite flexible with its options. Settings can be stored in an
optional configuration file and the commandline have highest priority over
settings. More information is available by using the commandline option -h
or --help. In doubt, use -p option to see what would have been copied, without
actually doing anything. Use -w to see what settings are currently in use. These
options help to understand if the script works as expected.Usage examples:
screentool.py --help screentool.py pengo screentool.py -s -l 5 -x "Donkey*" screentool.py --printonly --limit 50 | grep Donkey screentool.py -p -l 100 -r "p(e|a)" screentool.py --showlicense
Output from screentool.py --help
usage: screentool.py [-h] [-v] [-c FILE] [-n] [-i DIR] [-o DIR] [-s] [-l NUM] [-t] [-r PATTERN] [-x] [-p] [-w] [--showlicense] [romname] Searches and copies screenshot images from one directory to another. Results are sorted and reversed in alphanumerical way, so the newest screenshot should be found first. Existing files will be overwritten. Example usage: screentool.py pengo -p -l 5 positional arguments: romname Name of rom matching the start of filename. Search is case sensitive. Wildcards and image extensions are added automatically to find random numbered filenames. Defaults to '*'. optional arguments: -h, --help show this help message and exit -v, --version show program's version number and exit -c FILE, --config FILE Path to an optional config file. Defaults to scripts own name with replaced extension to .ini. -n, --noconfig Ignores the settings in configuration file. Use default values and commandline arguments only. -i DIR, --input DIR The base directory to look for images, defaults to current working dir. -o DIR, --output DIR Directory to copy images to, defaults to scripts own folder. Will be created, if it does not exist. -s, --sub Create a subfolder for each search attempt of romname search. -l NUM, --limit NUM Number of screenshot files to get. Defaults to 2 entries. Negative numbers can be used to subtract from total file count. -1 becomes count-1. -t, --nosort Do NOT sort and reverse files alphanumerical. Without this option an automatic sorting takes place. -r PATTERN, --regex PATTERN Additional regular expression filter. The filter is case insensitive and searches in whole filename, including extension. -x, --execute Open the first copied file (based on internal sorting) in output directory with its associated default application. -p, --printonly Simulate process. Print filenames of found images on screen and exit. Do not copy files. -w, --writesettings Simulate process. Print current active settings on screen and exit. Do not copy files. --showlicense Print license text of script on screen and exit. Do not copy files.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.