In Linux Mint Mate (with Caja file manager), store file under ~/.config/caja/scripts/
(in my case subfolder ~/.config/caja/scripts/pandoc-convert
). The example here uses $CAJA_SCRIPT_SELECTED_FILE_PATHS
, but I couldn't get this to work on my machine.
Last active
November 3, 2021 02:45
-
-
Save bitsgalore/fc69e55c67830413f97c to your computer and use it in GitHub Desktop.
Caja scripts for context menu actions in Linux Mint Mate
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
#!/bin/sh | |
# Analyze file with jpylyzer, display result with | |
# default text editor | |
# I/O stuff | |
fileIn=$1 | |
fileOut=/tmp/"$fileIn".xml | |
# Viewer - default text editor (should work across most Linux flavors) | |
viewer=xdg-open | |
# Run Jpylyzer | |
jpylyzer "$fileIn" > "$fileOut" | |
# Display result | |
$viewer "$fileOut" | |
# Alternative would be to use Zenity: | |
# jpylyzer "$fileIn" |zenity --text-info --title "Jpylyzer output $fileIn" --width=640 --height=480 | |
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
#!/bin/sh | |
# Convert Markdown file to docx using pandoc | |
fileIn=$1 | |
fileOut=$fileIn.docx | |
pandoc -s -S --ascii -N --toc-depth=2 "$fileIn" -o "$fileOut" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"The example here [broken link] uses $CAJA_SCRIPT_SELECTED_FILE_PATHS, but I couldn't get this to work on my machine."
I had been trying to use:
but it did not work properly for multiple selected files. But the following works: