Nemo Actions (Linux Mint) or Nautilus Actions (Ubuntu) let you run a command, a script or a program from the context menu (the menu that shows up when you right-click on a file or folder).
This Repository contains Nemo Actions for Linux Mint focused on the postprocessing of scanned documents and document management. The Shell/Zenity Scripts should work on other debian based Distros too. At the moment the GUIs are available in english and german (other languages: ready to translate). The featured Nemo Actions are:
1. PDF Document Page Rotator
Lets you rotate all the pages of a pdf document in one click (more).
2. Scan to Sandwich PDF
This script takes your scanned document (tif or pdf), removes the black borders, splits double pages, corrects the alignement, sets the document to black and white, runs text recognition and adds a text layer to the document. You will end up with a seachable/indexable pdf document. This script backs up the original file in an archive directory too (more).
3. PDF Metadata Editor
Lets you edit the title- and author-tag of a pdf file (more).
4. Pdf Document Downsizer
Reduces the size of your scanned pdf documents and stores the original file in an archive directory (more).
5. doc(x) to odt Converter
Converts Microsoft Office documents (doc, docx) to do documents in the LibreOffice (odt) format (more).
6. doc(x), odt, txt to pdf Converter
Converts your doc, docx, odt and txt documents to pdf files (more).
- pdf-rotator.nemo_action
- pdf-rotator/pdf-rotator.sh
- pdf-rotator/lang/de.ini
- pdf-rotator/lang/en.ini
Lets you rotate all the the pages of a pdf file in one click (90° cw, 90° ccw, 180°).
It's ideal for scanned multipage documents.
In the background runs this one-liner:
pdftk "INPUT" cat "ROTATION" output "OUTPUT" ;
Pdftk is used to rotate the pages. Zenity is used to for the GUI.
sudo apt-get update
sudo apt-get install pdftk zenity
- scan-to-sandwich-pdf.nemo_action
- scan-to-sandwich-pdf/scan-to-sandwich-pdf.sh
- scan-to-sandwich-pdf/config.ini
- scan-to-sandwich-pdf/lang/de.ini
- scan-to-sandwich-pdf/lang/en.ini
Takes your scanned documents (pdf or tif), removes the black border, splits double pages (if necessary), corrects page alignement, sets document to black and white, runs text recognition and adds the text layer to the pdf file. You will end up with a searchable/indexable pdf file, a so called sandwich-pdf file.
If necessary apply the PDF Document Page Rotator first, otherwise the text recognition will fail.
This Script uses several programs.
sudo apt-get update
sudo apt-get install zenity ghostscript scantailor tesseract-ocr tesseract-ocr-deu tesseract-ocr-fra exactimage pdftk procmail
- pdf-metadata-editor.nemo_action
- pdf-metadata-editor/pdf-metadata-editor.sh
- pdf-metadata-editor/lang/de.ini
- pdf-metadata-editor/lang/en.ini
Lets you edit the author- and the title-tag of a pdf file.
Pdftk is used to work the pdf file. Zenity is used to for the GUI.
sudo apt-get update
sudo apt-get install pdftk zenity
- pdf-downsizer.nemo_action
- pdf-downsizer/pdf-downsizer.sh
- pdf-downsizer/config.ini
- pdf-downsizer/lang/en.ini
- pdf-downsizer/lang/de.ini
Reduces the size of your scanned pdf files by running this ghostscript one-liner on the document:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -sOutputFile="OUTPUTFILE" "INPUTFILE" ;
Also makes a backup of the original file in an archive directory (default: /home/$USER/Scan-Archive; will be created, if it doesn't exist).
You don't need to run this script on files you edited with Scan to Sandwich PDF (this script already downsizes the pdf files).
Ghostscript is used to work the pdf file. Zenity is used to for the GUI.
sudo apt-get update
sudo apt-get install ghostscript zenity
- convert-doc-to-odt.nemo_action
Converts Microsoft Office Documents (doc and docx) to Documents in the LibreOffice Format (odt) by
unoconv -f odt "YOURFILE"
Unoconv is used to convert the files.
sudo apt-get update
sudo apt-get install unoconv
- convert-to-pdf.nemo_action
Converts doc, docx, odt and txt files to pdf by
unoconv "YOURFILE"
Unoconv is used to convert the files.
sudo apt-get update
sudo apt-get install unoconv
- pdf-merger.nemo_action
- pdf-merger/pdf-merger.sh
- pdf-merger/config.ini
- pdf-merger/lang/de.ini
- pdf-merger/lang/en.ini
pdftk INPUT1 INPUT2 INPUT3 cat output "OUTPUT"
You have to run this script out of a nemo window. If you mark the files direct on the desktop the order will be messed up.
Pdftk is used to build the file. Zenity is used for the GUI.
sudo apt-get update
sudo apt-get install pdftk zenity
- Fire up a terminal; make a directory, where you can store the files from this repository; enter this directory:
mkdir ~/Downloads/linux-mint-nemo-actions
cd ~/Downloads/linux-mint-nemo-actions
- Clone the files from this repository to your computer.
git clone https://github.com/Alfcx/linux-mint-nemo-actions
- Make sure you have the necessary programs (for the nemo action you want) installed on your system. E.g. for the sandwich-pdf nemo action you'll have to run:
sudo apt-get update
sudo apt-get install zenity ghostscript scantailor tesseract-ocr tesseract-ocr-deu tesseract-ocr-fra exactimage pdftk
- Copy the files and folders for the wanted nemo action to your nemo actions directory. Linux Mint stores the Nemo Actions in
~/.local/share/nemo/actions
(user) and/usr/share/nemo/actions
(system-wide). Also make sure the shell script is executable. E.g. for the "scan to sandwich pdf" nemo action you'll have to run:
cp scan-to-sandwich-pdf.nemo_action ~/.local/share/nemo/actions
mkdir ~/.local/share/nemo/actions/scan-to-sandwich-pdf
cp -r scan-to-sandwich-pdf/* ~/.local/share/nemo/actions/scan-to-sandwich-pdf
chmod +x ~/.local/share/nemo/actions/scan-to-sandwich-pdf/scan-to-sandwich-pdf.sh
- You should now be able to see your Nemo Action in the context menu (e.g. you'll see "Create Sandwich-PDF" when you right-click on a pdf file). If you don't see the Nemo Action, log out and back in. Have Fun with this Nemo Actions and let me know if they work for you.