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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
//! A library for reading and writing APEv2 tags. //! //! An APE tag is a tag used to add metadata (title, artist, album, etc...) to digital audio files. //! //! Read the [specification][1] for more information. //! [1]: http://wiki.hydrogenaud.io/index.php?title=APEv2_specification //! //! # Examples //! //! ## Creating a tag //! //! ```no_run //! use ape::{Tag, Item}; //! //! let mut tag = Tag::new(); //! let item = Item::from_text("artist", "Artist Name").unwrap(); //! tag.set_item(item); //! tag.write("path/to/file").unwrap(); //! ``` //! //! ## Reading a tag //! //! ```no_run //! use ape::read; //! //! let tag = read("path/to/file").unwrap(); //! let item = tag.item("artist").unwrap(); //! println!("{:?}", item.value); //! ``` //! //! ## Updating a tag //! //! ```no_run //! use ape::{read, Item}; //! //! let path = "path/to/file"; //! let mut tag = read(path).unwrap(); //! let item = Item::from_text("album", "Album Name").unwrap(); //! tag.set_item(item); //! tag.remove_item("cover"); //! tag.write(path).unwrap(); //! ``` //! //! ## Deleting a tag //! //! ```no_run //! use ape::remove; //! //! remove("path/to/file").unwrap(); //! ``` //! #![warn(missing_docs)] pub use error::{Result, Error}; pub use item::{Item, ItemValue}; pub use tag::{Tag, read, remove}; mod error; mod item; mod meta; mod tag; mod util;