Skip to content

Commit 5359a71

Browse files
committed
Better index for docs.rs
1 parent db7a22a commit 5359a71

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/lib.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
//! Library to read IPTC tags from JPEG files, in pure Rust.
2+
//!
3+
//! # Example
4+
//! ```rust,no_run
5+
//! use iptc::IPTC;
6+
//! use iptc::IPTCTag;
7+
//! use std::error::Error;
8+
//! use std::path::Path;
9+
10+
//! fn main() -> Result<(), Box<dyn Error>> {
11+
//! let image_path = Path::new("tests/smiley.jpg");
12+
//!
13+
//! let iptc = IPTC::read_from_path(&image_path)?;
14+
//!
15+
//! // See all the tags in the image
16+
//! println!("IPTC: {:?}", iptc.get_all());
17+
//!
18+
//! // Get a specific tag
19+
//! let keywords = iptc.get(IPTCTag::Keywords);
20+
//! println!("keywords: {}", keywords);
21+
//!
22+
//! Ok(())
23+
//! }
24+
//! ```
25+
126
mod jpeg;
227
use jpeg::JPEGReader;
328
mod tiff;

0 commit comments

Comments
 (0)