Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wsanchez committed Nov 6, 2023
1 parent 4e1d9a3 commit 6e68fa8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
13 changes: 13 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,21 @@ Once you have the above installed, you can install this package using ``pipx``:
You should now have a command called ``rtx`` in your system.


Usage
-----

``rtx`` provides a command line application that lets you browse though indexed audio content.
If you have an existing data file containing an index, put that at ``~/rtx.sqlite``.
Then start the application:

.. code-block:: console
rtx application
.. _Homebrew: https://brew.sh
.. _ffmpeg: https://ffmpeg.org
.. _openai-whisper: https://github.com/openai/whisper
.. _Python 3.11: https://www.python.org/downloads/release/python-3116/
.. _pipx: https://pypa.github.io/pipx/
.. _pydub: https://github.com/jiaaro/pydub/
4 changes: 4 additions & 0 deletions src/transmissions/indexer/_indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ async def _addDuration(
transmission=transmission,
error=e,
)
return

await store.setTransmissionDuration(
eventID=transmission.eventID,
system=transmission.system,
Expand Down Expand Up @@ -346,6 +348,8 @@ async def _addTranscription(
transmission=transmission,
error=e,
)
return

await store.setTransmissionTranscription(
eventID=transmission.eventID,
system=transmission.system,
Expand Down
3 changes: 0 additions & 3 deletions src/transmissions/run/_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
__all__ = ()


defaultConfigPath = Path("~/rtx.toml")


@frozen(kw_only=True)
class Command:
"""
Expand Down
4 changes: 2 additions & 2 deletions src/transmissions/run/_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ def storeFactoryFromConfig(configuration: dict[str, Any]) -> StoreFactory:
def sqliteStoreFactoryFromConfig(storeConfig: dict[str, Any]) -> StoreFactory:
from transmissions.store.sqlite import DataStore

fileName = storeConfig.get("File", "./rtx.sqlite")
fileName = storeConfig.get("File", "~/rtx.sqlite")

async def factory() -> TXDataStore:
store = DataStore(dbPath=Path(fileName))
store = DataStore(dbPath=Path(fileName).expanduser())
await store.upgradeSchema()
return store

Expand Down

0 comments on commit 6e68fa8

Please sign in to comment.