mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-17 11:22:28 +12:00
Merge branch 'master' into develop
This commit is contained in:
commit
cb79e504e7
87
README.md
87
README.md
|
@ -1,42 +1,67 @@
|
|||
# Manuskript
|
||||
|
||||
[Manuskript](http://www.theologeek.ch/manuskript) is an open-source tool for writers.
|
||||
[Manuskript](http://www.theologeek.ch/manuskript) is an open-source
|
||||
tool for writers.
|
||||
|
||||
![Main view](http://www.theologeek.ch/manuskript/wp-content/uploads/2016/03/manuskript-0.3.0.jpg)
|
||||
Manuskript runs on on GNU/Linux, Mac OS X, and Windows.
|
||||
|
||||
![Main view](http://www.theologeek.ch/manuskript/wp-content/uploads/2017/11/manuskript-0.5.0-main-view.jpg)
|
||||
|
||||
## Features
|
||||
|
||||
Manuskript provides a rich environment to help writers create their
|
||||
first draft and then further refine and edit their masterpiece.
|
||||
With Manuskript you can:
|
||||
|
||||
* Grow your premise from one sentence, to a paragraph, to a full
|
||||
summary
|
||||
* Create characters
|
||||
* Conceive plots
|
||||
* Construct outlines
|
||||
([Outline mode](http://www.theologeek.ch/manuskript/2016/02/05/outliner/)
|
||||
and/or
|
||||
[Index cards](http://www.theologeek.ch/manuskript/2016/02/05/index-cards/))
|
||||
* Write with focus
|
||||
([Distraction free mode](https://github.com/olivierkes/manuskript/wiki/Full-screen-mode))
|
||||
* Build worlds
|
||||
* [Track items](https://github.com/olivierkes/manuskript/wiki/How-to-keep-track-of-important-items)
|
||||
* Edit and re-organize chapters and scenes
|
||||
* View [Story line](http://www.theologeek.ch/manuskript/2016/02/28/story-line/)
|
||||
* Compose with
|
||||
[fiction or non-fiction templates and writing modes](http://www.theologeek.ch/manuskript/2016/03/31/writing-modes-simple-fiction/)
|
||||
* Export to HTML, ePub, OpenDocument, DocX, PDF, and
|
||||
[more](https://github.com/olivierkes/manuskript/wiki/Import-and-Export-capabilities)
|
||||
|
||||
|
||||
## [Download](http://www.theologeek.ch/manuskript/download)
|
||||
Additionally Manuskript can help in many more ways with a spell
|
||||
checker, markdown highlighter,
|
||||
[frequency analyzer](http://www.theologeek.ch/manuskript/2016/02/08/frequency-analyzer/),
|
||||
and automatic save in
|
||||
[open and plain text file format](http://www.theologeek.ch/manuskript/2016/03/31/open-plain-text-file-format/).
|
||||
|
||||
## Running from sources
|
||||
## Download
|
||||
|
||||
To run the application without installing just:
|
||||
|
||||
* Download [latest code archive](https://github.com/olivierkes/manuskript/archive/master.zip) or clone the repository.
|
||||
* Run:
|
||||
* On Linux/Mac: bin/manuskript
|
||||
|
||||
Be sure to have all **dependencies** installed!
|
||||
|
||||
## Dependencies
|
||||
- Python 3
|
||||
- PyQt5
|
||||
- Qt SVG (`libqt5svg5` on Ubuntu)
|
||||
- Qt Webkit (`python3-pyqt5.qtwebkit` on Ubuntu)
|
||||
- lxml (`python3-lxml` on Ubuntu)
|
||||
|
||||
Optional:
|
||||
- pyenchant
|
||||
- zlib
|
||||
|
||||
### To install dependencies on Linux:
|
||||
- Arch Linux:
|
||||
```sudo pacman -S --needed python python-pyqt5 qt5-svg python-lxml python-pyenchant zlib```
|
||||
|
||||
- Debian based (Ubuntu, Linux Mint, etc.):
|
||||
```sudo apt-get install python3-pyqt5 libqt5svg5 python3-lxml python3-enchant zlib1g```
|
||||
Additional packages that might be needed: ``python3-pyqt5.qtwebkit pyqt5-dev-tools``
|
||||
[Download](http://www.theologeek.ch/manuskript/download) and install Manuskript today.
|
||||
|
||||
## HowTo's
|
||||
|
||||
See the [Wiki](http://github.com/olivierkes/manuskript/wiki) for more
|
||||
detailed instructions on how to install on GNU/Linux, Windows, and OS X.
|
||||
detailed instructions on how to install and use Manuskript.
|
||||
|
||||
## Contribute
|
||||
|
||||
You can help improve Manuskript by reporting
|
||||
[issues](https://github.com/olivierkes/manuskript/issues), writing
|
||||
[wiki documentation](https://github.com/olivierkes/manuskript/wiki),
|
||||
and
|
||||
[translating to other languages](https://github.com/olivierkes/manuskript/wiki/Translate-Manuskript).
|
||||
See also
|
||||
[Manuskript Contribute page](http://www.theologeek.ch/manuskript/contribute/).
|
||||
|
||||
Manuskript is written in Python3 and PyQt5.
|
||||
|
||||
## Free Software
|
||||
|
||||
Manuskript is [Free Software](https://www.gnu.org/philosophy/free-sw.html).
|
||||
You have the freedom to run, copy, distribute, study, change and improve the software.
|
||||
Manuskript is distributed under the [GNU General Public License](https://www.gnu.org/licenses/gpl.html) version 3 or (at your option) any later version.
|
||||
|
|
1
_config.yml
Normal file
1
_config.yml
Normal file
|
@ -0,0 +1 @@
|
|||
theme: jekyll-theme-cayman
|
|
@ -53,13 +53,13 @@ SOURCES += ../manuskript/ui/views/textEditView.py
|
|||
SOURCES += ../manuskript/ui/views/corkDelegate.py
|
||||
SOURCES += ../manuskript/ui/views/outlineDelegates.py
|
||||
SOURCES += ../manuskript/ui/views/lineEditView.py
|
||||
SOURCES += ../manuskript/ui/views/textEditCompleter.py
|
||||
SOURCES += ../manuskript/ui/views/cmbOutlineLabelChoser.py
|
||||
SOURCES += ../manuskript/ui/views/plotDelegate.py
|
||||
SOURCES += ../manuskript/ui/views/plotTreeView.py
|
||||
SOURCES += ../manuskript/ui/views/treeView.py
|
||||
SOURCES += ../manuskript/ui/views/characterTreeView.py
|
||||
SOURCES += ../manuskript/ui/views/storylineView.py
|
||||
SOURCES += ../manuskript/ui/views/MDEditCompleter.py
|
||||
SOURCES += ../manuskript/ui/search.py
|
||||
SOURCES += ../manuskript/ui/collapsibleDockWidgets.py
|
||||
SOURCES += ../manuskript/ui/exporters/manuskript/plainTextSettings.py
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -102,8 +102,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||
|
||||
# Main Menu
|
||||
for i in [self.actSave, self.actSaveAs, self.actCloseProject,
|
||||
self.menuEdit, self.menuView, self.menuTools, self.menuHelp,
|
||||
self.actImport, self.actCompile, self.actSettings]:
|
||||
self.menuEdit, self.menuView, self.menuOrganize,
|
||||
self.menuTools, self.menuHelp, self.actImport,
|
||||
self.actCompile, self.actSettings]:
|
||||
i.setEnabled(False)
|
||||
|
||||
# Main Menu:: File
|
||||
|
@ -122,6 +123,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||
self.actCopy.triggered.connect(self.documentsCopy)
|
||||
self.actCut.triggered.connect(self.documentsCut)
|
||||
self.actPaste.triggered.connect(self.documentsPaste)
|
||||
self.actRename.triggered.connect(self.documentsRename)
|
||||
self.actDuplicate.triggered.connect(self.documentsDuplicate)
|
||||
self.actDelete.triggered.connect(self.documentsDelete)
|
||||
self.actMoveUp.triggered.connect(self.documentsMoveUp)
|
||||
|
@ -209,7 +211,14 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||
|
||||
def tabMainChanged(self):
|
||||
"Called when main tab changes."
|
||||
self.menuDocuments.menuAction().setVisible(self.tabMain.currentIndex() == self.TabRedac)
|
||||
tabIsEditor = self.tabMain.currentIndex() == self.TabRedac
|
||||
self.menuOrganize.menuAction().setEnabled(tabIsEditor)
|
||||
for i in [self.actCut,
|
||||
self.actCopy,
|
||||
self.actPaste,
|
||||
self.actDelete,
|
||||
self.actRename]:
|
||||
i.setEnabled(tabIsEditor)
|
||||
|
||||
def focusChanged(self, old, new):
|
||||
"""
|
||||
|
@ -449,6 +458,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||
def documentsPaste(self):
|
||||
"Paste clipboard item(s) into selected item."
|
||||
if self._lastFocus: self._lastFocus.paste()
|
||||
def documentsRename(self):
|
||||
"Rename selected item."
|
||||
if self._lastFocus: self._lastFocus.rename()
|
||||
def documentsDuplicate(self):
|
||||
"Duplicate selected item(s)."
|
||||
if self._lastFocus: self._lastFocus.duplicate()
|
||||
|
@ -559,8 +571,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||
for i in [self.actOpen, self.menuRecents]:
|
||||
i.setEnabled(False)
|
||||
for i in [self.actSave, self.actSaveAs, self.actCloseProject,
|
||||
self.menuEdit, self.menuView, self.menuTools, self.menuHelp,
|
||||
self.actImport, self.actCompile, self.actSettings]:
|
||||
self.menuEdit, self.menuView, self.menuOrganize,
|
||||
self.menuTools, self.menuHelp, self.actImport,
|
||||
self.actCompile, self.actSettings]:
|
||||
i.setEnabled(True)
|
||||
|
||||
# Add project name to Window's name
|
||||
|
@ -603,8 +616,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||
for i in [self.actOpen, self.menuRecents]:
|
||||
i.setEnabled(True)
|
||||
for i in [self.actSave, self.actSaveAs, self.actCloseProject,
|
||||
self.menuEdit, self.menuView, self.menuTools, self.menuHelp,
|
||||
self.actImport, self.actCompile, self.actSettings]:
|
||||
self.menuEdit, self.menuView, self.menuOrganize,
|
||||
self.menuTools, self.menuHelp, self.actImport,
|
||||
self.actCompile, self.actSettings]:
|
||||
i.setEnabled(False)
|
||||
|
||||
# Set Window's name - no project loaded
|
||||
|
@ -1140,12 +1154,12 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||
# Help box
|
||||
references = [
|
||||
(self.lytTabOverview,
|
||||
self.tr("Enter informations about your book, and yourself."),
|
||||
self.tr("Enter information about your book, and yourself."),
|
||||
0),
|
||||
(self.lytSituation,
|
||||
self.tr(
|
||||
"""The basic situation, in the form of a 'What if...?' question. Ex: 'What if the most dangerous
|
||||
evil wizard could wasn't abled to kill a baby?' (Harry Potter)"""),
|
||||
evil wizard wasn't able to kill a baby?' (Harry Potter)"""),
|
||||
1),
|
||||
(self.lytSummary,
|
||||
self.tr(
|
||||
|
|
|
@ -35,14 +35,14 @@ class aboutDialog(QWidget, Ui_about):
|
|||
GNU General Public License Version 3
|
||||
</a><br>"""
|
||||
)
|
||||
|
||||
|
||||
self.labelManuskriptVersion.setOpenExternalLinks(True)
|
||||
|
||||
|
||||
self.labelSoftwareVersion.setText(
|
||||
"<b>" + self.tr("Software Versions in Use:") + "</b><br>"
|
||||
+ " "*5 + self.tr("Python") + " " + python_version() + "<br>"
|
||||
+ " "*5 + self.tr("PyQt") + " " + PYQT_VERSION_STR + "<br>"
|
||||
+ " "*5 + self.tr("Qt") + " " + QT_VERSION_STR
|
||||
+ " "*5 + "Python " + python_version() + "<br>"
|
||||
+ " "*5 + "PyQt " + PYQT_VERSION_STR + "<br>"
|
||||
+ " "*5 + "Qt " + QT_VERSION_STR
|
||||
)
|
||||
#self.labelPythonVersion.setText()
|
||||
#self.labelPyQtVersion.setText()
|
||||
|
|
|
@ -395,6 +395,8 @@ class editorWidget(QWidget, Ui_editorWidget_ui):
|
|||
if self.getCurrentItemView(): self.getCurrentItemView().cut()
|
||||
def paste(self):
|
||||
if self.getCurrentItemView(): self.getCurrentItemView().paste()
|
||||
def rename(self):
|
||||
if self.getCurrentItemView(): self.getCurrentItemView().rename()
|
||||
def duplicate(self):
|
||||
if self.getCurrentItemView(): self.getCurrentItemView().duplicate()
|
||||
def delete(self):
|
||||
|
|
|
@ -22,14 +22,14 @@ except:
|
|||
|
||||
class mainEditor(QWidget, Ui_mainEditor):
|
||||
"""
|
||||
`mainEditor` is responsible for opening `outlineItem`s and offering informations
|
||||
`mainEditor` is responsible for opening `outlineItem`s and offering information
|
||||
and commands about those `outlineItem`s to the used.
|
||||
|
||||
It contains two main elements:
|
||||
|
||||
1. A `tabSplitter`, which can open any numer of `outlineItem`s either in tabs
|
||||
(in `QTabWidget`) and/or in splitted views (children `tabSplitter`s).
|
||||
2. An horizontal layout contain a number of buttons and informations:
|
||||
2. An horizontal layout contain a number of buttons and information:
|
||||
|
||||
- Go up button
|
||||
- Select folder view: either "text", "cork" or "outline" (see `editorWidget`)
|
||||
|
@ -252,6 +252,7 @@ class mainEditor(QWidget, Ui_mainEditor):
|
|||
def copy(self): self.currentEditor().copy()
|
||||
def cut(self): self.currentEditor().cut()
|
||||
def paste(self): self.currentEditor().paste()
|
||||
def rename(self): self.currentEditor().rename()
|
||||
def duplicate(self): self.currentEditor().duplicate()
|
||||
def delete(self): self.currentEditor().delete()
|
||||
def moveUp(self): self.currentEditor().moveUp()
|
||||
|
|
|
@ -12,6 +12,7 @@ class Ui_generalSettings(object):
|
|||
def setupUi(self, generalSettings):
|
||||
generalSettings.setObjectName("generalSettings")
|
||||
generalSettings.resize(267, 401)
|
||||
generalSettings.setWindowTitle("Form")
|
||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout(generalSettings)
|
||||
self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
|
||||
self.verticalLayout_2.setSpacing(10)
|
||||
|
@ -58,7 +59,6 @@ class Ui_generalSettings(object):
|
|||
|
||||
def retranslateUi(self, generalSettings):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
generalSettings.setWindowTitle(_translate("generalSettings", "Form"))
|
||||
self.chkGeneralSplitScenes.setText(_translate("generalSettings", "Split scenes at:"))
|
||||
self.txtGeneralSplitScenes.setPlaceholderText(_translate("generalSettings", "\\n---\\n"))
|
||||
self.chkGeneralTrimTitles.setText(_translate("generalSettings", "Trim long titles (> 32 chars)"))
|
||||
|
|
|
@ -11,22 +11,13 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
<string notr="true">Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
|
@ -50,16 +41,7 @@
|
|||
<string>General</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<property name="margin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
|
@ -77,7 +59,7 @@
|
|||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="txtGeneralSplitScenes">
|
||||
<property name="text">
|
||||
<string/>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>\n---\n</string>
|
||||
|
|
|
@ -1044,8 +1044,8 @@ class Ui_MainWindow(object):
|
|||
self.menuView.setObjectName("menuView")
|
||||
self.menuMode = QtWidgets.QMenu(self.menuView)
|
||||
self.menuMode.setObjectName("menuMode")
|
||||
self.menuDocuments = QtWidgets.QMenu(self.menubar)
|
||||
self.menuDocuments.setObjectName("menuDocuments")
|
||||
self.menuOrganize = QtWidgets.QMenu(self.menubar)
|
||||
self.menuOrganize.setObjectName("menuOrganize")
|
||||
MainWindow.setMenuBar(self.menubar)
|
||||
self.statusbar = QtWidgets.QStatusBar(MainWindow)
|
||||
self.statusbar.setObjectName("statusbar")
|
||||
|
@ -1210,6 +1210,10 @@ class Ui_MainWindow(object):
|
|||
icon = QtGui.QIcon.fromTheme("arrow-down")
|
||||
self.actMoveDown.setIcon(icon)
|
||||
self.actMoveDown.setObjectName("actMoveDown")
|
||||
self.actRename = QtWidgets.QAction(MainWindow)
|
||||
icon = QtGui.QIcon.fromTheme("edit-rename")
|
||||
self.actRename.setIcon(icon)
|
||||
self.actRename.setObjectName("actRename")
|
||||
self.menuFile.addAction(self.actOpen)
|
||||
self.menuFile.addAction(self.menuRecents.menuAction())
|
||||
self.menuFile.addAction(self.actSave)
|
||||
|
@ -1224,6 +1228,12 @@ class Ui_MainWindow(object):
|
|||
self.menuHelp.addAction(self.actAbout)
|
||||
self.menuTools.addAction(self.actSpellcheck)
|
||||
self.menuTools.addAction(self.actToolFrequency)
|
||||
self.menuEdit.addAction(self.actCut)
|
||||
self.menuEdit.addAction(self.actCopy)
|
||||
self.menuEdit.addAction(self.actPaste)
|
||||
self.menuEdit.addAction(self.actDelete)
|
||||
self.menuEdit.addAction(self.actRename)
|
||||
self.menuEdit.addSeparator()
|
||||
self.menuEdit.addAction(self.actLabels)
|
||||
self.menuEdit.addAction(self.actStatus)
|
||||
self.menuEdit.addAction(self.actSettings)
|
||||
|
@ -1232,21 +1242,15 @@ class Ui_MainWindow(object):
|
|||
self.menuMode.addAction(self.actModeSnowflake)
|
||||
self.menuView.addAction(self.menuMode.menuAction())
|
||||
self.menuView.addSeparator()
|
||||
self.menuDocuments.addAction(self.actCopy)
|
||||
self.menuDocuments.addAction(self.actCut)
|
||||
self.menuDocuments.addAction(self.actPaste)
|
||||
self.menuDocuments.addAction(self.actDuplicate)
|
||||
self.menuDocuments.addAction(self.actDelete)
|
||||
self.menuDocuments.addSeparator()
|
||||
self.menuDocuments.addAction(self.actMoveUp)
|
||||
self.menuDocuments.addAction(self.actMoveDown)
|
||||
self.menuDocuments.addSeparator()
|
||||
self.menuDocuments.addAction(self.actMerge)
|
||||
self.menuDocuments.addAction(self.actSplitDialog)
|
||||
self.menuDocuments.addAction(self.actSplitCursor)
|
||||
self.menuOrganize.addAction(self.actMoveUp)
|
||||
self.menuOrganize.addAction(self.actMoveDown)
|
||||
self.menuOrganize.addSeparator()
|
||||
self.menuOrganize.addAction(self.actMerge)
|
||||
self.menuOrganize.addAction(self.actSplitDialog)
|
||||
self.menuOrganize.addAction(self.actSplitCursor)
|
||||
self.menubar.addAction(self.menuFile.menuAction())
|
||||
self.menubar.addAction(self.menuEdit.menuAction())
|
||||
self.menubar.addAction(self.menuDocuments.menuAction())
|
||||
self.menubar.addAction(self.menuOrganize.menuAction())
|
||||
self.menubar.addAction(self.menuView.menuAction())
|
||||
self.menubar.addAction(self.menuTools.menuAction())
|
||||
self.menubar.addAction(self.menuHelp.menuAction())
|
||||
|
@ -1270,10 +1274,10 @@ class Ui_MainWindow(object):
|
|||
|
||||
def retranslateUi(self, MainWindow):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
self.grpBookInfos.setTitle(_translate("MainWindow", "Book informations"))
|
||||
self.grpBookInfos.setTitle(_translate("MainWindow", "Book information"))
|
||||
self.label_10.setText(_translate("MainWindow", "Title"))
|
||||
self.label_11.setText(_translate("MainWindow", "Subtitle"))
|
||||
self.label_12.setText(_translate("MainWindow", "Serie"))
|
||||
self.label_12.setText(_translate("MainWindow", "Series"))
|
||||
self.label_13.setText(_translate("MainWindow", "Volume"))
|
||||
self.label_14.setText(_translate("MainWindow", "Genre"))
|
||||
self.label_16.setText(_translate("MainWindow", "License"))
|
||||
|
@ -1358,13 +1362,13 @@ class Ui_MainWindow(object):
|
|||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Labels"))
|
||||
self.tabMain.setTabText(self.tabMain.indexOf(self.lytTabDebug), _translate("MainWindow", "Debug"))
|
||||
self.menuFile.setTitle(_translate("MainWindow", "&File"))
|
||||
self.menuRecents.setTitle(_translate("MainWindow", "&Recents"))
|
||||
self.menuRecents.setTitle(_translate("MainWindow", "&Recent"))
|
||||
self.menuHelp.setTitle(_translate("MainWindow", "&Help"))
|
||||
self.menuTools.setTitle(_translate("MainWindow", "&Tools"))
|
||||
self.menuEdit.setTitle(_translate("MainWindow", "&Edit"))
|
||||
self.menuView.setTitle(_translate("MainWindow", "&View"))
|
||||
self.menuMode.setTitle(_translate("MainWindow", "&Mode"))
|
||||
self.menuDocuments.setTitle(_translate("MainWindow", "&Documents"))
|
||||
self.menuOrganize.setTitle(_translate("MainWindow", "Organi&ze"))
|
||||
self.dckCheatSheet.setWindowTitle(_translate("MainWindow", "&Cheat sheet"))
|
||||
self.dckSearch.setWindowTitle(_translate("MainWindow", "Sea&rch"))
|
||||
self.dckNavigation.setWindowTitle(_translate("MainWindow", "&Navigation"))
|
||||
|
@ -1408,16 +1412,18 @@ class Ui_MainWindow(object):
|
|||
self.actSplitDialog.setShortcut(_translate("MainWindow", "Ctrl+Shift+K"))
|
||||
self.actSplitCursor.setText(_translate("MainWindow", "Sp&lit at cursor"))
|
||||
self.actSplitCursor.setShortcut(_translate("MainWindow", "Ctrl+K"))
|
||||
self.actMerge.setText(_translate("MainWindow", "Me&rge"))
|
||||
self.actMerge.setText(_translate("MainWindow", "M&erge"))
|
||||
self.actMerge.setShortcut(_translate("MainWindow", "Ctrl+M"))
|
||||
self.actDuplicate.setText(_translate("MainWindow", "&Duplicate"))
|
||||
self.actDuplicate.setText(_translate("MainWindow", "Dupl&icate"))
|
||||
self.actDuplicate.setShortcut(_translate("MainWindow", "Ctrl+D"))
|
||||
self.actDelete.setText(_translate("MainWindow", "D&elete"))
|
||||
self.actDelete.setText(_translate("MainWindow", "&Delete"))
|
||||
self.actDelete.setShortcut(_translate("MainWindow", "Del"))
|
||||
self.actMoveUp.setText(_translate("MainWindow", "&Move Up"))
|
||||
self.actMoveUp.setShortcut(_translate("MainWindow", "Ctrl+Shift+Up"))
|
||||
self.actMoveDown.setText(_translate("MainWindow", "M&ove Down"))
|
||||
self.actMoveDown.setShortcut(_translate("MainWindow", "Ctrl+Shift+Down"))
|
||||
self.actRename.setText(_translate("MainWindow", "&Rename"))
|
||||
self.actRename.setShortcut(_translate("MainWindow", "F2"))
|
||||
|
||||
from manuskript.ui.cheatSheet import cheatSheet
|
||||
from manuskript.ui.editors.mainEditor import mainEditor
|
||||
|
|
|
@ -151,7 +151,7 @@
|
|||
<item>
|
||||
<widget class="QGroupBox" name="grpBookInfos">
|
||||
<property name="title">
|
||||
<string>Book informations</string>
|
||||
<string>Book information</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_3">
|
||||
<property name="leftMargin">
|
||||
|
@ -186,7 +186,7 @@
|
|||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>Serie</string>
|
||||
<string>Series</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -2101,7 +2101,7 @@
|
|||
</property>
|
||||
<widget class="QMenu" name="menuRecents">
|
||||
<property name="title">
|
||||
<string>&Recents</string>
|
||||
<string>&Recent</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="folder-recent">
|
||||
|
@ -2137,6 +2137,12 @@
|
|||
<property name="title">
|
||||
<string>&Edit</string>
|
||||
</property>
|
||||
<addaction name="actCut"/>
|
||||
<addaction name="actCopy"/>
|
||||
<addaction name="actPaste"/>
|
||||
<addaction name="actDelete"/>
|
||||
<addaction name="actRename"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actLabels"/>
|
||||
<addaction name="actStatus"/>
|
||||
<addaction name="actSettings"/>
|
||||
|
@ -2156,16 +2162,10 @@
|
|||
<addaction name="menuMode"/>
|
||||
<addaction name="separator"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuDocuments">
|
||||
<widget class="QMenu" name="menuOrganize">
|
||||
<property name="title">
|
||||
<string>&Documents</string>
|
||||
<string>Organi&ze</string>
|
||||
</property>
|
||||
<addaction name="actCopy"/>
|
||||
<addaction name="actCut"/>
|
||||
<addaction name="actPaste"/>
|
||||
<addaction name="actDuplicate"/>
|
||||
<addaction name="actDelete"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actMoveUp"/>
|
||||
<addaction name="actMoveDown"/>
|
||||
<addaction name="separator"/>
|
||||
|
@ -2175,7 +2175,7 @@
|
|||
</widget>
|
||||
<addaction name="menuFile"/>
|
||||
<addaction name="menuEdit"/>
|
||||
<addaction name="menuDocuments"/>
|
||||
<addaction name="menuOrganize"/>
|
||||
<addaction name="menuView"/>
|
||||
<addaction name="menuTools"/>
|
||||
<addaction name="menuHelp"/>
|
||||
|
@ -2555,7 +2555,7 @@
|
|||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Me&rge</string>
|
||||
<string>M&erge</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+M</string>
|
||||
|
@ -2567,7 +2567,7 @@
|
|||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Duplicate</string>
|
||||
<string>Dupl&icate</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+D</string>
|
||||
|
@ -2579,7 +2579,7 @@
|
|||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>D&elete</string>
|
||||
<string>&Delete</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Del</string>
|
||||
|
@ -2609,6 +2609,18 @@
|
|||
<string>Ctrl+Shift+Down</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actRename">
|
||||
<property name="icon">
|
||||
<iconset theme="edit-rename">
|
||||
<normaloff>.</normaloff>.</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Rename</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>F2</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
|
|
@ -83,40 +83,60 @@ class outlineBasics(QAbstractItemView):
|
|||
|
||||
menu.addSeparator()
|
||||
|
||||
# Rename / add / remove items
|
||||
self.actRename = QAction(QIcon.fromTheme("edit-rename"), qApp.translate("outlineBasics", "Rename"), menu)
|
||||
self.actRename.triggered.connect(self.rename)
|
||||
menu.addAction(self.actRename)
|
||||
|
||||
self.actAddFolder = QAction(QIcon.fromTheme("folder-new"), qApp.translate("outlineBasics", "New Folder"), menu)
|
||||
# Add text / folder
|
||||
self.actAddFolder = QAction(QIcon.fromTheme("folder-new"),
|
||||
qApp.translate("outlineBasics", "New &Folder"),
|
||||
menu)
|
||||
self.actAddFolder.triggered.connect(self.addFolder)
|
||||
menu.addAction(self.actAddFolder)
|
||||
|
||||
self.actAddText = QAction(QIcon.fromTheme("document-new"), qApp.translate("outlineBasics", "New Text"), menu)
|
||||
self.actAddText = QAction(QIcon.fromTheme("document-new"),
|
||||
qApp.translate("outlineBasics", "New &Text"),
|
||||
menu)
|
||||
self.actAddText.triggered.connect(self.addText)
|
||||
menu.addAction(self.actAddText)
|
||||
|
||||
self.actDelete = QAction(QIcon.fromTheme("edit-delete"), qApp.translate("outlineBasics", "Delete"), menu)
|
||||
self.actDelete.triggered.connect(self.delete)
|
||||
menu.addAction(self.actDelete)
|
||||
|
||||
menu.addSeparator()
|
||||
|
||||
# Copy, cut, paste
|
||||
self.actCopy = QAction(QIcon.fromTheme("edit-copy"), qApp.translate("outlineBasics", "Copy"), menu)
|
||||
# Copy, cut, paste, duplicate
|
||||
self.actCopy = QAction(QIcon.fromTheme("edit-copy"),
|
||||
qApp.translate("outlineBasics", "&Copy"), menu)
|
||||
self.actCopy.triggered.connect(self.copy)
|
||||
menu.addAction(self.actCopy)
|
||||
|
||||
self.actCut = QAction(QIcon.fromTheme("edit-cut"), qApp.translate("outlineBasics", "Cut"), menu)
|
||||
self.actCut = QAction(QIcon.fromTheme("edit-cut"),
|
||||
qApp.translate("outlineBasics", "C&ut"), menu)
|
||||
self.actCut.triggered.connect(self.cut)
|
||||
menu.addAction(self.actCut)
|
||||
|
||||
self.actPaste = QAction(QIcon.fromTheme("edit-paste"), qApp.translate("outlineBasics", "Paste"), menu)
|
||||
self.actPaste = QAction(QIcon.fromTheme("edit-paste"),
|
||||
qApp.translate("outlineBasics", "&Paste"), menu)
|
||||
self.actPaste.triggered.connect(self.paste)
|
||||
menu.addAction(self.actPaste)
|
||||
|
||||
menu.addSeparator()
|
||||
|
||||
# Rename / duplicate / remove items
|
||||
self.actRename = QAction(QIcon.fromTheme("edit-rename"),
|
||||
qApp.translate("outlineBasics", "&Rename"),
|
||||
menu)
|
||||
self.actRename.triggered.connect(self.rename)
|
||||
menu.addAction(self.actRename)
|
||||
|
||||
self.actDuplicate = QAction(QIcon.fromTheme("folder-copy"),
|
||||
qApp.translate("outlineBasics", "Dup&licate"),
|
||||
menu)
|
||||
self.actDuplicate.triggered.connect(self.duplicate)
|
||||
menu.addAction(self.actDuplicate)
|
||||
|
||||
self.actDelete = QAction(QIcon.fromTheme("edit-delete"),
|
||||
qApp.translate("outlineBasics", "&Delete"),
|
||||
menu)
|
||||
self.actDelete.triggered.connect(self.delete)
|
||||
menu.addAction(self.actDelete)
|
||||
|
||||
menu.addSeparator()
|
||||
|
||||
# POV
|
||||
self.menuPOV = QMenu(qApp.translate("outlineBasics", "Set POV"), menu)
|
||||
mw = mainWindow()
|
||||
|
@ -224,6 +244,7 @@ class outlineBasics(QAbstractItemView):
|
|||
if len(sel) == 0:
|
||||
self.actCopy.setEnabled(False)
|
||||
self.actCut.setEnabled(False)
|
||||
self.actDuplicate.setEnabled(False)
|
||||
self.actRename.setEnabled(False)
|
||||
self.actDelete.setEnabled(False)
|
||||
self.menuPOV.setEnabled(False)
|
||||
|
@ -276,12 +297,19 @@ class outlineBasics(QAbstractItemView):
|
|||
mimeData = self.model().mimeData(self.selectionModel().selectedIndexes())
|
||||
qApp.clipboard().setMimeData(mimeData)
|
||||
|
||||
def paste(self):
|
||||
def paste(self, mimeData=None):
|
||||
"""
|
||||
Paste item from mimeData to selected item. If mimeData is not given,
|
||||
it is taken from clipboard. If not item selected, paste into root.
|
||||
"""
|
||||
index = self.currentIndex()
|
||||
if len(self.getSelection()) == 0:
|
||||
index = self.rootIndex()
|
||||
data = qApp.clipboard().mimeData()
|
||||
self.model().dropMimeData(data, Qt.CopyAction, -1, 0, index)
|
||||
|
||||
if mimeData is None:
|
||||
mimeData = qApp.clipboard().mimeData()
|
||||
|
||||
self.model().dropMimeData(mimeData, Qt.CopyAction, -1, 0, index)
|
||||
|
||||
def cut(self):
|
||||
self.copy()
|
||||
|
@ -312,8 +340,11 @@ class outlineBasics(QAbstractItemView):
|
|||
self.model().removeIndexes(self.getSelection())
|
||||
|
||||
def duplicate(self):
|
||||
self.copy()
|
||||
self.paste()
|
||||
"""
|
||||
Duplicates item(s), while preserving clipbaord content.
|
||||
"""
|
||||
mimeData = self.model().mimeData(self.selectionModel().selectedIndexes())
|
||||
self.paste(mimeData)
|
||||
|
||||
def move(self, delta=1):
|
||||
"""
|
||||
|
|
|
@ -588,6 +588,7 @@ class textEditView(QTextEdit):
|
|||
function = getattr(F.mainWindow().treeRedacOutline, functionName)
|
||||
function()
|
||||
|
||||
def rename(self): self.callMainTreeView("rename")
|
||||
def duplicate(self): self.callMainTreeView("duplicate")
|
||||
def moveUp(self): self.callMainTreeView("moveUp")
|
||||
def moveDown(self): self.callMainTreeView("moveDown")
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Single source the package version
|
||||
# https://packaging.python.org/guides/single-sourcing-package-version/
|
||||
|
||||
__version__ = "0.5.0"
|
||||
__version__ = "0.6.0"
|
||||
|
||||
def getVersion():
|
||||
return __version__
|
||||
|
|
|
@ -1,25 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Can take two parameters: AppVersion PkgNumber
|
||||
# Default values are: 0.5.0 1
|
||||
|
||||
# Manuskript Vars
|
||||
AppName=manuskript
|
||||
AppVersion=${1:-0.5.0}
|
||||
PkgNumber=${2:-1}
|
||||
PkgVersion=$AppVersion-$PkgNumber
|
||||
#PkgSizeInKb # find with: du -sk manuskript-0.5.0-1
|
||||
# If not provided, AppVersion is found in manuskript/version.py
|
||||
# PkgNumber is 1.
|
||||
|
||||
# Program vars
|
||||
ScriptPath="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||
Dest="$ScriptPath/../dist/$AppName-$PkgVersion"
|
||||
Root="$ScriptPath/../"
|
||||
|
||||
echo Package directory: $Dest
|
||||
# Manuskript Vars
|
||||
AppName=manuskript
|
||||
Version=$(grep -E "__version__.*\".*\"" "$Root/manuskript/version.py" \
|
||||
| cut -d\" -f2) # Look for version in manuskript/version
|
||||
AppVersion=${1:-$Version}
|
||||
PkgNumber=${2:-1}
|
||||
PkgVersion=$AppVersion-$PkgNumber
|
||||
Dest="$Root/dist/$AppName-$PkgVersion"
|
||||
|
||||
echo -n Creating folder structure
|
||||
mkdir -p $Dest/DEBIAN
|
||||
mkdir -p $Dest/usr/bin
|
||||
mkdir -p $Dest/usr/share/applications
|
||||
echo "Package directory: $Dest"
|
||||
|
||||
echo -n "Creating folder structure"
|
||||
mkdir -p "$Dest/DEBIAN"
|
||||
mkdir -p "$Dest/usr/bin"
|
||||
mkdir -p "$Dest/usr/share/applications"
|
||||
echo " [✓]"
|
||||
|
||||
# Getting manuskript files, by downloading
|
||||
|
@ -32,29 +35,31 @@ echo " [✓]"
|
|||
|
||||
# Using the current direction as source
|
||||
|
||||
echo -n Copying manuskript content
|
||||
rsync -a --exclude=.git --include="*.msk" --exclude-from=.gitignore $ScriptPath/../ $Dest/usr/share/manuskript
|
||||
cp $ScriptPath/create_deb/manuskript $Dest/usr/bin/manuskript
|
||||
cp $ScriptPath/create_deb/manuskript.desktop $Dest/usr/share/applications/manuskript.desktop
|
||||
cp $ScriptPath/create_deb/control $Dest/DEBIAN/control
|
||||
echo -n "Copying manuskript content"
|
||||
rsync -a --exclude=.git --include="*.msk" --exclude-from="$Root/.gitignore" \
|
||||
"$ScriptPath/../" "$Dest/usr/share/manuskript"
|
||||
cp "$ScriptPath/create_deb/manuskript" "$Dest/usr/bin/manuskript"
|
||||
cp "$ScriptPath/create_deb/manuskript.desktop" \
|
||||
"$Dest/usr/share/applications/manuskript.desktop"
|
||||
cp "$ScriptPath/create_deb/control" "$Dest/DEBIAN/control"
|
||||
|
||||
sed -i "s/{PkgVersion}/$PkgVersion/" $Dest/DEBIAN/control
|
||||
PkgSizeInKb=$(du -sk $Dest | cut -f 1)
|
||||
sed -i "s/{PkgSizeInKb}/$PkgSizeInKb/" $Dest/DEBIAN/control
|
||||
sed -i "s/{PkgVersion}/$PkgVersion/" "$Dest/DEBIAN/control"
|
||||
PkgSizeInKb=$(du -sk "$Dest" | cut -f 1)
|
||||
sed -i "s/{PkgSizeInKb}/$PkgSizeInKb/" "$Dest/DEBIAN/control"
|
||||
echo " [✓]"
|
||||
|
||||
echo -n Setting permissions
|
||||
chmod 0755 $Dest/usr/bin/manuskript
|
||||
echo -n "Setting permissions"
|
||||
chmod 0755 "$Dest/usr/bin/manuskript"
|
||||
echo " [✓]"
|
||||
|
||||
echo Your root password might now be asked to finish setting permissions:
|
||||
sudo chown root:root -R $Dest
|
||||
echo "Your root password might now be asked to finish setting permissions:"
|
||||
sudo chown root:root -R "$Dest"
|
||||
|
||||
echo Creating the package…
|
||||
dpkg -b $Dest
|
||||
echo "Creating the package…"
|
||||
dpkg -b "$Dest"
|
||||
|
||||
echo -n Removing build folder
|
||||
sudo rm -r $Dest
|
||||
echo -n "Removing build folder"
|
||||
sudo rm -r "$Dest"
|
||||
echo " [✓]"
|
||||
|
||||
echo Done !
|
||||
|
|
Loading…
Reference in a new issue