{"id":17036498,"url":"https://github.com/emoon/modland_hash","last_synced_at":"2025-04-12T13:20:36.581Z","repository":{"id":139859138,"uuid":"469142678","full_name":"emoon/modland_hash","owner":"emoon","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-30T12:42:10.000Z","size":17710,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-26T07:51:16.383Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emoon.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-12T16:48:57.000Z","updated_at":"2024-10-18T09:10:03.000Z","dependencies_parsed_at":"2024-01-10T09:30:55.318Z","dependency_job_id":"ffa5dacb-dd8c-444a-9bf8-f4978630bf52","html_url":"https://github.com/emoon/modland_hash","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emoon%2Fmodland_hash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emoon%2Fmodland_hash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emoon%2Fmodland_hash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emoon%2Fmodland_hash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emoon","download_url":"https://codeload.github.com/emoon/modland_hash/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248571836,"owners_count":21126522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T08:50:43.712Z","updated_at":"2025-04-12T13:20:36.553Z","avatar_url":"https://github.com/emoon.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"## About\n\nmodland_hash is a tool for [ftp.modland.com](https://ftp.modland.com) It's used to find duplicates and includes various filtering options.\nThe most basic use case is to run the tool and it will match the local files against the modland database and see if the files already exists on modland.\nCommandline options are as following:\n```\n  -b, --build-database \u003cBUILD_DATABASE\u003e\n          Builds a new database from a given local directory\n  -d, --download-database\n          Downloads the remote database (automatically performed if it doesn't exist)\n  -m, --match-dir \u003cMATCH_DIR\u003e\n          Directory to search against the database. If not specified, the current directory will be used [default: .]\n  -r, --recursive\n          Performs recursive scanning (includes sub-directories) when using --match-dir and --build-database\n      --match-samples\n          Instead of matching on hash or pattern hash match the samples in the files\n      --find-samples-with-length \u003cFIND_SAMPLES_WITH_LENGTH\u003e\n          Search the database for samples matching a certain length (length is in samples)\n      --find-samples-with-length-bytes \u003cFIND_SAMPLES_WITH_LENGTH_BYTES\u003e\n          Search the database for samples matching a certain length (length is in bytes)\n      --exclude-file-extensions \u003cEXCLUDE_FILE_EXTENSIONS\u003e\n          Skips files with these extensions if any duplicates are found. Example: --skip-file-extensions \"mdx,pdx\" will skip all duplicates that contain .mdx and .pdx files (case-insensitive) [default: ]\n      --exclude-paths \u003cEXCLUDE_PATHS\u003e\n          Skips duplicates that match these paths. Example: --exclude-paths \"/pub/favourites\" will exclude results where \"/pub/favourites\" is present [default: ]\n  -i, --include-file-extensions \u003cINCLUDE_FILE_EXTENSIONS\u003e\n          Includes only duplicates with these file extensions; other files will be skipped. Example: --include-file-extensions \"mod,xm\" will include only matches for .mod and .xm files [default: ]\n      --include-paths \u003cINCLUDE_PATHS\u003e\n          Includes matches only if duplicates match these file paths. Example: --include-paths \"/incoming\" will show results only when at least one file matches \"/incoming\" [default: ]\n      --include-sample-name \u003cINCLUDE_SAMPLE_NAME\u003e\n          Includes matches only if one of the duplicates matches the specified regexp pattern for sample names. Example: --include_sample_name \".*ripped.*\" will include duplicates where one of the tracks' sample names contains \"ripped\" [default: ]\n      --search-filename \u003cSEARCH_FILENAME\u003e\n          Displays duplicate results only if one of the entries includes a matching filename. Example: --search-filename \".*north.*\" will include results only if one of the entries has \"north\" in it (case-insensitive) [default: ]\n  -p, --print-sample-names\n          Enables printing of sample names\n  -l, --list-duplicates-in-database\n          Lists existing duplicates in the database\n      --list-database\n          Dumps all information in the database\n      --dump-patterns\n          Primarily a debug option to allow dumping of pattern data when building the database and matching entries\n  -h, --help\n          Print help\n  -V, --version\n          Print version\n  -b, --build-database \u003cBUILD_DATABASE\u003e\n            Builds a new database given a local directory\n```\n\n## Downloading\n\nBuilds of the tool can be found here https://github.com/emoon/modland_hash/releases (Windows and macOS) \n\n## Examples\n\nTo match the local files just run the tool without any options\n\n```\nmodland_hash\n```\n\nTo match the local files but only include .mod and .xm files \n\n```\nmodland_hash --include-file-extensions \"mod,xm\"\n```\n\nTo match the local files but only include .mod and .xm files and only include duplicates that match the \"/incoming\" path\n\n```\nmodland_hash --include-file-extensions \"mod,xm\" --include-paths \"/incoming\"\n```\n\nTo match the local files but only include .mod and .xm files and only include duplicates that match the \"/incoming\" path and only include duplicates that match the \".*north.*\" regexp pattern in the filename\n\n```\nmodland_hash --include-file-extensions \"mod,xm\" --include-paths \"/incoming\" --search-filename \".*north.*\"\n```\n\nMatch the local files but match the samples in the files instead of the files themselves\n\n```\nmodland_hash --match-samples\n```\n\nList all duplicates in the database\n\n```\nmodland_hash --list-duplicates-in-database\n```\n\nDump all information in the database and only include songs with the sample name \"ripped\" in them\n\n```\nmodland_hash --list-database --include-sample-name \".*ripped.*\"\n```\n\nFind all samples in the database with a length of 8700 and matching the text \"ahhvox\"\n\n```\nmodland_hash --find-samples-with-length-bytes 8700 --include-sample-name '.*ahhvox.*'`\n```\n\n## Database\n\nThe database is a SQLite database that can be downloaded from here https://www.dropbox.com/scl/fi/gtk2yri6iizlaeb6b0j0j/modland_hash.db.7z?rlkey=axcrqv54eg2c1yju6vf043ly1\u0026dl=1\nIt's updated every 24 hours and contains all the files on ftp.modland.com. If the modland_hash tool doesn't fit your needs, you can use the database directly in a tool such as https://sqliteonline.com or write your own tool to query the database. \n\n## Compiling\n\nTo compile the code you need to have the [Rust](https://www.rust-lang.org) compiler instead. You also need a C++ compiler which depends on your OS (usually MSVC on Windows and clang/gcc on *Nix, macOS)\n\n1. Download Rust from here https://rustup.rs and follow the instructions for your platform\n2. `git clone https://github.com/emoon/modland_hash`\n3. `cd modland_hash \u0026\u0026 cargo build --release`\n4. Use `modland_hash` by running `target/release/modland_hash` or `cargo run --release -- \u003ccommand line ops here\u003e`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femoon%2Fmodland_hash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femoon%2Fmodland_hash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femoon%2Fmodland_hash/lists"}