tbmihailov / overleaf-backup-tool

A script that automatically backups all Overleaf projects to a local folder. It works.
GNU General Public License v3.0
45 stars 6 forks source link

support Overleaf v2 #3

Open d-higuchi opened 5 years ago

d-higuchi commented 5 years ago

overleaf v2 launched and this tool did not work.

Traceback (most recent call last):
 File "/overleaf-backup-tool/overleaf_backup.py", line 50, in <module>
   projects_info_list = overleaf_client.get_projects(status="all")
 File "/overleaf-backup-tool/clients/OverleafClient.py", line 42, in get_projects
   status_projects = self.get_projects_by_status(st, login_cookies)
 File "/overleaf-backup-tool/clients/OverleafClient.py", line 91, in get_projects_by_status
   projects_list.extend(proj_json["docs"])
KeyError: 'docs'
gpelouze commented 5 years ago

Hi @cl-lab-k, I bet this would require important modifications to the code, because Overleaf v2 doesn’t seem to offer an API like in v1.

I wrote a quick and dirty adaptation of @tbmihailov’s code that downloads .zip archives of your projects. It’s nowhere as complete as this project, but at least it offers a backup solutions.

tbmihailov commented 5 years ago

I am trying to adapt it. The old API is still active. But they changed the strategy for assigning cookies and I am still figuring it out. @ArcturusB feel free to make a pull request if you figured this out.

gpelouze commented 5 years ago

@tbmihailov: I have a working login function that I can submit as a PR if you wish. :)