GithubHelp home page GithubHelp logo

hackpad-backup's Introduction

現在 g0v 太多東西放 hackpad, 除了 hackpad 自己的 history 功能, 應該另外作備份

# 備份
如果是 g0v 或是 open source 相關 project, 我可以幫忙 backup. 請聯絡我.
p.s. 如果是比較大的 site, 請開 admin 給我, 因為 hackpad 要 admin 才能 list uplodated pads

# 設定檔: 
(可以用 # 表示 comment)
- backup_list.txt 
  一行一個要備份的項目, 譬如 g0v/*
  目前不支援不是 * 的
  不是 admin 也可以, 只是比較沒有效率, 要 loop all pads
- api_keys.txt
  用來存取 hackpad 的 api key, 一行一個, 格式如
  [key] [secret] [site]

# api key
在 hackpad 網站上的 settings 裡可以找到. 注意每個 domain 的 key 是分開的.

# 使用方法
設好 backup_list.txt 跟 api_keys.txt, 執行
  python hackpad-backup.py
即可

程式會在 data/[site] 目錄建立 git repository, 以 padid.html 為檔名 commit 到 git 去.

# feature & limitation
- 會備份部份歷史版本 versions, 不過不會備份所有版本, 不然太大了
- 若整個 pad 被刪掉, 備份程式不會知道, 也不會備份刪掉前的版畚
- 預設以 html 格式備份, 因為這格式能保留比較多資訊

hackpad-backup's People

Contributors

kcwu avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.