This commit is contained in:
Jessa 2022-12-22 11:37:43 -08:00
commit 8570dcb14a
9 changed files with 167 additions and 0 deletions

57
.github/workflows/gh-pages.yml vendored Normal file
View File

@ -0,0 +1,57 @@
name: gh-pages
on:
push:
branches:
- master
- docs
permissions:
contents: read
pages: write
id-token: write
defaults:
run:
shell: bash
jobs:
gh-pages:
name: gh-pages
runs-on: ubuntu-latest
environment:
name: gh-pages
steps:
- name: checkout
uses: actions/checkout@v3
- name: cache cargo output
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
- name: create docs directory
run: mkdir -p docs
- name: cargo doc
run: cargo doc --lib --no-deps
- name: move public docs to docs folder
run: mv target/doc/ docs/public/
- name: cargo doc
run: cargo doc --lib --no-deps --document-private-items
- name: move private docs to docs folder
run: mv target/doc/ docs/private/
- name: upload docs artifact
uses: actions/upload-pages-artifact@v1
with:
path: docs
- name: deploy docs to github pages
uses: actions/deploy-pages@v1

47
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,47 @@
name: test
on: [push]
defaults:
run:
shell: bash
jobs:
build-and-test:
name: build-and-test
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: cache cargo output
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
- name: cargo check
run: cargo check --verbose
- name: cargo build
run: cargo build --verbose
- name: cargo test
run: cargo test --verbose
- name: cargo clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ github.token }}
format-check:
name: format-check
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: cargo fmt --check
run: cargo fmt --check

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
*~
/target
Cargo.lock

3
Cargo.toml Normal file
View File

@ -0,0 +1,3 @@
[workspace]
members = ["mp4san"]
resolver = "2"

19
LICENSE Normal file
View File

@ -0,0 +1,19 @@
Copyright (c) 2022 jessa0
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

15
README.md Normal file
View File

@ -0,0 +1,15 @@
# mp4san
A Rust MP4 file sanitizer.
[API Documentation](https://privacyresearchgroup.github.io/mp4san/public/mp4san/)
[Private Documentation](https://privacyresearchgroup.github.io/mp4san/private/mp4san/)
## Contributing Bug Reports
GitHub is the project's bug tracker. Please [search](https://github.com/privacyresearchgroup/mp4san/issues) for similar
existing issues before [submitting a new one](https://github.com/privacyresearchgroup/mp4san/issues/new).
## License
Licensed under [MIT](https://opensource.org/licenses/MIT).

19
mp4san/Cargo.toml Normal file
View File

@ -0,0 +1,19 @@
[package]
name = "mp4san"
description = "An MP4 file sanitizer."
version = "0.1.0"
edition = "2021"
rust-version = "1.61.0"
repository = "https://github.com/privacyresearchgroup/mp4san"
license = "MIT"
categories = ["multimedia::video"]
keywords = ["mp4", "sanitizer", "video", "media"]
exclude = ["/.github", ".*"]
[dependencies]
mp4 = "0.12.0"
[dev-dependencies]

1
mp4san/src/lib.rs Normal file
View File

@ -0,0 +1 @@

2
rustfmt.toml Normal file
View File

@ -0,0 +1,2 @@
max_width = 120
struct_lit_width = 120