# Overleaf community edition sync
A working fork of [overleaf-sync](https://github.com/moritzgloeckl/overleaf-sync-ce) by moritzgloeckl, who has not been active for over 2 years. Btw the code is weirdly architected.
I gathered 2 pull requests from ashmat98 (fix the upload) and mone27 (add Community Edition support), so thanks to them for their work.
### Easy Overleaf Two-Way Synchronization
This tool provides an easy way to synchronize Overleaf projects from and to your local computer. No paid account necessary.
----
## Features
- Sync your locally modified `.tex` (and other) files to your Overleaf projects
- Sync your remotely modified `.tex` (and other) files to computer
- Works with free Overleaf account
- No Git or Dropbox required
- Does not steal or store your login credentials (works with a persisted cookie, logging in is done on the original Overleaf website)
## How To Use
### Install
The package is available via [PyPI](https://pypi.org/project/overleaf-sync/). Just run:
```
moritz@github:~/test$ pip3 install overleaf-sync
```
That's it! Depending on your local Python installation, you might need to use `pip` instead of `pip3`.
### Prerequisites
- Create your project on [Overleaf](https://www.overleaf.com/project), for example a project named `test`. Overleaf-sync is not able to create projects (yet).
- Create a folder, preferably with the same name as the project (`test`) on your computer.
- Execute the script from that folder (`test`).
- If you do not specify the project name, overleaf-sync uses the current folder's name as the project name.
### Usage
#### Login
```
moritz@github:~/test$ ols login [--path]
Login successful. Cookie persisted as `.olauth`. You may now sync your project.
```
Logging in will be handled by a mini web browser opening on your device (using Qt5). You can then enter your username and password securely on the official Overleaf website. You might get asked to solve a CAPTCHA in the process. Your credentials are sent to Overleaf over HTTPS.
It then stores your *cookie* (**not** your login credentials) in a hidden file called `.olauth` in the same folder you run the command from. It is possible to store the cookie elsewhere using the `--path` option. The cookie file will not be synced to or from Overleaf.
Keep the `.olauth` file save, as it can be used to log in into your account.
### Listing all projects
```
moritz@github:~/test$ ols list [--store-path -v/--verbose]
10/31/2021, 01:23:45 - Project A
09/21/2020, 01:23:45 - Project B
08/11/2019, 01:23:45 - Project C
07/01/2018, 01:23:45 - Project D
```
Use `ols list` to conveniently list all projects in your account available for syncing.
### Downloading project's PDF
```
moritz@github:~/test$ ols download [--name --download-path --store-path -v/--verbose]
```
Use `ols download` to compile and download your project's PDF. Specify a download path if you do not want to store the PDF file in the current folder. Currently only downloads the first PDF file it finds.
### Syncing
```
moritz@github:~/test$ ols [-l/--local-only -r/--remote-only --store-path -p/--path -i/--olignore]
```
Just calling `ols` will two-way sync your project. When there are changes both locally, and remotely you will be asked which file to keep. Using the `-l` or `-r` option you can specify to either sync local project files to Overleaf only or Overleaf files to local ones only respectively. When using these options you can also sync deleted files. If a file has been deleted it can either be deleted on the target (remote when `-l`, local when `-r`) as well, restored on the source (local when `-l`, remote when `-r`) or ignored.
The option `--store-path` specifies the path of the cookie file created by the `login` command. If you did not change its path, you do not need to specify this argument. The `-p/--path` option allows you to specify a different sync folder than the one you're calling `ols` from. The `-i/--olignore` option allows you to specify the path of an `.olignore` file. It uses `fnmatch` internally, so it may have some similarity to `.gitignore` but doesn't work exactly the same. For example, if you wish to exclude a specific folder named `out`, you need to specify it as `out/*`. See [here](https://docs.python.org/3/library/fnmatch.html) for more information.
Sample Output:
```
Project queried successfully.
✅ Querying project
Project downloaded successfully.
✅ Downloading project
Syncing files from remote to local
====================
[SYNCING] report.tex
report.tex does not exist on local. Creating file.
[SYNCING] other-report.tex
other-report.tex does not exist on local. Creating file.
✅ Syncing files from remote to local
```
## Known Bugs
- When modifying a file on Overleaf and immediately syncing afterwards, the tool might not detect the changes. Please allow 1-2 minutes after modifying a file on Overleaf before syncing it to your local computer.
## Contributing
All pull requests and change/feature requests are welcome.
## Disclaimer
THE AUTHOR OF THIS SOFTWARE AND THIS SOFTWARE IS NOT ENDORSED BY, DIRECTLY AFFILIATED WITH, MAINTAINED, AUTHORIZED, OR SPONSORED BY OVERLEAF OR WRITELATEX LIMITED. ALL PRODUCT AND COMPANY NAMES ARE THE REGISTERED TRADEMARKS OF THEIR ORIGINAL OWNERS. THE USE OF ANY TRADE NAME OR TRADEMARK IS FOR IDENTIFICATION AND REFERENCE PURPOSES ONLY AND DOES NOT IMPLY ANY ASSOCIATION WITH THE TRADEMARK HOLDER OF THEIR PRODUCT BRAND.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THIS SOFTWARE WAS DESIGNED TO BE USED ONLY FOR RESEARCH PURPOSES. THIS SOFTWARE COMES WITH NO WARRANTIES OF ANY KIND WHATSOEVER. USE IT AT YOUR OWN RISK! IF THESE TERMS ARE NOT ACCEPTABLE, YOU AREN'T ALLOWED TO USE THE CODE.
Raw data
{
"_id": null,
"home_page": "https://github.com/JRodez/overleaf-sync-ce",
"name": "overleaf-sync-ce",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": "",
"keywords": "overleaf-ce overleaf sharelatex sync latex tex",
"author": "jrodez",
"author_email": "jrodez@users.noreply.github.com",
"download_url": "https://files.pythonhosted.org/packages/ca/b8/794a806c2c54a93cea089507a8a9c3304814402e4fc674d62b19266ff063/overleaf_sync_ce-2.0.0.tar.gz",
"platform": null,
"description": "# Overleaf community edition sync\n\nA working fork of [overleaf-sync](https://github.com/moritzgloeckl/overleaf-sync-ce) by moritzgloeckl, who has not been active for over 2 years. Btw the code is weirdly architected.\nI gathered 2 pull requests from ashmat98 (fix the upload) and mone27 (add Community Edition support), so thanks to them for their work.\n\n### Easy Overleaf Two-Way Synchronization\n\nThis tool provides an easy way to synchronize Overleaf projects from and to your local computer. No paid account necessary.\n\n----\n\n## Features\n- Sync your locally modified `.tex` (and other) files to your Overleaf projects\n- Sync your remotely modified `.tex` (and other) files to computer\n- Works with free Overleaf account\n- No Git or Dropbox required\n- Does not steal or store your login credentials (works with a persisted cookie, logging in is done on the original Overleaf website)\n\n## How To Use\n### Install\nThe package is available via [PyPI](https://pypi.org/project/overleaf-sync/). Just run:\n\n```\nmoritz@github:~/test$ pip3 install overleaf-sync\n```\n\nThat's it! Depending on your local Python installation, you might need to use `pip` instead of `pip3`.\n\n### Prerequisites\n- Create your project on [Overleaf](https://www.overleaf.com/project), for example a project named `test`. Overleaf-sync is not able to create projects (yet).\n- Create a folder, preferably with the same name as the project (`test`) on your computer.\n- Execute the script from that folder (`test`).\n- If you do not specify the project name, overleaf-sync uses the current folder's name as the project name.\n\n### Usage\n#### Login\n```\nmoritz@github:~/test$ ols login [--path]\nLogin successful. Cookie persisted as `.olauth`. You may now sync your project.\n```\n\nLogging in will be handled by a mini web browser opening on your device (using Qt5). You can then enter your username and password securely on the official Overleaf website. You might get asked to solve a CAPTCHA in the process. Your credentials are sent to Overleaf over HTTPS.\n\nIt then stores your *cookie* (**not** your login credentials) in a hidden file called `.olauth` in the same folder you run the command from. It is possible to store the cookie elsewhere using the `--path` option. The cookie file will not be synced to or from Overleaf.\n\nKeep the `.olauth` file save, as it can be used to log in into your account.\n\n### Listing all projects\n```\nmoritz@github:~/test$ ols list [--store-path -v/--verbose]\n10/31/2021, 01:23:45 - Project A\n09/21/2020, 01:23:45 - Project B\n08/11/2019, 01:23:45 - Project C\n07/01/2018, 01:23:45 - Project D\n```\n\nUse `ols list` to conveniently list all projects in your account available for syncing. \n\n### Downloading project's PDF\n```\nmoritz@github:~/test$ ols download [--name --download-path --store-path -v/--verbose]\n```\n\nUse `ols download` to compile and download your project's PDF. Specify a download path if you do not want to store the PDF file in the current folder. Currently only downloads the first PDF file it finds.\n\n### Syncing\n```\nmoritz@github:~/test$ ols [-l/--local-only -r/--remote-only --store-path -p/--path -i/--olignore]\n```\n\nJust calling `ols` will two-way sync your project. When there are changes both locally, and remotely you will be asked which file to keep. Using the `-l` or `-r` option you can specify to either sync local project files to Overleaf only or Overleaf files to local ones only respectively. When using these options you can also sync deleted files. If a file has been deleted it can either be deleted on the target (remote when `-l`, local when `-r`) as well, restored on the source (local when `-l`, remote when `-r`) or ignored.\n\nThe option `--store-path` specifies the path of the cookie file created by the `login` command. If you did not change its path, you do not need to specify this argument. The `-p/--path` option allows you to specify a different sync folder than the one you're calling `ols` from. The `-i/--olignore` option allows you to specify the path of an `.olignore` file. It uses `fnmatch` internally, so it may have some similarity to `.gitignore` but doesn't work exactly the same. For example, if you wish to exclude a specific folder named `out`, you need to specify it as `out/*`. See [here](https://docs.python.org/3/library/fnmatch.html) for more information.\n\nSample Output:\n\n```\nProject queried successfully.\n\u2705 Querying project\nProject downloaded successfully.\n\u2705 Downloading project\n\nSyncing files from remote to local\n====================\n\n[SYNCING] report.tex\nreport.tex does not exist on local. Creating file.\n\n[SYNCING] other-report.tex\nother-report.tex does not exist on local. Creating file.\n\n\n\u2705 Syncing files from remote to local\n```\n\n## Known Bugs\n- When modifying a file on Overleaf and immediately syncing afterwards, the tool might not detect the changes. Please allow 1-2 minutes after modifying a file on Overleaf before syncing it to your local computer.\n\n## Contributing\n\nAll pull requests and change/feature requests are welcome.\n\n## Disclaimer\nTHE AUTHOR OF THIS SOFTWARE AND THIS SOFTWARE IS NOT ENDORSED BY, DIRECTLY AFFILIATED WITH, MAINTAINED, AUTHORIZED, OR SPONSORED BY OVERLEAF OR WRITELATEX LIMITED. ALL PRODUCT AND COMPANY NAMES ARE THE REGISTERED TRADEMARKS OF THEIR ORIGINAL OWNERS. THE USE OF ANY TRADE NAME OR TRADEMARK IS FOR IDENTIFICATION AND REFERENCE PURPOSES ONLY AND DOES NOT IMPLY ANY ASSOCIATION WITH THE TRADEMARK HOLDER OF THEIR PRODUCT BRAND.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nTHIS SOFTWARE WAS DESIGNED TO BE USED ONLY FOR RESEARCH PURPOSES. THIS SOFTWARE COMES WITH NO WARRANTIES OF ANY KIND WHATSOEVER. USE IT AT YOUR OWN RISK! IF THESE TERMS ARE NOT ACCEPTABLE, YOU AREN'T ALLOWED TO USE THE CODE.\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Overleaf Two-Way Sync Tool",
"version": "2.0.0",
"project_urls": {
"Homepage": "https://github.com/JRodez/overleaf-sync-ce"
},
"split_keywords": [
"overleaf-ce",
"overleaf",
"sharelatex",
"sync",
"latex",
"tex"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3aefee6f02bdcd7ab71f6eed9626e0035b87608b002d117fad8ed0339d6dfdc4",
"md5": "ff0c07c1a8722efc24abc7f7643ba54f",
"sha256": "425dbd70d9993b8374c474fb7d65a75516efd35c502d2182cd7d09dec1f77e36"
},
"downloads": -1,
"filename": "overleaf_sync_ce-2.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ff0c07c1a8722efc24abc7f7643ba54f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3",
"size": 13733,
"upload_time": "2024-03-08T21:03:52",
"upload_time_iso_8601": "2024-03-08T21:03:52.879051Z",
"url": "https://files.pythonhosted.org/packages/3a/ef/ee6f02bdcd7ab71f6eed9626e0035b87608b002d117fad8ed0339d6dfdc4/overleaf_sync_ce-2.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cab8794a806c2c54a93cea089507a8a9c3304814402e4fc674d62b19266ff063",
"md5": "cd555a8329c5446f4d150108f81efb3c",
"sha256": "70c2bffde45e17a5abd5bd8c3175701a2cbc92754e2d265074f3f026a7de2b8a"
},
"downloads": -1,
"filename": "overleaf_sync_ce-2.0.0.tar.gz",
"has_sig": false,
"md5_digest": "cd555a8329c5446f4d150108f81efb3c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 14777,
"upload_time": "2024-03-08T21:03:55",
"upload_time_iso_8601": "2024-03-08T21:03:55.112092Z",
"url": "https://files.pythonhosted.org/packages/ca/b8/794a806c2c54a93cea089507a8a9c3304814402e4fc674d62b19266ff063/overleaf_sync_ce-2.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-08 21:03:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "JRodez",
"github_project": "overleaf-sync-ce",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "requests",
"specs": [
[
"==",
"2.*"
]
]
},
{
"name": "beautifulsoup4",
"specs": [
[
"==",
"4.11.1"
]
]
},
{
"name": "yaspin",
"specs": [
[
"==",
"2.*"
]
]
},
{
"name": "python-dateutil",
"specs": [
[
"~=",
"2.8.1"
]
]
},
{
"name": "click",
"specs": [
[
"==",
"8.*"
]
]
},
{
"name": "socketIO-client",
"specs": [
[
"==",
"0.5.7.2"
]
]
},
{
"name": "PySide6",
"specs": [
[
"==",
"6.*"
]
]
}
],
"lcname": "overleaf-sync-ce"
}