chapters
The community/tags/chapters
directory defines a tag and actions for navigating chapters in a reader application.
The core logic is defined in chapters.py
. It defines a chapters
tag which can be used to activate this functionality. It also defines an Actions
class that provides actions to jump between chapters.
chapter_current()
: Returns the current chapter number.chapter_next()
: Navigates to the next chapter usingchapter_jump()
andchapter_current()
.chapter_previous()
: Navigates to the previous chapter usingchapter_jump()
andchapter_current()
.chapter_jump(number)
: Navigates to the specified chapter number.chapter_final()
: Navigates to the final chapter.
These actions are bound to voice commands in chapters.talon
. This file uses the user.chapters
tag to activate this functionality.
- "chapter next": Calls
user.chapter_next()
. - "chapter last": Calls
user.chapter_previous()
. - "go chapter
<number>
": Callsuser.chapter_jump(number)
. - "go chapter final": Calls
user.chapter_final()
.
In summary, these files provide a way to navigate chapters in a reader application using voice commands. The chapters.py
file defines the actions, while chapters.talon
maps those actions to voice commands.