Last active
May 25, 2016 15:15
-
-
Save yamachu/8714d862531aa69e141fa1a6defe5c65 to your computer and use it in GitHub Desktop.
某講義の資料のパスワードを解除してSlackに投げ込むやつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
NUM=`cat ~/.myapp/alg_getter` | |
wget ページのURL/alg16${NUM}.pdf | |
if [ ! $? -eq 0 ]; then | |
exit | |
fi | |
# qpdfくんが有能 | |
qpdf --password='あのパスワード' --decrypt alg16${NUM}.pdf decrypt_alg16${NUM}.pdf | |
# 適当に自分でSlackに投げるスクリプト | |
# python bin/file_send.py decrypt_alg16${NUM}.pdf | |
if [ ! $? -eq 0 ]; then | |
exit | |
fi | |
printf %02d $((NUM + 1)) > ~/.myapp/alg_getter | |
rm alg16${NUM}.pdf decrypt_alg16${NUM}.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment