-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmetadata.sh
34 lines (33 loc) · 1.36 KB
/
metadata.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash
opt1="Extract Metadata"
opt2="Clean Metadata"
opt3="Google Document Metadata"
opt4="Launch Sherloq"
exifdata=$(zenity --list --title "Metadata Utilities" --radiolist --column "" --column "" TRUE "$opt1" FALSE "$opt2" FALSE "$opt3" FALSE "$opt4" --height=400 --width=300)
case $exifdata in
$opt1 )
zenity --info --text "The next window will prompt for a target folder of media" --title "Exiftool"
sleep 1
exiftool_folder=$(zenity --file-selection --directory --title "Exiftool")
exiftool /$exiftool_folder/* -csv > /$exiftool_folder/MetadataReport.csv
nautilus $exiftool_folder
zenity --info --text="Report saved in your Documents folder." --title="Metadata Cleaning"
exit;;
$opt2 )
zenity --info --text="Select a file to clean" --width=200 --title="Metadata Cleaning"
sleep 1
data_file=$(zenity --file-selection --title "Metadata Cleaning")
mat2 "$data_file"
nautilus $data_file
zenity --info --text "A clean copy has been saved next to the original." --title="Metadata Cleaning"
exit;;
$opt3 )
url=$(zenity --entry --title "Google Document" --text "Enter target URL")
xeuledoc "$url" > ~/Documents/"GMetadata.txt" | zenity --progress --pulsate --no-cancel --auto-close --title="Google Documents Metadata" --text="Data being saved to ~/Documents/"
xdg-open ~/Documents/GMetadata.txt
exit;;
$opt4 )
cd ~/Downloads/Programs/sherloq/gui/
python3 sherloq.py
exit;;
esac