203af0adc99b1a74c3bd1169297d124664415d0a
Was accidentally skipping a ton of skyrim mods because of this.
modmapper
Downloads mods from nexus, parses the plugins inside, and saves data to a postgres database.
Development Install
- Install and run postgres.
- Create postgres user and database (and add uuid extension while you're there ):
createuser modmapper
createdb modmapper
sudo -u postgres -i psql
postgres=# ALTER DATABASE modmapper OWNER TO modmapper;
\password modmapper
# Or, on Windows in PowerShell:
& 'C:\Program Files\PostgreSQL\13\bin\createuser.exe' -U postgres modmapper
& 'C:\Program Files\PostgreSQL\13\bin\createdb.exe' -U postgres modmapper
& 'C:\Program Files\PostgreSQL\13\bin\psql.exe' -U postgres
postgres=# ALTER DATABASE modmapper OWNER TO modmapper;
\password modmapper
- Save password somewhere safe and then and add a
.envfile to the project directory with the contents:
DATABASE_URL=postgresql://modmapper:<password>@localhost/modmapper
RUST_LOG=mod_mapper=debug
- Install
sqlx_cliwithcargo install sqlx-cli --no-default-features --features postgres - Run
sqlx migrate --source migrations runwhich will run all the database migrations. - Get your personal Nexus API token from your profile settings and add it to the
.envfile:
NEXUS_API_KEY=...
- Build the release binary by running
cargo build --release. - See
./target/release/modmapper -hfor further commands or run./scripts/update.shto start populating the database with scraped mods and dumping the data to JSON files.
Sync and Backup Setup
scripts/sync.sh and scripts/backup.sh both utilize rclone to transfer files that are generated on the machine running modmapper to separate servers for file storage.
For these scripts to run successfully you will need to install rclone and setup a remote for sync.sh (the "static server") and a remote for backup.sh (the "backup server"). Remotes can be created with the rclone config command. Then, make sure these variables are defined in the .env file corresponding to the remote names and buckets (or folders) within that remote you created:
STATIC_SERVER_REMOTESTATIC_SERVER_CELLS_BUCKETSTATIC_SERVER_MODS_BUCKETSTATIC_SERVER_PLUGINS_BUCKETSTATIC_SERVER_FILES_BUCKETBACKUP_SERVER_REMOTEBACKUP_SERVER_BUCKET
Description
Downloads every Skyrim mod plugin from nexusmods.com and saves CELL edits of each to a database
https://modmapper.com
Languages
Rust
96.3%
Shell
3.7%