plover2cat 4.0.0a1__tar.gz → 4.0.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.
- {plover2cat-4.0.0a1/plover2cat.egg-info → plover2cat-4.0.1}/PKG-INFO +4 -5
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/README.md +1 -3
- {plover2cat-4.0.0a1 → plover2cat-4.0.1/plover2cat.egg-info}/PKG-INFO +4 -5
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover2cat.egg-info/SOURCES.txt +2 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover2cat.egg-info/requires.txt +2 -1
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/PloverCATWindow.py +134 -91
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/TextEditor.py +7 -7
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/__init__.py +5 -6
- plover2cat-4.0.1/plover_cat/__version__.py +2 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/plover_cat.ui +80 -23
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/steno_objects.py +16 -15
- plover2cat-4.0.1/plover_cat/tapeDialogWindow.py +96 -0
- plover2cat-4.0.1/plover_cat/tape_dialog.ui +117 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/setup.cfg +2 -1
- plover2cat-4.0.0a1/plover_cat/__version__.py +0 -2
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/LICENSE.txt +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/MANIFEST.in +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover2cat.egg-info/dependency_links.txt +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover2cat.egg-info/entry_points.txt +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover2cat.egg-info/top_level.txt +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover2cat.egg-info/zip-safe +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/FlowLayout.py +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/affixDialogWindow.py +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/affix_dialog.ui +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/captionDialogWindow.py +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/captionWorker.py +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/caption_dialog.ui +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/constants.py +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/create_dialog.ui +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/documentWorker.py +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/export_helpers.py +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/fieldDialogWindow.py +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/field_dialog.ui +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/helpers.py +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/indexDialogWindow.py +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/index_dialog.ui +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/qcommands.py +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/recorderDialogWindow.py +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/recorder_dialog.ui +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/arrow-270-medium.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/arrow-circle-double-135.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/arrow-curve-180.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/arrow-curve.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/arrow-join.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/arrow-skip-180.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/arrow-skip.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/arrow-split.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/arrow-stop-180.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/book-question.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/card--pencil.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/card--plus.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/clipboard--plus.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/clipboard-paste-document-text.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/clipboard-paste.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/clipboard.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/control-cursor.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/control-record.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/control-skip-180.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/control-skip.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/control-stop-square.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/control-stop.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/cross.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/disk-black.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/document-copy.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/document-import.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/document-resize-actual.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/document-text-large.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/document-text.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/document.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/edit-alignment-center.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/edit-alignment-justify-distribute.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/edit-alignment-right.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/edit-alignment.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/edit-bold.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/edit-italic.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/edit-pilcrow.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/edit-style.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/edit-underline.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/edit.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/folder-open-document-music.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/folder-open-document-text.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/icon.svg +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/image--plus.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/information.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/lightning.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/lock.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/magnifier-zoom-in.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/magnifier-zoom-out.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/magnifier.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/microphone.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/minus-button.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/palette.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/plus-button.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/scissors-blue.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/spell-check-error.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/spell-check.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources/wand.png +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/resources.qrc +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/rtf_parsing.py +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/shortcutDialogWindow.py +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/shortcut_dialog.ui +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/spellcheck.py +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/suggestDialogWindow.py +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/suggest_dialog.ui +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/testDialogWindow.py +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/plover_cat/test_dialog.ui +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/pyproject.toml +0 -0
- {plover2cat-4.0.0a1 → plover2cat-4.0.1}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plover2cat
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.1
|
|
4
4
|
Summary: A CAT software for Plover
|
|
5
5
|
Home-page: https://github.com/greenwyrt/plover2CAT/
|
|
6
6
|
Author: plants
|
|
@@ -19,7 +19,8 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
License-File: LICENSE.txt
|
|
21
21
|
Requires-Dist: plover>=5.0.0.dev2
|
|
22
|
-
Requires-Dist: PySide6-
|
|
22
|
+
Requires-Dist: PySide6-Essentials>=6.10.0
|
|
23
|
+
Requires-Dist: PySide6-Addons>=6.10.0
|
|
23
24
|
Requires-Dist: odfpy
|
|
24
25
|
Requires-Dist: pyparsing>3.0.7
|
|
25
26
|
Requires-Dist: spylls
|
|
@@ -29,8 +30,6 @@ Dynamic: license-file
|
|
|
29
30
|
|
|
30
31
|
# plover2CAT
|
|
31
32
|
|
|
32
|
-
Note: In line with the new Plover 5 release, Plover2CAT is releasing 4.0.0-alpha, which should retain all existing functionalities and is installable on Plover 5 by Github. All issues can be reported here or in Discord.
|
|
33
|
-
|
|
34
33
|
Plover2CAT is a plugin for Plover, the open-source stenography engine. If the only user requirement is to write steno on the computer, this plugin is not needed as Plover is more than sufficient. Plover2CAT supplements Plover by providing some features of a computer-aided-transcription (CAT) program.
|
|
35
34
|
|
|
36
35
|
## Features Overview
|
|
@@ -55,7 +54,7 @@ Plover2CAT is a plugin for Plover, the open-source stenography engine. If the on
|
|
|
55
54
|
- timestamped paper tape
|
|
56
55
|
- creation and loading of transcript-specific dictionaries for each transcript
|
|
57
56
|
|
|
58
|
-
-
|
|
57
|
+
- media (audio/video) synchonization and recording
|
|
59
58
|
|
|
60
59
|
- captioning features such as:
|
|
61
60
|
- separate window to display captions
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# plover2CAT
|
|
2
2
|
|
|
3
|
-
Note: In line with the new Plover 5 release, Plover2CAT is releasing 4.0.0-alpha, which should retain all existing functionalities and is installable on Plover 5 by Github. All issues can be reported here or in Discord.
|
|
4
|
-
|
|
5
3
|
Plover2CAT is a plugin for Plover, the open-source stenography engine. If the only user requirement is to write steno on the computer, this plugin is not needed as Plover is more than sufficient. Plover2CAT supplements Plover by providing some features of a computer-aided-transcription (CAT) program.
|
|
6
4
|
|
|
7
5
|
## Features Overview
|
|
@@ -26,7 +24,7 @@ Plover2CAT is a plugin for Plover, the open-source stenography engine. If the on
|
|
|
26
24
|
- timestamped paper tape
|
|
27
25
|
- creation and loading of transcript-specific dictionaries for each transcript
|
|
28
26
|
|
|
29
|
-
-
|
|
27
|
+
- media (audio/video) synchonization and recording
|
|
30
28
|
|
|
31
29
|
- captioning features such as:
|
|
32
30
|
- separate window to display captions
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plover2cat
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.1
|
|
4
4
|
Summary: A CAT software for Plover
|
|
5
5
|
Home-page: https://github.com/greenwyrt/plover2CAT/
|
|
6
6
|
Author: plants
|
|
@@ -19,7 +19,8 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
License-File: LICENSE.txt
|
|
21
21
|
Requires-Dist: plover>=5.0.0.dev2
|
|
22
|
-
Requires-Dist: PySide6-
|
|
22
|
+
Requires-Dist: PySide6-Essentials>=6.10.0
|
|
23
|
+
Requires-Dist: PySide6-Addons>=6.10.0
|
|
23
24
|
Requires-Dist: odfpy
|
|
24
25
|
Requires-Dist: pyparsing>3.0.7
|
|
25
26
|
Requires-Dist: spylls
|
|
@@ -29,8 +30,6 @@ Dynamic: license-file
|
|
|
29
30
|
|
|
30
31
|
# plover2CAT
|
|
31
32
|
|
|
32
|
-
Note: In line with the new Plover 5 release, Plover2CAT is releasing 4.0.0-alpha, which should retain all existing functionalities and is installable on Plover 5 by Github. All issues can be reported here or in Discord.
|
|
33
|
-
|
|
34
33
|
Plover2CAT is a plugin for Plover, the open-source stenography engine. If the only user requirement is to write steno on the computer, this plugin is not needed as Plover is more than sufficient. Plover2CAT supplements Plover by providing some features of a computer-aided-transcription (CAT) program.
|
|
35
34
|
|
|
36
35
|
## Features Overview
|
|
@@ -55,7 +54,7 @@ Plover2CAT is a plugin for Plover, the open-source stenography engine. If the on
|
|
|
55
54
|
- timestamped paper tape
|
|
56
55
|
- creation and loading of transcript-specific dictionaries for each transcript
|
|
57
56
|
|
|
58
|
-
-
|
|
57
|
+
- media (audio/video) synchonization and recording
|
|
59
58
|
|
|
60
59
|
- captioning features such as:
|
|
61
60
|
- separate window to display captions
|
|
@@ -42,6 +42,8 @@ plover_cat/spellcheck.py
|
|
|
42
42
|
plover_cat/steno_objects.py
|
|
43
43
|
plover_cat/suggestDialogWindow.py
|
|
44
44
|
plover_cat/suggest_dialog.ui
|
|
45
|
+
plover_cat/tapeDialogWindow.py
|
|
46
|
+
plover_cat/tape_dialog.ui
|
|
45
47
|
plover_cat/testDialogWindow.py
|
|
46
48
|
plover_cat/test_dialog.ui
|
|
47
49
|
plover_cat/resources/arrow-270-medium.png
|
|
@@ -9,32 +9,23 @@ from collections import Counter, deque
|
|
|
9
9
|
from copy import deepcopy
|
|
10
10
|
from sys import platform
|
|
11
11
|
from tempfile import gettempdir, TemporaryDirectory
|
|
12
|
-
|
|
13
|
-
|
|
14
12
|
from PySide6 import QtCore, QtGui, QtWidgets
|
|
15
|
-
from PySide6.QtGui import (
|
|
16
|
-
|
|
17
|
-
QTextOption,
|
|
13
|
+
from PySide6.QtGui import (QColor, QTextCursor, QFont, QFontMetrics, QTextDocument,
|
|
14
|
+
QStandardItem, QStandardItemModel, QPageSize,
|
|
15
|
+
QTextOption, QKeySequence, QPalette, QDesktopServices, QPixmap, QAction, QIcon)
|
|
18
16
|
from PySide6.QtWidgets import (QMainWindow, QFileDialog, QInputDialog, QListWidgetItem, QTableWidgetItem,
|
|
19
|
-
|
|
17
|
+
QMessageBox, QDialog, QFontDialog, QColorDialog, QLabel, QMenu,
|
|
20
18
|
QCompleter, QApplication, QTextEdit, QPlainTextEdit, QProgressBar, QToolButton, QDockWidget)
|
|
21
19
|
from PySide6.QtMultimedia import (QMediaPlayer, QMediaRecorder, QMediaFormat, QMediaDevices, QAudioInput)
|
|
22
20
|
from PySide6.QtMultimediaWidgets import QVideoWidget
|
|
23
|
-
from PySide6.QtCore import Qt, QFile,
|
|
24
|
-
_ = lambda txt: QtCore.QCoreApplication.translate("Plover2CAT", txt)
|
|
21
|
+
from PySide6.QtCore import Qt, QFile, QLocale, QUrl, QTime, QDateTime, QSettings, QRegularExpression, QSize, QStringListModel, QSizeF, QTimer, QThread
|
|
25
22
|
from PySide6.QtTextToSpeech import QTextToSpeech
|
|
26
|
-
|
|
27
23
|
import plover
|
|
28
|
-
|
|
29
|
-
from plover.engine import StenoEngine
|
|
30
24
|
from plover.steno import Stroke, normalize_steno, normalize_stroke
|
|
31
|
-
from plover.dictionary.base import load_dictionary
|
|
32
25
|
from plover.system.english_stenotype import DICTIONARIES_ROOT, ORTHOGRAPHY_WORDLIST
|
|
33
26
|
from plover.system import _load_wordlist
|
|
34
27
|
from plover import log
|
|
35
|
-
|
|
36
28
|
from plover_cat.__version__ import __version__
|
|
37
|
-
|
|
38
29
|
from plover_cat.plover_cat_ui import Ui_PloverCAT
|
|
39
30
|
from plover_cat.TextEditor import PloverCATEditor
|
|
40
31
|
from plover_cat.fieldDialogWindow import fieldDialogWindow
|
|
@@ -44,8 +35,8 @@ from plover_cat.indexDialogWindow import indexDialogWindow
|
|
|
44
35
|
from plover_cat.suggestDialogWindow import suggestDialogWindow
|
|
45
36
|
from plover_cat.captionDialogWindow import captionDialogWindow
|
|
46
37
|
from plover_cat.recorderDialogWindow import recorderDialogWindow
|
|
38
|
+
from plover_cat.tapeDialogWindow import tapeDialogWindow
|
|
47
39
|
from plover_cat.testDialogWindow import testDialogWindow
|
|
48
|
-
|
|
49
40
|
from plover_cat.rtf_parsing import *
|
|
50
41
|
from plover_cat.constants import *
|
|
51
42
|
from plover_cat.qcommands import *
|
|
@@ -57,6 +48,8 @@ from plover_cat.FlowLayout import FlowLayout
|
|
|
57
48
|
from plover_cat.documentWorker import documentWorker
|
|
58
49
|
from plover_cat.captionWorker import captionWorker
|
|
59
50
|
|
|
51
|
+
_ = lambda txt: QtCore.QCoreApplication.translate("Plover2CAT", txt)
|
|
52
|
+
|
|
60
53
|
scowl = _load_wordlist(ORTHOGRAPHY_WORDLIST, DICTIONARIES_ROOT)
|
|
61
54
|
|
|
62
55
|
try:
|
|
@@ -92,6 +85,7 @@ class PloverCATWindow(QMainWindow, Ui_PloverCAT):
|
|
|
92
85
|
:ivar textEdit: hold current transcript
|
|
93
86
|
:ivar index_dialog: instance of ``indexDialogWindow``
|
|
94
87
|
:ivar caption_dialog: instance of ``captionDialogWindow``
|
|
88
|
+
:ivar tape_dialog: instance of ``tapeDialogWindow``
|
|
95
89
|
:ivar suggest_dialog: instance of ``suggestDialogWindow``
|
|
96
90
|
:ivar cap_worker: instance of ``capWorker``
|
|
97
91
|
:ivar autosave_time: autosave timer as ``QTimer``
|
|
@@ -152,6 +146,8 @@ class PloverCATWindow(QMainWindow, Ui_PloverCAT):
|
|
|
152
146
|
self.index_dialog = indexDialogWindow({})
|
|
153
147
|
self.caption_dialog = captionDialogWindow()
|
|
154
148
|
self.suggest_dialog = suggestDialogWindow(None, self.engine, scowl)
|
|
149
|
+
self.tape_dialog = tapeDialogWindow()
|
|
150
|
+
self.tape_dialog.translate_stroke_from_tape.connect(self.tape_stroke_translate)
|
|
155
151
|
self.cap_worker = None
|
|
156
152
|
self.autosave_time = QTimer()
|
|
157
153
|
self.cutcopy_storage = deque(maxlen = 5)
|
|
@@ -1529,7 +1525,7 @@ class PloverCATWindow(QMainWindow, Ui_PloverCAT):
|
|
|
1529
1525
|
else:
|
|
1530
1526
|
self.close_file()
|
|
1531
1527
|
self.display_message("Closing window.")
|
|
1532
|
-
self.parent().
|
|
1528
|
+
self.parent().done(1)
|
|
1533
1529
|
|
|
1534
1530
|
def close_file(self, tab_index = None):
|
|
1535
1531
|
"""Close transcript tab, checking for changes.
|
|
@@ -1859,10 +1855,10 @@ class PloverCATWindow(QMainWindow, Ui_PloverCAT):
|
|
|
1859
1855
|
return
|
|
1860
1856
|
self.textEdit.log_to_tape(stroke)
|
|
1861
1857
|
|
|
1862
|
-
def on_send_string(self,
|
|
1858
|
+
def on_send_string(self, txt_string):
|
|
1863
1859
|
"""Set string sent by Plover in transcript.
|
|
1864
1860
|
"""
|
|
1865
|
-
self.textEdit.last_string_sent =
|
|
1861
|
+
self.textEdit.last_string_sent = txt_string
|
|
1866
1862
|
|
|
1867
1863
|
def count_backspaces(self, backspace):
|
|
1868
1864
|
"""Set number of backspaces sent by Plover in transcript.
|
|
@@ -1888,6 +1884,9 @@ class PloverCATWindow(QMainWindow, Ui_PloverCAT):
|
|
|
1888
1884
|
self.display_captions()
|
|
1889
1885
|
self.textEdit.on_stroke(stroke_pressed, self.actionCursorAtEnd.isChecked())
|
|
1890
1886
|
|
|
1887
|
+
def reconnect_keyboard(self):
|
|
1888
|
+
self.engine._keyboard_emulation = self.kc
|
|
1889
|
+
|
|
1891
1890
|
def tape_translate(self):
|
|
1892
1891
|
"""Translate tape contents into transcript.
|
|
1893
1892
|
"""
|
|
@@ -1897,71 +1896,40 @@ class PloverCATWindow(QMainWindow, Ui_PloverCAT):
|
|
|
1897
1896
|
self.engine.set_output(True)
|
|
1898
1897
|
else:
|
|
1899
1898
|
return
|
|
1900
|
-
# do not erase any content before, case of too many asterisks for example
|
|
1901
1899
|
self.engine.clear_translator_state()
|
|
1902
|
-
# bit of a hack since triggering stroked hook through code
|
|
1903
|
-
selected_file = QFileDialog.getOpenFileName(
|
|
1904
|
-
self,
|
|
1905
|
-
_("Select tape file to translate"),
|
|
1906
|
-
str(self.textEdit.file_name), _("Tape (*.tape *.txt)"))[0]
|
|
1907
|
-
if not selected_file:
|
|
1908
|
-
return
|
|
1909
|
-
transcript_dir = self.textEdit.file_name
|
|
1910
|
-
if pathlib.Path(selected_file) == transcript_dir.joinpath(transcript_dir.stem).with_suffix(".tape"):
|
|
1911
|
-
self.statusBar.showMessage("Cannot translate from own transcript tape.")
|
|
1912
|
-
return
|
|
1913
|
-
selected_file = pathlib.Path(selected_file)
|
|
1914
|
-
paper_format, ok = QInputDialog.getItem(self, "Translate Tape", "Format of tape file:", ["Plover2CAT", "Plover (raw)", "Plover (paper)"], editable = False)
|
|
1915
|
-
log.debug(f"Translating tape from {selected_file} with {paper_format} format.")
|
|
1916
|
-
self.mainTabs.hide()
|
|
1917
|
-
self.textEdit.blockSignals(True)
|
|
1918
|
-
self.textEdit.document().blockSignals(True)
|
|
1919
1900
|
self.kc = self.engine._keyboard_emulation
|
|
1920
1901
|
self.engine._keyboard_emulation = mock_output()
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
for line in f:
|
|
1949
|
-
keys = []
|
|
1950
|
-
for i in range(len(line)):
|
|
1951
|
-
if not line[i].isspace() and i < len(plover.system.KEYS):
|
|
1952
|
-
keys.append(plover.system.KEYS[i])
|
|
1953
|
-
self.engine._translator.translate(Stroke(keys))
|
|
1954
|
-
self.engine._trigger_hook('stroked', Stroke(keys))
|
|
1955
|
-
count += 1
|
|
1956
|
-
if count > 100:
|
|
1957
|
-
self.textEdit.undo_stack.clear()
|
|
1958
|
-
count = 0
|
|
1959
|
-
self.textEdit.undo_stack.clear()
|
|
1902
|
+
self.tape_dialog.open()
|
|
1903
|
+
self.tape_dialog.finished.connect(self.reconnect_keyboard)
|
|
1904
|
+
# # do not erase any content before, case of too many asterisks for example
|
|
1905
|
+
# self.engine.clear_translator_state()
|
|
1906
|
+
# self.mainTabs.hide()
|
|
1907
|
+
# self.textEdit.blockSignals(True)
|
|
1908
|
+
# self.textEdit.document().blockSignals(True)
|
|
1909
|
+
|
|
1910
|
+
# self.textEdit.undo_stack.clear()
|
|
1911
|
+
# self.textEdit.document().blockSignals(False)
|
|
1912
|
+
# self.textEdit.blockSignals(False)
|
|
1913
|
+
# self.mainTabs.show()
|
|
1914
|
+
# self.engine._keyboard_emulation = self.kc
|
|
1915
|
+
# todo, if format has time data, that should be inserted into stroke data of editor too
|
|
1916
|
+
|
|
1917
|
+
def tape_stroke_translate(self, strokes = 1):
|
|
1918
|
+
if strokes > 50:
|
|
1919
|
+
self.mainTabs.hide()
|
|
1920
|
+
self.textEdit.blockSignals(True)
|
|
1921
|
+
self.textEdit.document().blockSignals(True)
|
|
1922
|
+
selected_row = self.tape_dialog.tape_view.currentIndex().row()
|
|
1923
|
+
for idx in range(selected_row, selected_row + strokes):
|
|
1924
|
+
if idx >= self.tape_dialog.tape_model.rowCount():
|
|
1925
|
+
break
|
|
1926
|
+
stroke_data = self.tape_dialog.tape_model.item(idx)
|
|
1927
|
+
print(stroke_data.data(Qt.UserRole))
|
|
1928
|
+
self.engine._translator.translate(Stroke(stroke_data.data(Qt.UserRole)))
|
|
1960
1929
|
self.textEdit.document().blockSignals(False)
|
|
1961
1930
|
self.textEdit.blockSignals(False)
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
# todo, if format has time data, that should be inserted into stroke data of editor too
|
|
1931
|
+
if strokes > 50:
|
|
1932
|
+
self.mainTabs.show()
|
|
1965
1933
|
|
|
1966
1934
|
def reset_paragraph(self):
|
|
1967
1935
|
"""Remove all data from paragraph block, and erase action history.
|
|
@@ -2772,42 +2740,117 @@ class PloverCATWindow(QMainWindow, Ui_PloverCAT):
|
|
|
2772
2740
|
self.textEdit.recorder.durationChanged.disconnect()
|
|
2773
2741
|
|
|
2774
2742
|
def tts_synthesize(self):
|
|
2775
|
-
|
|
2743
|
+
"""TTS synthesize from selection or cursor position"""
|
|
2744
|
+
self.tts_play.setEnabled(False)
|
|
2745
|
+
current_cursor = self.textEdit.textCursor()
|
|
2746
|
+
if current_cursor.hasSelection():
|
|
2747
|
+
document_text = current_cursor.selectedText()
|
|
2748
|
+
else:
|
|
2749
|
+
document_text = self.textEdit.toPlainText()
|
|
2750
|
+
document_text = document_text[current_cursor.position():]
|
|
2751
|
+
print(document_text)
|
|
2752
|
+
if document_text.strip():
|
|
2753
|
+
self.tts_instance.enqueue(document_text)
|
|
2754
|
+
|
|
2776
2755
|
|
|
2777
2756
|
def tts_setup(self):
|
|
2757
|
+
"""Set up TTS engine and connections"""
|
|
2778
2758
|
self.tts_instance = QTextToSpeech(self)
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2759
|
+
self.tts_pop_engine()
|
|
2760
|
+
if self.tts_instance.engineCapabilities() & QTextToSpeech.Capability.PauseResume:
|
|
2761
|
+
self.tts_pause.setVisible(True)
|
|
2762
|
+
self.tts_resume.setVisible(True)
|
|
2763
|
+
else:
|
|
2764
|
+
self.tts_pause.setVisible(False)
|
|
2765
|
+
self.tts_resume.setVisible(False)
|
|
2784
2766
|
self.tts_pitch.valueChanged.connect(self.tts_set_pitch)
|
|
2785
2767
|
self.tts_volume.valueChanged.connect(self.tts_set_volume)
|
|
2786
2768
|
self.tts_rate.valueChanged.connect(self.tts_set_rate)
|
|
2787
|
-
self.tts_locale.currentIndexChanged.connect(self.tts_set_locale)
|
|
2788
|
-
self.tts_voice.currentIndexChanged.connect(self.tts_set_voice)
|
|
2789
2769
|
self.tts_engine.currentIndexChanged.connect(self.tts_set_engine)
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2770
|
+
self.tts_locale.currentIndexChanged.connect(self.tts_set_locale)
|
|
2771
|
+
self.tts_voice.currentIndexChanged.connect(self.tts_set_voice)
|
|
2772
|
+
self.tts_play.clicked.connect(self.tts_synthesize)
|
|
2773
|
+
self.tts_stop.clicked.connect(self.tts_end)
|
|
2774
|
+
self.tts_pause.clicked.connect(lambda: self.tts_instance.pause())
|
|
2775
|
+
self.tts_resume.clicked.connect(lambda: self.tts_instance.resume())
|
|
2776
|
+
self.tts_instance.stateChanged.connect(self.tts_state_manage)
|
|
2777
|
+
self.tts_set_engine()
|
|
2778
|
+
|
|
2779
|
+
def tts_end(self):
|
|
2780
|
+
"""Stop TTS playback"""
|
|
2781
|
+
self.tts_instance.stop()
|
|
2782
|
+
self.tts_play.setEnabled(True)
|
|
2783
|
+
|
|
2784
|
+
def tts_pop_engine(self, index=None):
|
|
2785
|
+
"""Populate TTS engine choices"""
|
|
2786
|
+
self.tts_engine.blockSignals(True)
|
|
2787
|
+
self.tts_engine.clear()
|
|
2788
|
+
for engine in QTextToSpeech.availableEngines():
|
|
2789
|
+
if engine != "mock":
|
|
2790
|
+
self.tts_engine.addItem(engine)
|
|
2791
|
+
self.tts_engine.blockSignals(False)
|
|
2792
|
+
if index:
|
|
2793
|
+
self.tts_engine.setCurrentIndex(index)
|
|
2794
|
+
else:
|
|
2795
|
+
self.tts_engine.setCurrentIndex(0)
|
|
2796
|
+
|
|
2797
|
+
def tts_state_manage(self, state):
|
|
2798
|
+
"""Respond to changes in TTS state"""
|
|
2799
|
+
if state == QTextToSpeech.State.Ready:
|
|
2800
|
+
self.tts_play.setEnabled(True)
|
|
2801
|
+
elif state == QTextToSpeech.State.Error:
|
|
2802
|
+
self.display_message(self.tts_instance.errorString())
|
|
2803
|
+
|
|
2804
|
+
def tts_set_engine(self, index = None):
|
|
2805
|
+
"""Set TTS engine"""
|
|
2806
|
+
user_select = self.tts_engine.currentText()
|
|
2807
|
+
self.tts_instance.setEngine(user_select)
|
|
2808
|
+
self.tts_pop_locale()
|
|
2809
|
+
|
|
2810
|
+
def tts_pop_locale(self):
|
|
2811
|
+
"""Populate locales in ui for selected TTS engine"""
|
|
2812
|
+
self.tts_locale.blockSignals(True)
|
|
2813
|
+
self.tts_locale.clear()
|
|
2814
|
+
for loc in self.tts_instance.availableLocales():
|
|
2815
|
+
self.tts_locale.addItem(f"{QLocale.languageToString(loc.language())} ({QLocale.territoryToString(loc.territory())})", loc)
|
|
2816
|
+
self.tts_locale.blockSignals(False)
|
|
2817
|
+
self.tts_locale.setCurrentIndex(0)
|
|
2818
|
+
self.tts_pop_voice()
|
|
2793
2819
|
|
|
2794
2820
|
def tts_set_locale(self, index):
|
|
2795
|
-
|
|
2821
|
+
"""Set locale for present TTS engine"""
|
|
2822
|
+
user_select = self.tts_locale.currentData()
|
|
2823
|
+
self.tts_instance.setLocale(user_select)
|
|
2824
|
+
self.tts_pop_voice()
|
|
2825
|
+
|
|
2826
|
+
def tts_pop_voice(self):
|
|
2827
|
+
"""Populate voices in ui for selected TTS engine"""
|
|
2828
|
+
self.tts_voice.blockSignals(True)
|
|
2829
|
+
self.tts_voice.clear()
|
|
2830
|
+
for voice in self.tts_instance.availableVoices():
|
|
2831
|
+
self.tts_voice.addItem(voice.name(), voice)
|
|
2832
|
+
self.tts_voice.blockSignals(False)
|
|
2833
|
+
self.tts_voice.setCurrentIndex(0)
|
|
2796
2834
|
|
|
2797
2835
|
def tts_set_voice(self, index):
|
|
2798
|
-
|
|
2836
|
+
"""Set voice for present TTS engine"""
|
|
2837
|
+
user_select = self.tts_voice.currentData()
|
|
2838
|
+
self.tts_instance.setVoice(user_select)
|
|
2799
2839
|
|
|
2800
2840
|
def tts_set_pitch(self, pitch):
|
|
2841
|
+
"""Set TTS pitch"""
|
|
2801
2842
|
pitch = pitch / 10
|
|
2802
2843
|
if self.tts_instance:
|
|
2803
2844
|
self.tts_instance.setPitch(pitch)
|
|
2804
2845
|
|
|
2805
2846
|
def tts_set_volume(self, volume):
|
|
2847
|
+
"""Set TTS volume"""
|
|
2806
2848
|
volume = volume / 10
|
|
2807
2849
|
if self.tts_instance:
|
|
2808
2850
|
self.tts_instance.setVolume(volume)
|
|
2809
2851
|
|
|
2810
2852
|
def tts_set_rate(self, rate):
|
|
2853
|
+
"""Set TTS rate"""
|
|
2811
2854
|
rate = rate / 10
|
|
2812
2855
|
if self.tts_instance:
|
|
2813
2856
|
self.tts_instance.setRate(rate)
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import string
|
|
2
1
|
import pathlib
|
|
3
2
|
import json
|
|
4
3
|
import os
|
|
@@ -9,13 +8,11 @@ from dulwich.errors import NotGitRepository
|
|
|
9
8
|
from dulwich import porcelain
|
|
10
9
|
from spylls.hunspell import Dictionary
|
|
11
10
|
|
|
12
|
-
from PySide6 import QtCore, QtGui
|
|
13
|
-
from PySide6.QtGui import
|
|
14
|
-
from PySide6.QtCore import
|
|
11
|
+
from PySide6 import QtCore, QtGui
|
|
12
|
+
from PySide6.QtGui import QTextCursor, QTextDocument, QColor, QUndoStack
|
|
13
|
+
from PySide6.QtCore import Qt, Signal, QUrl, QSettings
|
|
15
14
|
from PySide6.QtWidgets import QCompleter, QTextEdit, QMessageBox, QApplication
|
|
16
|
-
from PySide6.QtMultimedia import (QMediaPlayer, QMediaRecorder,
|
|
17
|
-
|
|
18
|
-
_ = lambda txt: QtCore.QCoreApplication.translate("Plover2CAT", txt)
|
|
15
|
+
from PySide6.QtMultimedia import (QMediaPlayer, QMediaRecorder, QMediaCaptureSession, QAudioOutput)
|
|
19
16
|
|
|
20
17
|
import plover
|
|
21
18
|
|
|
@@ -29,6 +26,8 @@ from plover_cat.export_helpers import load_odf_styles, recursive_style_format, p
|
|
|
29
26
|
from plover_cat.helpers import ms_to_hours, save_json, backup_dictionary_stack, add_custom_dicts, load_dictionary_stack_from_backup, return_commits, hide_file
|
|
30
27
|
from plover_cat.constants import default_styles, default_config, default_dict
|
|
31
28
|
|
|
29
|
+
_ = lambda txt: QtCore.QCoreApplication.translate("Plover2CAT", txt)
|
|
30
|
+
|
|
32
31
|
class PloverCATEditor(QTextEdit):
|
|
33
32
|
"""Editor object for a transcript.
|
|
34
33
|
|
|
@@ -185,6 +184,7 @@ class PloverCATEditor(QTextEdit):
|
|
|
185
184
|
self.mock_type(event.text())
|
|
186
185
|
# print(event.key())
|
|
187
186
|
QTextEdit.keyPressEvent(self, event)
|
|
187
|
+
|
|
188
188
|
def recorder_error(self, error, message):
|
|
189
189
|
log.debug(f"{error}: {message}")
|
|
190
190
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from PySide6.QtCore import Qt
|
|
2
|
-
from PySide6.QtWidgets import
|
|
1
|
+
from PySide6.QtCore import Qt
|
|
2
|
+
from PySide6.QtWidgets import QHBoxLayout
|
|
3
3
|
|
|
4
4
|
from plover.gui_qt.tool import Tool
|
|
5
5
|
|
|
@@ -18,12 +18,11 @@ class PloverCAT(Tool):
|
|
|
18
18
|
|
|
19
19
|
def __init__(self, engine):
|
|
20
20
|
super().__init__(engine)
|
|
21
|
-
|
|
22
21
|
self.setWindowFlags(Qt.Window | Qt.WindowMinMaxButtonsHint)
|
|
23
22
|
self.layout = QHBoxLayout()
|
|
24
|
-
self.
|
|
23
|
+
self.everything = PloverCATWindow(engine)
|
|
24
|
+
self.layout.addWidget(self.everything)
|
|
25
25
|
self.layout.setContentsMargins(0,0,0,0)
|
|
26
26
|
self.setLayout(self.layout)
|
|
27
|
-
|
|
28
27
|
#what does this do?
|
|
29
|
-
self.finished.connect(lambda: None)
|
|
28
|
+
# self.finished.connect(lambda: None)
|