{"id":18597570,"url":"https://github.com/lealre/folder-sync","last_synced_at":"2025-05-16T13:33:53.782Z","repository":{"id":243300709,"uuid":"811029413","full_name":"lealre/folder-sync","owner":"lealre","description":"A program designed to synchronize files between two folders","archived":false,"fork":false,"pushed_at":"2024-06-08T21:24:24.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T23:45:28.346Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/lealre.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":"2024-06-05T20:03:12.000Z","updated_at":"2024-06-11T21:10:56.000Z","dependencies_parsed_at":"2024-06-07T22:23:27.012Z","dependency_job_id":"74c16d21-d4f5-466e-9f6b-89f854ecb700","html_url":"https://github.com/lealre/folder-sync","commit_stats":null,"previous_names":["lealre/folder-sync"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lealre%2Ffolder-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lealre%2Ffolder-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lealre%2Ffolder-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lealre%2Ffolder-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lealre","download_url":"https://codeload.github.com/lealre/folder-sync/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254538625,"owners_count":22087896,"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-11-07T01:28:38.086Z","updated_at":"2025-05-16T13:33:53.764Z","avatar_url":"https://github.com/lealre.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Folder Synchronization for File Backup\n\nThis repository hosts an implementation of a program designed to synchronize two folders: a source and a replica.\n\nThe program's objective is to ensure that the replica folder maintains a complete, identical copy of the source folder.\n\n- Synchronization must be one-way: after the synchronization content of the replica folder should be modified to exactly match content of the source folder;\n- Synchronization should be performed periodically;\n- File creation/copying/removal operations should be logged to a file and to the console output;\n- Folder paths, synchronization interval and log file path should be provided using the command line arguments;\n\nThis synchronization is achieved using only built-in Python libraries.\n\n## How it works\n\nUsing the command line, the user sets the following inputs:\n\n- `--source_path`: The path of the source directory, from where the files will be backed up. If the directory does not exist, it will show a message to the user.\n- `--replica_path`: The path of the replica directory, where the files from the source directories will be stored. If the directory does not exist, it will show a message to the user.\n- `--log_path`: The path of the log file, where all modifications in replica folder folders will be recorded. If the file path does not exist, it will show a message to the user.\n- `--sync_time`: The synchronization interval.\n\nFrom there, the script runs until it is interrupted by the user, recording all modifications of files in the replica folder in the log file, as well as any eventual errors during the process that may stop it from running. The messages are also displayed in the interface.\n\n\n## How to run locally\n\nAll the steps here are intended to a `bash` terminal.\n\n1. Clone the repository locally\n```bash\ngit clone https://github.com/lealre/folder-sync.git\n```\n\n2. Enter the project folder\n```bash\ncd folder-sync\n```\n\n3. Set the local Python version (Optional - Requires [`pyenv`](https://github.com/pyenv/pyenv))\n```bash\npyenv local 3.12.2\n```\n\nAs it uses just built-in Python packages, steps 4 and 5 are optional.\n\n4. Create a virtual environment (Optional)\n```bash\npython -m venv .venv\n```\n\n5. Activate virtual environment (Optional)\n```bash\n source .venv/bin/activate\n```\n\n6. Run the program locally by replacing `\u003cSOURCE_FOLDER_PATH\u003e` with the actual source folder path, `\u003cREPLICA_FOLDER_PATH\u003e` with the replica folder path, `\u003cFILE_PATH\u003e` with the log file path, and `\u003cSYNC_INTERVAL\u003e` with the synchronization interval.\n\n\n```bash\npython app --source_path=\u003cSOURCE_FOLDER_PATH\u003e --replica_path=\u003cREPLICA_FOLDER_PATH\u003e --log_path=\u003cFILE_PATH\u003e --sync_time=\u003cSYNC_INTERVAL\u003e\n```\n\nTo run it as it is in the cloned project, simply execute the following command\n```bash\npython app  --source_path=data/source --replica_path=data/replica --log_path=logs/log.txt --sync_time=10\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flealre%2Ffolder-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flealre%2Ffolder-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flealre%2Ffolder-sync/lists"}