{"id":28505321,"url":"https://github.com/ignacio-gn/git-overleaf-sync","last_synced_at":"2025-07-11T03:33:18.246Z","repository":{"id":296379537,"uuid":"992648281","full_name":"ignacio-gn/git-overleaf-sync","owner":"ignacio-gn","description":"Sync overleaf changes with git locally","archived":false,"fork":false,"pushed_at":"2025-06-20T19:26:23.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-06T12:39:17.731Z","etag":null,"topics":["overleaf","overleaf-sync"],"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/ignacio-gn.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,"zenodo":null}},"created_at":"2025-05-29T13:46:48.000Z","updated_at":"2025-06-20T19:26:26.000Z","dependencies_parsed_at":"2025-06-03T04:51:16.392Z","dependency_job_id":null,"html_url":"https://github.com/ignacio-gn/git-overleaf-sync","commit_stats":null,"previous_names":["ignacio-gn/git-overleaf-sync"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ignacio-gn/git-overleaf-sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ignacio-gn%2Fgit-overleaf-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ignacio-gn%2Fgit-overleaf-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ignacio-gn%2Fgit-overleaf-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ignacio-gn%2Fgit-overleaf-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ignacio-gn","download_url":"https://codeload.github.com/ignacio-gn/git-overleaf-sync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ignacio-gn%2Fgit-overleaf-sync/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264721529,"owners_count":23653949,"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":["overleaf","overleaf-sync"],"created_at":"2025-06-08T19:07:11.698Z","updated_at":"2025-07-11T03:33:18.239Z","avatar_url":"https://github.com/ignacio-gn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-overleaf-sync\nHelp with the process of downloading Overleaf projects, sync them into a local Git repository, generate AI-assisted commit messages, and sync the changes remotely.\n\n## Features\n- 🔄 Sync Overleaf Projects: Helps download .zip exports of Overleaf projects via Selenium.\n- 🧠 AI-Powered Commit Messages: Uses OpenWebUI with LLaMA model to generate meaningful commit messages based on git diff.\n- 🧪 Logging: Logs everything into timestamped log files.\n\n## Requirements\n- Python 3.9+\n- Firefox (for Selenium)\n- geckodriver in $PATH\n- Overleaf account (read-only share URL)\n- Git repository for syncing, git configuration set up \n- OpenWebUI instance with API access\n\n## Setup\n1. Install dependencies\n```bash\npip install -r requirements.txt\n```\n\n2. Set up .env\nCreate a .env file in the root directory:\n\n```env\nOVERLEAF_URL=https://www.overleaf.com/read/abc123...\nGIT_REPO_PATH=~/your/local/git/repo\nTMP_ZIP_FOLDER=/tmp/\nLOGS_FOLDER=/tmp/overleaf_logs\nOPENWEBUI_URL=http://localhost:3000\nAPI_KEY=your_openwebui_api_key\n```\n3. Install Firefox \u0026 Geckodriver\n\n4. Run the main script:\n\n```bash\npython main.py --overleaf_url https://www.overleaf.com/read/abc123 \\\n               --git_path ~/my-paper \\\n               --log_level DEBUG \\\n               --openwebui_url http://localhost:3000 \\\n               --api_key sk-abc...\n```\nYou can omit CLI args to use values from .env.\n\u003e [!NOTE]\n\u003e Configuring a cron job to run this script periodically is recommended for continuous syncing.\n\n\n## Environment Variables\n| Variable         | Description                                             |\n|------------------|---------------------------------------------------------|\n| `OVERLEAF_URL`   | Share URL of the Overleaf project (read-only)          |\n| `GIT_REPO_PATH`  | Path to the local Git repo where LaTeX files are synced |\n| `TMP_ZIP_FOLDER` | Temp directory for Overleaf .zip downloads             |\n| `LOGS_FOLDER`    | Directory for storing log files                        |\n| `OPENWEBUI_URL`  | Base URL of the OpenWebUI instance                     |\n| `API_KEY`        | API key for authenticating with OpenWebUI              |\n\n\n## How it works\n- Launches a headless Firefox browser via Selenium.\n- Logs into Overleaf (via shared link)\n- Downloads the .zip file of the project.\n- Unzips the .zip archive into a Git repo.\n- Runs git diff to detect changes.\n- Sends the diff to OpenWebUI for commit message generation.\n- Adds, commits, and pushes the changes to the remote repo.\n\n### File Structure\n```text\nmain.py         - Entry point\nhelpers.py      - Logging, datetime utilities, OpenWebUI helper\nparser.py       - Selenium-based Overleaf project downloader\ngit.py          - Git CLI wrapper for add/commit/push/diff\n```\n\n## Potential Issues\n- geckodriver must be installed and match Firefox version.\n- Assumes Overleaf’s UI doesn’t change, based on XPath selectors\n- AI-generated commit messages may contain errors or irrelevant text.\n\n\u003e [!IMPORTANT]\n\u003e This tool is intended for personal use. It helps download Overleaf projects via publicly shared read-only URLs.\n\u003e It is the user's responsibility to ensure their use of this tool complies with [Overleaf's terms](https://www.overleaf.com/legal#Terms).\n\u003e The authors take no responsibility for misuse of this software.\n\n## License\nSee [LICENSE](LICENSE) for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fignacio-gn%2Fgit-overleaf-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fignacio-gn%2Fgit-overleaf-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fignacio-gn%2Fgit-overleaf-sync/lists"}