notepipe 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. notepipe-0.1.0/.gitattributes +1 -0
  2. notepipe-0.1.0/.gitignore +18 -0
  3. notepipe-0.1.0/AGENTS.md +56 -0
  4. notepipe-0.1.0/CHANGELOG.md +51 -0
  5. notepipe-0.1.0/CODE_OF_CONDUCT.md +83 -0
  6. notepipe-0.1.0/CONTRIBUTING.md +83 -0
  7. notepipe-0.1.0/Cargo.lock +1697 -0
  8. notepipe-0.1.0/Cargo.toml +48 -0
  9. notepipe-0.1.0/LICENSE +22 -0
  10. notepipe-0.1.0/PKG-INFO +394 -0
  11. notepipe-0.1.0/README.md +369 -0
  12. notepipe-0.1.0/SECURITY.md +26 -0
  13. notepipe-0.1.0/docs/adapters.md +296 -0
  14. notepipe-0.1.0/docs/cli.md +124 -0
  15. notepipe-0.1.0/docs/configuration.md +153 -0
  16. notepipe-0.1.0/docs/design.md +104 -0
  17. notepipe-0.1.0/docs/logo.svg +24 -0
  18. notepipe-0.1.0/docs/wordmark-dark.svg +1 -0
  19. notepipe-0.1.0/docs/wordmark-light.svg +1 -0
  20. notepipe-0.1.0/pyproject.toml +28 -0
  21. notepipe-0.1.0/src/adapter.rs +290 -0
  22. notepipe-0.1.0/src/app.rs +194 -0
  23. notepipe-0.1.0/src/artifact.rs +787 -0
  24. notepipe-0.1.0/src/asr.rs +887 -0
  25. notepipe-0.1.0/src/checkpoint.rs +573 -0
  26. notepipe-0.1.0/src/cli.rs +238 -0
  27. notepipe-0.1.0/src/config.rs +674 -0
  28. notepipe-0.1.0/src/dispatch.rs +367 -0
  29. notepipe-0.1.0/src/doctor.rs +162 -0
  30. notepipe-0.1.0/src/error.rs +34 -0
  31. notepipe-0.1.0/src/lib.rs +43 -0
  32. notepipe-0.1.0/src/llm.rs +1313 -0
  33. notepipe-0.1.0/src/main.rs +3 -0
  34. notepipe-0.1.0/src/media.rs +167 -0
  35. notepipe-0.1.0/src/options.rs +289 -0
  36. notepipe-0.1.0/src/pipeline.rs +608 -0
  37. notepipe-0.1.0/src/progress.rs +318 -0
  38. notepipe-0.1.0/src/render.rs +219 -0
  39. notepipe-0.1.0/src/runtime/windows.rs +78 -0
  40. notepipe-0.1.0/src/runtime.rs +675 -0
  41. notepipe-0.1.0/src/scene.rs +310 -0
  42. notepipe-0.1.0/src/settings.rs +623 -0
  43. notepipe-0.1.0/src/source.rs +708 -0
  44. notepipe-0.1.0/src/subtitle.rs +647 -0
  45. notepipe-0.1.0/src/summarize.rs +222 -0
  46. notepipe-0.1.0/src/timeline.rs +672 -0
  47. notepipe-0.1.0/src/vad.rs +514 -0
  48. notepipe-0.1.0/src/wizard.rs +259 -0
  49. notepipe-0.1.0/tests/cli_ux.rs +771 -0
  50. notepipe-0.1.0/tests/fixtures/ai_adapter.py +52 -0
  51. notepipe-0.1.0/tests/fixtures/asr_adapter.py +106 -0
  52. notepipe-0.1.0/tests/fixtures/source_adapter.py +78 -0
  53. notepipe-0.1.0/tests/fixtures/speech.wav +0 -0
  54. notepipe-0.1.0/tests/scene_synthetic.rs +306 -0
  55. notepipe-0.1.0/tests/support/mod.rs +109 -0
  56. notepipe-0.1.0/tests/task_execution.rs +1761 -0
