Merge branch 'master' of git.schuerz.at:public/myshellconfig
This commit is contained in:
commit
b36d5c3632
1 changed files with 12 additions and 8 deletions
|
@ -38,28 +38,32 @@ help () {
|
|||
renameinplace: rename file to YYYYMMDD_HHmmss-c.ext in place (just rename file)
|
||||
rename: move like true, but rename ist like renameinplace
|
||||
copyrename: rename file in place and copy it to final destination with new name
|
||||
forcedate=$forcedate [fase|true] false: datetimeoriginal and createdate is only updated from filename, if not set; true: tags are always updated
|
||||
forcedate=$forcedate [false|true] false: datetimeoriginal and createdate is only updated from filename, if not set; true: tags are always updated
|
||||
setdate=$setdate [false|true] false: do not set date-tags, only if you are sure, tags are ok, and you want move or copy files;
|
||||
setoriginalfilenamee=$setoriginalfilename [false|true|force] false: do not set originalfilename from filname (default); true: set it, if not set; force: set it, also if exists;
|
||||
setoriginalfilename=$setoriginalfilename [false|true|force] false: do not set originalfilename from filname (default); true: set it, if not set; force: set it, also if exists;
|
||||
setartist=$setartist [false|true|<User Name>] true: set USERNAME from user, running the script; <User Name> set this User Name
|
||||
|
||||
# destination
|
||||
dest=$dest
|
||||
mimedestpic=$mimedestpic
|
||||
mimedestvid=$mimedestvid
|
||||
|
||||
subdestpic=$subdestpic
|
||||
subdestvid=$subdestvid
|
||||
|
||||
# or set subdestdefault, which is default for subdestpic and subdestvid
|
||||
subdestdefault=$subdestdefault
|
||||
|
||||
# final destinationpath
|
||||
${dest}/${mimedestpic}/${subdestpic}/%Y/%Y_%m"
|
||||
${dest}/${mimedestvid}/${subdestvid}/%Y/%Y_%m"
|
||||
|
||||
Supported Filet-extensions
|
||||
*.jpg, *.jpeg, *.png, *.mp4, *.3gp, *.gif
|
||||
*.jpg, *.jpeg, *.png, *.mp4, *.mov, *.3gp, *.gif
|
||||
|
||||
Examples:
|
||||
|
||||
# Scan current directory for all jpg|jpeg|mp4|png files, set datetimeoriginal and createdate
|
||||
# Scan current directory for all jpg|jpeg|mp4|mov|png|3gp|gif files, set datetimeoriginal and createdate
|
||||
$(basename $0)
|
||||
|
||||
# set datetimeoriginal and createdate from given file (only one is possible)
|
||||
|
@ -157,7 +161,7 @@ run_fix () {
|
|||
image/gif)
|
||||
MIMEDEST="${mimedestpic}/${subdestpic}"
|
||||
;;
|
||||
video/mp4|video/m4a|video/3gpp)
|
||||
video/mp4|video/m4a|video/3gpp|application/octet-stream)
|
||||
MIMEDEST="${mimedestvid}/${subdestvid}"
|
||||
;;
|
||||
*)
|
||||
|
@ -317,9 +321,9 @@ if [ $# -gt 0 ]; then
|
|||
esac
|
||||
|
||||
else
|
||||
loginfo "Progress all *.jpg, *.jpeg, *.png and mp4, *.3gp, *.gif files in pwd $(pwd)"
|
||||
all=$(find ${maxdepth:+-maxdepth} ${maxdepth:+$maxdepth} -type f |grep -i ".jpg$\|.jpeg$\|.mp4$\|.png$\|.3gp$\|.gif$"|wc -l)
|
||||
find ${maxdepth:+-maxdepth} ${maxdepth:+$maxdepth} -type f |grep -i ".jpg$\|.jpeg$\|.mp4$\|.png$\|.3gp$\|.gif$"|while read file; do
|
||||
loginfo "Progress all *.jpg, *.jpeg, *.png and mp4, *.3gp, *.gif *.mov files in pwd $(pwd)"
|
||||
all=$(find ${maxdepth:+-maxdepth} ${maxdepth:+$maxdepth} -type f |grep -i ".jpg$\|.jpeg$\|.mp4$\|.mov$\|.png$\|.3gp$\|.gif$"|wc -l)
|
||||
find ${maxdepth:+-maxdepth} ${maxdepth:+$maxdepth} -type f |grep -i ".jpg$\|.jpeg$\|.mp4$\|.mov$\|.png$\|.3gp$\|.gif$"|while read file; do
|
||||
let "i=i+1"
|
||||
loginfo "$i/$all"
|
||||
run_fix "$file"
|
||||
|
|
Loading…
Reference in a new issue