mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-11-10 06:34:18 +00:00
parent
e9db3a2644
commit
95476dccd9
311 changed files with 147 additions and 158 deletions
3
.github/workflows/bench.yml
vendored
3
.github/workflows/bench.yml
vendored
|
@ -10,6 +10,9 @@ on:
|
|||
workflow_dispatch:
|
||||
jobs:
|
||||
benchmark_with_bencher:
|
||||
defaults:
|
||||
run:
|
||||
working-directory: 'lofty'
|
||||
name: Benchmark with Bencher
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
|
|
154
.github/workflows/ci.yml
vendored
154
.github/workflows/ci.yml
vendored
|
@ -1,99 +1,75 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'LICENSE-*'
|
||||
- '**/*.md'
|
||||
- '.gitignore'
|
||||
- 'CHANGELOG.md'
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'LICENSE-*'
|
||||
- '**/*.md'
|
||||
- '.gitignore'
|
||||
- 'CHANGELOG.md'
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
project: ['.', 'ogg_pager', 'lofty_attr']
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ matrix.project }}
|
||||
name: Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install test dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ffmpeg # Need ffprobe for issue #37
|
||||
sudo apt-get install -y opus-tools # Need opusinfo for issue #130
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- run: |
|
||||
cargo test --all-features --tests
|
||||
test:
|
||||
name: Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install test dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ffmpeg # Need ffprobe for issue #37
|
||||
sudo apt-get install -y opus-tools # Need opusinfo for issue #130
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- run: |
|
||||
cargo test --all-features --tests
|
||||
|
||||
docs:
|
||||
strategy:
|
||||
matrix:
|
||||
project: ['.', 'ogg_pager', 'lofty_attr']
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ matrix.project }}
|
||||
name: Docs
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
RUSTDOCFLAGS: -Dwarnings
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- run: |
|
||||
cargo doc --all-features --no-deps
|
||||
cargo test --all-features --doc
|
||||
docs:
|
||||
name: Docs
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
RUSTDOCFLAGS: -Dwarnings
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- run: |
|
||||
cargo doc --all-features --no-deps
|
||||
cargo test --all-features --doc
|
||||
|
||||
clippy:
|
||||
strategy:
|
||||
matrix:
|
||||
project: ['.', 'ogg_pager', 'lofty_attr']
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ matrix.project }}
|
||||
name: Clippy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
components: clippy
|
||||
- run: |
|
||||
cargo clippy --all-features -- -Dclippy::all -Dclippy::pedantic -Dwarnings
|
||||
clippy:
|
||||
name: Clippy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
components: clippy
|
||||
- run: |
|
||||
cargo clippy --all-features -- -Dclippy::all -Dclippy::pedantic -Dwarnings
|
||||
|
||||
style:
|
||||
strategy:
|
||||
matrix:
|
||||
project: ['.', 'ogg_pager', 'lofty_attr']
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ matrix.project }}
|
||||
name: Style
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
components: rustfmt
|
||||
- run: |
|
||||
cargo fmt -- --check
|
||||
style:
|
||||
name: Style
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
components: rustfmt
|
||||
- run: |
|
||||
cargo fmt -- --check
|
||||
|
|
68
Cargo.toml
68
Cargo.toml
|
@ -1,63 +1,13 @@
|
|||
[package]
|
||||
name = "lofty"
|
||||
version = "0.19.0"
|
||||
authors = ["Serial <69764315+Serial-ATA@users.noreply.github.com>"]
|
||||
edition = "2021"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "Audio metadata library"
|
||||
repository = "https://github.com/Serial-ATA/lofty-rs"
|
||||
keywords = ["tags", "audio", "metadata", "id3", "vorbis"]
|
||||
categories = ["multimedia", "multimedia::audio", "parser-implementations"]
|
||||
readme = "README.md"
|
||||
include = ["src", "LICENSE-APACHE", "LICENSE-MIT", "SUPPORTED_FORMATS.md"]
|
||||
[workspace]
|
||||
resolver = "2"
|
||||
members = [
|
||||
"lofty",
|
||||
"lofty_attr",
|
||||
"ogg_pager",
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
# Vorbis comments pictures
|
||||
data-encoding = "2.5.0"
|
||||
byteorder = "1.5.0"
|
||||
# ID3 compressed frames
|
||||
flate2 = { version = "1.0.28", optional = true }
|
||||
# Proc macros
|
||||
lofty_attr = "0.10.0"
|
||||
# Debug logging
|
||||
log = "0.4.21"
|
||||
# OGG Vorbis/Opus
|
||||
ogg_pager = "0.6.1"
|
||||
# Key maps
|
||||
paste = "1.0.14"
|
||||
|
||||
[features]
|
||||
default = ["id3v2_compression_support"]
|
||||
id3v2_compression_support = ["dep:flate2"]
|
||||
|
||||
[dev-dependencies]
|
||||
# WAV properties validity tests
|
||||
hound = { git = "https://github.com/ruuda/hound.git", rev = "02e66effb33683dd6acb92df792683ee46ad6a59" }
|
||||
# tag_writer example
|
||||
structopt = { version = "0.3.26", default-features = false }
|
||||
tempfile = "3.10.1"
|
||||
iai-callgrind = "0.10.2"
|
||||
|
||||
[lib]
|
||||
bench = false
|
||||
[workspace.dependencies]
|
||||
byteorder = "1.5.0"
|
||||
|
||||
[profile.bench]
|
||||
debug = true
|
||||
|
||||
[[bench]]
|
||||
name = "read_file"
|
||||
path = "benches/read_file.rs"
|
||||
harness = false
|
||||
|
||||
[[bench]]
|
||||
name = "create_tag"
|
||||
path = "benches/create_tag.rs"
|
||||
harness = false
|
||||
|
||||
[[example]]
|
||||
name = "custom_resolver"
|
||||
path = "examples/custom_resolver/src/main.rs"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
|
60
lofty/Cargo.toml
Normal file
60
lofty/Cargo.toml
Normal file
|
@ -0,0 +1,60 @@
|
|||
[package]
|
||||
name = "lofty"
|
||||
version = "0.19.0"
|
||||
authors = ["Serial <69764315+Serial-ATA@users.noreply.github.com>"]
|
||||
edition = "2021"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "Audio metadata library"
|
||||
repository = "https://github.com/Serial-ATA/lofty-rs"
|
||||
keywords = ["tags", "audio", "metadata", "id3", "vorbis"]
|
||||
categories = ["multimedia", "multimedia::audio", "parser-implementations"]
|
||||
readme = "README.md"
|
||||
include = ["src", "LICENSE-APACHE", "LICENSE-MIT", "SUPPORTED_FORMATS.md"]
|
||||
|
||||
[dependencies]
|
||||
# Vorbis comments pictures
|
||||
data-encoding = "2.5.0"
|
||||
byteorder = { workspace = true }
|
||||
# ID3 compressed frames
|
||||
flate2 = { version = "1.0.28", optional = true }
|
||||
# Proc macros
|
||||
lofty_attr = "0.10.0"
|
||||
# Debug logging
|
||||
log = "0.4.21"
|
||||
# OGG Vorbis/Opus
|
||||
ogg_pager = "0.6.1"
|
||||
# Key maps
|
||||
paste = "1.0.14"
|
||||
|
||||
[features]
|
||||
default = ["id3v2_compression_support"]
|
||||
id3v2_compression_support = ["dep:flate2"]
|
||||
|
||||
[dev-dependencies]
|
||||
# WAV properties validity tests
|
||||
hound = { git = "https://github.com/ruuda/hound.git", rev = "02e66effb33683dd6acb92df792683ee46ad6a59" }
|
||||
# tag_writer example
|
||||
structopt = { version = "0.3.26", default-features = false }
|
||||
tempfile = "3.10.1"
|
||||
iai-callgrind = "0.10.2"
|
||||
|
||||
[lib]
|
||||
bench = false
|
||||
|
||||
[[bench]]
|
||||
name = "read_file"
|
||||
path = "../benches/read_file.rs"
|
||||
harness = false
|
||||
|
||||
[[bench]]
|
||||
name = "create_tag"
|
||||
path = "../benches/create_tag.rs"
|
||||
harness = false
|
||||
|
||||
[[example]]
|
||||
name = "custom_resolver"
|
||||
path = "../examples/custom_resolver/src/main.rs"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
|
@ -5,7 +5,7 @@
|
|||
//! Parse, convert, and write metadata to audio formats.
|
||||
//!
|
||||
//! # Supported Formats
|
||||
#![doc = include_str!("../SUPPORTED_FORMATS.md")]
|
||||
#![doc = include_str!("../../SUPPORTED_FORMATS.md")]
|
||||
//! # Examples
|
||||
//!
|
||||
//! ## Reading a generic file
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue