<commit_before><commit_msg>init chg file name using author's name<commit_after>#!/usr/bin/env perl
# myke foto-author-lc.pl 2016-01-14 0.1
# make foto file name lowercase and add author's name to it
# repeat for all files in directory
# no dubbing in renaming

print "This is foto-mk-lc.pl 2011-02-07 1 by myke\n\n";

@fa = <*.jpg>;
@fb = <*.JPG>;
%files = ();

foreach $f (@fa) {$files{$f} = 1; }
foreach $f (@fb) {$files{$f} = 1; }

$n = 0;

foreach $f (sort keys %files) {print "$f -> "; 

	$fn = lc $f;
	($name, $ext) = split (/\./, $fn);
	$name .= '_myke' unless substr($name, -5) eq '_myke';
	$fnew = $name . '.' . $ext;

	print "$fnew\n";

	rename ($f, $fnew) unless $f eq $fnew;
	$n++;

}
# foreach 

print "\nfiles processed: $n\n";
{'fraction_non_alphanumeric': 0.21322537112010798, 'fraction_numerical': 0.0310391363022942, 'mean_word_length': 3.313953488372093, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6768221', 'n_tokens_mistral': 333, 'n_tokens_neox': 308, 'n_words': 97}