dpo_reader.cli¶
CLI entrypoint for DPO Reader.
Functions
|
Export a Discourse thread to audio file (no auto-play). |
|
Get TTS backend instance. |
|
Extract base URL from thread URL. |
|
Show information about a Discourse thread without generating audio. |
|
Convert a Discourse thread to audio and play it. |
Extract post number from Discourse URL if present. |
|
|
Create Rich markup for a clickable post link. |
|
Preview the first few posts of a thread. |
|
Create Rich markup for a clickable title link. |
|
Create Rich markup for a clickable user link. |
Classes
TTS engine choices. |
- dpo_reader.cli.parse_post_number_from_url(url)[source]¶
Extract post number from Discourse URL if present.
URLs like /t/topic-slug/12345/17 have post number 17. URLs like /t/topic-slug/12345 have no post number.
- dpo_reader.cli.user_link(base_url, username, display=None)[source]¶
Create Rich markup for a clickable user link.
- dpo_reader.cli.post_link(base_url, topic_id, post_number, display=None)[source]¶
Create Rich markup for a clickable post link.
- class dpo_reader.cli.Engine[source]¶
-
TTS engine choices.
- bark = 'bark'¶
- openai = 'openai'¶
- piper = 'piper'¶
- __new__(value)¶
- dpo_reader.cli.listen(url=<typer.models.ArgumentInfo object>, output=<typer.models.OptionInfo object>, engine=<typer.models.OptionInfo object>, max_posts=<typer.models.OptionInfo object>, no_attribution=<typer.models.OptionInfo object>, cache_dir=<typer.models.OptionInfo object>, pause=<typer.models.OptionInfo object>, no_play=<typer.models.OptionInfo object>, ui=<typer.models.OptionInfo object>, file=<typer.models.OptionInfo object>, start_post=<typer.models.OptionInfo object>)[source]¶
Convert a Discourse thread to audio and play it.
- dpo_reader.cli.export_audio(url=<typer.models.ArgumentInfo object>, output=<typer.models.OptionInfo object>, engine=<typer.models.OptionInfo object>, max_posts=<typer.models.OptionInfo object>, no_attribution=<typer.models.OptionInfo object>, cache_dir=<typer.models.OptionInfo object>, pause=<typer.models.OptionInfo object>)[source]¶
Export a Discourse thread to audio file (no auto-play).