{"id":19783294,"url":"https://github.com/psychedelicshayna/folder-indexer","last_synced_at":"2025-10-13T00:53:36.930Z","repository":{"id":108568176,"uuid":"234084323","full_name":"PsychedelicShayna/folder-indexer","owner":"PsychedelicShayna","description":"Ruby script that can build a hash index of a folder and re-evaluate or compare it with another index later to determine what files are new, removed, and modified. Directory checksum also included.","archived":false,"fork":false,"pushed_at":"2020-10-03T23:02:53.000Z","size":113,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T13:10:06.341Z","etag":null,"topics":["checksum","diffing","directory-analyzer","directory-index","directory-utilities","folder-analyzer","hashing"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/PsychedelicShayna.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":"2020-01-15T13:15:50.000Z","updated_at":"2020-10-03T23:02:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"7cc49bae-f4d2-4932-b635-d026788fa196","html_url":"https://github.com/PsychedelicShayna/folder-indexer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PsychedelicShayna/folder-indexer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsychedelicShayna%2Ffolder-indexer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsychedelicShayna%2Ffolder-indexer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsychedelicShayna%2Ffolder-indexer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsychedelicShayna%2Ffolder-indexer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PsychedelicShayna","download_url":"https://codeload.github.com/PsychedelicShayna/folder-indexer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsychedelicShayna%2Ffolder-indexer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013646,"owners_count":26085298,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["checksum","diffing","directory-analyzer","directory-index","directory-utilities","folder-analyzer","hashing"],"created_at":"2024-11-12T06:07:51.893Z","updated_at":"2025-10-13T00:53:36.925Z","avatar_url":"https://github.com/PsychedelicShayna.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Folder Indexer\nThis Ruby script combo allows for two things: folder indexing, and folder checksumming.\n\n## findexer.rb\nThe primary script. This script can generate a folder \"index\" (.json) containing a dictionary of every single file in a directory, and its corresponding hexdigest (sha256), as well as a hexdigest of the root folder (calculated by summing the hexdigests of every file, in alphabetical order). This index can be compared with another index, or re-evaluated (essentially generating a new index of the same directory in memory and comparing it without ever storing it in a file).\n\n### Command Line Arguments\n- `--mode(-m) [build | compare | reval]` Specifies the operation mode. The rest of the arguments depend on what mode has been set.\n\n- `--input(-i)` Applies to `build` and `reval` - specifies the target directory in the case of `build`. Specifies an index file in case of `reval`.\n\n- `--output(-o)` Applies to `build` - specifies where to write the index. If left unspecified, stdout is used instead.\n\n- `--old-index(-oi)` Applies to `compare` - specifies the \"old\" index in the comparison. Affects whether or not a file is treated as new/absent.\n\n- `--new-index(-ni)` Applies to `compare` - specifies the \"new\" index in the comparison. Affects whether or not a file is treated as new/absent.\n\n### Example Usage\n```\nλ findexer --mode build --input . --output ../index.json\nλ echo \"Hello World!\" \u003e hello_world.txt\nλ echo \"The magic number is: 42\" \u003e magic_number.txt\nλ findexer --mode reval --input ../index.json\n\nDISCREPANCY IN SHA512 DIRECTORY HASHES, FURTHER COMPARISONS IN PROGRESS..\n------------------------------------------------------------------------------------------------------------------------------------\nOLD cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e\nNEW 2b5801d08603c0d5f4db58b71dc5ff22e1e3d3b88ac43dcc4468d1cbbaf3c4631c066a848818c4ed52fb329ec8a9ea77aa470d397040f2d938d1a9c8da6fa96c\n------------------------------------------------------------------------------------------------------------------------------------\n\nNEW FILE....... ./hello_world.txt\n- (de02dc0b26d5826c0ccd4e4c60178713d645c2082d1bce10b3501233df20d8cf)\n\nNEW FILE....... ./magic_number.txt\n- (1d72c70935282b87d002e2dfff6f771a0ab46bbacd2c2ab8ca81bb2b56617465)\n\n------------------------------------------------------------------------------------------------------------------------------------\n\nλ findexer --mode build --input . --output ../index_new.json\nλ echo \"The magic number is: 420\" \u003e magic_number.txt\nλ findexer --mode build --input . --output ../index_new_2.json\nλ findexer --mode compare --old-index ../index_new.json --new-index ../index_new_2.json\n\nDISCREPANCY IN SHA512 DIRECTORY HASHES, FURTHER COMPARISONS IN PROGRESS..\n------------------------------------------------------------------------------------------------------------------------------------\nOLD 2b5801d08603c0d5f4db58b71dc5ff22e1e3d3b88ac43dcc4468d1cbbaf3c4631c066a848818c4ed52fb329ec8a9ea77aa470d397040f2d938d1a9c8da6fa96c\nNEW 52cf3c915bb75d5c2b439d846b65e3979c0f77f18340be14bc88c1731c1dc3ebeb86d9650a15c56ccaeb8ecd387ad49da4932297c7e7b747d285311d65a6dbe8\n------------------------------------------------------------------------------------------------------------------------------------\n\nFILE MODIFIED.. ./magic_number.txt\n- OLD: (1d72c70935282b87d002e2dfff6f771a0ab46bbacd2c2ab8ca81bb2b56617465)\n- NEW: (14c5ce23c0bf418946ae68c5f9871d9e129a511632111abb46750eeb12df9c3e)\n\n------------------------------------------------------------------------------------------------------------------------------------\n\nλ rm *.txt\nλ findexer --mode reval --input ../index_new.json\n\nDISCREPANCY IN SHA512 DIRECTORY HASHES, FURTHER COMPARISONS IN PROGRESS..\n------------------------------------------------------------------------------------------------------------------------------------\nOLD 2b5801d08603c0d5f4db58b71dc5ff22e1e3d3b88ac43dcc4468d1cbbaf3c4631c066a848818c4ed52fb329ec8a9ea77aa470d397040f2d938d1a9c8da6fa96c\nNEW cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e\n------------------------------------------------------------------------------------------------------------------------------------\n\nFILE ABSENT.... ./hello_world.txt\n- (de02dc0b26d5826c0ccd4e4c60178713d645c2082d1bce10b3501233df20d8cf)\n\nFILE ABSENT.... ./magic_number.txt\n- (1d72c70935282b87d002e2dfff6f771a0ab46bbacd2c2ab8ca81bb2b56617465)\n\n------------------------------------------------------------------------------------------------------------------------------------\n```\n\n## dirsum.rb\nThe secondary script. Can be used to perform a checksum of an entire directory by hashing every file in the directory and sorting the hexdigests in alphabetical order before feeding them into the digest object's update function one by one.\n\n### Command Line Arguments\n- `--input(-i)` The path to the directory that should be checksummed.\n- `--sha(-s)` The sha2 mode, can be either 256, 384, or 512.\n\n### Example Usage\n```\nλ dirsum --input ../../lspm -sha 384                                                                                                                                        \nScanning for files..\n463 Files queued for hashing..\n....100.0% --\u003e main_dlg.ui\nHexdigest of  463 files: 73e0235375c98fc41db3d7804546ff626269b63c260476a00cf45b14fd50e00f\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsychedelicshayna%2Ffolder-indexer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsychedelicshayna%2Ffolder-indexer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsychedelicshayna%2Ffolder-indexer/lists"}