|
@@ -30,9 +30,22 @@ If you want to mix photos while keeping chronological order in viewers, you have
|
|
|
|
|
|
Use the command below to make every file start by `YYYYMMDD_hhmmss`.
|
|
|
|
|
|
+### Metadata extraction
|
|
|
+
|
|
|
+Replace `firstname` by the firstname of the person taking the picture.
|
|
|
+
|
|
|
+```sh
|
|
|
+exiftool -p 'mv $FileName ${CreateDate}_firstname.jpg' -d "%Y%m%d_%H%M%S" -q
|
|
|
+ . > rename.sh
|
|
|
+```
|
|
|
+
|
|
|
+Then execute and remove `rename.sh`.
|
|
|
+
|
|
|
+### File name manipulations
|
|
|
+
|
|
|
On Ubuntu, you have two different utilities : `rename.ul` making simple replacements, and `rename` working with regex.
|
|
|
|
|
|
-### Add a name suffixe
|
|
|
+#### Add a name suffixe
|
|
|
|
|
|
`p1.jpg` -> `p1_suffixe.jpg`
|
|
|
|
|
@@ -40,7 +53,7 @@ On Ubuntu, you have two different utilities : `rename.ul` making simple replacem
|
|
|
rename.ul '.jpg' '_suffixe.jpg' *
|
|
|
```
|
|
|
|
|
|
-### Replace strange chars
|
|
|
+#### Replace strange chars
|
|
|
|
|
|
`20220711_181620~2.jpg` -> `20220711_181620_2.jpg`
|
|
|
|
|
@@ -50,7 +63,7 @@ rename.ul ')' '' *.jpg
|
|
|
rename.ul '(' '_' *.jpg
|
|
|
```
|
|
|
|
|
|
-### Device to end
|
|
|
+#### Device to end
|
|
|
|
|
|
`CANON_20220711_181620.jpg` -> `20220711_181620_IMG_CANON.jpg`
|
|
|
|
|
@@ -58,7 +71,7 @@ rename.ul '(' '_' *.jpg
|
|
|
rename 's/(\w+)_(\d{8}_.*)\./$2_IMG_$1./' *.jpg
|
|
|
```
|
|
|
|
|
|
-### Device and type to end
|
|
|
+#### Device and type to end
|
|
|
|
|
|
`CANON_IMG_20220713_210605__01.jpg` -> `20220713_210605__01_IMG_CANON`
|
|
|
`SAM_VID_20220713_210605__01.mp4` -> `20220713_210605__01_VID_SAM.mp4`
|
|
@@ -67,7 +80,7 @@ rename 's/(\w+)_(\d{8}_.*)\./$2_IMG_$1./' *.jpg
|
|
|
rename 's/(\w+)_(\w{3})_(\d{8}_.*)\./$3_$2_$1/\.' *
|
|
|
```
|
|
|
|
|
|
-### Fix Google Pixel length
|
|
|
+#### Fix Google Pixel length
|
|
|
|
|
|
```sh
|
|
|
rename 's/(^PXL_.*_[0-9]{6}).*\.jpg$/$1_IMG_person.jpg/' *.jpg
|