scribe-cli 0.3.0__tar.gz → 0.3.1__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 (28) hide show
  1. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/.gitignore +1 -0
  2. {scribe_cli-0.3.0/scribe_cli.egg-info → scribe_cli-0.3.1}/PKG-INFO +1 -1
  3. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/pyproject.toml +1 -1
  4. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/scribe/_version.py +2 -2
  5. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/scribe/install_desktop.py +9 -13
  6. {scribe_cli-0.3.0 → scribe_cli-0.3.1/scribe_cli.egg-info}/PKG-INFO +1 -1
  7. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/scribe_cli.egg-info/SOURCES.txt +3 -2
  8. scribe_cli-0.3.1/scribe_cli.egg-info/top_level.txt +2 -0
  9. scribe_cli-0.3.1/scribe_data/__init__.py +0 -0
  10. {scribe_cli-0.3.0 → scribe_cli-0.3.1/scribe_data}/templates/scribe.desktop +2 -2
  11. scribe_cli-0.3.0/scribe_cli.egg-info/top_level.txt +0 -1
  12. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/.github/workflows/pypi.yml +0 -0
  13. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/LICENSE +0 -0
  14. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/README.md +0 -0
  15. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/scribe/__init__.py +0 -0
  16. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/scribe/audio.py +0 -0
  17. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/scribe/keyboard.py +0 -0
  18. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/scribe/models.py +0 -0
  19. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/scribe/models.toml +0 -0
  20. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/scribe/saverecording.py +0 -0
  21. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/scribe/streamer.py +0 -0
  22. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/scribe/testpynput.py +0 -0
  23. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/scribe/util.py +0 -0
  24. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/scribe_cli.egg-info/dependency_links.txt +0 -0
  25. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/scribe_cli.egg-info/entry_points.txt +0 -0
  26. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/scribe_cli.egg-info/requires.txt +0 -0
  27. {scribe_cli-0.3.0 → scribe_cli-0.3.1/scribe_data}/share/icon.jpg +0 -0
  28. {scribe_cli-0.3.0 → scribe_cli-0.3.1}/setup.cfg +0 -0
@@ -3,3 +3,4 @@ __pycache__
3
3
  .venv
4
4
  build
5
5
  dist
6
+ scribe/_version.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: scribe-cli
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: scribe is a local speech recognition tool that provides real-time transcription using vosk and whisper AI.
5
5
  Author-email: Mahé Perrette <mahe.perrette@gmail.com>
6
6
  License: MIT License
@@ -36,7 +36,7 @@ keywords = [
36
36
  ]
37
37
 
38
38
  [tool.setuptools]
39
- packages = [ "scribe" ]
39
+ packages = [ "scribe", "scribe_data" ]
40
40
 
41
41
  [tool.setuptools_scm]
42
42
  write_to = "scribe/_version.py"
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.3.0'
16
- __version_tuple__ = version_tuple = (0, 3, 0)
15
+ __version__ = version = '0.3.1'
16
+ __version_tuple__ = version_tuple = (0, 3, 1)
@@ -1,5 +1,6 @@
1
1
  import os, sys, platform, shutil, sysconfig
2
2
  import argparse
3
+ import scribe_data
3
4
 
4
5
  def main():
5
6
 
@@ -12,31 +13,26 @@ def main():
12
13
  o, rest = parser.parse_known_args()
13
14
  o.arguments = rest
14
15
 
15
- PACKAGE_NAME = 'scribe'
16
+ SOURCE_SCRIBE_DATA = os.path.dirname(scribe_data.__file__)
16
17
 
17
18
  HOME = os.environ.get('HOME',os.path.expanduser('~'))
18
19
  XDG_SHARE = os.environ.get('XDG_DATA_HOME', os.path.join(HOME, '.local','share'))
19
20
  XDG_APP_DATA = os.path.join(XDG_SHARE, 'applications')
20
- XDG_SCRIBE_DATA = os.path.join(XDG_SHARE, PACKAGE_NAME)
21
-
22
21
 
23
22
  # Create the directory if it doesn't exist
24
- os.makedirs(XDG_SCRIBE_DATA, exist_ok=True)
25
23
  os.makedirs(XDG_APP_DATA, exist_ok=True)
26
24
 
27
- # Copy your files to the desired location
28
- print("Copying files to", XDG_SCRIBE_DATA)
29
- shutil.copy('share/icon.jpg', XDG_SCRIBE_DATA)
30
-
31
- with open('templates/scribe.desktop') as f:
25
+ with open(os.path.join(SOURCE_SCRIBE_DATA, 'templates', 'scribe.desktop')) as f:
32
26
  template = f.read()
33
27
 
34
28
  bin_folder = sysconfig.get_path("scripts")
35
- desktop_file = template.format(XDG_SCRIBE_DATA=XDG_SCRIBE_DATA, bin_folder=bin_folder, options=' '.join(o.arguments))
29
+ icon_folder = os.path.join(SOURCE_SCRIBE_DATA, 'share')
30
+ desktop_filecontent = template.format(icon_folder=icon_folder, bin_folder=bin_folder, options=' '.join(o.arguments) if o.arguments else '')
36
31
 
37
- print("Writing desktop file to", XDG_APP_DATA)
38
- with open(os.path.join(XDG_APP_DATA, 'scribe.desktop'), "w") as f:
39
- f.write(desktop_file)
32
+ desktop_filepath = os.path.join(XDG_APP_DATA, 'scribe.desktop')
33
+ print("Writing GNOME desktop file:", desktop_filepath)
34
+ with open(desktop_filepath, "w") as f:
35
+ f.write(desktop_filecontent)
40
36
 
41
37
 
42
38
  if __name__ == "__main__":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: scribe-cli
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: scribe is a local speech recognition tool that provides real-time transcription using vosk and whisper AI.
5
5
  Author-email: Mahé Perrette <mahe.perrette@gmail.com>
6
6
  License: MIT License
@@ -20,5 +20,6 @@ scribe_cli.egg-info/dependency_links.txt
20
20
  scribe_cli.egg-info/entry_points.txt
21
21
  scribe_cli.egg-info/requires.txt
22
22
  scribe_cli.egg-info/top_level.txt
23
- share/icon.jpg
24
- templates/scribe.desktop
23
+ scribe_data/__init__.py
24
+ scribe_data/share/icon.jpg
25
+ scribe_data/templates/scribe.desktop
@@ -0,0 +1,2 @@
1
+ scribe
2
+ scribe_data
File without changes
@@ -3,6 +3,6 @@
3
3
  Terminal=true
4
4
  Type=Application
5
5
  Name=Scribe
6
- Exec={bin_folder}/scribe {options}
7
- Icon={XDG_SCRIBE_DATA}/icon.jpg
6
+ Exec={bin_folder}/scribe{options}
7
+ Icon={icon_folder}/icon.jpg
8
8
  StartupWMClass=crx_mpnasdanpmmopoasdjdcgaaiekailkhb
@@ -1 +0,0 @@
1
- scribe
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes