Downloads every Skyrim mod plugin from nexusmods.com and saves CELL edits of each to a database
https://modmapper.com
Tyler Hallada
a0aa24f360
There's not much I can do for plugins with invalid headers (e.g. TES4 Oblivion plugins), so just log the error and skip over it. A plugin row will not be created in the DB for invalid plugins. It was useful to crash the process on parse errors before when I was working out the kinks in the parser, but I think I'm confident enough in it now to skip over the parse failures and defer analyzing the failures until after the fact to make sure there still isn't a bug in the parser and I skipped over a valid TES5 plugin. Also fixes the plugin span logging in the delate64 error case when extracting zip files. |
||
---|---|---|
migrations | ||
src | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
README.md |
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
.env
file to the project directory with the contents:
DATABASE_URL=postgresql://modmapper:<password>@localhost/modmapper
RUST_LOG=mod_mapper=debug
- Install
sqlx_cli
withcargo install sqlx-cli --no-default-features --features postgres
- Run
sqlx migrate --source migrations run
which will run all the database migrations. - Get your personal Nexus API token from your profile settings and add it to the
.env
file:
NEXUS_API_KEY=...
- Either run
cargo run
for development mode, or build the release binary withcargo build --release
, which will get saved totarget/release/
.