{"id":23862838,"url":"https://github.com/decuser/decuser_python_playground","last_synced_at":"2026-06-03T00:30:17.532Z","repository":{"id":48281994,"uuid":"227182841","full_name":"decuser/decuser_python_playground","owner":"decuser","description":"A repository for python scripts of interest","archived":false,"fork":false,"pushed_at":"2024-12-22T04:53:48.000Z","size":162,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-03T07:30:19.197Z","etag":null,"topics":["directory-comparator","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/decuser.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}},"created_at":"2019-12-10T17:51:44.000Z","updated_at":"2024-12-22T04:40:31.000Z","dependencies_parsed_at":"2022-09-08T01:51:01.430Z","dependency_job_id":null,"html_url":"https://github.com/decuser/decuser_python_playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decuser%2Fdecuser_python_playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decuser%2Fdecuser_python_playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decuser%2Fdecuser_python_playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decuser%2Fdecuser_python_playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/decuser","download_url":"https://codeload.github.com/decuser/decuser_python_playground/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240170085,"owners_count":19759145,"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":["directory-comparator","python"],"created_at":"2025-01-03T07:24:15.458Z","updated_at":"2026-06-03T00:30:17.483Z","avatar_url":"https://github.com/decuser.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# decuser_python_playground\nA repository for python scripts of interest\n\n# News\n20241221 I am in the process of refactoring the program in anticipation of adding a GUI (tkinter). Before I start on the GUI transition, I am modularizing, formalizing the configuration, adding logging (with all output being through the logger, vastly improving the progress tracking, adding explanatory comments, and generally making the code better. A lot of this is complete, but in testing. Once it's tested, I will merge it into master and it will become the next version, may as well call it version 1 at that point. The GUI version will most definitely be version 2. If you want to see the new code, as I work on it (I commit when I think it's working, but occasionally, it's got bugs), it's the pre-gui branch.\n\n# Version History\n* 20210804 v0.7.3 - Added compact output\n* 20210804 v0.7.2 - Bugfix: Issue with directories added to filelist\n* 20210804 v0.7.1 - Bugfix: -b -s flags not working\n* 20210802 v0.7.0 - Added single directory support and fixed counting\n* 20200620 v0.6.2 - Added version argument\n* 20191218 v0.6.1 - Bugfixes: Empty source dir and hidden files issue\n* 20191218 v0.6.0 - Refactored, embraced global data structures\n* 20191216 v0.5.1 - Added fast digest support\n* 20191212 v0.5.0 - Added recursion, hidden file support, and version scheme change\n* 20191210 v0.4.0 - Refactor, comments, added same name diff digest\n* 20191210 v0.3.0 - Added argparse functionality and brief mode\n* 20191210 v0.2.0 - Added duplicate checking in src and dst\n* 20191210 v0.1.0 - Initial working version\n\n# First up - dircmp.py, a *nix utility to compare two directories\nWhat it does is:\n\n* Calculate sha1 checksums for all non-hidden files in a src and dst directory\n* Supports recursion\n* Supports hidden directories and files\n* Supports fast digests (not terribly accurate, but sufficient for quick scanning)\n* Supports single directory analysis\n* Gets a list and count of files that:\n  * Only exist in src\n  * Only exist in dst\n  * Exist in both\n  * Are duplicates in src\n  * Are duplicates in dst\n  * Have the same name in both, but different checksums\n  * Have the same checksums, but different names\n\n## Systems Tested\n* Tuxedo OS 202412 with Python 3.9.21\n* Linux Mint 22 with Python 3.9.21\n* Mac OS X 10.16.7 with Python 3.9.21\n* Mac OS X 10.14.6 with Python 3.9.4\n* 10.15.1 Catalina with Python 3.7.3\n* Linux Mint 19.2 Tina with Python 3.7.5\n\n## Notes\nI was tired of trying to understand other compare utilities that didn't seem to do quite what I wanted them to. This utility lets me see exactly what the state of the two directories are relative to each other. I use it to detect duplicates and to bring to directory trees into synchronization.\n\nThe utility isn't optimized, but it's good for most work. One of these days, I'll have to do some optimization. That said, it's very accurate. \n\n## Test Run\n```\ngit clone https://github.com/decuser/decuser_python_playground.git\ncd decuser_python_playground/dircmp\npython dircmp.py tests/src tests/dst\n\n+----------------------------------+\n| Welcome to dircmp version 0.7.3  |\n| Created by Will Senn on 20191210 |\n| Last updated 20210805            |\n+----------------------------------+\nArguments: tests/src tests/dst\nDigest: sha1\nSource (src): tests/src/\nDestination (dst): tests/dst/\nCompact mode: False\nSingle directory mode: False\nShow all files: False\nRecurse subdirectories: False\nCalculate shallow digests: False\n\nScanning src ... 9 files found (0.01s).\nCalculating sha1 digests in src .... done (0.0s).\nScanning dst ... 7 files found (0.0s).\nCalculating sha1 digests in dst ..... done (0.0s).\nAnalyzing src directory ...done (0.0s).\nAnalyzing dst directory ...done (0.0s).\nComparing src to dst ...done (0.0s).\nComparing dst to src ...done (0.0s).\nChecking for different names, same digest ...done (0.0s).\n\nDuplicates found in tests/src/: 6 files found.\n0026a27ffa78a4a4963175c35fbee11c332049ed same_in_both\n0026a27ffa78a4a4963175c35fbee11c332049ed same_in_both_copy\nc62a323c301dfb0f3cc8e27609c7f507d1965b64 only_in_src\nc62a323c301dfb0f3cc8e27609c7f507d1965b64 only_in_src_copy\nda39a3ee5e6b4b0d3255bfef95601890afd80709 empty\nda39a3ee5e6b4b0d3255bfef95601890afd80709 empty_in_both\n\nDuplicates found in tests/dst/: 2 files found.\n0026a27ffa78a4a4963175c35fbee11c332049ed same_in_both\n0026a27ffa78a4a4963175c35fbee11c332049ed same_in_both_copy\n\nExact matches: 4 files found.\n75093aa729169179c9dbbca6aa2d95a97865ca03 b_same_in_both\nda39a3ee5e6b4b0d3255bfef95601890afd80709 empty_in_both\n0026a27ffa78a4a4963175c35fbee11c332049ed same_in_both\n0026a27ffa78a4a4963175c35fbee11c332049ed same_in_both_copy\n\nOnly in tests/src/: 2 files found.\nc62a323c301dfb0f3cc8e27609c7f507d1965b64 only_in_src\nc62a323c301dfb0f3cc8e27609c7f507d1965b64 only_in_src_copy\n\nOnly in tests/dst/: 1 files found.\n36969b074153d1e76fbd43fb3d3c59802b5f730d only_in_dst\n\nSame names but different digests: 2 files found.\nin_both_diff_content src:e3bbf99ae9bb23804155b25a82a943e8757fc07a\nin_both_diff_content dst:2690814b054f2ddf3435a30a65506ce4bedba1d2\n\nDifferent names but same digests: 8 files found.\n0026a27ffa78a4a4963175c35fbee11c332049ed src:same_in_both\n0026a27ffa78a4a4963175c35fbee11c332049ed src:same_in_both_copy\n0026a27ffa78a4a4963175c35fbee11c332049ed dst:same_in_both\n0026a27ffa78a4a4963175c35fbee11c332049ed dst:same_in_both_copy\n6476df3aac780622368173fe6e768a2edc3932c8 src:in_src_same_content_diff_name\n6476df3aac780622368173fe6e768a2edc3932c8 dst:in_dst_same_content_diff_name\nda39a3ee5e6b4b0d3255bfef95601890afd80709 src:empty\nda39a3ee5e6b4b0d3255bfef95601890afd80709 dst:empty_in_both\n\nSummary\n-------\nStarted at 2024-12-21 22:28:01.651505\n4 dirs, 16 files analyzed including tests/src/ and tests/dst/.\n0 dirs, 9 files found in tests/src/.\n2 dirs, 7 files found in tests/dst/.\n6 duplicate files found in tests/src/.\n2 duplicate files found in tests/dst/.\n4 exact matches found.\n2 files only exist in tests/src/.\n1 files only exist in tests/dst/.\n2 files have same names but different digests.\n8 files have different names but same digest.\nFinished at 2024-12-21 22:28:01.657768\n\nTotal running time: 0.01s.\n```\n## Known Issues\n\n* the comparison effectively ignores empty directories - git ignores them too and this \n\tmakes git hosted tests problematic for this sorta thing\n\n## Quirks\n\n* 20210803 \"Only in\" refers to file content, not filename, so a filename might exist in only one of the trees being compared, but if its contents match a file in the other tree, it will not be listed in \"Only in\". It will be noted in \"Different names but same digests\"\n\nFor example: In src, there's a file named only_in_src that contains the letter 'a'. In dst, there's a file named only_in_dst that contains the letter 'a'. The comparison would show 0 files Only in src, 0 files Only in dst and 2 files Different names but same digests. To be clear, the program privileges content over names. An enhancement would be to support Names only in and Content only in...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecuser%2Fdecuser_python_playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdecuser%2Fdecuser_python_playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecuser%2Fdecuser_python_playground/lists"}