File tree Expand file tree Collapse file tree 9 files changed +131
-0
lines changed Expand file tree Collapse file tree 9 files changed +131
-0
lines changed Original file line number Diff line number Diff line change
1
+ # NiceScripts
2
+
3
+ Some nice scripts...
4
+
5
+ # Folders
6
+
7
+ * nautilus : scripts for the nautilus contextual menu
8
+ * nemo : scripts for the nemo contextual menu
9
+ * bin : scripts for generic bash use
10
+
11
+
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # Copy the nautilus scripts to nautilus folder
3
+ TARGET=" ${HOME} /.local/share/nemo/scripts"
4
+ SRC=` realpath ./scripts`
5
+ cp -a ./scripts/* $TARGET /
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # Replace nemo script folder with a link to this repository
3
+ TARGET=" ${HOME} /.local/share/nemo/scripts"
4
+ SRC=` realpath ./scripts`
5
+ if test -d " $TARGET "
6
+ then
7
+ mv $TARGET $TARGET .bak
8
+ echo " Your previous $TARGET folder has been rename to $TARGET .bak"
9
+ fi
10
+ ln -s $SRC $TARGET
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ # Script using pandoc to convert Latex file to Markdown file
4
+ # Author Romain Rossi <[email protected] >
5
+ # Licence : GPL
6
+
7
+ logf=" $HOME /scripts.log"
8
+
9
+ for infile in " $NEMO_SCRIPT_SELECTED_FILE_PATHS "
10
+ do
11
+ d=$( dirname " $infile " )
12
+ i=$( basename -z " $infile " )
13
+ o=$( basename -z --suffix=.txt " $i " ) .md
14
+ ifile=" $d /$i "
15
+ ofile=" $d /$o "
16
+ pandoc -f latex " $ifile " -o " $ofile " 2> " $logf "
17
+ notify-send " Fichier $ifile converti" " Sortie : $ofile "
18
+ done
19
+
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ # Script using pandoc to convert Markdown files to OpenDocument Text
4
+ # Author Romain Rossi <[email protected] >
5
+ # Licence : GPL
6
+
7
+ logf=" $HOME /scripts.log"
8
+
9
+ for infile in " $NEMO_SCRIPT_SELECTED_FILE_PATHS "
10
+ do
11
+ d=$( dirname " $infile " )
12
+ i=$( basename -z " $infile " )
13
+ o=$( basename -z --suffix=.md " $i " ) .odt
14
+ ifile=" $d /$i "
15
+ ofile=" $d /$o "
16
+ pandoc -f markdown --toc -t odt " $ifile " -o " $ofile " 2> " $logf "
17
+ notify-send " Fichier $ifile converti" " Sortie : $ofile "
18
+ done
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # Script using pandoc to convert Markdown files to PDF
3
+ # Author Romain Rossi <[email protected] >
4
+ # Licence : GPL
5
+
6
+ logf=" $HOME /scripts.log"
7
+
8
+ for infile in " $NEMO_SCRIPT_SELECTED_FILE_PATHS "
9
+ do
10
+ d=$( dirname " $infile " )
11
+ i=$( basename -z " $infile " )
12
+ o=$( basename -z --suffix=.md " $i " ) .pdf
13
+ ifile=" $d /$i "
14
+ ofile=" $d /$o "
15
+ pandoc -M papersize=a4 -M documentclass=report -M geometry=margin=2cm -f markdown " $ifile " -o " $ofile " 2> " $logf "
16
+ notify-send " Fichier $ifile converti" " Sortie : $ofile "
17
+ done
18
+
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # Script using pandoc to convert Textile files to OpenDocument text
3
+ # Author Romain Rossi <[email protected] >
4
+ # Licence : GPL
5
+
6
+ logf=" $HOME /scripts.log"
7
+
8
+ for infile in " $NEMO_SCRIPT_SELECTED_FILE_PATHS "
9
+ do
10
+ d=$( dirname " $infile " )
11
+ i=$( basename -z " $infile " )
12
+ o=$( basename -z --suffix=.txt " $i " ) .odt
13
+ ifile=" $d /$i "
14
+ ofile=" $d /$o "
15
+ pandoc -f textile --toc -t odt " $ifile " -o " $ofile " 2> " $logf "
16
+ notify-send " Fichier $ifile converti" " Sortie : $ofile "
17
+ done
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # Script using pandoc to convert Textile files to PDF
3
+ # Author Romain Rossi <[email protected] >
4
+ # Licence : GPL
5
+
6
+ logf=" $HOME /scripts.log"
7
+
8
+ for infile in " $NEMO_SCRIPT_SELECTED_FILE_PATHS "
9
+ do
10
+ d=$( dirname " $infile " )
11
+ i=$( basename -z " $infile " )
12
+ o=$( basename -z --suffix=.txt " $i " ) .pdf
13
+ ifile=" $d /$i "
14
+ ofile=" $d /$o "
15
+ pandoc -M papersize=a4 -M documentclass=report -M geometry=margin=2cm --toc -f textile " $ifile " -o " $ofile " 2> " $logf "
16
+ notify-send " Fichier $ifile converti" " Sortie : $ofile "
17
+ done
18
+
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # Wrapper nautilus script for ps2pdf
3
+ # Author Romain Rossi <[email protected] >
4
+ # Licence : GPL
5
+
6
+ logf=" $HOME /scripts.log"
7
+
8
+ for infile in " $NEMO_SCRIPT_SELECTED_FILE_PATHS "
9
+ do
10
+ d=$( dirname " $infile " )
11
+ i=$( basename -z " $infile " )
12
+ ifile=" $d /$i "
13
+ ps2pdf " $i " 2> " $logf "
14
+ notify-send " Fichier $i converti"
15
+ done
You can’t perform that action at this time.
0 commit comments