JALの機内WiFiサービスにある動画を一括ダウンロードする.
1年前北海道-東京の便に乗ったとき暇だったので書いた. 今年乗ったら,コンテンツがHLSに切り替わっていて,簡単にダウンロードできなくなっていた. 飛行機で暇な時は,こういう遊びをすると時間を潰せて楽しい.
gist0df3e33a617d0cf10d0baa2140794220
↑を実行すると下記のような.shが出来上がるよ.
Ubuntu 16.04でSATySFi環境構築&コンパイル
2017/02/12時点の情報です. まだSATySFiは絶賛開発途中であり,特に今インストール周りが改善中のようですので,うまくいかない場合はgithubのページを追ってください.
↓ココらへんを参考にした.
SATySFi
型づけがしっかりしていて,エラーメッセージのわかりやすい組版システム(を目指しているらしい). texのように文章の構造や装飾をマークアップして記述する. 未踏に採択されて先日成果発表会が行われた.
依存関係をインストール
$ sudo apt-get update
$ sudo apt-get install opam autoconf
opam構築
.profileを読んでくれないので,.bashrcに直接書き込んだ
$ cd
$ opam init
$ echo "¥n. /home/satysfi/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true" >> $HOME/.bashrc
$ opam switch 4.05.0
$ eval `opam config env`
SATySFi構築
$ cd
$ git clone https://github.com/gfngfn/SATySFi.git
$ cd $HOME/SATySFi
$ git submodule update -i
$ opam pin add satysfi .
$ opam install satysfi
$ satysfi --help
-o Specify output file
--output Specify output file
-v Print version
--version Print version
--full-path Display paths in full-path style
-help Display this list of options
--help Display this list of options
demo/demo.satyをコンパイル
フォントや画像が足りないので用意する
$ cd $HOME/SATySFi/demo
ArnoPro-Regular.otfを用意
$ wget https://www.wfonts.com/download/data/2014/12/28/arno-pro/ArnoPro-Regular.otf -P $HOME/.satysfi/dist/fonts/
$ wget https://ipafont.ipa.go.jp/old/ipaexfont/ipaexm00201.php -P /tmp
$ unzip -d /tmp /tmp/ipaexm00201.php
$ cp /tmp/ipaexm00201/ipaexm.ttf $HOME/.satysfi/dist/fonts/
Osaka.ttf
ttc→ttfに変換するために,unitettcをインストールする
$ wget http://yozvox.web.fc2.com/unitettc.zip -P /tmp
$ unzip -d /tmp /tmp/unitettc.zip
$ chmod +x /tmp/unitettc/unitettc64
$ wget http://osaka.is.land.to/files/Osaka.zip -P /tmp
$ unzip -d /tmp /tmp/Osaka.zip
$ /tmp/unitettc/unitettc64 /tmp/Osaka.ttc
$ cp /tmp/Osaka001.ttf $HOME/.satysfi/dist/fonts/Osaka.ttf
satysfi-logo.png
png→jpgに変換するために,imagemagickをインストールする
$ sudo apt-get install imagemagick
$ wget https://raw.githubusercontent.com/wiki/gfngfn/SATySFi/img/satysfi-logo.png -P /tmp
$ convert /tmp/satysfi-logo.png satysfi-logo.jpg
コンパイル
$ make
$ file demo.pdf
demo.pdf: PDF document, version 1.7
C:¥windows¥installerの容量が大きすぎる
Cドライブの容量がいっぱいになっていた.
ちなみに実家パソコン
WinDirStatで見たらC:¥windows¥installerが20GB以上食っていた.
Windows Updateのインストーラが入ってるらしい
PatchCleanerでWindows Updateのインストーラを削除した.
PatchCleanerを使うと,いらないインストーラだけ削除してくれる
直った.
よかった
httpstatを使ってみた
近況報告
かろうじて生きています。
cicleciでWarning: Git is not installed in the image. Falling back to CircleCI's native git client but this is still an experiment feature. We highly recommend using an image that has official Git installed. worktree is not clean
circleci 2.0でcheckoutするとタイトルみたいなエラーが出るんだよね。使ってるdocker imageにgitが入っていないので、gitを入れましょ。
apt-get install -y git