With the neutering of Cyberdrop-DL, downloading from SimpCity now requires using the "Forum post downloader" userscript. This script downloads files in a zip file, which can be cumbersome to manage. UnSimpd is a daemon designed to automatically unzip these post zip files. It monitors configured directories for zip files, calculates their SHA256 hash, checks for duplicates, ensures sufficient disk space, and then extracts the contents. Upon successful extraction, the original zip file is deleted, and a record is kept in a local database of processed files.
Highlights
Automatic Monitoring: Watches specified directories for zip files.
Duplicate Detection: Prevents processing of duplicate files based on SHA256 hash.
Disk Space Check: Verifies sufficient disk space before extraction.
Extraction: Unzips files to a directory with the same name as the zip file (without the post number or extension).
Record Keeping: Uses a simple local database to store information about processed files.
Error Handling: Includes error handling and logging for various operations.
Configuration: Configurable through a YAML file.
Dependencies
notify-send (for desktop notifications)
systemd (for running as a user service)
Installation
Clone the repository:
git clone https://github.com/duckysn0there/UnSimpd
cd UnSimpd
Run the setup script:
This script will:
Build and install the unsimpd binary to your $GOPATH/bin.
Create ~/.config/unsimpd/config.yaml if it doesn't exist.
Create ~/.config/systemd/user/UnSimpd.service if it doesn't exist.
Enable and start the UnSimpd.service for your user.
./scripts/setup.sh
You must have Go installed and $GOPATH/bin in your $PATH.
Configure Monitored Paths:
The service will start but will wait for you to configure a real path. Edit the configuration file:
vi ~/.config/unsimpd/config.yaml
Replace "/path/to/monitored/folder" with the absolute path to your downloads folder. For example:
paths:
- "/home/youruser/Downloads"
Restart the Service:
After editing the config, restart the service or wait for the next config check (every 10 minutes) to apply changes.
systemctl --user restart UnSimpd.service
Usage
The daemon runs in the background. You can check its status and logs.