From b4fc89cfbeacb9dc99eba01b0dbfb0023709fe40 Mon Sep 17 00:00:00 2001 From: tassaron Date: Fri, 29 Apr 2022 00:22:26 -0400 Subject: document keyboard shortcuts. fix "show ffmpeg command" --- README.md | 24 ++++++++++++++++++++++++ src/gui/mainwindow.py | 8 +++++--- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index abb9a73..3ca5305 100644 --- a/README.md +++ b/README.md @@ -71,5 +71,29 @@ Download audio-visualizer-python from this repository and run it with `python3 m * **Warning:** [Compiling from source is difficult on Windows](http://pillow.readthedocs.io/en/3.1.x/installation.html#building-on-windows). +# Keyboard Shortcuts +| Key Combo | Effect | +| ------------------------- | -------------------------------------------------- | +| Ctrl+S | Save Current Project | +| Ctrl+A | Save Project As... | +| Ctrl+O | Open Project | +| Ctrl+N | New Project (prompts to save current project) | +| Ctrl+Z | Undo | +| Ctrl+Shift+Z _or_ Ctrl+Y | Redo | +| Ctrl+T _or_ Insert | Add Component | +| Ctrl+R _or_ Delete | Remove Component | +| Ctrl+Space | Focus Component List | +| Ctrl+Shift+S | Save Component Preset | +| Ctrl+Shift+C | Remove Preset from Component | +| Ctrl+Up | Move Selected Component Up | +| Ctrl+Down | Move Selected Component Down | +| Ctrl+Home | Move Selected Component to Top | +| Ctrl+End | Move Selected Component to Bottom | +| Ctrl+Shift+U | Open Undo History | +| Ctrl+Shift+F | Show FFmpeg Command | +| Ctrl+Alt+Shift+R | Force redraw preview (must use `--debug`) | +| Ctrl+Alt+Shift+A | Dump MainWindow data into log (must use `--debug`) | + + # License audio-visualizer-python is licensed under the MIT license. diff --git a/src/gui/mainwindow.py b/src/gui/mainwindow.py index da8370d..f60befd 100644 --- a/src/gui/mainwindow.py +++ b/src/gui/mainwindow.py @@ -758,15 +758,17 @@ class MainWindow(QtWidgets.QMainWindow): def showFfmpegCommand(self): from textwrap import wrap - from toolkit.ffmpeg import createFfmpegCommand + from ..toolkit.ffmpeg import createFfmpegCommand command = createFfmpegCommand( self.window.lineEdit_audioFile.text(), self.window.lineEdit_outputFile.text(), self.core.selectedComponents ) - lines = wrap(" ".join(command), 49) + command = " ".join(command) + log.info(f"FFmpeg command: {command}") + lines = wrap(command, 49) self.showMessage( - msg="Current FFmpeg command:\n\n %s" % " ".join(lines) + msg=f"Current FFmpeg command:\n\n{' '.join(lines)}" ) def addComponent(self, compPos, moduleIndex): -- cgit v1.2.3