|
|
@ -11,9 +11,9 @@ export def `main import` [
|
|
|
|
--tag-origin # tag with origin folder name
|
|
|
|
--tag-origin # tag with origin folder name
|
|
|
|
] {
|
|
|
|
] {
|
|
|
|
print "Importing"
|
|
|
|
print "Importing"
|
|
|
|
if ("moved.csv" | path exists) == false {
|
|
|
|
# if ("moved.csv" | path exists) == false {
|
|
|
|
"source,destination\n" | save moved.csv
|
|
|
|
# "source,destination\n" | save moved.csv
|
|
|
|
}
|
|
|
|
# }
|
|
|
|
let entries = ( glob $"($src | str trim --right --char '/')/**/*"
|
|
|
|
let entries = ( glob $"($src | str trim --right --char '/')/**/*"
|
|
|
|
| each { try { ls -l $in } catch {|e| print_line -e $"Failed to get metadata of ($e)"; []} }
|
|
|
|
| each { try { ls -l $in } catch {|e| print_line -e $"Failed to get metadata of ($e)"; []} }
|
|
|
|
| where { ($in | length) > 0 }
|
|
|
|
| where { ($in | length) > 0 }
|
|
|
@ -90,7 +90,7 @@ def parse_exif_timestamp [timestamp: string, offset?: any] {
|
|
|
|
|
|
|
|
|
|
|
|
def archive-cp [src: string, dst: string, --link, --tag] {
|
|
|
|
def archive-cp [src: string, dst: string, --link, --tag] {
|
|
|
|
rsync -X -U -p -t -g -o -u --info=ALL $src $dst
|
|
|
|
rsync -X -U -p -t -g -o -u --info=ALL $src $dst
|
|
|
|
$"($src),($dst)\n" | save -a moved.csv
|
|
|
|
# $"($src),($dst)\n" | save -a moved.csv
|
|
|
|
|
|
|
|
|
|
|
|
if $tag {
|
|
|
|
if $tag {
|
|
|
|
xattr -w user.xdg.tags ($src | path parse | get parent | path parse | get stem) $dst
|
|
|
|
xattr -w user.xdg.tags ($src | path parse | get parent | path parse | get stem) $dst
|
|
|
|