Giter Site home page Giter Site logo

dmodman's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dmodman's Issues

do not rely on Rust nightly

It seems like currently building with rust nighly is required, otherwise the following error occurs:

use of unstable library feature 'binary_heap_retain'

Cache directory not automatically created

The program failed with error Error: IOError { source: Os { code: 2, kind: NotFound, message: "No such file or directory" } } until I created ~/.local/share/dmodman/ manually.

error when saving metadata: Invalid length 2, expected fewer elements in array /api/query/queriable.rs:20:96

When downloading Starfield mod 454 Enhanced Player Healthbar - WYOR the file downloads fine but there is a bug with writing metadata.

Couldn't copy the text so screenshot and if I didn't made a mistake in rewriting it:

thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap() on an `Err` value: Error("Invalid length 2, expected fewer elements in array" line: 0, column: 0), src /api/query/queriable.rs:20:96

EDIT: I am using the built binary from releases: https://github.com/dandels/dmodman/releases/download/v0.2.2/dmodman

type error in test

I am not particularly well-versed in Rust, but I think there might be an unwrap missing:

diff --git a/src/cache/cacheable.rs b/src/cache/cacheable.rs
index ab2b5eb..f0d6508 100644
--- a/src/cache/cacheable.rs
+++ b/src/cache/cacheable.rs
@@ -53,7 +53,7 @@ mod tests {
         println!("{:?}", path);

         let mi: ModInfo = ModInfo::load(path).await?;
-        assert_eq!(mi.name, "Graphic Herbalism - MWSE and OpenMW Edition");
+        assert_eq!(mi.name.unwrap(), "Graphic Herbalism - MWSE and OpenMW Edition");
         Ok(())
     }

Error message while testing dmodman

I just installed dmodman v0.2.2 (the latest tagged version on GitHub at the time of writing) and downloaded a few popular mods to test it.

Some time while I wasn't looking due to browsing and clicking download buttons on nexusmods, dmodman emitted some error message that messed up the GUI until quitting via q and restarting dmodman.

Screenshot_20231029_091846

The message seems to suggest that an error state was improperly processed, but you probably know more about what it means, than I do.

The list of mods I downloaded so far, in case the file or filename is relevant:

  • Unofficial Skyrim Special Edition Patch-266-4-2-9a-1685216241.7z
  • SkyUI_5_2_SE-12604-5-2SE.7z
  • Ordinator 9.31.0-1137-9-31-0-1635693140.zip
  • A Quality World Map - Classic with All Roads-5804-8-4CA.zip
  • Apocalypse - Ordinator Compatibility Patch WHY DO I HAVE TO CHANGE THE NAME-1090-.zip
  • Apocalypse v945-1090-9-45.zip
  • KS Hairdos SSE-6817-1-9-1645369981.7z
  • Mannaz 3.0.1-87219-3-0-1-1689266411.zip
  • Freyr 1.2.0-88043-1-2-0-1688923816.zip

If you already resolved this issue since release v0.2.2, feel free to just close the issue. ๐Ÿ™‚

binary heap retain issue

during cargo build (or run) --release:

   Compiling reqwest v0.11.18
   Compiling dmodman v0.2.2 (/home/pulec/git/dmodman)
error[E0658]: use of unstable library feature 'binary_heap_retain'
  --> src/cache/mod.rs:94:14
   |
94 |         heap.retain(|fdata| fdata.file_id != id_to_delete);
   |              ^^^^^^
   |
   = note: see issue #71503 <https://github.com/rust-lang/rust/issues/71503> for more information

For more information about this error, try `rustc --explain E0658`.
error: could not compile `dmodman` due to previous error

I am not any smarter after scrolling through the talk at the mentioned issue.

rustc explain wants me to use rustc nightly or something?

Uff, rusty issue.

mismatching Cargo.toml and Cargo.lock

While trying to package this for https://github.com/NixOS/nixpkgs an error occured with cargo build --frozen (nix does not allow cargo to download dependencies on build and vendors thembeforehand):

