{"id":21992402,"url":"https://github.com/josttim/foldermerge","last_synced_at":"2026-04-28T18:03:43.022Z","repository":{"id":215533369,"uuid":"739178025","full_name":"JostTim/foldermerge","owner":"JostTim","description":"CLI tool allowing to check and merge a \"main\" folder with older versions, removing duplicates and trying to keep main folder organization.","archived":false,"fork":false,"pushed_at":"2024-10-24T04:54:46.000Z","size":21096,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-28T09:49:57.838Z","etag":null,"topics":["flask","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JostTim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-01-05T00:31:29.000Z","updated_at":"2024-07-19T22:42:59.000Z","dependencies_parsed_at":"2024-05-28T19:08:02.169Z","dependency_job_id":null,"html_url":"https://github.com/JostTim/foldermerge","commit_stats":null,"previous_names":["josttim/foldermerge"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JostTim%2Ffoldermerge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JostTim%2Ffoldermerge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JostTim%2Ffoldermerge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JostTim%2Ffoldermerge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JostTim","download_url":"https://codeload.github.com/JostTim/foldermerge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245052619,"owners_count":20553161,"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":["flask","python"],"created_at":"2024-11-29T20:13:41.309Z","updated_at":"2026-04-28T18:03:37.990Z","avatar_url":"https://github.com/JostTim.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm-project.org)\n\n# File Hashing and Directory Comparison Tool\n\nThis project provides a Python utility for hashing files within directories, comparing directory contents, and assisting with folder merging. It is designed to be used on local filesystems where you need to compare folders, identify duplicates, and potentially merge them.\n\n## Features\n\n- **Hash Generation**: Create SHA1 hashes for files to efficiently compare content.\n- **Directory Comparison**: Compare files across directories by name and content.\n- **Merging Assistance**: Identify identical, moved, and modified files to help with directory merging.\n- **Status Tracking**: Store and track the status of operations in a JSON file.\n\n## Usage\n\nTo use this tool, simply instantiate the `FolderMerger` class with the destination repository and the source repositories you want to compare and potentially merge. The class will automatically scan the directories, generate hashes, and prepare comparisons.\n\nHere is a basic example of how to use the tool:\n\n\n```python\nfrom pathlib import Path\nfrom file_hashing_tool import FolderMerger\n\n\n# Define the destination directory and the list of source directories\n\ndestination_dir = Path(\"path/to/destination\")\nsource_dirs = [Path(\"path/to/source1\"), Path(\"path/to/source2\")]\n\n\n# Create a FolderMerger instance\n\nmerger = FolderMerger(destination_dir, source_dirs)\n\n\n# Perform comparison and generate report\n\ncomparison_report = merger.report()\n\n\n# Print the report to view the comparison results\n\nfor report in comparison_report:\n    print(report)\n```\n\n## Requirements\n\n- python 3.7+\n- pandas\n- tqdm\n\n## Components\n\n- `HashLibrary`: Class responsible for generating and storing file hashes.\n- `FolderChecker`: Class for scanning directories and storing file information.\n- `FolderComparator`: Class for comparing two folders and identifying differences.\n- `Folders`: Utility class to organize and access multiple `FolderChecker` instances.\n- `FolderMerger`: Main class to orchestrate directory comparison and merging.\n\n## Clearing Results\n\nTo clear any saved results and statuses, you can call the `clear_results` function which will remove all saved `.pickle` and `status.json` files from the default results path (typically `~/Downloads/FILE_HASHES`).\n\n## Development\n\nThe project is modular, allowing for easy extension and customization. New comparison strategies or different hashing algorithms can be added by extending the relevant classes.\n\n## License\n\nThis project is open-source and available under the [MIT License](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosttim%2Ffoldermerge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosttim%2Ffoldermerge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosttim%2Ffoldermerge/lists"}