Last active
August 29, 2015 14:14
-
-
Save ssh0/3b56819ed55f0f887442 to your computer and use it in GitHub Desktop.
IPython Notebookのスライドを(無理やり)pdf化する方法 ref: http://qiita.com/ssh0/items/c873b7cec7f363eed1d0
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/bash | |
folder=$(pwd) | |
num=$1 | |
xte 'keydown Super_L' 'key 4' 'keyup Super_L' | |
for t in `seq 1 ${num}` | |
do | |
name=$(printf screen_%03d.jpg $t); | |
sleep 0.5 | |
import -window root -quality 0 ${folder}/${name} | |
xte 'key Right' | |
done | |
xte 'keydown Super_L' 'key 3' 'keyup Super_L' | |
exit 0 |
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
convert -page 1024x768 -gravity Center *.jpg out1.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment