Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tanchao90/hexo-git-backup-tools
Back-up the source files of my blog.
https://github.com/tanchao90/hexo-git-backup-tools
hexo python2
Last synced: 21 days ago
JSON representation
Back-up the source files of my blog.
- Host: GitHub
- URL: https://github.com/tanchao90/hexo-git-backup-tools
- Owner: tanchao90
- License: mit
- Created: 2017-02-27T06:52:33.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-28T03:04:33.000Z (almost 8 years ago)
- Last Synced: 2024-08-05T17:42:17.611Z (4 months ago)
- Topics: hexo, python2
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-hacking-lists - tanchao90/hexo-git-backup-tools - Back-up the source files of my blog. (Python)
README
# README #
Back-up the source files of my blog.
[coneycode/hexo-git-backup](https://github.com/coneycode/hexo-git-backup) is more popular, you also can try it.
## env
- git
- Python 2.7: Tested.
- Python 3.x: Not tested.## Install Hexo
Reference [Hexo](https://hexo.io/)- Install Hexo
- Create hexo blog
- Install theme## clone repo to local
- Go to the root directory of hexo blog.
- `git clone https://github.com/tanchao90/hexo-git-backup.git`## modify remote `origin` to your repo
- `git remote set-url origin https://github.com/username/repo.git`## backup `source files` to Git
- `cd hexo-git-backup`
- `config.py`: check and modify.
- `backup-win.bat` or `sh backup-mac.sh`: copy `source files` to git repo
- git ops: add, commit, and push files to Github or Bitbucket.## update `source files` from Git
- `cd hexo-git-backup`
- `config.py`: check and modify.
- `update-win.bat` or `sh update-mac.sh`: pull `source files` and copy it to the root directory of hexo blog.
- `history-files` is used to store the history files that has been overwrited by the same file in git repo.## Reference
- [os — Miscellaneous operating system interfaces](https://docs.python.org/2/library/os.html?highlight=os#module-os)
- [os.path — Common pathname manipulations](https://docs.python.org/2/library/os.path.html)
- [shutil — High-level file operations](https://docs.python.org/2.7/library/shutil.html?highlight=shutil)
- [python copy folder structure under another directory](http://stackoverflow.com/questions/40828450/python-copy-folder-structure-under-another-directory)
- [Changing a remote's URL](https://help.github.com/articles/changing-a-remote-s-url/)