Crate ape [] [src]

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 for more information.

Examples

Creating a tag

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

use ape::read;

let tag = read("path/to/file").unwrap();
let item = tag.item("artist").unwrap();
println!("{:?}", item.value);

Updating a tag

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

use ape::remove;

remove("path/to/file").unwrap();

Structs

Item

Represents an APE Tag Item.

Tag

An APE Tag containing APE Tag Items.

Enums

Error

Describes all errors that may occur.

ItemValue

Represents an APE Item Value

Functions

read

Attempts to read APE tag from the file at the specified path.

remove

Attempts to remove APE tag from the file at the specified path.

Type Definitions

Result

A specialized Result type for metadata operations.