From afb43c69b331ae7a1c76ae99064aa6094b62acee Mon Sep 17 00:00:00 2001 From: MattJackson <1085847+MattJackson@users.noreply.github.com> Date: Mon, 6 Apr 2026 10:43:52 -0700 Subject: [PATCH] Add CONTRIBUTING.md, issue templates, badges --- .github/ISSUE_TEMPLATE/bug_report.md | 25 ++++++++ .github/ISSUE_TEMPLATE/drive_profile.md | 7 +++ .github/ISSUE_TEMPLATE/feature_request.md | 11 ++++ CONTRIBUTING.md | 73 +++++------------------ README.md | 4 ++ 5 files changed, 63 insertions(+), 57 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/drive_profile.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..76a377f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,25 @@ +--- +name: Bug Report +about: Report a bug +labels: bug +--- + +**What happened?** + + +**What did you expect?** + + +**Steps to reproduce** +1. +2. +3. + +**Drive info** (run `freemkv info`) +``` + +``` + +**Environment** +- OS: +- freemkv version: diff --git a/.github/ISSUE_TEMPLATE/drive_profile.md b/.github/ISSUE_TEMPLATE/drive_profile.md new file mode 100644 index 0000000..227b5c8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/drive_profile.md @@ -0,0 +1,7 @@ +--- +name: Drive Profile +about: Submit drive data (auto-created by freemkv info --share) +labels: drive-profile +--- + +Paste your `freemkv info` output here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..9154582 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,11 @@ +--- +name: Feature Request +about: Suggest a feature +labels: enhancement +--- + +**What would you like?** + + +**Why?** + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6a5420e..0f51103 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,68 +1,27 @@ # Contributing to libfreemkv -Thank you for your interest in helping make disc archival accessible to everyone. +Thanks for your interest in contributing! -## Contributing Drive Profiles +## Ways to help -The most impactful contribution is adding support for new drives. If you have -an optical drive that isn't listed in [profiles/](profiles/), we'd love your help. +- **Report a bug** — open an issue with steps to reproduce +- **Submit your drive profile** — run `freemkv info --share` to help expand hardware support +- **Fix a bug** — fork, branch, PR +- **Add a feature** — open an issue first to discuss -### How to submit drive data +## Development -1. Install the tool: - ```bash - cargo install libfreemkv - ``` +```bash +cargo build +cargo test +``` -2. Run `freemkv-info` with your drive: - ```bash - freemkv-info /dev/sr0 --raw > my_drive.txt - ``` +## Code style -3. Open a pull request or issue with the output file attached. - -That's it. The raw SCSI response data lets us build a profile for your drive. - -### What data is collected - -`freemkv-info --raw` sends two standard SCSI commands to your drive: - -- **INQUIRY** (opcode 0x12) — returns drive vendor, model, firmware version -- **GET CONFIGURATION** (opcode 0x46) — returns drive feature data - -These are read-only, standard SCSI commands. They don't modify your drive -or access any disc data. Every operating system sends these commands -automatically when a drive is connected. - -### Priority: Pioneer drives - -We especially need data from **Pioneer** Blu-ray drives (BDR-S08, BDR-S09, -BDR-S12, BDR-S13, BDR-209, BDR-212, etc). If you have one, your contribution -would help unlock support for 130+ Pioneer drive firmware versions. - -## Contributing Code - -1. Fork the repository -2. Create a feature branch (`git checkout -b feature/my-change`) -3. Write tests for your changes -4. Ensure `cargo test` and `cargo clippy` pass -5. Submit a pull request - -### Code Style - -- Run `cargo fmt` before committing -- No `unsafe` without a comment explaining why -- Public APIs need doc comments -- Error handling via `Result`, no panics in library code - -### Architecture - -- `src/scsi.rs` — SCSI transport layer (SG_IO on Linux) -- `src/profile.rs` — Profile loading and matching -- `src/platform/` — Per-chipset command implementations -- `src/drive.rs` — High-level DriveSession API -- `profiles/` — JSON drive profile data +- Follow Rust conventions (`cargo fmt`, `cargo clippy`) +- Field names follow SPC-4 and MMC-6 SCSI standards +- Error codes are structured — no user-facing text in the library ## License -By contributing, you agree that your contributions will be licensed under AGPL-3.0. +By contributing, you agree your code will be licensed under AGPL-3.0. diff --git a/README.md b/README.md index c25247e..85df656 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +[![Crates.io](https://img.shields.io/crates/v/libfreemkv)](https://crates.io/crates/libfreemkv) +[![License: AGPL-3.0](https://img.shields.io/badge/license-AGPL--3.0-blue)](LICENSE) +[![Drives: 206](https://img.shields.io/badge/drives-206-green)]() + # libfreemkv Open source raw disc access library for UHD Blu-ray optical drives.