pages.tsv 中列舉了所有頁面
- main branch - 放置文件與網站 archive 的相關 script
- gh-pages branch - 靜態化網站完整頁面與檔案
約 7.8GB(含 .git);純靜態檔案約 4GB
➜ brew install git-lfs # mac brew 安裝 git LFS (其他作業系統參考: https://github.com/git-lfs/git-lfs#installing)
➜ git lfs install # 初始化 LFS
➜ git clone --single-branch -b gh-pages https://github.com/ocftw/creativecommons.tw.git # 下載 gh-pages branch- 在 mac 上安裝 httrack
➜ ~ brew install httrack- 建立基礎鏡像
./httrack.sh- binary 檔案的擷取策略
- 先只抓 html 網頁
- 接著再從 hts-cache/new.txt 中列舉 binary 檔案
- sftp 進去主機找該檔案,下載後置入,於 httrack.sh 手動排除該路徑
- 再用 httrack_url_list.sh 抓取其餘的 binary 檔案
請參考 commit history - main branch、gh-pages branch
- 使用
page_search_to_list.sh搜尋問題頁面(如 "Page not found") - 使用
files_to_urls.sh將檔案路徑轉換為 URL - 使用
extract_media.sh提取多媒體檔案清單 - 使用
httrack_url_list.sh抓取清單列出的 URL 目標
- 重新下載 *.tmp 檔案
- 重新下載 *.delayed 檔案
- 把沒有副檔名的 html 檔案加入 .html 副檔名
- 補回頁面上遺失的圖片檔
- 加入 script 把 github lfs 管理的檔案動態指向 github repo
- 列出所有的頁面目錄與標題清單
- 重新下載 zero_bytes_url.txt 的檔案
- 刪除
<title>40x的 HTML 檔案 - 設定 git-pages repo 並將 /creativecommons.tw/creativecommons.tw 搬移到根目錄下以便打開 github pages
- files/downloads/ 下的檔案實在太大了,透過 Git LFS 上傳
- 如果
<TITLE>Page has moved</TITLE>頁面有對應的 .html 檔案,就將其移除 - 把所有的 page not found 刪除
- 修正變成 0 Bytes 的檔案
- feed 要改名叫 feed.xml
- 移除 <script>jQuery.extend(Drupal.settings...</script> 標籤
- 修正檔案內連結的 css 變成 html
- 列出所有的 binary 檔案清單並且抓取
- 內容有「Click here...」的頁面是沒有成功抓到的頁面
- main branch 下的所有檔案以 CC0 釋出至公眾領域。
- gh-pages 內的網頁、影像與多媒體檔案,依循 creativecommons.tw 網站授權——除另有註明外,採用 創用CC 姓名標示-相同方式分享 3.0 台灣 授權條款 釋出。