@@ -0,0 +1 @@
1
+ *.patch text eol=lf
@@ -0,0 +1,18 @@
1
+ /target
2
+ out/
3
+ .pi/
4
+ models/
5
+ *.wav
6
+ !tests/fixtures/speech.wav
7
+ *.mp4
8
+ .DS_Store
9
+ .venv/
10
+ __pycache__/
11
+ out-bv/
12
+ out-bench/
13
+ out-gpu/
14
+ out-smoke/
15
+ adapters/speech-swift/native/.build/
16
+ /adapters/speech-swift/target/
17
+ /adapters/speech-swift/wheel-data/
18
+ /dist/
@@ -0,0 +1,56 @@
1
+ # AGENTS.md
2
+
3
+ Guidance for coding agents and contributors working in this repository.
4
+
5
+ ## Project
6
+
7
+ notepipe is an extensible engine and command-line tool that turns video and audio into Markdown notes. Other programs can
8
+ build on it, and it is useful on its own.
9
+
10
+ ## The core boundary
11
+
12
+ The core turns a **local media file** into a **note folder**, and talks to the outside world only through standard
13
+ protocols: ffmpeg for decoding, OpenAI-compatible HTTP APIs for speech recognition and language models, and the adapter
14
+ contracts in `docs/` for anything else.
15
+
16
+ Before adding code to `src/`, check it against this list. If any answer is yes, the code belongs in an adapter, in
17
+ configuration or in documentation — not in the core:
18
+
19
+ - Does it depend on a particular website, service vendor, model, operating system or package manager?
20
+ - Does it need a local model, a GPU runtime or a platform SDK?
21
+ - Does it decide how a note should read (wording, structure, which content to drop) instead of leaving that to the user's
22
+ prompts and settings?
23
+ - Does it favor one language, region or script?
24
+ - Is it an option, mode or abstraction that no current caller needs?
25
+
26
+ ## Layout
27
+
28
+ - `src/` — the engine library and CLI.
29
+ - `adapters/` — official adapters (speech recognition and media sources), each a separate package and an extra of
30
+ `notepipe` in `pyproject.toml`.
31
+ - `tests/` — integration tests and fixtures.
32
+ - `docs/` — adapter contracts and the CLI protocol.
33
+
34
+ ## Conventions
35
+
36
+ - Prefer the smallest complete change. Delete rather than keep; do not add options, abstractions or dependencies that the
37
+ change does not need.
38
+ - CLI messages are English. Prompts sent to models are English defaults that users can replace.
39
+ - Machine-readable output (`--json`, `note.json`) is a contract: keep field names stable.
40
+
41
+ ## Before committing
42
+
43
+ Run the same checks as `.github/workflows/ci.yml`:
44
+
45
+ ```sh
46
+ cargo fmt --check
47
+ cargo clippy --all-targets -- -D warnings
48
+ cargo test --lib
49
+ cargo test --test cli_ux --test task_execution
50
+ cargo test --features integration --test scene_synthetic # needs ffmpeg; not run on Windows
51
+ ```
52
+
53
+ Adapters under `adapters/` have their own tests; run them from the adapter's directory.
54
+
55
+ Write commit subjects as `area: summary` in the imperative mood, one concern per commit. Record user-visible changes under
56
+ `Unreleased` in `CHANGELOG.md`.
@@ -0,0 +1,51 @@
1
+ # Changelog
2
+
3
+ All notable changes to notepipe are documented in this file. The format is based on
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to
5
+ [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Adapters under `adapters/` are versioned separately.
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.1.0] - 2026-10-22
10
+
11
+ The first release as notepipe. It started from course2md 2.0.0-rc.16 by mizorewww; this entry lists the differences.
12
+
13
+ ### Added
14
+
15
+ - Audio files and audio-only online items as input.
16
+ - Speech adapters: notepipe starts a local engine that serves an OpenAI-compatible transcription API for the run.
17
+ Official adapters for llama.cpp, OpenVINO, speech-swift (Apple silicon), xAI and Meta.
18
+ - AI adapters: `[ai].adapter` starts a program that serves the AI stages through an OpenAI-compatible chat API, so other
19
+ APIs or subscription access can be connected.
20
+ - Download adapters for URLs, with an official yt-dlp adapter; the core itself reads local files.
21
+ - A configuration file whose sections follow the pipeline (`[output]`, `[transcript]`, `[speech]`, `[screenshots]`,
22
+ `[ai]`, `[download]`), with matching option names; `notepipe config path`; API keys are optional.
23
+ - Prompt-driven AI stages (`[[ai.stages]]`): built-in `proofread` and `summary`, plus custom stages that replace
24
+ paragraphs, add text below them or add Markdown at the top of the note; per-stage model, endpoint, key and extra request
25
+ fields.
26
+ - `--config FILE|-`, `--subtitle FILE`, `--stages`, `--no-stages`, `NOTEPIPE_SPEECH_API_KEY`, `NOTEPIPE_AI_API_KEY`.
27
+ - `[output].on_complete`, a command run after each note is written.
28
+ - Packages for `uv tool install`, with the official adapters as extras (`notepipe[ytdlp]`), and a release workflow that
29
+ publishes to PyPI and crates.io.
30
+
31
+ ### Changed
32
+
33
+ - Speech detection uses earshot, a small built-in neural detector, instead of a fixed loudness threshold.
34
+ - Notes are written as `<out>/<title>/note.md`, `images/` and `note.json`; `note.md` starts with YAML front matter.
35
+ Running again on the same source replaces its note; intermediate results are cached per source.
36
+ - Default prompts are English and replaceable; summaries are Markdown written by the model in the transcript's language.
37
+ - The CLI and `--json` output are English; NDJSON events are limited to `stage`, `progress`, `tokens`, `log`, `done` and
38
+ `error`.
39
+ - Subtitles are chosen by the configured language, then the media's original language, instead of preferring Chinese.
40
+ - Korean and other space-separated scripts keep their word spacing when transcript fragments are joined.
41
+ - Ctrl-C (and SIGTERM on Unix) stops the run and any adapters it started.
42
+
43
+ ### Removed
44
+
45
+ - The desktop application.
46
+ - Built-in local speech backends (now adapters) and model management commands.
47
+ - Bilibili login and site-specific handling, cookie options and other website-specific code (now in download adapters).
48
+ - ChatGPT-subscription and Ollama login; every language model is reached as an OpenAI-compatible endpoint.
49
+ - Interface translations, `--lang` and `NOTEPIPE_LANG`.
50
+ - HTML and ZIP exports, versioned note storage, `run-task` and the `summarize` subcommand.
51
+ - `--translate` (translation is a custom AI stage), `--formats`, `--no-download`, `--resume`, `--keep-video`.
@@ -0,0 +1,83 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or advances of any kind
22
+ * Trolling, insulting or derogatory comments, and personal or political attacks
23
+ * Public or private harassment
24
+ * Publishing others' private information, such as a physical or email address, without their explicit permission
25
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
26
+
27
+ ## Enforcement Responsibilities
28
+
29
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
32
+
33
+ ## Scope
34
+
35
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36
+
37
+ ## Enforcement
38
+
39
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [@3ae3ae](https://github.com/3ae3ae) on GitHub. All complaints will be reviewed and investigated promptly and fairly.
40
+
41
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
42
+
43
+ ## Enforcement Guidelines
44
+
45
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
46
+
47
+ ### 1. Correction
48
+
49
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
50
+
51
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
52
+
53
+ ### 2. Warning
54
+
55
+ **Community Impact**: A violation through a single incident or series of actions.
56
+
57
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
58
+
59
+ ### 3. Temporary Ban
60
+
61
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
62
+
63
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
64
+
65
+ ### 4. Permanent Ban
66
+
67
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
68
+
69
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
70
+
71
+ ## Attribution
72
+
73
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
74
+
75
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
76
+
77
+ For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
78
+
79
+ [homepage]: https://www.contributor-covenant.org
80
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
81
+ [Mozilla CoC]: https://github.com/mozilla/diversity
82
+ [FAQ]: https://www.contributor-covenant.org/faq
83
+ [translations]: https://www.contributor-covenant.org/translations
@@ -0,0 +1,83 @@
1
+ # Contributing to notepipe
2
+
3
+ Bug reports, adapters and code changes are welcome.
4
+
5
+ ## Reporting problems
6
+
7
+ Open an issue with the command you ran, what you expected and what happened. Run with `-v` (or `-vv`) and include the
8
+ relevant log lines. Remove API keys, cookies and private URLs first.
9
+
10
+ ## Development setup
11
+
12
+ You need Rust (see `rust-version` in `Cargo.toml`) and `ffmpeg` on `PATH`. The Python adapters use
13
+ [uv](https://docs.astral.sh/uv/).
14
+
15
+ ```sh
16
+ git clone https://github.com/3ae3ae/notepipe
17
+ cd notepipe
18
+ cargo build
19
+ cargo run -- --help
20
+ ```
21
+
22
+ ## Checks
23
+
24
+ Run the same checks as CI before opening a pull request:
25
+
26
+ ```sh
27
+ cargo fmt --check
28
+ cargo clippy --all-targets -- -D warnings
29
+ cargo test --lib
30
+ cargo test --test cli_ux --test task_execution
31
+ cargo test --features integration --test scene_synthetic # needs ffmpeg; not run on Windows
32
+ ```
33
+
34
+ Each adapter under `adapters/` is a separate package with its own tests:
35
+
36
+ ```sh
37
+ uv run --directory adapters/llama python -m unittest # Python adapters
38
+ cargo test --manifest-path adapters/speech-swift/Cargo.toml # speech-swift adapter (macOS arm64 with Xcode)
39
+ ```
40
+
41
+ ## Project layout
42
+
43
+ | Path | Contents |
44
+ |---|---|
45
+ | `src/` | The engine and the `notepipe` CLI |
46
+ | `adapters/` | Official speech and download adapters, each a separate package |
47
+ | `tests/` | Integration tests and fixtures |
48
+ | `docs/` | [CLI contract](docs/cli.md) and [adapter contracts](docs/adapters.md) |
49
+
50
+ ## What belongs in the core
51
+
52
+ The core turns a local media file into a note folder and reaches everything else through standard interfaces: ffmpeg,
53
+ OpenAI-compatible HTTP APIs and the adapter contracts. Code that depends on a particular website, vendor, model,
54
+ operating system or package manager, that needs local models or platform SDKs, or that decides how a note should read
55
+ belongs in an adapter, in configuration or in documentation instead. [AGENTS.md](AGENTS.md) has the full checklist.
56
+
57
+ Prefer the smallest complete change: delete rather than keep, and do not add options, abstractions or dependencies the
58
+ change does not need. CLI messages are English; prompts are English defaults that users can replace.
59
+
60
+ ## Writing an adapter
61
+
62
+ See [docs/adapters.md](docs/adapters.md). Third-party adapters do not need to live in this repository; name the executable
63
+ `notepipe-asr-<name>`, `notepipe-ai-<name>` or `notepipe-source-<name>` and publish it as a package.
64
+
65
+ ## Commits and pull requests
66
+
67
+ - One concern per commit, with a subject like `area: summary` in the imperative mood (for example
68
+ `asr: retry on HTTP 429`), and the reason in the body.
69
+ - Add a test for new behavior.
70
+ - Record user-visible changes under `Unreleased` in [CHANGELOG.md](CHANGELOG.md).
71
+
72
+ ## Releases
73
+
74
+ Pushing a tag `vX.Y.Z` runs `.github/workflows/release.yml`: it builds the CLI binaries and wheels and every adapter,
75
+ attaches them with checksums to a GitHub release and publishes the packages to PyPI through trusted publishing. Versions
76
+ of adapters that are already on PyPI are skipped, so bump an adapter's version when it changes. Each PyPI project
77
+ publishes from its own GitHub environment, `pypi` for notepipe and `pypi-<package>` for an adapter, and its trusted
78
+ publisher on PyPI names that environment.
79
+
80
+ The same workflow publishes the crate to crates.io from the `crates-io` environment through trusted publishing, unless
81
+ that version is already there.
82
+
83
+ By contributing, you agree that your contributions are licensed under the [MIT License](LICENSE).