Skip to content

Commit

Permalink
Merge pull request #58 from ccbogel/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ccbogel authored Jan 1, 2020
2 parents 18bd067 + af5244c commit 472805f
Show file tree
Hide file tree
Showing 4 changed files with 189 additions and 710 deletions.
Binary file modified QualCoder_Manual.pdf
Binary file not shown.
20 changes: 10 additions & 10 deletions qualcoder/GUI/About.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title></title>
<meta name="generator" content="Bluefish 2.2.7" />
<meta name="author" content="cc" />
<meta name="generator" content="LibreOffice 5.1.6.2 (Linux)"/>
<meta name="author" content="cc"/>
<meta name="created" content="00:00:00"/>
<meta name="changed" content="2019-10-29T21:22:17.011521707"/>
<meta name="changed" content="2020-01-01T23:38:56.271755937"/>
<style type="text/css">
@page { margin: 2cm }
p { margin-bottom: 0.21cm; color: #000000 }
Expand All @@ -23,13 +23,13 @@
<body lang="en-US" text="#000000" dir="ltr">
<h1 class="western">About QualCoder</h1>
<h2 class="western">Version:</h2>
<p style="margin-bottom: 0cm">QualCoder 1.6</p>
<p style="margin-bottom: 0cm">2019 December 20</p>
<p style="margin-bottom: 0cm">QualCoder 1.7</p>
<p style="margin-bottom: 0cm">2020 January 1</p>
<p style="margin-bottom: 0cm">Depends on python 3.x, pyqt5 lxml
Pillow ebooklib ply chardet click pikepdf pdfminer.six</p>
Pillow ebooklib ply chardet pikepdf pdfminer.six</p>
<p style="margin-bottom: 0cm">VLC should also be installed.</p>
<p style="margin-bottom: 0cm">Tested on: Linux Mint 18.04, Ubuntu 19.04, Lubuntu 18.04, partly tested on
Windows 10 and Mac OS</p>
<p style="margin-bottom: 0cm">Tested on: Linux Mint 18.04, Ubuntu
19.04, Lubuntu 18.04, partly tested on Windows 10 and Mac OS</p>
<p style="margin-bottom: 0cm"><br/>

</p>
Expand Down Expand Up @@ -61,7 +61,7 @@ <h2 class="western">Other details</h2>
interface.</p>
<h2 class="western">License</h2>
<p>MIT License</p>
<p>Copyright (c) 2019 Colin Curtain
<p>Copyright (c) 2020 Colin Curtain
</p>
<p>Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
Expand All @@ -84,4 +84,4 @@ <h2 class="western">License</h2>
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
</body>
</html>
</html>
856 changes: 168 additions & 688 deletions qualcoder/GUI/en_Help.html

Large diffs are not rendered by default.

23 changes: 11 additions & 12 deletions qualcoder/view_av.py
Original file line number Diff line number Diff line change
Expand Up @@ -1783,6 +1783,7 @@ def eventFilter(self, object, event):
""" Add key options to textEdit_transcription to improve manual transcribing.
Options are:
ctrl + r to rewind 3 seconds.
xtrl + s to start/pause
ctrl + t to insert timestamp in format [hh.mm.ss]
ctrl + n to enter a new speakers name into shortcuts
ctrl + 1 .. 8 to insert speaker in format [speaker name]
Expand Down Expand Up @@ -1849,7 +1850,9 @@ def eventFilter(self, object, event):
self.speaker_list.pop()
self.speaker_list.append(name)
self.add_speaker_names_to_label()

# KEY 83 MODS 20 ctrl + s pause/play toggle
if key == 83 and mods == 20:
self.play_pause()
return True

def add_speaker_names_to_label(self):
Expand Down Expand Up @@ -1920,40 +1923,41 @@ def get_timestamps_from_transcription(self):
hhmmss_sss = "#[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\.[0-9][0-9][0-9]#"
srt = "[0-9][0-9]:[0-9][0-9]:[0-9][0-9],[0-9][0-9][0-9]\s-->\s[0-9][0-9]:[0-9][0-9]:[0-9][0-9],[0-9][0-9][0-9]"

transcription = self.ui.textEdit_transcription.toPlainText()
self.time_positions = []
for match in re.finditer(mmss1, self.transcription[1]):
for match in re.finditer(mmss1, transcription):
stamp = match.group()[1:-1]
s = stamp.split(':')
try:
msecs = (int(s[0]) * 60 + int(s[1])) * 1000
self.time_positions.append([match.span()[0], match.span()[1], msecs])
except:
pass
for match in re.finditer(hhmmss1, self.transcription[1]):
for match in re.finditer(hhmmss1, transcription):
stamp = match.group()[1:-1]
s = stamp.split(':')
try:
msecs = (int(s[0]) * 3600 + int(s[1]) * 60 + int(s[2])) * 1000
self.time_positions.append([match.span()[0], match.span()[1], msecs])
except:
pass
for match in re.finditer(mmss2, self.transcription[1]):
for match in re.finditer(mmss2, transcription):
stamp = match.group()[1:-1]
s = stamp.split('.')
try:
msecs = (int(s[0]) * 60 + int(s[1])) * 1000
self.time_positions.append([match.span()[0], match.span()[1], msecs])
except:
pass
for match in re.finditer(hhmmss2, self.transcription[1]):
for match in re.finditer(hhmmss2, transcription):
stamp = match.group()[1:-1]
s = stamp.split('.')
try:
msecs = (int(s[0]) * 3600 + int(s[1]) * 60 + int(s[2])) * 1000
self.time_positions.append([match.span()[0], match.span()[1], msecs])
except:
pass
for match in re.finditer(hhmmss_sss, self.transcription[1]):
for match in re.finditer(hhmmss_sss, transcription):
# Format #00:12:34.567#
stamp = match.group()[1:-1]
s = stamp.split(':')
Expand All @@ -1963,7 +1967,7 @@ def get_timestamps_from_transcription(self):
self.time_positions.append([match.span()[0], match.span()[1], msecs])
except:
pass
for match in re.finditer(srt, self.transcription[1]):
for match in re.finditer(srt, transcription):
# Format 09:33:04,100 --> 09:33:09,600 skip the arrow and second time position
stamp = match.group()[0:12]
s = stamp.split(':')
Expand All @@ -1975,11 +1979,6 @@ def get_timestamps_from_transcription(self):
pass
#print(self.time_positions)

def test(self):
''' Test keyboard shortcuts '''

QtWidgets.QMessagebox.information(None, "TEST", "escape pressed")

def set_position(self):
""" Set the movie position according to the position slider.
The vlc MediaPlayer needs a float value between 0 and 1, Qt uses
Expand Down

0 comments on commit 472805f

Please sign in to comment.