ArchiveBoxで自分用WebArchive(django版)
Kenichiro Matohara(matoken)
大隅の山奥在住
好きなディストリビューションはDebian
https://matoken.org
最近の発表とか
rsync 3.2.0 の新機能を試してみる 前回
cowを増やそう 前回
John the Ripperでいろいろなパスワードを調べる SSH鍵のパスフレーズとか(小
江戸らぐ)
Linuxでノイズキャンセルその2 RNNoise (東海道らぐオンラインライブ!ておく
れデイズ)
Sipeed Lichee Nanoでhello world armv5な切手サイズのコンピュータ(低レベル勉
強会)
ArchiveBoxで自分用WebArchive(django版)
WebArchive
最近web情報の寿命が短くなっている気がする
(オンライン)ブックマークサービスから飛ぶと消えてる><
WebArchiveサービスで保存
Web ArchiveのWayback Machine https://archive.org/
archive.today http://archive.today/
日本だとウェブ魚拓 https://megalodon.jp/
制限や削除されることも(◞‸◟)
ローカルに保存
Evernoteのウェブクリッパー(Wine)
Joplinのウェブクリッパー
勝手に消されることはないけど手動めんどい
ArchiveBox
セルフホストできるWebAechiveアプリケーション
URLやURLリンク集,RSS等からアーカイブ可能
アーカイブ対象はWebの他にビデオオーディオGit等
アーカイブはhtmlの他にスクリーンショット画像,pdfも
Python製,MIT License
https://archivebox.io/
導入
$ sudo apt install python3 python3-pip git curl wget youtube-dl chromium-browser
$ git clone https://github.com/pirate/ArchiveBox.git && cd ArchiveBox
アーカイブ
$ echo 'https://example.com' | ./archive
アーカイブ閲覧
$ xdg-open ./index.html
注意点
複数プロセスを動かすとdbが壊れる
同時起動しないようにscriptを用意
Shift JISのページはエラーでアーカイブに失敗する(373news.comとか)
「proxy挟むとか?」
とりあえず諦める
鹿児島Linux勉強会 2019.08
ここまで鹿児島Linux勉強会 2019.08の内容
ArchiveBox django branch(New!)
Shift JISのページがエラーになってしまう件でISSUEを立てていた
->「django branch試してみて.タイトルはおかしいけど……」
django branch install
$ git checkout django
$ pip3 install .
$ ~/.local/bin/archivebox --help
Welcome to ArchiveBox v0.4.3!
To import an existing archive (from a previous version of ArchiveBox):
1. cd into your data dir OUTPUT_DIR (usually ArchiveBox/output) and run:
2. archivebox init
To start a new archive:
1. Create an empty directory, then cd into it and run:
2. archivebox init
For more information, see the documentation here:
https://github.com/pirate/ArchiveBox/wiki
初期設定
$ mkdir -p ~/Documents/ArchiveBox
$ cd ~/Documents/ArchiveBox
$ archivebox init
アーカイブ取得
$ archivebox add https://kagolug.org/
アーカイブ確認
従来と同じ
$ xdg-open ./index.html
New!
$ archivebox manage createsuperuser #アカウント登録
$ archivebox