Portál AbcLinuxu, 8. května 2025 13:55
#!/bin/bash base_name="$HOME/tmp/$(date +'%Y-%m-%d-Note-%H-%M-%S')" xournal_file="$base_name.xoj" screenshot_name="bg_1.png" screenshot_file="$xournal_file.$screenshot_name" if [ -f "$1" ] then cp "$1" "$screenshot_file" else import -screen -window root "$screenshot_file" fi width="$(identify -format %w "$screenshot_file")" height="$(identify -format %h "$screenshot_file")" dimensions_attr="$(identify -format 'width="%[fx:w*0.75]" height="%[fx:h*0.75]"' "$screenshot_file")" gzip >"$xournal_file" <<eof <?xml version="1.0" standalone="no"?> <xournal version="0.4.8"> <title>Xournal document - see http://math.mit.edu/~auroux/software/xournal/</title> <page $dimensions_attr> <background type="pixmap" domain="attach" filename="$screenshot_name" /> <layer> </layer> </page> </xournal> eof exec xournal "$xournal_file"
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.