{"id":13844472,"url":"https://github.com/tanchao90/hexo-git-backup-tools","last_synced_at":"2025-07-11T22:32:12.883Z","repository":{"id":81708558,"uuid":"83278141","full_name":"tanchao90/hexo-git-backup-tools","owner":"tanchao90","description":"Back-up the source files of my blog.","archived":false,"fork":false,"pushed_at":"2017-02-28T03:04:33.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-05T17:42:17.611Z","etag":null,"topics":["hexo","python2"],"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/tanchao90.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}},"created_at":"2017-02-27T06:52:33.000Z","updated_at":"2019-05-11T06:41:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"90b27bfe-70dc-45a9-ad8f-9a5e6f17b1a2","html_url":"https://github.com/tanchao90/hexo-git-backup-tools","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/tanchao90%2Fhexo-git-backup-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanchao90%2Fhexo-git-backup-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanchao90%2Fhexo-git-backup-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanchao90%2Fhexo-git-backup-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanchao90","download_url":"https://codeload.github.com/tanchao90/hexo-git-backup-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225763428,"owners_count":17520457,"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":["hexo","python2"],"created_at":"2024-08-04T17:02:43.248Z","updated_at":"2024-11-21T16:31:34.746Z","avatar_url":"https://github.com/tanchao90.png","language":"Python","funding_links":[],"categories":["Python (1887)","Python"],"sub_categories":[],"readme":"# README #\n\nBack-up the source files of my blog.\n\n[coneycode/hexo-git-backup](https://github.com/coneycode/hexo-git-backup) is more popular, you also can try it.\n\n\n## env\n- git\n- Python 2.7: Tested.\n- Python 3.x: Not tested.\n\n\n## Install Hexo\nReference [Hexo](https://hexo.io/)\n\n- Install Hexo\n- Create hexo blog\n- Install theme\n\n\n## clone repo to local\n- Go to the root directory of hexo blog.\n- `git clone https://github.com/tanchao90/hexo-git-backup.git`\n\n\n## modify remote `origin` to your repo\n- `git remote set-url origin https://github.com/username/repo.git`\n\n\n## backup `source files` to Git\n- `cd hexo-git-backup`\n- `config.py`: check and modify.\n- `backup-win.bat` or `sh backup-mac.sh`: copy `source files` to git repo\n- git ops: add, commit, and push files to Github or Bitbucket.\n\n\n## update `source files` from Git\n- `cd hexo-git-backup`\n- `config.py`: check and modify.\n- `update-win.bat` or `sh update-mac.sh`: pull `source files` and copy it to the root directory of hexo blog.\n- `history-files` is used to store the history files that has been overwrited by the same file in git repo.\n\n\n## Reference\n- [os — Miscellaneous operating system interfaces](https://docs.python.org/2/library/os.html?highlight=os#module-os)\n- [os.path — Common pathname manipulations](https://docs.python.org/2/library/os.path.html)\n- [shutil — High-level file operations](https://docs.python.org/2.7/library/shutil.html?highlight=shutil)\n- [python copy folder structure under another directory](http://stackoverflow.com/questions/40828450/python-copy-folder-structure-under-another-directory)\n- [Changing a remote's URL](https://help.github.com/articles/changing-a-remote-s-url/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanchao90%2Fhexo-git-backup-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanchao90%2Fhexo-git-backup-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanchao90%2Fhexo-git-backup-tools/lists"}