diff --git a/Makefile.in b/Makefile.in index 26ea49b..b7a6399 100644 --- a/Makefile.in +++ b/Makefile.in @@ -94,6 +94,7 @@ IN_FILES = $(shell find $(local_dirs) -type f -iname '*.in') IN_FILES_INSTANTIATED = $(IN_FILES:.in=) CONFIGURE_AC = configure.ac +CONFIGURE = configure # get information from changelog DEBIAN_CHANGELOG = debian/changelog @@ -101,7 +102,7 @@ DEBIAN_CHANGELOG_VERSION = $(shell perl -ne 'if(s/^$(PACKAGE_NAME)\s*\((.*?)\).* # default target .PHONY: all -all: $(IN_FILES_INSTANTIATED) $(UCA_XML_FILES) $(CONFIGURE_AC) $(GFMANPAGES) +all: $(IN_FILES_INSTANTIATED) $(UCA_XML_FILES) $(CONFIGURE) $(CONFIGURE_AC) $(GFMANPAGES) %: %.m4 $(wildcard $(M4_INCL)/*.m4) m4 -I $(M4_INCL) $< > $@ @@ -139,6 +140,9 @@ $(sort $(install_target_dirs)): % : mkdir -p $@ @echo $@ >> $(installed_files_file) +$(CONFIGURE): $(CONFIGURE_AC) + -autoconf + $(CONFIGURE_AC): $(DEBIAN_CHANGELOG) perl -pi -e 's#^(\s*AC_INIT\([^,]*,\s*\[)([.0-9_a-zA-Z-]+)(\]\s*,.*\))#$${1}$(DEBIAN_CHANGELOG_VERSION)$${3}#g' $@ diff --git a/configure b/configure index d2217a9..9d985b6 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for thunar-custom-actions 0.0.8. +# Generated by GNU Autoconf 2.69 for thunar-custom-actions 0.0.9. # # Report bugs to . # @@ -579,8 +579,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='thunar-custom-actions' PACKAGE_TARNAME='thunar-custom-actions' -PACKAGE_VERSION='0.0.8' -PACKAGE_STRING='thunar-custom-actions 0.0.8' +PACKAGE_VERSION='0.0.9' +PACKAGE_STRING='thunar-custom-actions 0.0.9' PACKAGE_BUGREPORT='nobodyinperson@gmx.de' PACKAGE_URL='' @@ -593,7 +593,10 @@ gs_bin bc_bin zenity_bin gpg2_bin +perl_bin convert_bin +xargs_bin +xdg_open_bin make_bin UCAFILE PASSWDFILE @@ -1195,7 +1198,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures thunar-custom-actions 0.0.8 to adapt to many kinds of systems. +\`configure' configures thunar-custom-actions 0.0.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1258,7 +1261,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of thunar-custom-actions 0.0.8:";; + short | recursive ) echo "Configuration of thunar-custom-actions 0.0.9:";; esac cat <<\_ACEOF @@ -1333,7 +1336,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -thunar-custom-actions configure 0.0.8 +thunar-custom-actions configure 0.0.9 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1350,7 +1353,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by thunar-custom-actions $as_me 0.0.8, which was +It was created by thunar-custom-actions $as_me 0.0.9, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -1794,6 +1797,86 @@ fi test "$make_bin" != "yes" && as_fn_error $? "no make found" "$LINENO" 5 +# Extract the first word of "xdg-open", so it can be a program name with args. +set dummy xdg-open; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_xdg_open_bin+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$xdg_open_bin"; then + ac_cv_prog_xdg_open_bin="$xdg_open_bin" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_xdg_open_bin="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_xdg_open_bin" && ac_cv_prog_xdg_open_bin="no" +fi +fi +xdg_open_bin=$ac_cv_prog_xdg_open_bin +if test -n "$xdg_open_bin"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xdg_open_bin" >&5 +$as_echo "$xdg_open_bin" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +test "$xdg_open_bin" != "yes" && as_fn_error $? "no xdg-open found" "$LINENO" 5 + +# Extract the first word of "xargs", so it can be a program name with args. +set dummy xargs; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_xargs_bin+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$xargs_bin"; then + ac_cv_prog_xargs_bin="$xargs_bin" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_xargs_bin="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_xargs_bin" && ac_cv_prog_xargs_bin="no" +fi +fi +xargs_bin=$ac_cv_prog_xargs_bin +if test -n "$xargs_bin"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xargs_bin" >&5 +$as_echo "$xargs_bin" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +test "$xargs_bin" != "yes" && as_fn_error $? "no xargs found" "$LINENO" 5 + # Extract the first word of "convert", so it can be a program name with args. set dummy convert; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -1834,6 +1917,46 @@ fi test "$convert_bin" != "yes" && as_fn_error $? "no convert/ImageMagick found" "$LINENO" 5 +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_perl_bin+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$perl_bin"; then + ac_cv_prog_perl_bin="$perl_bin" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_perl_bin="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_perl_bin" && ac_cv_prog_perl_bin="no" +fi +fi +perl_bin=$ac_cv_prog_perl_bin +if test -n "$perl_bin"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_bin" >&5 +$as_echo "$perl_bin" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +test "$perl_bin" != "yes" && as_fn_error $? "no Perl found" "$LINENO" 5 + # Extract the first word of "gpg2", so it can be a program name with args. set dummy gpg2; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -2693,7 +2816,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by thunar-custom-actions $as_me 0.0.8, which was +This file was extended by thunar-custom-actions $as_me 0.0.9, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -2746,7 +2869,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -thunar-custom-actions config.status 0.0.8 +thunar-custom-actions config.status 0.0.9 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index be19d62..0c1860f 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT([thunar-custom-actions], [0.0.8], [nobodyinperson@gmx.de]) +AC_INIT([thunar-custom-actions], [0.0.9], [nobodyinperson@gmx.de]) m4_include([m4/ax_python_module.m4]) @@ -16,9 +16,18 @@ AC_SUBST([UCAFILE]) AC_CHECK_PROG([make_bin],[make],[yes],[no]) test "$make_bin" != "yes" && AC_MSG_ERROR([no make found]) +AC_CHECK_PROG([xdg_open_bin],[xdg-open],[yes],[no]) +test "$xdg_open_bin" != "yes" && AC_MSG_ERROR([no xdg-open found]) + +AC_CHECK_PROG([xargs_bin],[xargs],[yes],[no]) +test "$xargs_bin" != "yes" && AC_MSG_ERROR([no xargs found]) + AC_CHECK_PROG([convert_bin],[convert],[yes],[no]) test "$convert_bin" != "yes" && AC_MSG_ERROR([no convert/ImageMagick found]) +AC_CHECK_PROG([perl_bin],[perl],[yes],[no]) +test "$perl_bin" != "yes" && AC_MSG_ERROR([no Perl found]) + AC_CHECK_PROG([gpg2_bin],[gpg2],[yes],[no]) test "$gpg2_bin" != "yes" && AC_MSG_ERROR([no gpg2 found]) diff --git a/debian/changelog b/debian/changelog index 6d2e45f..bd987c4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +thunar-custom-actions (0.0.9) unstable; urgency=medium + + * add symbolic link creation + * remove double translations + * add space-consuming element finder + + -- Yann Büchau Thu, 08 Jun 2017 19:49:22 +0200 + thunar-custom-actions (0.0.8) unstable; urgency=medium * add GPG en/decryption actions diff --git a/debian/control b/debian/control index f6872ff..b4aac41 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,8 @@ Vcs-Git: https://github.com/nobodyinperson/thunar-custom-actions.git Package: thunar-custom-actions Architecture: all Depends: ${misc:Depends}, thunar, python3, python3-lxml, make, imagemagick, - zenity, ghostscript, gnupg2, bc + zenity, ghostscript, gnupg2, bc, xdg-utils, perl, findutils (>=4.6), + coreutils (>=8.0) Conflicts: thunar-custom-actions Replaces: thunar-custom-actions Description: system-wide thunar custom actions diff --git a/m4/tuca.m4 b/m4/tuca.m4 index 0ba38c8..86d4b23 100644 --- a/m4/tuca.m4 +++ b/m4/tuca.m4 @@ -13,9 +13,7 @@ define(TUCA_FIRST_FILE,%f)dnl define(TUCA_FIRST_FILE_FOLDER,%d)dnl define(TUCA_FIRST_FILENAME,%n)dnl dnl -dnl define(TUCA_LOOP,dnl -set -e;dnl AMOUNT=$(for TUCA_FILE_VAR in TUCA_ALL_FILES;do echo TUCA_FILE;done | wc -l);dnl NR=0;dnl for TUCA_FILE_VAR in TUCA_ALL_FILES;do dnl @@ -35,5 +33,5 @@ dnl define(TUCA_WAIT,dnl set -e;dnl $1 |dnl -zenity --progress --auto-kill --auto-close --pulsate;dnl +zenity --progress --auto-kill --auto-close --pulsate dnl )dnl diff --git a/share/thunar-custom-actions/system-uca/gpg.xml.m4 b/share/thunar-custom-actions/system-uca/gpg.xml.m4 index 66e5c7a..3cfb86b 100644 --- a/share/thunar-custom-actions/system-uca/gpg.xml.m4 +++ b/share/thunar-custom-actions/system-uca/gpg.xml.m4 @@ -6,11 +6,9 @@ include(tuca.m4)dnl gcr-gnupg - encrypt symmetrically with GPG symmetrisch mit GPG verschlüsseln encrypt symmetrically with GPG - PASSWORD=$(zenity --password);TUCA_LOOP(TUCA_OUT_VAR=TUCA_FILE.asc;echo $PASSWORD | gpg2 --batch --yes --passphrase-fd 0 --symmetric --armor --cipher-algo AES256 -o TUCA_TEMP TUCA_FILE) - Each selected file is encrypted symmetrically with one given password via GPG. + PASSWORD=$(zenity --password) || exit;TUCA_LOOP(TUCA_OUT_VAR=TUCA_FILE.asc;echo $PASSWORD | gpg2 --batch --yes --passphrase-fd 0 --symmetric --armor --cipher-algo AES256 -o TUCA_TEMP TUCA_FILE) Die ausgewählten Dateien werden symmetrisch mit einem Password mit GPG verschlüsselt. Each selected file is encrypted symmetrically with one given password with GPG. * @@ -22,11 +20,9 @@ include(tuca.m4)dnl gcr-gnupg - decrypt symmetrically with GPG symmetrisch mit GPG entschlüsseln decrypt symmetrically with GPG PASSWORD=$(zenity --password);TUCA_LOOP(TUCA_OUT_VAR=$(dirname TUCA_FILE)/$(basename TUCA_FILE .asc);echo $PASSWORD | gpg2 --batch --yes --passphrase-fd 0 --decrypt --cipher-algo AES256 -o TUCA_TEMP TUCA_FILE || zenity --warning --text "Wrong Password for $(basename TUCA_FILE)?") - Each selected file is decrypted symmetrically with one given password via GPG. Die ausgewählten Dateien werden symmetrisch mit einem Password mit GPG entschlüsselt. Each selected file is decrypted symmetrically with one given password with GPG. *.asc diff --git a/share/thunar-custom-actions/system-uca/misc.xml.m4 b/share/thunar-custom-actions/system-uca/misc.xml.m4 new file mode 100644 index 0000000..78d4cf2 --- /dev/null +++ b/share/thunar-custom-actions/system-uca/misc.xml.m4 @@ -0,0 +1,32 @@ + + + + + emblem-symbolic-link + Verknüpfung erstellen + create link to this file + TARGET=$(zenity --file-selection --save --filename TUCA_FIRST_FILE) || exit;ln -s TUCA_FIRST_FILE $TARGET || zenity --error; + Eine symbolische Verknüpfung zu der ausgewählten Datei erstellen. + Create a symbolic link to the selected file. + * + + + + + + + + edit-find + Platzfresser finden + find space-consuming elements + TMPFILE=$(mktemp);TUCA_WAIT(du -ha --max-depth 1 TUCA_FIRST_FILE | grep -v 'TUCA_FIRST_FILE$' | sort -rh | perl -ne '($s,$n)=m/^(\S+)\s+(\S+.*)$/;$n=~s:.*/([^/]+)$:${1}:g;print "$s\n$n\n"' | tee $TMPFILE);cd TUCA_FIRST_FILE;cat $TMPFILE | zenity --list --column="size" --column="name" --title="" --text="" --print-column 2 | xargs -r --delimiter='\n' xdg-open;rm $TMPFILE + Die größten Dateien und Ordner hier sortiert auflisten. + Give a sorted list of the biggest files and folders here. + * + + + + diff --git a/share/thunar-custom-actions/system-uca/pdf.xml.m4 b/share/thunar-custom-actions/system-uca/pdf.xml.m4 index ad58520..3c49a88 100644 --- a/share/thunar-custom-actions/system-uca/pdf.xml.m4 +++ b/share/thunar-custom-actions/system-uca/pdf.xml.m4 @@ -6,11 +6,9 @@ include(tuca.m4)dnl application-pdf - convert to PDF zu PDF konvertieren convert to PDF TUCA_WAIT(convert TUCA_ALL_FILES -gravity Center -background white -resize 1654x2338 -extent 1654x2338 -units PixelsPerInch -density 200x200 TUCA_FIRST_FILE.pdf) - The selected images are converted to pages of a single PDF document at A4 page size. Die ausgewählten Bilder werden zu Seiten eines einzigen PDF-Dokument in A4-Größe konvertiert. The selected images are converted to pages of a single PDF document at A4 page size. * @@ -18,11 +16,9 @@ include(tuca.m4)dnl application-pdf - concatenate PDFs zu einem PDF zusammenfügen concatenate PDFs TUCA_WAIT(gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=TUCA_FIRST_FILE-all.pdf TUCA_ALL_FILES) - The selected PDF files are concatenated into one PDF file. Die ausgewählten PDF-Dateien werden zu einem einzigen PDF-Dokument zusammengefügt The selected PDF files are concatenated into one PDF file. *.PDF;*.pdf @@ -30,11 +26,9 @@ include(tuca.m4)dnl window-restore-symbolic - reduce PDF file size PDF-Dateigröße verringern reduce PDF file size TUCA_LOOP(gs -dBATCH -dNOPAUSE -q -dPDFSETTINGS=/screen -sDEVICE=pdfwrite -dDownsampleColorImages=true -dDownsampleGrayImages=true -dDownsampleMonoImages=true -dColorImageResolution=72 -dGrayImageResolution=72 -dMonoImageResolution=72 -sOutputFile=TUCA_TEMP TUCA_FILE) - [Caution: loss of quality!] An attempt to reduce the file size of each selected PDF file is made. [Vorsicht: Qualitätsverlust] Es wird versucht, bei den ausgewählten PDF-Dokumenten die Dateigröße zu verringern. [Caution: loss of quality!] An attempt to reduce the file size of each selected PDF file is made. *.PDF;*.pdf