| Summary | Metadata sync tool to import OF-Scraper data into you Stash database. | |
| Repository | https://github.com/timekillerj/ofscraper-stash-sync |
OFScraper/Stash Metadata Sync Tool
This project unites the work of OF-Scraper and StashApp by merging the metadata scraped by OF-Scraper into the StashApp database.
What metadata is merged?
- Title/Details: Onlyfans text can be very long. Script attempts to turn this into a reasonable Title and Details
- Date: OnlyFans âposted atâ date is used
- Studio: Hardcoded to âOnlyFansâ. You must have a studio âOnlyFansâ (case insensitive) in your Stash database
- Studio Code: OnlyFans Media ID is used
- URLs: Link to original file on OF
- Performers: Original posting model as well as any models @mentioned in the post text are added to the stash media record. For this to work the OF username must match exactly either the Stash performer name or one of the performerâs aliases.
- Organized: Set to true once processed. This prevents processing already processed media.
Installation and Use
This script can be run directly or through a docker image
Direct Execution
- Clone this directory
git clone https://github.com/timekillerj/ofscraper-stash-sync
- Move into cloned directory
cd ofscraper-stash-sync
- (Optional but recommended) Install and activate a virtual environment
python3 -m venv .venv
source .venv/bin/activate
- Install dependancies
pip install -r requirements.txt
- Copy and edit config.ini.sample
cp config.ini.sample config.ini
vi config.ini
- Run the code
python ofscraper-stash-sync -c config.ini
Docker Execution
- Create a configs directory and place a config in it. Use the config.ini.sample in this repo as reference
- Rune the docker image. You will need to mount 2 volumes. One for the configs path and one for the OF-Scraper data path. Command should look something like this:
docker run -it --rm --name=ofscraper-stash-sync -v /path/to/configs:/configs -v /path/to/ofscraper:/ofscraper timekillerj/ofscraper-stash-sync:latest ofscraper-stash-sync -c /configs/config.ini
Run Options
| Option | Parameter | Description |
|---|---|---|
| -h, --help | show this help message and exit | |
| -v, --verbose | Enable verbose (debugging) output | |
| -c, --config | CONFIG_PATH | Path to config file |
| -m, --model | FILTER_MODEL | Filter to sync a single modelâs metadata |
| -fs, --full-sync | Ignore âOrganizedâ tag and (re)sync all media |