Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/softgeekro/sgs.nemo-actions
Nemo actions used in out internal workflow
https://github.com/softgeekro/sgs.nemo-actions
bash nemo nemo-action python3 shell
Last synced: 2 days ago
JSON representation
Nemo actions used in out internal workflow
- Host: GitHub
- URL: https://github.com/softgeekro/sgs.nemo-actions
- Owner: SoftGeekRO
- License: gpl-3.0
- Created: 2024-04-16T20:06:06.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-06-29T15:20:38.000Z (7 months ago)
- Last Synced: 2024-11-13T12:05:08.337Z (2 months ago)
- Topics: bash, nemo, nemo-action, python3, shell
- Language: Python
- Homepage: https://www.sgsolar.ro
- Size: 1.37 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SoftGeek Romania internal Nemo actions
This collection of Nemo actions are used in our internal workflow to make our
lives better.
All our company workflows are bases on Linux and opensource resources.In this repo we have collected all the Nemo actions that are used to post, edit,
and optimize of documents, images, blog, post, online store images and
descriptions.## Audio / Video
| | |
|-|-|
| | |## Images
| | |
|--------------------:|----------------------------------------------------------------------------------------------------|
| **image_resize_*** | (ImageMagick) to resize images on specific sizes and put the images in a **resize**/ subdir |
| **convert_to_*** | use **mogrify** (ImageMagick) to convert images to specific format WebP, PNG, GIF with 90% quality |## PDF actions
| | |
|---------------:|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **pdf2images** | use **pdfimages** command (`poppler-utils` package in Debian) to convert PDF pages in images and place them in "pdf2images" subdir |
| **img2pdf** | use [img2pdf utility](https://pypi.org/project/img2pdf/) to create a PDF file from selected images |
| **pdfShrink** | Shrink pdf to a decent size, using [ghostscript](https://www.ghostscript.com/). You can chose to make images grayscale and/or change the resolution of images |
| **pdfMerge** | Merge two or more pdf files in to a single pdf file, files will be merge using alphabetical name of the files. |## Others actions
| | |
|---------------------:|:--------------------------------------------------------------------------------|
| **refresh** | refresh the folder content. Similar with Refresh from Windows |
| **print** | print selected file using default printer settings |
| **printlibreoffice** | print LibreOffice files with default LibreOffice print settings |
| **refresh** | refresh the Nemo interface, basically is a right click menu shortcut for CTRL+R |
| **python3** | Run any python file using python3 exec |
| **massRename** | Use [Bulky](https://github.com/linuxmint/bulky) to mass rename selected files |## Nemo Action installation
These instructions assume a Debian/Ubuntu based distro for the commands to
install dependencies. For users of other distros please replace `sudo apt`
with the equivalent for your distro's package management system.First install git
```bash
sudo apt install git
```Then clone this repo
```bash
git clone https://github.com/SoftGeekRO/sgs.nemo-actions.git
```To have a functional Nemo actions pack you have to install first all the
applications that are used by the Nemo actions. For this use the bash
script install_app.sh. _For this script to run you must have root permissions_.Having cloned the repo you can either install all the actions using the
commands below or refer to the index of actions to install individual actions.To install all the nemo actions use the **install.sh** bash file and for
applications use **install_apps.sh**. Make sure that the
file is executable.### Make the install scrips executables
```bash
chmod a+x install.sh install_apps.sh
```### Install dependencies applications
For install_apps.sh script you have:
_(all|install|uninstall|reinstall|installBulky|uninstallBulky|listPackages)_* **listPackages** command will show a list of what packages are going to be installed
To perform the installation for dependency applications use:
```bash
sudo ./install_apps.sh all
```### Install sgs.nemo-actions
For install.sh you have three options:
_(install|uninstall|reinstall|)_To install sgs.nemo-actions use:
```bash
./install.sh install
```
this command will create soft links of all the actions inside you home profile Nemo
actions folder, under `/~.local/share/nemo/actions`### Individual packages list
- Imagemagick (`apt install imagemagick`) to use images resizing
- ffmpeg (`apt install ffmpeg`) to use video tools
- sox (`apt install sox`) to use wav's concatenation tools
- lame (`apt install lame`) to use audio conversions tools
- flac (`apt install flac`) to use flac compression tools
- poppler-utils (`apt install poppler-utils`) Poppler is a PDF rendering library based on the xpdf-3.0 code base.
- qpdf (`apt install qpdf`) QPDF is a command-line tool and C++ library that performs content-preserving transformations on PDF files
- pdf2djvu (`apt install pdf2djvu`) to use PDF to DJVU conversion tool
- img2pdf (`apt install img2pdf`) to convert any image to pdf
- pdftk (`apt install pdftk`) PDFtk is a simple tool for doing everyday things with PDF documents **(in the future possible to remove from the apps)**
- pypdf (`apt install pypdf`) [pypdf](https://github.com/py-pdf/pypdf) pypdf is a free and open-source pure-python PDF library capable of splitting, merging, cropping, and transforming
- ghostscript (`apt install ghostscript`) Ghostscript is an interpreter for the PostScript® language and PDF files.
- tesseract-ocr (`apt install tesseract-ocr`) Tesseract Open Source OCR Engine
- tesseract-ocr-eng (`apt install tesseract-ocr-eng`) Tesseract Open Source OCR Engine for English documents
- tesseract-ocr-ron (`apt install tesseract-ocr-eron`) Tesseract Open Source OCR Engine for Romanian documents
- pdfimages (`apt install poppler-utils`) to use PDF images extraction tools
- pdf_repair (`apt install qpdf`) to use PDF file repairing tools
- zenity (`apt install zenity`) Zenity enables you to create the various types of simple dialog.
- YAD (`apt install yad`) Program allows you to display GTK+ dialog boxes from command line or shell scripts.## Nemo Action updating
In a terminal navigate to the `sgs.nemo-actions` folder created when you
originally cloned the repoe.g `cd sgs.nemo-actions`
Once in the correct folder update your local copy with the latest commits,
before reinstalling your actions.`git pull origin; cd ..`
## Debug
`nemo -q; NEMO_DEBUG=Actions NEMO_ACTION_VERBOSE=5 nemo --debug`
## Write an action
To make scripts executed to multiple files with a progress bar,
use `bash_action.sh`. Simple example:
- execute `ls` command on each selected files:
`Exec=`
- same effect, but adding a bash variable:
`Exec=`Take a look to existing actions. Particularly `flac_to_wav.nemo_action` is a simple real-world example.
To specify icon you can use `Icon-Name`. Available icons are located in `/usr/share/icons/gnome/32x32/actions`.
## Debug actions (show actions logs and Nemo errors about actions)
```
nemo -q; NEMO_ACTION_VERBOSE=1 nemo --no-desktop
```### Some tricks:
- the space between `"` and `%F>` is important; ie `"%F>` will **not** work![plot](docs/title.svg)