From e493d37860b9d1c4f303020a932d85b59260f7d6 Mon Sep 17 00:00:00 2001 From: Micha Glave Date: Wed, 17 Jun 2020 11:08:44 +0200 Subject: [PATCH] reading exif-proof of concept. --- .gitignore | 25 +----------------------- BlueSquare.jpg | Bin 0 -> 24205 bytes Canon_40D.jpg | Bin 0 -> 7958 bytes Cargo.toml | 15 +++++++++++++++ README.md | 9 ++++++++- src/main.rs | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 75 insertions(+), 25 deletions(-) create mode 100644 BlueSquare.jpg create mode 100644 Canon_40D.jpg create mode 100644 Cargo.toml create mode 100644 src/main.rs diff --git a/.gitignore b/.gitignore index 2df0763..c6637ef 100644 --- a/.gitignore +++ b/.gitignore @@ -15,27 +15,7 @@ Cargo.lock # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 # User-specific stuff -.idea/**/workspace.xml -.idea/**/tasks.xml -.idea/**/usage.statistics.xml -.idea/**/dictionaries -.idea/**/shelf - -# Generated files -.idea/**/contentModel.xml - -# Sensitive or high-churn files -.idea/**/dataSources/ -.idea/**/dataSources.ids -.idea/**/dataSources.local.xml -.idea/**/sqlDataSources.xml -.idea/**/dynamic.xml -.idea/**/uiDesigner.xml -.idea/**/dbnavigator.xml - -# Gradle -.idea/**/gradle.xml -.idea/**/libraries +.idea/ # Gradle and Maven with auto-import # When using Gradle or Maven with auto-import, you should exclude module files, @@ -53,9 +33,6 @@ Cargo.lock # CMake cmake-build-*/ -# Mongo Explorer plugin -.idea/**/mongoSettings.xml - # File-based project format *.iws diff --git a/BlueSquare.jpg b/BlueSquare.jpg new file mode 100644 index 0000000000000000000000000000000000000000..81b8a2255092ab06f72ec3ed3af68a9ac1fb47e2 GIT binary patch literal 24205 zcmeG^30PCd)^igG`wp%sA)=rH*&rdvBD+x#WD&Ji3`u}!NH7V4Yuu`JX;rjp)w;J< zZME9xS}m^CR;!h|*4CY>)mmIoRLK3$+>j6yP`kYM|L^za%iNhWXU?2+=G>XNGj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RfEfpF3xcrfA6PI)9=5Z_d*Wd=Ho&7ea}WZOU(=B=z;g!=pEj?t8BgN=V9j9~O1)Lim!TKI#3uLV0It ze6hZ-!4fb?iqWET-wTN=+I4eG(`G`*4WXa3TulM*Ou5h7w%?D^n=O!jP;c`7*o(oS zah1`faK4s_69T3A1-|OL$ev&B$39wqYiz65{Ym%|r&VQRP6TQuGU@Tp$BX#>dg1F$ zCu{M~m5-kBv?B41*o{8Za&zY4!E2^ip z8Ah6WedOwKvjT^PAM#BC?}_*6k8B)YcUn%%2J@s$r$(JSS>Y42v{S0Nx4i?^$0lZw z&=*8tw%i;Yu?AlnNspykdKV7=C{wVyq#t?DGm~i%E)(m+IH8i1nuDL(k=; zOJcDS3EH)%HnHIx` zWjbBY(fob4TseGm^baqxpM|}9Nt3^9`pk`s^sTTeVaQ0r-{#HkZ*-dcH>+c-lMR+> d?CFX{0jN|FapO9!Jq9UvVYCnKZVqds{|5vCi01$R literal 0 HcmV?d00001 diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..9090ad4 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "curators" +version = "0.1.0" +authors = ["Micha Glave "] +edition = "2018" +exclude = [".travis.yml", ".gitignore", "test-data/**"] +description = "Image Gallery. Defined by plain files." + +[dependencies] +toml = "0.5" +structopt = "0.3" +#exempi = "2.5.0" +strum = "0.18.0" +strum_macros = "0.18.0" +kamadak-exif = "0.5" diff --git a/README.md b/README.md index 998a25c..32db490 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,10 @@ # curators -Image Gallery. Defined by plain files. \ No newline at end of file +Image Gallery. Defined by plain files. + +## Goal: +Image management for multiple (competing) users. Purely file-based, non-destructive, based on standards (as much as possible). Using + +* [Exif](https://de.wikipedia.org/wiki/Exchangeable_Image_File_Format) +* [IPTC](https://de.wikipedia.org/wiki/IPTC-IIM-Standard) +* [XMP](https://de.wikipedia.org/wiki/Extensible_Metadata_Platform) diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..1114aa6 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,51 @@ +extern crate strum; + +use structopt::StructOpt; +use strum_macros::EnumString; + +#[derive(EnumString, Debug)] +enum Cmd { + #[strum(serialize = "read", serialize = "r")] + Read, + #[strum( + serialize = "write", + serialize = "w", + serialize = "set", + serialize = "s" + )] + Write, +} + +#[derive(Debug, StructOpt)] +#[structopt(name = "curators", about = "An image meta-data handling tool.")] +struct Opt { + /// image-file to work with. + image_file: String, + + /// operation + cmd: Option, + + /// Property to handle. + property: Option, +} + +fn main() { + let opt = Opt::from_args(); + println!("{:?}", opt); + + match std::fs::File::open(&opt.image_file) { + Ok(file) => { + let mut bufreader = std::io::BufReader::new(&file); + let exifreader = exif::Reader::new(); + match exifreader.read_from_container(&mut bufreader) { + Ok(exif) => { + for f in exif.fields() { + println!("{}: {}", f.tag, f.display_value().with_unit(&exif)); + } + } + Err(e) => println!("{:?}", e), + } + } + Err(e) => println!("{:?}", e), + } +}