Various compilation scripts & patches for Linux programs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
824 B

7 years ago
  1. --- a/pdfunlock.sh
  2. +++ b/pdfunlock.sh
  3. @@ -0,0 +1,9 @@
  4. +#!/bin/bash
  5. +
  6. +while [ $# -gt 0 ]; do
  7. + ENCRYP=$1
  8. + DECRYP=$(echo "$ENCRYP" | sed 's/\.\w*$/_unlocked.pdf/')
  9. + #qpdf --decrypt "$ENCRYP" "$DECRYP"
  10. + gs -sPDFPassword=$PASS -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=%stdout% -c .setpdfwrite -f "$ENCRYP" > "$DECRYP"
  11. + shift
  12. +done
  13. \ No newline at end of file
  14. --- a/pdfunlock.desktop
  15. +++ b/pdfunlock.desktop
  16. @@ -0,0 +1,15 @@
  17. +[Desktop Entry]
  18. +Type=Service
  19. +ServiceTypes=KonqPopupMenu/Plugin
  20. +MimeType=application/pdf
  21. +Icon=application-pdf
  22. +Actions=pdfunlock;
  23. +X-KDE-StartupNotify=false
  24. +X-KDE-Priority=TopLevel
  25. +TryExec=gs
  26. +
  27. +[Desktop Action pdfunlock]
  28. +Name=Unlock this PDF file
  29. +Name[fi]=Poista PDF-tiedoston suojaukset
  30. +Icon=application-pdf
  31. +Exec=/usr/share/kservices5/ServiceMenus/pdfunlock.sh