Downloads every Skyrim mod plugin from nexusmods.com and saves CELL edits of each to a database https://modmapper.com
Go to file
2022-10-02 00:34:38 -04:00
migrations Add is_translation to mod with backfill 2022-03-15 23:59:56 -04:00
scripts Enable updating skyrim mods 2022-09-24 19:58:26 -04:00
src Login before scraping mods to include adult mods 2022-10-02 00:34:38 -04:00
.gitignore Add tracing logging to all commands 2022-06-04 18:51:20 -04:00
Cargo.lock Update skyrim-cell-dump to 0.4.1 2022-10-01 17:57:02 -04:00
Cargo.toml Update skyrim-cell-dump to 0.4.0 2022-09-30 16:47:43 -04:00
drop_all.sql Rename drop_all.sql file 2021-07-29 01:01:27 -04:00
README.md Login before scraping mods to include adult mods 2022-10-02 00:34:38 -04:00

modmapper

Downloads mods from nexus, parses the plugins inside, and saves data to a postgres database.

Development Install

  1. Install and run postgres.
  2. 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
  1. Save password somewhere safe and then and add a .env file to the project directory with the contents:
DATABASE_URL=postgresql://modmapper:<password>@localhost/modmapper
RUST_LOG=mod_mapper=debug
  1. Install sqlx_cli with cargo install sqlx-cli --no-default-features --features postgres
  2. Run sqlx migrate --source migrations run which will run all the database migrations.
  3. Get your personal Nexus API token from your profile settings and add it to the .env file:
NEXUS_API_KEY=...
  1. Build the release binary by running cargo build --release.
  2. See ./target/release/modmapper -h for further commands or run ./scripts/update.sh to start populating the database with scraped mods and dumping the data to JSON files.

Nexus Mods user credentials

Nexus Mods filters out adult-only mods unless you are logged in and have set your content filters to allow adult mods. Modmapper works without Nexus Mods user credentials, but if you would like to add your user credentials so that adult mods are included then edit the .env file and add values for NEXUS_MODS_USERNAME and NEXUS_MODS_PASSWORD.

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_REMOTE
  • STATIC_SERVER_CELLS_BUCKET
  • STATIC_SERVER_MODS_BUCKET
  • STATIC_SERVER_PLUGINS_BUCKET
  • STATIC_SERVER_FILES_BUCKET
  • BACKUP_SERVER_REMOTE
  • BACKUP_SERVER_BUCKET