chore: initial commit
This commit is contained in:
commit
82face79e8
14
.editorconfig
Normal file
14
.editorconfig
Normal file
@ -0,0 +1,14 @@
|
||||
# https://editorconfig.org/
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{yml,yaml,md}]
|
||||
indent_size = 2
|
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
||||
* text=auto eol=lf
|
38
.github/workflows/ci.yml
vendored
Normal file
38
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
name: "ci"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: "always"
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- uses: "actions/checkout@v4"
|
||||
- uses: "dtolnay/rust-toolchain@stable"
|
||||
|
||||
- run: "rustc --version"
|
||||
- run: "cargo build --verbose"
|
||||
- run: "cargo test --verbose"
|
||||
- run: "cargo clippy --verbose -- -D warnings"
|
||||
- run: "cargo fmt -- --check"
|
||||
|
||||
lint-markdown:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- uses: "actions/checkout@v4"
|
||||
- uses: "DavidAnson/markdownlint-cli2-action@v14"
|
||||
with:
|
||||
globs: "**/*.md"
|
||||
config: ".markdownlint-cli2.jsonc"
|
||||
|
||||
lint-commit:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- uses: "actions/checkout@v4"
|
||||
- uses: "wagoid/commitlint-github-action@v5"
|
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
target/
|
||||
book/
|
||||
.bin/
|
7
.markdownlint-cli2.jsonc
Normal file
7
.markdownlint-cli2.jsonc
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"config": {
|
||||
"default": true,
|
||||
"MD033": false
|
||||
},
|
||||
"globs": ["**/*.md"]
|
||||
}
|
7
Cargo.lock
generated
Normal file
7
Cargo.lock
generated
Normal file
@ -0,0 +1,7 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "fileformats"
|
||||
version = "1.0.0"
|
10
Cargo.toml
Normal file
10
Cargo.toml
Normal file
@ -0,0 +1,10 @@
|
||||
[package]
|
||||
name = "fileformats"
|
||||
version = "1.0.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.74.0"
|
||||
|
||||
[package.metadata.bin]
|
||||
mdbook = { version = "=0.4.36" }
|
||||
|
||||
[dependencies]
|
39
README.md
Normal file
39
README.md
Normal file
@ -0,0 +1,39 @@
|
||||
<h1 align="center">FileFormats</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Documentation and Rust Implementation to learn how most famous file formats store data.</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<img src="documentation/images/logo.png" width="200px" alt="FileFormats Logo" />
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
## About
|
||||
|
||||
- [Documentation](./documentation/): Explains the theory for each file format, the advantages and disadvantages compared to other file formats in the same category, why it is stored in that way, and the **User Manual** for the implementation.
|
||||
- [`fileformats` Implementation](./src/): **Command-Line Interface and Rust Library** to cover most common features of each file format, and understand practically how the theory works. The features of the implementation include, but is not limited to, **read, write, convert, and compare** between file formats.
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- [Rust](https://www.rust-lang.org/tools/install) >= v1.74.0
|
||||
- [cargo-run-bin](https://crates.io/crates/cargo-run-bin) >= v1.6.0 (`cargo install cargo-run-bin`)
|
||||
|
||||
### Commands
|
||||
|
||||
```sh
|
||||
# Run `fileformats` CLI
|
||||
cargo run --help
|
||||
|
||||
# Documentation
|
||||
cargo bin mdbook serve
|
||||
|
||||
# Build, Lint, and Test
|
||||
cargo build
|
||||
cargo test
|
||||
cargo clippy --verbose -- -D warnings
|
||||
cargo fmt -- --check
|
||||
```
|
5
book.toml
Normal file
5
book.toml
Normal file
@ -0,0 +1,5 @@
|
||||
[book]
|
||||
language = "en"
|
||||
multilingual = false
|
||||
src = "documentation"
|
||||
title = "FileFormats"
|
41
documentation/README.md
Normal file
41
documentation/README.md
Normal file
@ -0,0 +1,41 @@
|
||||
<h1 align="center">FileFormats</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Documentation and Rust Implementation to learn how most famous file formats store data.</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<img src="./images/logo.png" width="200px" alt="FileFormats Logo" />
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
## Concepts
|
||||
|
||||
2 kinds of computer files: **text files** and **binary files**.
|
||||
|
||||
- [ ] [Text files](https://en.wikipedia.org/wiki/Text_file)
|
||||
- [ ] Encoding (charset: ASCII, UTF-8, etc.)
|
||||
- [ ] End Of Line (EOL): `\n`, `\r\n`, `\r`, and End Of File (EOF)
|
||||
- [ ] Type (common mimetypes: `text/plain`, `text/html`, `text/markdown`, etc.)
|
||||
- [ ] Identations: Spaces vs Tabs
|
||||
- [ ] [Binary files](https://en.wikipedia.org/wiki/Binary_file): Endianness, Type
|
||||
- [ ] Images
|
||||
- [ ] PPM (Portable PixMap)
|
||||
- [ ] PNG
|
||||
- [ ] JPG, JPEG
|
||||
- [ ] GIF
|
||||
- [ ] WebP
|
||||
- [ ] BMP
|
||||
- [ ] SVG
|
||||
- [ ] Videos
|
||||
- [ ] MP4
|
||||
- [ ] AVI
|
||||
- [ ] Audio
|
||||
- [ ] MP3
|
||||
- [ ] WAV
|
||||
- [ ] Documents
|
||||
- [ ] PDF
|
||||
- [ ] DOCX
|
||||
- [ ] XLSX
|
||||
- [ ] PPTX
|
4
documentation/Resources.md
Normal file
4
documentation/Resources.md
Normal file
@ -0,0 +1,4 @@
|
||||
# Resources
|
||||
|
||||
- [MDN - Media type and format guide: image, audio, and video content](https://developer.mozilla.org/en-US/docs/Web/Media/Formats)
|
||||
- [dav1d - AV1 cross-platform decoder, open-source, and focused on speed and correctness](https://github.com/videolan/dav1d)
|
4
documentation/SUMMARY.md
Normal file
4
documentation/SUMMARY.md
Normal file
@ -0,0 +1,4 @@
|
||||
# Summary
|
||||
|
||||
- [FileFormats](./README.md)
|
||||
- [Resources](./Resources.md)
|
BIN
documentation/images/logo.png
Normal file
BIN
documentation/images/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 97 KiB |
3
src/main.rs
Normal file
3
src/main.rs
Normal file
@ -0,0 +1,3 @@
|
||||
fn main() {
|
||||
println!("- FileFormats -");
|
||||
}
|
Loading…
Reference in New Issue
Block a user