error: the lock file /tmp/dmodman/Cargo.lock needs to be updated but --frozen was passed to prevent this
If you want to try to generate the lock file without accessing the network, remove the --frozen flag and use --offline instead.

It seems Cargo.toml and Cargo.lock do not match in v0.2.3.

Exporting finished download to another application or script

I realized that my initial description for this issue was too rambly and too narrowly focused on my own code, so I'll try again:

Is there some way to easily "export" a completed download to another terminal command for further processing? If not, how bothersome would something like that be to implement into dmodman?

What I'd be ideally looking for would be some way to give dmodman a template command and have it execute that on the desired file(s) after filling in some variable(s).

For my usecase it would at minimum need to be able to fill-in the path location of the completed download into the command.

Ideally, providing additional metadata (like full mod name, mod author and the URL to the applicable nexusmods page) might be useful as well.

If this is not something you'd like to work on yourself, I fully understand. In that case I would appreciate it if you could give some guidance on what work would be needed if I wanted to implement it into dmodman (or a personal fork thereof) myself.

Original issue description (click to expand)

Hi!

I just became aware of this project a few hours ago through it's entry on the API key page of nexusmods and immediately had an idea I would like your opinion on.

For some context:

Due to the long-time lack of useful software for game modding on Linux, I have recently begun working on a CLI tool called modfs to help me cleanly mod my games (primarily Elder Scrolls).

You can find it here under the AGPLv3-only license: https://github.com/jotoho/modfs

The tasks of modfs are roughly:

  • to import mod files provided by the user
  • to store mods (and different mod versions installed at once) separate from each other, each in their own subdirectory
  • to allow basic managing of installed mods
  • to deploy active mods in the desired version into the game files using overlayfs
    • to prevent damage to the mod and game files
    • to avoid different mods permanently overwriting each other

So when I just discovered this repository, I couldn't help noticing that dmodman and modfs may be able to complement each other well - dmodman interacting with nexusmods and downloading mod files and modfs storing the files and managing the actual install / deployment process.

I haven't gotten around to using dmodman yet but I imagine the ideal scenario would be where you
could select a downloaded file, press a button/keybind and dmodman calls the modfs.py import command with the appropriate parameters and flags.

To finally get to my question: How complicated do you think it would be, to add an export functionality like that into dmodman?

From the modfs side of things, I believe dmodman would need three pieces of information from the user to be able to do this:

  • the path to the modfs.py script
  • the path to the modfs instance directory to use
  • the user's desired mod_id for this mod
    (The mod id is a short string that may contain lower-case letters a to z and the ten digits. It acts as the unique identifier of a given mod, both internally and in user commands.)

The script and instance locations would be tedious to type in by hand every time, so it would probably make more sense to have it stored in some configuration, or pass it to dpodman via CLI argument or environment variable.
The mod id might be different for every operation, so the user would have to provide that per export at runtime.

As things stand, the executed command would ideally look similar to this:

python3 /path/to/modfs.py --instance /path/to/instance/directory import <mod_id> /path/to/directory-or-archive.zip

Optionally, the following flags could be inserted between import and <mod_id> to teach modfs the correct metadata for this mod:

  • --set-name: the full name of the mod
  • --set-author: the username of the author on nexusmods
  • --set-link: the URL of the mod's page on nexusmods

If you aren't interested in adding a feature like this, I might look into doing it myself in a personal fork or for a pull request.

Thanks for taking the time to read this ๐Ÿ™‚

[feature request] Support for downloading mod collections

Downloading all the mods from a collection or collection itself (not sure about how does it work technically in Vortex etc.) would be a huge improvement in my opinion. I'm also aware that this feature may be pretty complicated to implement but definitely it's a topic worth considering.

Currently it obviously doesn't work and when given an collection URL as an argument, for example, dmodman "nxm://cyberpunk2077/collections/dfvt7o/revisions/55" we will see an error message in the application 0: Unable to parse nxm string "nxm://cyberpunk2077/collections/dfvt7o/revisions/55" invalid digit found in string.

Anyway, it's a great project and I'll definitely be using it :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.