Downloads every Skyrim mod plugin from nexusmods.com and saves CELL edits of each to a database https://modmapper.com
Go to file
Tyler Hallada 5d55e78283 Dump plugins by hash instead of id
The same exact plugins are often included in many different files/mods. Grouping by hash in the sql query will show all files and mods a plugin appears in. Previously, the last file that was processed would overwrite the plugin file and only that single file/mod would appear in the file.

Also adds an index on plugins.hash since I'm now querying directly on it.
2022-03-12 13:05:21 -05:00
migrations Dump plugins by hash instead of id 2022-03-12 13:05:21 -05:00
scripts Dump plugins data with file and mod data 2022-03-10 22:32:46 -05:00
src Dump plugins by hash instead of id 2022-03-12 13:05:21 -05:00
.gitignore Add option for generating mod files 2022-01-24 01:24:15 -05:00
Cargo.lock Add cli option to save cell data json to directory 2022-01-17 19:25:07 -05:00
Cargo.toml Add cli option to save cell data json to directory 2022-01-17 19:25:07 -05:00
drop_all.sql Rename drop_all.sql file 2021-07-29 01:01:27 -04:00
README.md Add some .env instructions to readme 2021-07-11 22:59:53 -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. Either run cargo run for development mode, or build the release binary with cargo build --release, which will get saved to target/release/.