-
-
Save fewaltix/c1437171d16671741aafe146751dbf9f to your computer and use it in GitHub Desktop.
Desktop file for linux machines with graphical dialogs based on the scanner.sh script to make a pdf look scanned using ImageMagick
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
[Desktop Entry] | |
Encoding=UTF-8 | |
Version=1.0 | |
Type=Application | |
Categories=Office | |
Terminal=true | |
Exec=bash -c 'convert -density 150 "$(zenity --file-selection --title="Select Input File" --file-filter=*[PpDdFf])" -rotate "$([ $((RANDOM % 2)) -eq 1 ] && echo -)0.$(($RANDOM % 4 + 5))" -attenuate 0.4 +noise Multiplicative -attenuate 0.03 +noise Multiplicative -sharpen 0x1.0 -colorspace Gray "$(zenity --file-selection --save --title="Select Output File" --filename ".pdf")"' | |
Name=FakeScan-Creator | |
Icon=utilities-terminal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Desktop-File version with file-picking dialog
Can be placed in "/usr/share/applications" on Linux machines to have the script showing up in the starter. Uses zenity for the input and output file dialogs.
The script can of course also be used in the terminal:
convert -density 150 "$(zenity --file-selection --title="Select Input File" --file-filter=*[PpDdFf])" -rotate "$([ $((RANDOM % 2)) -eq 1 ] && echo -)0.$(($RANDOM % 4 + 5))" -attenuate 0.4 +noise Multiplicative -attenuate 0.03 +noise Multiplicative -sharpen 0x1.0 -colorspace Gray "$(zenity --file-selection --save --title="Select Output File" --filename ".pdf")"