photo-helpers

Unnamed repository; edit this file 'description' to name the repository.
git clone git://code.clttr.info/photo-helpers.git
Log | Files | Refs | README | LICENSE

commit d5146f66688dc4165f5d81093e0e67cb2946bb1e
parent 706102c7657bf27f6ef7ffebc9341bb48d3b785e
Author: René Wagner <rwagner@rw-net.de>
Date:   Sun, 13 Sep 2020 13:49:43 +0200

some cosmetics

Diffstat:
MREADME.md | 2+-
Mafm.pl | 17++++++++---------
Mjd.pl | 2+-
Mspmvsc.pl | 4++--
Msposc.pl | 4++--
5 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/README.md b/README.md @@ -1,7 +1,7 @@ # About This rather small scripts written in [Perl](https://perl.org) provide useful function for managing (raw and output) files for photographers. -**Additional information can be found on the [wiki page](https://man.sr.ht/~rwa/photo-workflow/photo-helpers).** +**Additional information can be found on the [wiki page](https://man.sr.ht/~rwa/photo-workflow/).** ## usage diff --git a/afm.pl b/afm.pl @@ -15,9 +15,9 @@ use Getopt::Std; $Getopt::Std::STANDARD_HELP_VERSION = 'true'; my $VERSION = '0.6'; -my $PROGRAM = 'Art File Mover'; +my $PROGRAM = 'ART File Mover'; -my $configfile = catfile(File::HomeDir->my_home, '.art_file_mover.conf'); +my $configfile = catfile(File::HomeDir->my_home, '.afm.conf'); # read commandline switches our $opt_l = 0; @@ -26,9 +26,9 @@ our $opt_f = 'JPEG'; our $opt_c = 'jpe{0,1}g'; our $opt_s = 0; -getconfig($configfile); +getconfig(); -getopts('slr:f:c:') or die "Invalid parameters provided! See 'art_file_mover.pl --help' for more details."; +getopts('slr:f:c:') or die "Invalid parameters provided! See 'afm.pl --help' for more details."; # read remaining commandline args für destination dir # last dir will win @@ -41,7 +41,7 @@ foreach my $arg ( @ARGV ) if ($destination_dir eq getcwd) { $opt_l = 1; } -if ( $opt_s ) { writeconfig($configfile); } +if ( $opt_s ) { writeconfig(); } move_files($destination_dir); @@ -109,14 +109,12 @@ sub move_files sub getconfig { - my ( $config_filename ) = @_; - if ( -f $config_filename ) { do $config_filename; } + if ( -f $configfile ) { do $configfile; } } sub writeconfig { - my ( $config_filename ) = @_; - open(my $filehandle, '>', $config_filename) or die "Could not open file '$config_filename': $!"; + open(my $filehandle, '>', $configfile) or die "Could not open file '$configfile': $!"; say $filehandle '$opt_f="'. $opt_f .'";'; say $filehandle '$opt_c="'. $opt_c .'";'; say $filehandle '$opt_r="'. $opt_r .'";'; @@ -143,6 +141,7 @@ sub main::HELP_MESSAGE say ' -r <raw> : override the raw extensions, defaults to "DNG"'; say ' -f <folder> : override the folder for converted files, defaults to "JPEG"'; say ' -c <ext> : override the converted file extenion (case-insensitive), defaults to "jp(e)g"'; + say ' Perl-compatible regular expressions allowed'; say ' -s : safe current options (-r, -f, -c only) to user profile. If present the saved values are applied automatically.'; say ' --help : show this help'; } diff --git a/jd.pl b/jd.pl @@ -20,7 +20,7 @@ my $PROGRAM = 'JpegDivider'; our $opt_l = 0; our $opt_f = 'JPEG'; -getopts('lf:') or die "Invalid parameters provided! See 'jpegdivider.pl --help' for more details."; +getopts('lf:') or die "Invalid parameters provided! See 'jd.pl --help' for more details."; # read remaining commandline args # last dir will win diff --git a/spmvsc.pl b/spmvsc.pl @@ -12,12 +12,12 @@ use Getopt::Std; $Getopt::Std::STANDARD_HELP_VERSION = 'true'; my $VERSION = '0.6'; -my $PROGRAM = 'Multiversion Sidecar Cleaner'; +my $PROGRAM = 'SilkyPix Multiversion Sidecar Cleaner'; # read commandline switches our $opt_l = 0; -getopts('l') or die "Invalid parameters provided! See 'silkypix_multiversion_sidecar_cleaner.pl --help' for more details."; +getopts('l') or die "Invalid parameters provided! See 'spmvsc.pl --help' for more details."; # read remaining commandline args # last dir will win diff --git a/sposc.pl b/sposc.pl @@ -13,12 +13,12 @@ use Getopt::Std; $Getopt::Std::STANDARD_HELP_VERSION = 'true'; my $VERSION = '0.5'; -my $PROGRAM = 'Orphaned Sidecar Cleaner'; +my $PROGRAM = 'SilkyPix Orphaned Sidecar Cleaner'; # read commandline switches our $opt_l = 0; -getopts('l') or die "Invalid parameters provided! See 'silkypix_multiversion_sidecar_cleaner.pl --help' for more details."; +getopts('l') or die "Invalid parameters provided! See 'sposc.rpl --help' for more details."; # read remaining commandline args # last dir will win