Compare commits

...

853 Commits
v2.0.4 ... v2.2

Author SHA1 Message Date
Veronica Berglyd Olsen
b6282772ae Release 2.2 (#1641) 2023-12-17 17:00:05 +01:00
Veronica Berglyd Olsen
bfecebc047 Update release notes 2023-12-17 16:56:43 +01:00
Veronica Berglyd Olsen
186737a170 Update file history info 2023-12-13 22:07:53 +01:00
Veronica Berglyd Olsen
f32383ea99 Update changelog 2023-12-13 21:25:26 +01:00
Veronica Berglyd Olsen
4097949c44 Update translations 2023-12-13 21:24:50 +01:00
Veronica Berglyd Olsen
10feafeab4 Bump version for release 2.2 2023-12-10 22:21:25 +01:00
Veronica Berglyd Olsen
399a867836 Update docs with 2.2 features (#1640) 2023-12-10 22:18:03 +01:00
Veronica Berglyd Olsen
6f3702f2df Update docs organising section 2023-12-10 22:12:59 +01:00
Veronica Berglyd Olsen
7dc9e65f68 Update docs using novelWriter section 2023-12-10 21:53:04 +01:00
Veronica Berglyd Olsen
1740bbedbd Update docs introduction section 2023-12-10 18:39:29 +01:00
Veronica Berglyd Olsen
8585334a51 Update buttons in viewer and editor (#1638) 2023-12-04 09:12:30 +01:00
Veronica Berglyd Olsen
553b76cafc Update en_US and nb_NO translations 2023-12-03 18:58:01 +01:00
Veronica Berglyd Olsen
c04e1035a7 Merge branch 'main' into gui_fixes 2023-12-03 18:48:26 +01:00
Veronica Berglyd Olsen
dfbb61a37e Add viewer panel importance info (#1639) 2023-12-03 18:47:09 +01:00
Veronica Berglyd Olsen
cb485c5c86 Revert deleting the view button in viewer panel, but keep the double click change 2023-12-03 18:37:47 +01:00
Veronica Berglyd Olsen
62a94850a6 Add tooltips to all entries in the viewer panel and update translation file 2023-12-03 18:24:55 +01:00
Veronica Berglyd Olsen
99c00f8b93 Update tests 2023-12-03 18:20:23 +01:00
Veronica Berglyd Olsen
cbb000a18f Drop the view column in the viewer panel 2023-12-03 18:18:00 +01:00
Veronica Berglyd Olsen
847d8ab726 Add importance column to document viewer panel (#1620) 2023-12-03 18:15:16 +01:00
Veronica Berglyd Olsen
9f1e2d322e Re-order formats menu to be consistent with toolbar 2023-12-03 17:55:12 +01:00
Veronica Berglyd Olsen
b7c657141f Update translations 2023-12-03 17:43:28 +01:00
Veronica Berglyd Olsen
023f6bed01 Update base translation file 2023-12-03 17:34:08 +01:00
Veronica Berglyd Olsen
fff6ba98bc Rename emph and strong to italic and bold for consistency and add tooltips to editor toolbar 2023-12-03 17:33:15 +01:00
Veronica Berglyd Olsen
776eedc5f2 Drop the markdown/shortcode toggle feature from editor toolbar and update icons (#1636, #1637) 2023-12-03 16:56:36 +01:00
Veronica Berglyd Olsen
f2eaaa09b6 Turn viewer footer button and label into text buttons (#1628) 2023-12-03 16:10:09 +01:00
Veronica Berglyd Olsen
60b0a4c901 Update extensions (#1634) 2023-11-29 22:35:02 +01:00
Veronica Berglyd Olsen
a6d346fcb6 Clean up and fix minor issues with GUI extensions 2023-11-29 22:21:56 +01:00
Veronica Berglyd Olsen
78a75d5719 Fix some minor issues (#1632) 2023-11-29 21:59:36 +01:00
Veronica Berglyd Olsen
f59317c2b5 Remove alternative apostrophe from auto select logic because it is already a letter 2023-11-29 21:55:07 +01:00
Veronica Berglyd Olsen
b203bcdcff Include apostrophes when auto selecting in editor (#1624) 2023-11-29 21:48:09 +01:00
Veronica Berglyd Olsen
a31f42b04c Clean up novel view and improve coverage 2023-11-29 21:24:07 +01:00
Veronica Berglyd Olsen
ce666d9d7a Scroll novel view when looping through documents (#1555) 2023-11-29 20:55:05 +01:00
Veronica Berglyd Olsen
ef93b41240 Clean up alert boxes and update event filters (#1631) 2023-11-29 16:12:08 +01:00
Veronica Berglyd Olsen
1118f01c91 Combine all event filters in one module, and apply the status tip filter to the sidebar as well 2023-11-29 16:05:58 +01:00
Veronica Berglyd Olsen
b526315084 Clean up some redundant code and fix annotations 2023-11-29 16:05:14 +01:00
Veronica Berglyd Olsen
1d1dae0c7e Remove caching of the alert object in the shared instance 2023-11-29 16:03:48 +01:00
Veronica Berglyd Olsen
1edfcfcd91 Add debug comment 2023-11-29 08:10:16 +01:00
Veronica Berglyd Olsen
82e9fb0c44 Fix minor optimisation issue 2023-11-29 08:06:56 +01:00
Veronica Berglyd Olsen
1b8d424b27 Filter menu status tips (#1630) 2023-11-29 00:05:06 +01:00
Veronica Berglyd Olsen
4ab2b04e6b Add an event filter to remove status tip updates 2023-11-28 23:57:41 +01:00
Veronica Berglyd Olsen
d291995c0e Add deleteLater to temporary widgets (#1629) 2023-11-28 23:27:36 +01:00
Veronica Berglyd Olsen
54510951de Rename lipsum button 2023-11-28 23:21:35 +01:00
Veronica Berglyd Olsen
52d1d87985 Add the new flag to the command line help 2023-11-28 23:20:49 +01:00
Veronica Berglyd Olsen
62847e55f0 Rewrite how lipsum text is inserted 2023-11-28 23:14:23 +01:00
Veronica Berglyd Olsen
bf6cefa840 Update dialog handling of all dialogs 2023-11-28 22:12:30 +01:00
Veronica Berglyd Olsen
4e1fa01562 Add widget diff info to help debug memory issues 2023-11-28 17:29:34 +01:00
Veronica Berglyd Olsen
83c9fb96e9 Add memory usage debug info for status bar 2023-11-28 16:44:01 +01:00
Veronica Berglyd Olsen
ff7f27ff97 Add closeEvents to dialogs and set the deleteLater command 2023-11-28 16:29:21 +01:00
Veronica Berglyd Olsen
50a9b5b5e2 Fix some annotations and add deleteLater to non-modal dialogs 2023-11-27 21:43:13 +01:00
Veronica Berglyd Olsen
4fa20273f7 Clean up dialogs 2023-11-27 17:10:29 +01:00
Veronica Berglyd Olsen
93b36406f1 Make sure context menus are deleted after use 2023-11-27 16:30:21 +01:00
Veronica Berglyd Olsen
a0e6f9cf82 Fix various bugs and minor issues (#1626) 2023-11-27 16:17:01 +01:00
Veronica Berglyd Olsen
1f9b6d7624 Fix icons not updating on theme switch in viewer panel 2023-11-27 16:08:34 +01:00
Veronica Berglyd Olsen
ccc444f355 Fix section sizes for viewer panel (#1627) 2023-11-27 16:08:00 +01:00
Veronica Berglyd Olsen
ba0198407f Change panel label back to "References" 2023-11-27 07:42:25 +01:00
Veronica Berglyd Olsen
918b077252 Drop the space in front of Synopsis and Short comments inserts 2023-11-26 22:12:23 +01:00
Veronica Berglyd Olsen
b348ba6aff Update Main GUI launch test 2023-11-26 22:02:01 +01:00
Veronica Berglyd Olsen
e521a30612 Remove warning for alpha releases 2023-11-26 21:43:32 +01:00
Veronica Berglyd Olsen
2e2ab5ad6f Update project load dialog 2023-11-26 21:40:51 +01:00
Veronica Berglyd Olsen
47781f981f Fix wrong keyboard shortcut for Short comment insert 2023-11-26 21:40:05 +01:00
Veronica Berglyd Olsen
0676056968 Update translations (#1625) 2023-11-26 20:58:25 +01:00
Veronica Berglyd Olsen
65562ae790 Update base translation, US English, Norwegian, and Japanese 2023-11-26 16:20:14 +01:00
Veronica Berglyd Olsen
623f74019f Fix wrong PR mentioned in changelog 2023-11-26 15:09:43 +01:00
Veronica Berglyd Olsen
55e0dc3030 Release 2.2 RC1 (#1615) 2023-11-26 14:31:53 +01:00
Veronica Berglyd Olsen
9af7ff447b Update changelog 2023-11-26 14:29:53 +01:00
Veronica Berglyd Olsen
c71a5c0997 Merge branch 'dev' into release_2.2rc1 2023-11-26 14:03:05 +01:00
Veronica Berglyd Olsen
efea1a3140 Merge branch 'main' into dev 2023-11-26 14:02:11 +01:00
Veronica Berglyd Olsen
1fcae908ec Add "short description" feature, replace "summary" (#1622) 2023-11-26 14:01:49 +01:00
Veronica Berglyd Olsen
b9b4969b85 Rename once again, and use short instead for short descriptions of notes 2023-11-26 13:58:00 +01:00
Veronica Berglyd Olsen
f919149c58 Rename "brief" to "summary" (#1621) 2023-11-26 00:02:43 +01:00
Veronica Berglyd Olsen
6fd4417350 Fix variable name and test 2023-11-25 23:57:12 +01:00
Veronica Berglyd Olsen
bedd71b105 Add a summary entry to the insert menu (#1619) 2023-11-25 23:51:30 +01:00
Veronica Berglyd Olsen
53aa970427 Rename "brief" to "summary" 2023-11-25 23:42:05 +01:00
Veronica Berglyd Olsen
9fc815abe1 Add project note briefs (#1618) 2023-11-25 19:01:15 +01:00
Veronica Berglyd Olsen
b17b5d32c2 Allow double-clicking in viewer panel 2023-11-25 18:53:11 +01:00
Veronica Berglyd Olsen
05e63cb01e Make the columns in the viewer panel resizeable 2023-11-25 18:45:06 +01:00
Veronica Berglyd Olsen
519e5857d1 Add a column to viewer panel to show the brief 2023-11-25 18:23:09 +01:00
Veronica Berglyd Olsen
6a6b05c338 Update tokenizer and converters 2023-11-25 18:12:45 +01:00
Veronica Berglyd Olsen
8ed85363e2 Add test coverage and update the highlighter 2023-11-25 17:50:59 +01:00
Veronica Berglyd Olsen
887b4379b2 Add comment style processing to the index class 2023-11-25 17:50:25 +01:00
Veronica Berglyd Olsen
3a030c9acb Fix Ctrl+Del regression (#1616) 2023-11-25 16:31:37 +01:00
Veronica Berglyd Olsen
e216f80d64 Revert previous change of keyboard shortcut for item delete in tree made in #1590 2023-11-25 16:27:40 +01:00
Veronica Berglyd Olsen
74c5a66a4c Fix typos in changelog 2023-11-25 16:24:27 +01:00
Veronica Berglyd Olsen
8738bc562e Update alpha version warning, and drop the translation 2023-11-23 23:53:22 +01:00
Veronica Berglyd Olsen
c6f06866bd Bump version for 2.2 RC1 2023-11-23 20:44:47 +01:00
Veronica Berglyd Olsen
b7eede22da Add a context menu entry to set item name from heading (#1614) 2023-11-23 20:39:28 +01:00
Veronica Berglyd Olsen
e02d2b9298 Add annotations import to all test source files 2023-11-23 20:35:17 +01:00
Veronica Berglyd Olsen
de11ea389a Add test coverage of editor context menu 2023-11-23 20:25:18 +01:00
Veronica Berglyd Olsen
3f842c2fbe Add a context menu option to rename a document from any title within it 2023-11-23 19:40:17 +01:00
Veronica Berglyd Olsen
d35dfda92f Change set selection from doc header to use a signal/slot set 2023-11-23 19:04:35 +01:00
Veronica Berglyd Olsen
84eff433fb Clean up Qt enums in doc viewer 2023-11-23 18:52:42 +01:00
Veronica Berglyd Olsen
8c3c85f259 Clean up Qt enums in doc editor 2023-11-23 18:36:08 +01:00
Veronica Berglyd Olsen
39e1c54c33 Add a button to open manuscript build folder (#1613) 2023-11-23 16:55:22 +01:00
Veronica Berglyd Olsen
2998f2c363 Update tests 2023-11-23 16:45:14 +01:00
Veronica Berglyd Olsen
4bd830f0d6 Add an "Open Folder" button to build dialog (#1554) 2023-11-23 16:45:08 +01:00
Veronica Berglyd Olsen
30b4e5511a Add a common function to open file paths externally 2023-11-23 16:43:56 +01:00
Veronica Berglyd Olsen
4f9aab3c81 Add multi selection to project tree (#1612) 2023-11-22 19:00:25 +01:00
Veronica Berglyd Olsen
445414d126 Improve test coverage of project tree 2023-11-22 18:48:10 +01:00
Veronica Berglyd Olsen
62ea54e1ed Add test coverage of tree context menu class 2023-11-22 18:08:34 +01:00
Veronica Berglyd Olsen
ea0358b2ed Move project tree context menu to a separate class 2023-11-22 18:08:07 +01:00
Veronica Berglyd Olsen
d7730fb7c2 Clean up a few bits 2023-11-22 00:12:14 +01:00
Veronica Berglyd Olsen
40f6a108ed Add a multi-select context menu and handlers 2023-11-22 00:03:51 +01:00
Veronica Berglyd Olsen
33a30f3875 Remove tree undo and fix drop on root issue 2023-11-21 23:13:12 +01:00
Veronica Berglyd Olsen
f75ed33cec Add a working implementation of multi-item move 2023-11-21 22:26:10 +01:00
Veronica Berglyd Olsen
1a2bd7d640 Update Qt enums and set selection to multi select 2023-11-21 20:26:19 +01:00
Veronica Berglyd Olsen
afc04514a0 Add a tool to download spell check dictionaries (#1611) 2023-11-20 18:22:09 +01:00
Veronica Berglyd Olsen
d741a75de8 Clean up and add test coverage 2023-11-20 18:14:00 +01:00
Veronica Berglyd Olsen
71d17da483 Complete new Add Dictionaries tool 2023-11-20 17:26:12 +01:00
Veronica Berglyd Olsen
e00e64dc46 Copy changes from download_dicts branch 2023-11-20 17:24:49 +01:00
Veronica Berglyd Olsen
c585c87633 Remove two annotations in tests that block using older pytest versions 2023-11-18 21:12:09 +01:00
Veronica Berglyd Olsen
40c07973ce Disable hidden tab feature for older Qt libs 2023-11-18 21:04:35 +01:00
Veronica Berglyd Olsen
2fca22359b Improve cursor visibility features (#1608) 2023-11-18 15:59:48 +01:00
Veronica Berglyd Olsen
83187c517f Ensure cursor is visible after showing or closing the document viewer (#1302) 2023-11-18 15:56:03 +01:00
Veronica Berglyd Olsen
208b9334e1 Ensure cursor is visible after switching focus mode (#1478) 2023-11-18 15:43:51 +01:00
Veronica Berglyd Olsen
17fc370609 Fix some typos 2023-11-18 14:14:10 +01:00
Veronica Berglyd Olsen
ab35d1a0bf Add a new document viewer panel for tags and references (#1606) 2023-11-17 23:30:11 +01:00
Veronica Berglyd Olsen
69ccb1560c Update index test 2023-11-17 23:20:16 +01:00
Veronica Berglyd Olsen
d4560b3be8 Add test coverage of document viewer panel 2023-11-17 23:01:59 +01:00
Veronica Berglyd Olsen
fca941b726 Merge branch 'dev' into new_ref_panel 2023-11-17 21:39:30 +01:00
Veronica Berglyd Olsen
eda9a076d6 Clean up config and improve project tree test coverage (#1607) 2023-11-17 21:38:42 +01:00
Veronica Berglyd Olsen
1279b0e5b7 Fix bug from project tree test 2023-11-17 21:33:22 +01:00
Veronica Berglyd Olsen
16a56d6f60 Improve test coverage of project tree 2023-11-17 21:28:44 +01:00
Veronica Berglyd Olsen
c501e12c9d Remove deprecated config fields and update tests 2023-11-17 16:35:05 +01:00
Veronica Berglyd Olsen
dd05f6532a Update document viewer tests 2023-11-17 16:22:59 +01:00
Veronica Berglyd Olsen
1098354fca Fix broken test 2023-11-17 07:55:43 +01:00
Veronica Berglyd Olsen
f81c9aa319 Clean up document viewer class 2023-11-17 00:06:29 +01:00
Veronica Berglyd Olsen
9d662a0d40 Rename index signal function 2023-11-16 22:31:41 +01:00
Veronica Berglyd Olsen
123d9df170 Rewrite and improve the index event signal feature 2023-11-16 19:12:01 +01:00
Veronica Berglyd Olsen
844240b5b8 Fix broken tests 2023-11-16 00:23:59 +01:00
Veronica Berglyd Olsen
3d17d8e08c Clean up the viewer panel code a bit 2023-11-15 22:09:18 +01:00
Veronica Berglyd Olsen
f51223e7c3 Rename the tab count function just to be safe 2023-11-15 21:58:41 +01:00
Veronica Berglyd Olsen
b94e012f8f Fix bug with clearing class tag lists 2023-11-15 21:46:32 +01:00
Veronica Berglyd Olsen
2fc8e43e71 Connect the edit and view buttons 2023-11-15 21:38:45 +01:00
Veronica Berglyd Olsen
565350fcfb Clean up tree item updates 2023-11-15 21:14:40 +01:00
Veronica Berglyd Olsen
e82d5277c0 Add signal for re-indexed document 2023-11-15 21:03:12 +01:00
Veronica Berglyd Olsen
6b9d92e75a Add handlers for document label change 2023-11-15 20:13:23 +01:00
Veronica Berglyd Olsen
8508248f12 Add signal for processing tag changes 2023-11-15 20:12:17 +01:00
Veronica Berglyd Olsen
2cb6020cac Added tags changed signal 2023-11-15 18:11:37 +01:00
Veronica Berglyd Olsen
3f8220f350 Added tag data to viewer panels 2023-11-15 18:11:15 +01:00
Veronica Berglyd Olsen
f5901a4c8c Added new icons for the viewer panel 2023-11-15 18:10:29 +01:00
Veronica Berglyd Olsen
f4be38dd65 Populate the back reference panel 2023-11-14 23:56:51 +01:00
Veronica Berglyd Olsen
4d7ef63e83 Connect the new viewer panel and add icon for it 2023-11-14 22:41:39 +01:00
Veronica Berglyd Olsen
1d89e4935f Merge branch 'dev' into new_ref_panel 2023-11-14 11:06:04 +01:00
Veronica Berglyd Olsen
51337ae4e5 Increase button padding in sidebar by 2px 2023-11-14 10:48:47 +01:00
Veronica Berglyd Olsen
66dfe25e17 Fix bug in sidebar tooltip 2023-11-13 22:46:30 +01:00
Veronica Berglyd Olsen
c5322341ec Bring back the "Scroll past end" setting (#1605) 2023-11-13 22:13:39 +01:00
Veronica Berglyd Olsen
a5755c47e5 Add types to the Preferences dialog, and update tests 2023-11-13 22:09:38 +01:00
Veronica Berglyd Olsen
68af4aec86 Add back the scroll past end setting 2023-11-13 22:09:07 +01:00
Veronica Berglyd Olsen
0b35227756 Fix some usability issues in the UI (#1601) 2023-11-12 21:45:18 +01:00
Veronica Berglyd Olsen
a5b2e47098 Don't block auto-replace on keyword lines, and only show completer on single keypresses 2023-11-12 21:27:24 +01:00
Veronica Berglyd Olsen
a3f9d88271 Remove 2 px margin on sidebar 2023-11-12 20:59:00 +01:00
Veronica Berglyd Olsen
28b3046e51 Update editor code history 2023-11-12 20:55:31 +01:00
Veronica Berglyd Olsen
e7ea9d45e5 Improve how formatting is applied in the editor (#1600) 2023-11-12 20:45:37 +01:00
Veronica Berglyd Olsen
45b278f999 Fix an outdated comment 2023-11-12 20:38:38 +01:00
Veronica Berglyd Olsen
37e0319598 Clean up code a bit 2023-11-12 20:38:03 +01:00
Veronica Berglyd Olsen
7cf7eb4a48 Fix test coverage 2023-11-12 20:21:35 +01:00
Veronica Berglyd Olsen
597b788254 Implement a new word auto select feature that is more careful with punctuation 2023-11-12 20:11:31 +01:00
Veronica Berglyd Olsen
e4206bdcc0 Make autoselect and formatting selection a bit smarter 2023-11-12 19:44:24 +01:00
Veronica Berglyd Olsen
5f80a6b400 Update PyPi info 2023-11-12 15:33:05 +01:00
Veronica Berglyd Olsen
09022ba41a Add post-release fixes 2023-11-12 15:31:53 +01:00
Veronica Berglyd Olsen
6c9c1ec088 Release 2.2 Beta 1 (#1595) 2023-11-12 14:47:09 +01:00
Veronica Berglyd Olsen
88ba3b3dfe Bump version to 2.2 Beta 1, and update changelog 2023-11-11 22:48:51 +01:00
Veronica Berglyd Olsen
9e4ac8f9d4 Merge branch 'main' into dev 2023-11-11 22:05:41 +01:00
Veronica Berglyd Olsen
656a5ada61 Clean up main readme a bit 2023-11-11 22:01:25 +01:00
Veronica Berglyd Olsen
96ac87d5ed Rename linting job to match the rest 2023-11-11 21:57:33 +01:00
Veronica Berglyd Olsen
5597c0e172 Replace the icon on the readme page 2023-11-11 21:49:38 +01:00
Veronica Berglyd Olsen
25c4cf695f Add a new logo (#1593) 2023-11-11 17:41:06 +01:00
Veronica Berglyd Olsen
8db71c432d Fix MacOS build and add font credits 2023-11-11 17:08:22 +01:00
Veronica Berglyd Olsen
e1b92d14c3 Change MacOS build to generate icons on the fly 2023-11-11 16:44:23 +01:00
Veronica Berglyd Olsen
1c4fd4ea5a Add MacOS icons 2023-11-11 16:41:06 +01:00
Veronica Berglyd Olsen
b04386b183 Update Windows icons 2023-11-11 16:38:13 +01:00
Veronica Berglyd Olsen
4b2c01dbf1 Update novelWriter text images 2023-11-11 16:37:58 +01:00
Veronica Berglyd Olsen
134cf45199 Add new PNG icons 2023-11-11 15:11:40 +01:00
Veronica Berglyd Olsen
a0ca78b4fd Add new SVG icon designs 2023-11-11 15:10:50 +01:00
Veronica Berglyd Olsen
062b336105 Make it possible to re-order build settings (#1591) 2023-11-10 22:23:07 +01:00
Veronica Berglyd Olsen
2c5947eeaa Make build settings re-orderable (#1542) 2023-11-10 22:03:38 +01:00
Veronica Berglyd Olsen
f9fd3512b7 Improve widget focus keyboard shortcuts (#1590) 2023-11-10 19:14:10 +01:00
Veronica Berglyd Olsen
98c62f0912 Make Ctrl+Del the default for deleting item in project tree 2023-11-10 19:03:30 +01:00
Veronica Berglyd Olsen
a3f63530d7 Update documentation 2023-11-10 18:57:48 +01:00
Veronica Berglyd Olsen
788f46bd7f Improve focus switching and combine with main menu entries 2023-11-10 18:25:32 +01:00
Veronica Berglyd Olsen
2097eaeeaa Add keyboard shortcuts to sidebar tooltips 2023-11-10 17:53:54 +01:00
Veronica Berglyd Olsen
693f3fb656 Add a keyboard shortcut to toggle tree view 2023-11-10 17:53:36 +01:00
Veronica Berglyd Olsen
25697b0957 Add language setting to Project Settings (#1589) 2023-11-09 19:09:36 +01:00
Veronica Berglyd Olsen
76d67dd0aa Clean up build settings and update tests 2023-11-09 19:04:36 +01:00
Veronica Berglyd Olsen
e3997b53aa Add language setting to wizard 2023-11-09 18:55:02 +01:00
Veronica Berglyd Olsen
c7bfb1b21e Change to always use project language for generating documents 2023-11-09 18:44:08 +01:00
Veronica Berglyd Olsen
2cde1b845e Clean up project settings class 2023-11-09 18:26:33 +01:00
Veronica Berglyd Olsen
27f3b8e0f2 Add project translations for Norwegian nynorsk 2023-11-09 18:02:53 +01:00
Veronica Berglyd Olsen
3f0024a6a3 Use GUI language when translating meta data for the viewer 2023-11-09 18:02:33 +01:00
Veronica Berglyd Olsen
fa32ef248b Add a basic doc viewer panel class 2023-11-09 17:49:29 +01:00
Veronica Berglyd Olsen
234b189e3c Add project translations for meta data keywords (#1586) 2023-11-09 17:35:28 +01:00
Veronica Berglyd Olsen
21dd254831 Include already translated project translation files 2023-11-09 17:24:39 +01:00
Veronica Berglyd Olsen
2ed3666b9f Add keyword translations to the project language files for manuscript builds 2023-11-09 17:17:46 +01:00
Veronica Berglyd Olsen
ebe1998b0b Fix initial visibility of editor toolbar 2023-11-08 23:26:00 +01:00
Veronica Berglyd Olsen
3f0de93438 Add an optional editor toolbar (#1584) 2023-11-08 23:18:06 +01:00
Veronica Berglyd Olsen
6d411e17a6 Improve test coverage 2023-11-08 23:12:39 +01:00
Veronica Berglyd Olsen
003615c3be Make some minor modifications to the doc toolbar, and add typings in themes 2023-11-08 21:27:14 +01:00
Veronica Berglyd Olsen
9a1947c0f5 Add colour to sub/superscript icons 2023-11-08 21:26:19 +01:00
Veronica Berglyd Olsen
5fbcca35a5 Make sure toolbar is hidden when document is closed 2023-11-08 18:16:55 +01:00
Veronica Berglyd Olsen
c88fbf629d Update tests 2023-11-08 18:06:19 +01:00
Veronica Berglyd Olsen
711766cf52 Change main menu to emit signals 2023-11-08 18:00:43 +01:00
Veronica Berglyd Olsen
1a6072be2c Add editor toolbar icons 2023-11-08 16:54:42 +01:00
Veronica Berglyd Olsen
9282b39f2a Change the menu icon to three dots 2023-11-08 16:54:15 +01:00
Veronica Berglyd Olsen
b3ae1774a8 Merge branch 'dev' into format_actions 2023-11-07 22:29:21 +01:00
Veronica Berglyd Olsen
f3b6be3100 Add shortcodes to the main menu (#1583) 2023-11-07 22:28:25 +01:00
Veronica Berglyd Olsen
394cdd5dad Add a basic document editor toolbar 2023-11-07 17:48:34 +01:00
Veronica Berglyd Olsen
e236fb30dc Clean up document header signals 2023-11-07 17:47:59 +01:00
Veronica Berglyd Olsen
a07177c153 Clean up main menu code 2023-11-07 13:54:31 +01:00
Veronica Berglyd Olsen
d2a0ff88a6 Add shortcodes to main menu 2023-11-07 13:54:02 +01:00
Veronica Berglyd Olsen
08e67b0190 Add context menu option to create note from tag (#1582) 2023-11-06 22:48:06 +01:00
Veronica Berglyd Olsen
eb5a98f482 Sort imports 2023-11-06 22:45:37 +01:00
Veronica Berglyd Olsen
ccd3122633 Make some improvements and update tests 2023-11-06 22:42:02 +01:00
Veronica Berglyd Olsen
f17e1f38de Add option to create note from tag, and improve auto-completer a bit 2023-11-06 22:25:28 +01:00
Veronica Berglyd Olsen
1ab35b5b63 Add an auto-completer for editor references (#1581) 2023-11-06 19:35:46 +01:00
Veronica Berglyd Olsen
fd1eaa8c47 Add test coverage of completer 2023-11-06 19:15:58 +01:00
Veronica Berglyd Olsen
ce53971836 Improve code flow in completer class 2023-11-06 19:15:43 +01:00
Veronica Berglyd Olsen
d827b5204b Add meta data autocomplete menu 2023-11-06 18:22:39 +01:00
Veronica Berglyd Olsen
09e0d28115 Add tags get function to index class 2023-11-06 18:19:03 +01:00
Veronica Berglyd Olsen
2a40913105 Add sub/superscript and partial word emphasis (#1540) 2023-11-06 11:54:49 +01:00
Veronica Berglyd Olsen
b03603cc9b Update tests and word counter 2023-11-06 11:49:26 +01:00
Veronica Berglyd Olsen
5e41dd9a92 Merge branch 'dev' into sub_super 2023-11-05 21:28:32 +01:00
Veronica Berglyd Olsen
c1272974ed Fix index bug due to lower/upper case mixing (#1578) 2023-11-05 21:12:04 +01:00
Veronica Berglyd Olsen
72e740ccdf Merge branch 'dev' into fix_index 2023-11-05 21:08:56 +01:00
Veronica Berglyd Olsen
a5a2b2c68e Merge branch 'dev' into fix_index 2023-11-05 21:06:39 +01:00
Veronica Berglyd Olsen
654ff3e81d Fix bug from merged branch 2023-11-05 21:00:23 +01:00
Veronica Berglyd Olsen
a2a1e2e6d0 Merge branch 'main' into dev 2023-11-05 18:54:52 +01:00
Veronica Berglyd Olsen
786c1f7d54 Make AppIamge build use Python 3.11 2023-11-05 18:37:09 +01:00
Veronica Berglyd Olsen
38c279b98f Release 2.1.1 (#1574) 2023-11-05 18:26:12 +01:00
Veronica Berglyd Olsen
b126b8cf0a Bumb version and update release notes for v2.1.1 2023-11-04 18:19:57 +01:00
Veronica Berglyd Olsen
a3b60dad0a Fix editor refresh issues (#1573) 2023-11-04 17:54:46 +01:00
Veronica Berglyd Olsen
ee5f340fe2 Refresh spell checking when word list changes (#1559) 2023-11-04 17:46:25 +01:00
Veronica Berglyd Olsen
dd61897d11 Force a rehighlight on theme switch for small documents (#1535) 2023-11-04 17:43:02 +01:00
Veronica Berglyd Olsen
a50e79b155 Set menu parents (#1572) 2023-11-04 17:31:26 +01:00
Veronica Berglyd Olsen
8abcada86e Make sure all QMenu instances have a parent widget set (#1536) 2023-11-04 17:24:43 +01:00
Veronica Berglyd Olsen
ef29571bd9 Add autoscroll feature (#1571) 2023-11-04 17:04:12 +01:00
Veronica Berglyd Olsen
6f8109609c Use the correct margin settings 2023-11-04 16:50:41 +01:00
Veronica Berglyd Olsen
05ddca043a Add comment to explain why autoscroll was added 2023-11-04 16:48:22 +01:00
Veronica Berglyd Olsen
da3747c5f5 Implement autoscroll in project tree, and disable library autoscroll feature (#1561) 2023-11-04 16:45:16 +01:00
Veronica Berglyd Olsen
2322923c4a Add check for illegal drag and drops (#1570) 2023-11-04 16:16:38 +01:00
Veronica Berglyd Olsen
c5baa8d359 Remove commented out code 2023-11-04 10:14:49 +01:00
Veronica Berglyd Olsen
a7e2b51225 Add blockers for illegal drop events on invisible root and for root items (#1569) 2023-11-04 10:05:37 +01:00
Veronica Berglyd Olsen
0413684150 Fix viewer navigation (#1568) 2023-11-03 10:32:36 +01:00
Veronica Berglyd Olsen
b047695501 Update tests 2023-11-03 10:28:54 +01:00
Veronica Berglyd Olsen
52197149a7 Merge branch 'main' into html_anchors 2023-11-03 10:15:12 +01:00
Veronica Berglyd Olsen
4582ef8b83 Fix anchor tags in html output (#1566) 2023-11-03 10:13:35 +01:00
Veronica Berglyd Olsen
0077326274 Fix errors in documentation (#1567) 2023-11-03 08:26:05 +01:00
nisemono-neko
36fd64e1a3 Fix typos 2023-11-03 16:29:30 +10:00
nisemono-neko
552249d145 Fix typos 2023-11-03 16:18:43 +10:00
nisemono-neko
7080703481 Fix typos 2023-11-03 16:16:18 +10:00
nisemono-neko
4c7fbdb77a Fix typos 2023-11-03 16:12:53 +10:00
nisemono-neko
0c249d2010 Fix typos 2023-11-03 16:07:14 +10:00
nisemono-neko
3896d0fbf4 Fix typos 2023-11-03 13:40:24 +10:00
nisemono-neko
b3018bb392 Fix typos 2023-11-03 13:27:03 +10:00
Veronica Berglyd Olsen
d67cef2611 Fix bug where tags were lost in the index when saving a document 2023-11-03 00:39:24 +01:00
Veronica Berglyd Olsen
f9df78a8d4 Fix i18n issues (#1565) 2023-11-02 23:44:53 +01:00
Veronica Berglyd Olsen
12d7512441 Make sure also Preferences defaults to British English 2023-11-02 23:41:34 +01:00
Veronica Berglyd Olsen
08a012ef8d Only default to system locale if a translation file exists (#1564) 2023-11-02 23:34:42 +01:00
Veronica Berglyd Olsen
6df591c803 Fix untranslated strings in Build tool (#1563) 2023-11-02 23:01:41 +01:00
Veronica Berglyd Olsen
2d78312206 Fix Build Settings icon column size issue (#1553) 2023-10-24 00:04:41 +02:00
Veronica Berglyd Olsen
bce6f9543a Make sure icon columns on build settings dialog are narrow (#1551) 2023-10-23 23:58:29 +02:00
Veronica Berglyd Olsen
ddd5e841bf Clean up unneeded docs build settings 2023-10-22 00:13:21 +02:00
Veronica Berglyd Olsen
69af58227a Fix broken docs build 2023-10-21 15:41:49 +02:00
Veronica Berglyd Olsen
c02e7a52a1 Fix keyword section in writing classes 2023-10-21 15:40:33 +02:00
Veronica Berglyd Olsen
ba2250be47 Add shortcodes example text 2023-10-20 22:58:32 +02:00
Veronica Berglyd Olsen
d51bfec090 Fix ToOdt test coverage 2023-10-20 22:55:59 +02:00
Veronica Berglyd Olsen
dc50f4bb3b Fix Tokenizer test coverage 2023-10-20 22:17:28 +02:00
Veronica Berglyd Olsen
b9df625914 Add ODT support for new formats 2023-10-20 21:42:00 +02:00
Veronica Berglyd Olsen
e669560462 Add syntax theme entry for shortcodes 2023-10-20 17:57:35 +02:00
Veronica Berglyd Olsen
1558a11646 Add shortcodes functionality 2023-10-20 17:50:18 +02:00
Veronica Berglyd Olsen
2214b7472b Fix ODT test 2023-10-20 00:06:43 +02:00
Veronica Berglyd Olsen
ae1ed10f25 Add converter support for the new formats 2023-10-20 00:05:17 +02:00
Veronica Berglyd Olsen
0115f1e343 Add tokenizer support for the new formats 2023-10-20 00:04:58 +02:00
Veronica Berglyd Olsen
ef4277437b Add regexes and highlighting for in-line commands 2023-10-20 00:04:23 +02:00
Veronica Berglyd Olsen
bd6e666fdc Add new syntax highlighting for in-line commands 2023-10-19 18:04:06 +02:00
Veronica Berglyd Olsen
181809d34a Update i18n readme (#1539) 2023-10-19 03:01:38 +02:00
Veronica Berglyd Olsen
bc1b5f24a0 Add more information in error output from pkgutils 2023-10-19 02:58:29 +02:00
Veronica Berglyd Olsen
658953df15 Add note about pkgutils dependency on PyQt6 for qtlupdate 2023-10-19 02:54:22 +02:00
Veronica Berglyd Olsen
b0e3cf1a3a Change editor to true plain text (#1525) 2023-10-17 21:03:36 +02:00
Veronica Berglyd Olsen
90ca8f481d Disable checking spelling in tests on Windows 2023-10-17 20:58:57 +02:00
Veronica Berglyd Olsen
b11a3c4bc7 Add editor spell checking test coverage 2023-10-17 20:54:00 +02:00
Veronica Berglyd Olsen
9dd8f65795 Clean up a few bits in the editor code, fix margins, and fix issue in spell checker 2023-10-17 20:25:17 +02:00
Veronica Berglyd Olsen
f8bff62754 Merge branch 'dev' into text_document 2023-10-17 18:16:02 +02:00
Veronica Berglyd Olsen
77108784d9 Merge branch 'main' into dev 2023-10-17 18:13:47 +02:00
Veronica Berglyd Olsen
60b977f8ec Update setup scripts 2023-10-17 18:12:35 +02:00
Veronica Berglyd Olsen
a03bd140db Release 2.1 (#1533) 2023-10-17 16:25:52 +02:00
Veronica Berglyd Olsen
1566fd3ec9 Rename Mac test 2023-10-17 16:24:44 +02:00
Veronica Berglyd Olsen
d6e0517209 Update changelog and release notes 2023-10-17 16:21:40 +02:00
Veronica Berglyd Olsen
f090ffa649 Update Spanish translation 2023-10-17 08:22:44 +02:00
Veronica Berglyd Olsen
2e5cb85410 Update Portuguese translation 2023-10-16 09:32:00 +02:00
Veronica Berglyd Olsen
6a4fa295f2 Update US English, Italian and Norwegian translations 2023-10-15 20:54:00 +02:00
Veronica Berglyd Olsen
dc516bab8b Bump version for 2.1 release 2023-10-15 20:17:52 +02:00
Veronica Berglyd Olsen
ac36ce07ba Update docs for 2.1 release (#1531) 2023-10-15 20:14:55 +02:00
Veronica Berglyd Olsen
ccffa91c49 Make a second apss through the entire documentation to fix issues 2023-10-15 20:11:29 +02:00
Veronica Berglyd Olsen
cceb31aac7 Update the glossary section of the docs 2023-10-15 17:53:51 +02:00
Veronica Berglyd Olsen
b16f4477b8 Update the additional topics section of the docs 2023-10-15 17:41:22 +02:00
Veronica Berglyd Olsen
56b4cd3036 Update the Project section of the docs 2023-10-15 17:27:44 +02:00
Veronica Berglyd Olsen
d68d215420 Merge branch 'main' into dev 2023-10-08 21:18:53 +02:00
Veronica Berglyd Olsen
8e72432db8 Merge branch 'main' into update_docs 2023-10-08 21:08:53 +02:00
Veronica Berglyd Olsen
ed8d4a4c26 Switch CI from 3.12-dev to 3.12 2023-10-08 21:08:08 +02:00
Veronica Berglyd Olsen
328216d9e5 Update the Using novelWriter section of the docs 2023-10-08 20:54:14 +02:00
Veronica Berglyd Olsen
a3fdb3cfc4 Update the introduction section of the docs 2023-10-08 18:50:33 +02:00
Veronica Berglyd Olsen
699bf2292c Clean up import order 2023-09-28 16:41:37 +02:00
Veronica Berglyd Olsen
14a75a421d Merge branch 'dev' into text_document 2023-09-28 16:17:43 +02:00
Veronica Berglyd Olsen
fd76f5a2c4 Do some minor variable cleanup in ToOdt 2023-09-28 14:33:33 +02:00
Veronica Berglyd Olsen
0700dd59bb Clean up variables and typing in doc converters 2023-09-26 18:39:50 +02:00
Veronica Berglyd Olsen
6d7453885b Merge branch 'main' into dev 2023-09-18 15:22:23 +02:00
Veronica Berglyd Olsen
609366076a Merge branch 'dev' into text_document 2023-09-18 15:21:32 +02:00
Veronica Berglyd Olsen
16f57e4c48 Case insensitive tags (#1522) 2023-09-18 08:16:54 +01:00
Veronica Berglyd Olsen
976f73c41c Fix two typos in usage docs (#1524) 2023-09-18 07:07:06 +01:00
Ainali
b891e9ada6 Fix two typos in usage docs 2023-09-17 23:20:14 +02:00
Veronica Berglyd Olsen
2e0204d577 Clean up variables and annotations in index classes 2023-09-17 20:29:33 +02:00
Veronica Berglyd Olsen
29518a33f2 Fix index tests 2023-09-16 10:10:55 +02:00
Veronica Berglyd Olsen
bf592fa706 Clean up outline view code 2023-09-15 22:38:56 +02:00
Veronica Berglyd Olsen
cba1a2c062 Make tags in the index case insensitive 2023-09-15 22:38:39 +02:00
Veronica Berglyd Olsen
cb522c7d50 Fix some layout issues in main gui 2023-09-15 18:40:32 +02:00
Veronica Berglyd Olsen
c3a4b840fb Improve handling of spell check state 2023-09-14 16:26:05 +02:00
Veronica Berglyd Olsen
309c7de5de Clean up variables in editor 2023-09-14 16:20:38 +02:00
Veronica Berglyd Olsen
45a4503fa3 Clean up variables in document editor 2023-09-10 23:43:50 +02:00
Veronica Berglyd Olsen
dea5c54ef0 Make some minor improvements to spell check suggest 2023-09-10 21:52:38 +02:00
Veronica Berglyd Olsen
f1e28e21f8 Cache spell check errors for usage in the editor when correcting 2023-09-10 21:27:34 +02:00
Veronica Berglyd Olsen
3f91f5c506 Use the global thread pool, like the docs suggest 2023-09-10 18:15:16 +02:00
Veronica Berglyd Olsen
e210bca319 Move the thread pool to the shared object instance 2023-09-10 17:46:35 +02:00
Veronica Berglyd Olsen
16e2e0cc83 Add a custom text document in the editor 2023-09-07 19:20:00 +02:00
Veronica Berglyd Olsen
e08790e889 Make the editor actually Plain Text (#1521) 2023-09-06 20:10:09 +01:00
Veronica Berglyd Olsen
915b9da5d0 Remove document size constraint 2023-09-06 20:35:48 +02:00
Veronica Berglyd Olsen
0ef46ef0ea Simplify editor scrolling features 2023-09-06 20:05:13 +02:00
Veronica Berglyd Olsen
0bfa3cb592 Simplify setting cursor position in the editor 2023-09-06 18:20:25 +02:00
Veronica Berglyd Olsen
8c3e906fc5 Remove the big doc limit feature 2023-09-06 17:56:39 +02:00
Veronica Berglyd Olsen
2b98e0d4d2 Make the editor a plain text editor again 2023-09-06 17:47:25 +02:00
Veronica Berglyd Olsen
8275963811 Sidebar cleanup and minor fixes (#1520) 2023-09-05 21:26:20 +01:00
Veronica Berglyd Olsen
4cc402679f Fix typo and move special popup menu class 2023-09-05 22:20:04 +02:00
Veronica Berglyd Olsen
b1095481ef Add test coverage 2023-09-05 22:12:08 +02:00
Veronica Berglyd Olsen
f754c80352 Redesign main sidebar 2023-09-05 21:55:42 +02:00
Veronica Berglyd Olsen
ca3a493932 Fix type checking warning 2023-09-04 20:12:26 +02:00
Veronica Berglyd Olsen
e8b2f3a8f9 Only spell check proper words 2023-09-04 20:12:04 +02:00
Veronica Berglyd Olsen
72b89a6768 Merge branch 'main' into dev 2023-09-04 11:50:21 +02:00
Veronica Berglyd Olsen
be3d642868 Fix minor font size issue (#1518) 2023-09-03 20:17:02 +01:00
Veronica Berglyd Olsen
a358a0007a Fix writing stats font size issue (#1442) 2023-09-03 21:12:54 +02:00
Veronica Berglyd Olsen
a2254512f7 Fix minor issue with translation string 2023-09-03 21:03:21 +02:00
Veronica Berglyd Olsen
b450fa1818 Annotate the doc editor source 2023-09-01 21:36:57 +02:00
Veronica Berglyd Olsen
c03c1c2bbf Bump dev branch to 2.2-alpha1 2023-09-01 20:49:09 +02:00
Veronica Berglyd Olsen
3eb49d32fa Display build details in Manuscript tool (#1516) 2023-09-01 18:50:55 +01:00
Veronica Berglyd Olsen
856e504c26 Improve the ternary if in expand state on manuscript dialog 2023-09-01 18:46:01 +02:00
Veronica Berglyd Olsen
206265b6d3 Update base translation file 2023-09-01 17:39:02 +02:00
Veronica Berglyd Olsen
dee1e9d71b Re-sort imports 2023-09-01 17:37:24 +02:00
Veronica Berglyd Olsen
9c7663996c Fix issues discovered when testing 2023-09-01 17:34:34 +02:00
Veronica Berglyd Olsen
03c4b91682 Make a few improvements to manuscript details panel 2023-09-01 17:19:25 +02:00
Veronica Berglyd Olsen
ecebd69cda Add build details widget to manuscript tool 2023-09-01 16:55:23 +02:00
Veronica Berglyd Olsen
746bd4bf2c Remove Python 3.7 support (#1515) 2023-08-31 18:32:27 +01:00
Veronica Berglyd Olsen
93ffc11f2a Bump MacOS build Python version to 3.11 2023-08-31 19:20:18 +02:00
Veronica Berglyd Olsen
e36eebf09a Add Python 3.12 to setup.cfg 2023-08-31 19:17:20 +02:00
Veronica Berglyd Olsen
baf7bc5866 Add Python 3.12-dev to linux tests, and update mac and windows tests to 3.11 2023-08-31 19:10:37 +02:00
Veronica Berglyd Olsen
e766fa7dcc Remove official Python 3.7 support 2023-08-31 19:09:23 +02:00
Veronica Berglyd Olsen
ee84c635c5 Fix typo in changelog 2023-08-31 19:03:50 +02:00
Veronica Berglyd Olsen
eccb4040b6 Release 2.1 RC 1 (#1513) 2023-08-31 16:44:52 +01:00
Veronica Berglyd Olsen
eca97bb6ff Bump version number and update changelog 2023-08-31 17:40:15 +02:00
Veronica Berglyd Olsen
7c3505cf2a Update US translation 2023-08-31 17:19:53 +02:00
Veronica Berglyd Olsen
fbcb8e121c Update translation files 2023-08-31 17:18:09 +02:00
Veronica Berglyd Olsen
ca95a17a63 Merge branch 'main' into release_2.1rc1 2023-08-31 17:00:34 +02:00
Veronica Berglyd Olsen
73a5dc4693 Update i18n files (#1512) 2023-08-31 16:00:00 +01:00
Veronica Berglyd Olsen
6805be0d26 Update i18n files 2023-08-31 16:55:46 +02:00
Veronica Berglyd Olsen
440256c3f0 Forward all scroll events in text area widgets to parent (#1511) 2023-08-31 15:43:39 +01:00
Veronica Berglyd Olsen
d7c8f97d47 Add test coverage and fix a few minor things 2023-08-31 16:38:51 +02:00
Veronica Berglyd Olsen
94329b334a Forward all scroll events in editor/viewer areas to their text area widgets (#1425) 2023-08-31 11:40:52 +02:00
Veronica Berglyd Olsen
190848ad2e Update the file info dialog box (#1510) 2023-08-30 18:08:00 +01:00
Veronica Berglyd Olsen
9bf43aa40f Update the file info dialog box 2023-08-30 18:57:48 +02:00
Veronica Berglyd Olsen
f41e71199c Add hash and dates to document meta data (#1509) 2023-08-30 17:35:51 +01:00
Veronica Berglyd Olsen
10c7934ae2 Update tests 2023-08-25 18:37:01 +02:00
Veronica Berglyd Olsen
fa7e9b7f33 Update sample project 2023-08-25 17:16:18 +02:00
Veronica Berglyd Olsen
4dfc27f727 Add check that prevHash is actually recorded 2023-08-25 17:16:10 +02:00
Veronica Berglyd Olsen
125d501aaf Fix issue with document hash comparison 2023-08-25 17:13:41 +02:00
Veronica Berglyd Olsen
0d262c0ae8 Remove the sha256sum function for files and update tests 2023-08-25 16:55:45 +02:00
Veronica Berglyd Olsen
b3fcea29da Change how text hash is calculated in documents, and add dates 2023-08-25 16:55:08 +02:00
Veronica Berglyd Olsen
1b98bdf28f Refactor handling of spell checking (#1508) 2023-08-25 12:19:25 +01:00
Veronica Berglyd Olsen
cf2d30895c Remove added test check that fails 2023-08-25 13:12:23 +02:00
Veronica Berglyd Olsen
56fc5ec40c Add spell check languages to Tools menu 2023-08-25 13:09:05 +02:00
Veronica Berglyd Olsen
a72c824d8b Move all handling of spell check instance to shared class 2023-08-24 22:33:53 +02:00
Veronica Berglyd Olsen
b54f81355a Clean up the syntax highlighter class 2023-08-24 20:40:10 +02:00
Veronica Berglyd Olsen
f7ed133b2e Move the spell check instance to the shared class 2023-08-24 20:17:23 +02:00
Veronica Berglyd Olsen
4507489f0b Clean up a few things in project classes 2023-08-24 19:45:08 +02:00
Veronica Berglyd Olsen
f339ec2471 Remove re-usage of project class (#1504)_ 2023-08-23 19:56:58 +01:00
Veronica Berglyd Olsen
e1ba66fb87 Fix some missing test coverage 2023-08-23 20:51:42 +02:00
Veronica Berglyd Olsen
af50b219a6 Add test coverage of shared class 2023-08-23 20:19:48 +02:00
Veronica Berglyd Olsen
8090832f3b Fix weird unitilialised shared class issue 2023-08-20 23:38:14 +02:00
Veronica Berglyd Olsen
55423174ed Make a few minor improvements, including fixing #1495 2023-08-20 22:09:02 +02:00
Veronica Berglyd Olsen
ed3e4bca6c Simplify the class variables of the tree class 2023-08-20 21:36:33 +02:00
Veronica Berglyd Olsen
0b4cfd0037 Move idle time records to the shared class 2023-08-20 21:33:04 +02:00
Veronica Berglyd Olsen
777b1a15fd Clean up no longer needed code 2023-08-14 17:43:47 +02:00
Veronica Berglyd Olsen
a17e73b5a2 Let the shared class handle alert dialogs 2023-08-14 17:08:53 +02:00
Veronica Berglyd Olsen
3441ff38de Remove dependence of main GUI class in project class 2023-08-14 17:08:30 +02:00
Veronica Berglyd Olsen
a3976ab4fb Fix imports 2023-08-14 00:07:38 +02:00
Veronica Berglyd Olsen
156a6fac98 Use a signal for status bar messages 2023-08-14 00:03:55 +02:00
Veronica Berglyd Olsen
c4140d753c Improve handling of project closing 2023-08-13 23:32:10 +02:00
Veronica Berglyd Olsen
150f6603cd Let the shared class handle project open/save/close and recreating the project instance 2023-08-13 20:16:37 +02:00
Veronica Berglyd Olsen
8154293d92 Move the hasProject logic into the shared class 2023-08-13 19:23:32 +02:00
Veronica Berglyd Olsen
fd181b18a6 Rename exception variable in makeAlert 2023-08-13 19:23:03 +02:00
Veronica Berglyd Olsen
863dcf8b37 Move theme and project instances to new shared data class 2023-08-10 21:13:10 +02:00
Veronica Berglyd Olsen
a2f183f147 Add a shared data class 2023-08-10 21:10:08 +02:00
Veronica Berglyd Olsen
a0921d2541 Clean up core structure (#1502) 2023-08-10 11:29:25 +01:00
Veronica Berglyd Olsen
ddacfc743e Annotate config class and extensions 2023-08-10 00:49:33 +02:00
Veronica Berglyd Olsen
71e961ba38 Fix annotations in NWStatus class 2023-08-08 23:32:30 +02:00
Veronica Berglyd Olsen
6e5d991cfe Move TypeGuard to TYPE_CHECKING condition 2023-08-08 23:14:35 +02:00
Veronica Berglyd Olsen
5d817ae51f Move GUI components module to extensions subpackage 2023-08-08 22:47:24 +02:00
Veronica Berglyd Olsen
eeadfc95e3 Annotate core modules 2023-08-08 22:37:48 +02:00
Veronica Berglyd Olsen
d658a993c0 Update source file headers 2023-08-08 21:41:35 +02:00
Veronica Berglyd Olsen
348e62cd3e Change default backup folder to HOME/Backups
Signed-off-by: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com>
2023-08-08 20:04:17 +02:00
Veronica Berglyd Olsen
c40d910b69 Make backup path always set 2023-08-08 19:50:20 +02:00
Veronica Berglyd Olsen
12897ff2e1 Make project instance private to main GUI class 2023-08-08 17:21:00 +02:00
Veronica Berglyd Olsen
94c95d6f67 Move GUI theme instance to the config object (after app creation) 2023-08-08 14:35:55 +02:00
Veronica Berglyd Olsen
c50c8ee73a Improve alert boxes (#1501) 2023-08-08 09:45:58 +01:00
Veronica Berglyd Olsen
431bc8d401 Clarify closing dialog on build settings 2023-08-08 10:39:10 +02:00
Veronica Berglyd Olsen
de66f1e21b Switch out some alert icons 2023-08-08 09:33:42 +02:00
Veronica Berglyd Olsen
abfe7ee7ff Clean up a few minor things 2023-08-07 20:57:33 +02:00
Veronica Berglyd Olsen
7cb77e8524 Update comment 2023-08-07 20:49:04 +02:00
Veronica Berglyd Olsen
470017cdea Remove the global APP singleton again 2023-08-07 20:45:25 +02:00
Veronica Berglyd Olsen
7756368113 Fix some minor issues with new alert code 2023-08-07 20:25:51 +02:00
Veronica Berglyd Olsen
3911bc10c6 Clean up code and tests 2023-08-07 20:20:04 +02:00
Veronica Berglyd Olsen
90f9fa4451 Rewrite the makeAlert and askQuestion functions to use recommended interface 2023-08-07 20:19:51 +02:00
Veronica Berglyd Olsen
ec010bf18e Add new icons for alert boxes 2023-08-07 17:02:18 +02:00
Veronica Berglyd Olsen
8959af1f30 Move make alert to separate module and add a global singleton for pointers 2023-08-07 17:01:44 +02:00
Veronica Berglyd Olsen
c3b3120bc1 Improve build settings dialog (#1499) 2023-08-06 22:08:31 +01:00
Veronica Berglyd Olsen
28263dcbac Make build settings dialog a child of main gui, and ensure only one instance can be open for each build 2023-08-06 23:04:59 +02:00
Veronica Berglyd Olsen
4951e4f8fe Automatically select the first build if no builds are selected in the build tool 2023-08-06 22:27:15 +02:00
Veronica Berglyd Olsen
61836c8c04 Change page size preset to Custom when values are changed instead of blocking the spin boxes 2023-08-06 22:04:12 +02:00
Veronica Berglyd Olsen
effe7abdec Fix formatting of line breaks in headers 2023-08-06 21:49:55 +02:00
Veronica Berglyd Olsen
5bc391c6c2 Add file extensions to Outpu tab headers 2023-08-06 19:51:10 +02:00
Veronica Berglyd Olsen
3f951fa61f Move reset button to after included and excluded 2023-08-06 18:20:19 +02:00
Veronica Berglyd Olsen
72de32b126 Add iterative filter action for single selection in build settings 2023-08-06 17:49:11 +02:00
Veronica Berglyd Olsen
2780e722d0 Change icon for filtered items in build settings dialog 2023-08-06 17:28:05 +02:00
Veronica Berglyd Olsen
18d0265515 Fix possibly unbound variable in project tree 2023-08-06 17:25:29 +02:00
Veronica Berglyd Olsen
6168b45c75 Add a triangle arrow to the menu items on the paged side bar 2023-08-06 16:36:34 +02:00
Veronica Berglyd Olsen
7a74165221 Improve section headings on filter tab 2023-08-06 15:39:30 +02:00
Veronica Berglyd Olsen
c480db898c Double the left margin of the button text for the paged side bar 2023-08-06 15:08:57 +02:00
Veronica Berglyd Olsen
762f7c62cd Fix label in syntax check workflow 2023-08-06 14:57:49 +02:00
Veronica Berglyd Olsen
97dccd9d68 Drop saving fullscreen flag (#1498) 2023-08-06 13:57:31 +01:00
Veronica Berglyd Olsen
8778466d42 Annotate main gui 2023-08-06 14:50:11 +02:00
Veronica Berglyd Olsen
6f1aa5b812 Remove fullscreen setting in config file 2023-08-06 14:49:35 +02:00
Veronica Berglyd Olsen
352b70d060 Fix MacOS release for 2.1b1 (#1496) 2023-07-31 00:50:13 +02:00
Veronica Berglyd Olsen
4ce18611bd Remove redundant references to GUI parent 2023-07-31 00:44:30 +02:00
Veronica Berglyd Olsen
f09851b889 Remove beta part of version number for macOS build 2023-07-31 00:18:03 +02:00
Veronica Berglyd Olsen
993205701c Define all non-modal dialogs as tools 2023-07-30 23:39:29 +02:00
Veronica Berglyd Olsen
71b3694399 Try setting build non-modal dialogs as tools 2023-07-30 23:31:05 +02:00
Veronica Berglyd Olsen
9d8d25fbb5 Add a util function to restack the windows 2023-07-30 23:23:07 +02:00
Veronica Berglyd Olsen
c41a104eca Fix version number for mac build 2023-07-30 22:06:25 +02:00
Veronica Berglyd Olsen
1d19a900b1 Handle raise parent on all close events in build tools 2023-07-30 21:57:27 +02:00
Veronica Berglyd Olsen
25f9f0519f Fix raise window issue on Mac 2023-07-30 19:55:47 +02:00
Veronica Berglyd Olsen
b93bc0a295 Allow MacOS build to handle pre-release version 2023-07-30 14:36:47 +02:00
Veronica Berglyd Olsen
7d0e7d7dce Release 2.1 Beta 1 (#1490) 2023-07-30 14:20:51 +02:00
Veronica Berglyd Olsen
4b2b4117a5 Make some minor improvements to the change log 2023-07-30 14:17:34 +02:00
Veronica Berglyd Olsen
2bd519aa5b Update release date, change log and release notes 2023-07-30 14:07:28 +02:00
Veronica Berglyd Olsen
34c5b4fec7 Change tree nav shortcut modifier and update docs (#1489) 2023-07-30 00:06:36 +02:00
Veronica Berglyd Olsen
fd1f4a5dbe Merge branch 'dev' into tree_shortcuts 2023-07-30 00:00:59 +02:00
Veronica Berglyd Olsen
59a31f1c20 Restructure keyboard shortcuts page in docs 2023-07-29 23:59:41 +02:00
Veronica Berglyd Olsen
a79ff09e3b Use alt as modiefier for special project tree move keys 2023-07-29 23:59:18 +02:00
Veronica Berglyd Olsen
ea13f4f9b8 Add project tree navigation shortcuts (#1488) 2023-07-29 22:41:07 +02:00
Veronica Berglyd Olsen
26d97bd234 Update tests and docs 2023-07-29 22:26:13 +02:00
Veronica Berglyd Olsen
c52a37c276 Add shift + arrow navigation feature to project tree (#1348) 2023-07-29 22:25:58 +02:00
Veronica Berglyd Olsen
1dadd1ddb7 Annotate some more functions in project tree source 2023-07-29 20:49:23 +02:00
Veronica Berglyd Olsen
aa64fdbfc3 Annotate and clean up project tree source 2023-07-29 20:45:12 +02:00
Veronica Berglyd Olsen
db892f633a New root folder location (#1487) 2023-07-28 23:23:46 +02:00
Veronica Berglyd Olsen
08648e0a33 Update annotations in related source 2023-07-28 23:17:09 +02:00
Veronica Berglyd Olsen
addacd368d Allow root folders to be created next to selected root 2023-07-28 23:16:20 +02:00
Veronica Berglyd Olsen
925ead775c Try to fix issue with fickly test 2023-07-27 00:33:23 +02:00
Veronica Berglyd Olsen
46cac5cc94 Improve backup feature (#1484) 2023-07-27 00:18:51 +02:00
Veronica Berglyd Olsen
0c04b0ba86 Update test 2023-07-27 00:12:25 +02:00
Veronica Berglyd Olsen
ace037808f Add backups size to pop-up dialog (#1453) 2023-07-27 00:09:05 +02:00
Veronica Berglyd Olsen
d81a90add3 Add project name to backup file (#1476) 2023-07-27 00:08:26 +02:00
Veronica Berglyd Olsen
b837becc58 Remove remaining reference to lxml package 2023-07-26 23:47:49 +02:00
Veronica Berglyd Olsen
d88d07e0b3 Remove setup.py (#1483) 2023-07-26 23:34:04 +02:00
Veronica Berglyd Olsen
2966a709b8 Remove setup.py, and remove sample project from source build 2023-07-26 22:33:05 +02:00
Veronica Berglyd Olsen
7c138d33fc Move requirements file for tests to the tests folder 2023-07-26 22:26:18 +02:00
Veronica Berglyd Olsen
42d8d56636 Update ubuntu releases 2023-07-26 20:00:26 +02:00
Veronica Berglyd Olsen
02312054fb Split up setup.py and move packaging tools to new script 2023-07-26 19:28:34 +02:00
Veronica Berglyd Olsen
a6c0152a68 Improve project item and tree classes (#1482) 2023-07-26 19:06:45 +02:00
Veronica Berglyd Olsen
39ef662807 Add test coverage of the project tree consistency function 2023-07-26 18:57:31 +02:00
Veronica Berglyd Olsen
1752d5c5cb Fix inconsistent clearing of lockfiles in projects 2023-07-24 23:29:39 +02:00
Veronica Berglyd Olsen
7965e3365b Make sure file scan test don't depend on file list order 2023-07-22 23:15:30 +02:00
Veronica Berglyd Olsen
c8d588d6d2 Complete annotations in project class and update tests 2023-07-22 01:06:34 +02:00
Veronica Berglyd Olsen
d382775d1d Make some improvements to the tree consistency check 2023-07-22 01:06:04 +02:00
Veronica Berglyd Olsen
3753f5b829 Rewrite project consistency chech as part of the tree class 2023-07-21 23:56:48 +02:00
Veronica Berglyd Olsen
f0e372b2ba Update tests 2023-07-21 22:53:04 +02:00
Veronica Berglyd Olsen
9a1a2d9ab2 Rewrite NWItem to not allow handle to be None 2023-07-21 22:52:54 +02:00
Veronica Berglyd Olsen
4dfa51855e Spell check comments and docstrings 2023-07-20 23:25:49 +02:00
Veronica Berglyd Olsen
e773884c29 Add duplication of files and folders (#1480) 2023-07-20 21:18:17 +02:00
Veronica Berglyd Olsen
4e448134fc Add test coverage of new function in Document class 2023-07-20 21:14:10 +02:00
Veronica Berglyd Olsen
def846ce4b Clean up imports (missed one) 2023-07-20 21:08:38 +02:00
Veronica Berglyd Olsen
75a840b10b Clean up imports 2023-07-20 21:07:12 +02:00
Veronica Berglyd Olsen
188536d0f6 Add test coverage of duplicate function in project tree 2023-07-20 21:00:11 +02:00
Veronica Berglyd Olsen
b3c744d22e Add test coverage of DocDuplicator class 2023-07-20 20:36:09 +02:00
Veronica Berglyd Olsen
7a72634448 Improve how items are added to project tree, allowing root folders to be added next to specified items 2023-07-20 19:51:01 +02:00
Veronica Berglyd Olsen
1559e3299a Add item duplication functionality to project tree 2023-07-20 18:51:50 +02:00
Veronica Berglyd Olsen
567045e4ff Add document duplication tool and support in item and tree classes 2023-07-20 18:51:26 +02:00
Veronica Berglyd Olsen
1c5466a799 Add annotations to document class 2023-07-20 18:50:53 +02:00
Veronica Berglyd Olsen
fe7e44a3a6 Add annotations to tree and item classes 2023-07-20 16:00:16 +02:00
Veronica Berglyd Olsen
bba46ba042 Add annotations to core tools 2023-07-20 15:14:01 +02:00
Veronica Berglyd Olsen
f2bba55bca Change default font on macOS (#1479) 2023-07-20 01:28:31 +02:00
Veronica Berglyd Olsen
57d6b6ac1d Change default macOS font to Helvetica 2023-07-20 01:22:30 +02:00
Veronica Berglyd Olsen
664d314d3a Improve ODT build (#1477) 2023-07-20 00:35:13 +02:00
Veronica Berglyd Olsen
32a52b2bf1 Update tests 2023-07-20 00:29:11 +02:00
Veronica Berglyd Olsen
dedb86b11d Make paper sizes translatable 2023-07-20 00:29:01 +02:00
Veronica Berglyd Olsen
e1ea285201 Update test reference files 2023-07-19 23:57:45 +02:00
Veronica Berglyd Olsen
3c535ab0ef Make some improvements to the config layout class 2023-07-19 23:55:17 +02:00
Veronica Berglyd Olsen
ac92e5b126 Add support for page layout settings in builds 2023-07-19 23:55:00 +02:00
Veronica Berglyd Olsen
bebf487776 Update tests 2023-07-19 18:17:18 +02:00
Veronica Berglyd Olsen
c123ef9258 Add a separator style to ODT builds 2023-07-19 18:17:03 +02:00
Veronica Berglyd Olsen
7d065659e8 Bump version 2.1-beta1 2023-07-19 18:05:46 +02:00
Veronica Berglyd Olsen
3af60b4b6f Theme updates (#1475) 2023-07-19 17:43:57 +02:00
Veronica Berglyd Olsen
354d299dce Delete redundant colour definition in theme class 2023-07-19 17:40:18 +02:00
Veronica Berglyd Olsen
2670f46941 Don't set an icon theme for the Qt default theme 2023-07-19 17:36:56 +02:00
Veronica Berglyd Olsen
d289b41546 Fix test and update paged sidebar hover colour 2023-07-19 17:31:23 +02:00
Veronica Berglyd Olsen
2c5799679c Add help text colour as separate setting, and annotate theme class 2023-07-19 17:31:02 +02:00
Veronica Berglyd Olsen
795782320c Add default light theme and update other themes 2023-07-19 17:30:35 +02:00
Veronica Berglyd Olsen
734899a543 Improve test coverage of build tools (#1466) 2023-07-18 18:14:07 +02:00
Veronica Berglyd Olsen
8e3a258fd2 Fix sometimes failing backup test 2023-07-18 18:08:17 +02:00
Veronica Berglyd Olsen
36c0349c0a Split print test into separate due to MacOS issues 2023-07-18 17:59:29 +02:00
Veronica Berglyd Olsen
9721c25613 Add test coverage of GuiManuscript tool 2023-07-18 17:52:49 +02:00
Veronica Berglyd Olsen
1997872f71 Comment out blocking call 2023-07-17 20:57:07 +02:00
Veronica Berglyd Olsen
d9e0730ad2 Add test coverage of GuiManuscriptBuild tool 2023-07-17 20:56:31 +02:00
Veronica Berglyd Olsen
839bc778aa Add test coverage of GuiBuildSettings tool 2023-07-17 20:06:46 +02:00
Veronica Berglyd Olsen
f502411079 Complete test coverage of doc build module 2023-06-24 19:14:22 +02:00
Veronica Berglyd Olsen
151e4b2770 Change build filter to skip empty root folders 2023-06-24 18:25:44 +02:00
Veronica Berglyd Olsen
4b194752eb Complete test coverage of build settings module 2023-06-18 19:22:42 +02:00
Veronica Berglyd Olsen
73451faa31 Add test coverage of build settings class 2023-06-17 17:30:37 +02:00
Veronica Berglyd Olsen
a3f0d5b865 Fix bug in options file conversion 2023-06-15 23:54:16 +02:00
Veronica Berglyd Olsen
6193e3191b Fix minor issue in session log conversion 2023-06-15 23:26:27 +02:00
Veronica Berglyd Olsen
0689e977ea Rename and restructure project meta files (#1464) 2023-06-15 23:13:14 +02:00
Veronica Berglyd Olsen
028abc0ce9 Update storage class and test coverage of it 2023-06-15 23:05:21 +02:00
Veronica Berglyd Olsen
ca2964c037 Add test coverage of session log class 2023-06-15 00:19:47 +02:00
Veronica Berglyd Olsen
2a1324e6cc Make error dialog report a monospace font 2023-06-13 23:18:22 +02:00
Veronica Berglyd Olsen
61535b6ab6 Fix minor mistakes in source files from last commits 2023-06-13 22:57:19 +02:00
Veronica Berglyd Olsen
90012aff17 Fix test coverage of writingstats class 2023-06-13 22:32:17 +02:00
Veronica Berglyd Olsen
b2bfaad73d Fix test coverage of outline class 2023-06-13 22:15:14 +02:00
Veronica Berglyd Olsen
26e6845439 Fix test coverage of spell check classes 2023-06-13 21:54:06 +02:00
Veronica Berglyd Olsen
b7bb2988e8 Fix test coverage of options class 2023-06-13 21:11:05 +02:00
Veronica Berglyd Olsen
f33ba03a2f Fix test coverage of wordlist dialog 2023-06-13 21:10:11 +02:00
Veronica Berglyd Olsen
8d38f27eee Update gui options file format to macth others 2023-06-13 17:31:40 +02:00
Veronica Berglyd Olsen
0003f8c24d Change format of wordlist.txt file to json 2023-06-13 17:31:16 +02:00
Veronica Berglyd Olsen
9ac61105f3 Annotate index class and change file format slightly to match others 2023-06-13 17:30:07 +02:00
Veronica Berglyd Olsen
1b85f782a6 Update writing stats dialog to work with new log file 2023-06-13 17:29:15 +02:00
Veronica Berglyd Olsen
eba6783816 Move session log handling to a separate class, and use jsonl format 2023-06-12 01:50:27 +02:00
Veronica Berglyd Olsen
aea41032ef Add one more random error message 2023-06-11 22:51:03 +02:00
Veronica Berglyd Olsen
f572eed5be Update Docs (#1462) 2023-06-10 13:16:23 +02:00
Veronica Berglyd Olsen
9cd3e78043 Merge branch 'main' into update_docs 2023-06-10 13:15:12 +02:00
Veronica Berglyd Olsen
f9a4d7ec1f Make a couple of corrections 2023-06-10 13:13:36 +02:00
Veronica Berglyd Olsen
98692eb2fe Fix some sizing issues in the manuscript tools 2023-06-10 13:07:47 +02:00
Veronica Berglyd Olsen
8e6bb0b3d6 Fix outline margin so last column can be resized 2023-06-10 01:14:25 +02:00
Veronica Berglyd Olsen
6f02f3f74d Simplify how outline column headers are saved 2023-06-10 00:45:25 +02:00
Veronica Berglyd Olsen
00350140d3 Rename index and options meta files 2023-06-10 00:44:52 +02:00
Veronica Berglyd Olsen
a87cc64766 Add a new GUI for the Build Tool (#1389) 2023-06-09 22:18:28 +02:00
Veronica Berglyd Olsen
0eb39d2e0a Clean up a few remnants of old test code 2023-06-09 22:06:38 +02:00
Veronica Berglyd Olsen
112aa8468c Finish up controls on manuscript build tool 2023-06-09 22:06:05 +02:00
Veronica Berglyd Olsen
c344cf441e Add back print functionality to manuscript tool 2023-06-09 21:31:02 +02:00
Veronica Berglyd Olsen
5f4b6009ce Complete the manuscript build dialog, and the doc builder class 2023-06-09 21:07:46 +02:00
Veronica Berglyd Olsen
8b7aab36a2 Add circular progress bar on manuscript preview 2023-06-08 23:33:16 +02:00
Veronica Berglyd Olsen
8ef1a12201 Use enums for build formats 2023-06-08 23:32:32 +02:00
Veronica Berglyd Olsen
4ee452d186 Add a circular progress bar to the manuscript build tool 2023-06-07 22:37:47 +02:00
Veronica Berglyd Olsen
3bcb4a5091 Add back the file name label on manuscript build dialog 2023-06-06 22:47:37 +02:00
Veronica Berglyd Olsen
b09068ab99 Add annotations to odt class 2023-06-06 22:12:56 +02:00
Veronica Berglyd Olsen
6b6c517b1f Add annotations to tokenizer, html and markdown classes 2023-06-06 00:35:57 +02:00
Veronica Berglyd Olsen
850ee73ed4 Simplify core variables in tokenizer 2023-06-06 00:03:46 +02:00
Veronica Berglyd Olsen
67f1dd6677 Clean up variables in doc builder 2023-06-06 00:03:27 +02:00
Veronica Berglyd Olsen
9bc66128a7 Complete the build process in the build tool 2023-06-05 23:39:28 +02:00
Veronica Berglyd Olsen
b0201c58e9 Add Table of Contents to build dialog 2023-06-05 21:49:30 +02:00
Veronica Berglyd Olsen
18df119332 Update build tools icons 2023-06-05 17:19:32 +02:00
Veronica Berglyd Olsen
bc38ea19ba Merge branch 'dev' into feature/build_gui 2023-06-05 17:13:23 +02:00
Veronica Berglyd Olsen
a730e8747f Optimise all SVG icons (#1456) 2023-06-05 17:11:56 +02:00
Veronica Berglyd Olsen
62b0e7f9ca Optimise all SVG icons 2023-06-05 16:52:13 +02:00
Veronica Berglyd Olsen
ee9da2bdf1 Improve the manuscript GUIs a bit 2023-06-05 00:25:02 +02:00
Veronica Berglyd Olsen
2f0ac4fe17 Fix Qt.UserRole access warning 2023-06-05 00:08:11 +02:00
Veronica Berglyd Olsen
033b9f2a59 Update the zipIt function to include new files 2023-06-04 21:25:03 +02:00
Veronica Berglyd Olsen
3996ff8798 Assemble most of the Manuscript Build tool 2023-06-04 20:58:50 +02:00
Veronica Berglyd Olsen
5f6335d8f9 Fix some typing issues 2023-06-04 00:40:04 +02:00
Veronica Berglyd Olsen
135ba3f290 Update the project storage class 2023-06-03 19:05:18 +02:00
Veronica Berglyd Olsen
8ef3b3e09a Add project file revision number, and update all test reference files 2023-06-03 18:37:41 +02:00
Veronica Berglyd Olsen
0704812376 Remove titleFormat from project XML and rename mock test file 2023-06-03 18:13:02 +02:00
Veronica Berglyd Olsen
db8140418e Fix typing and docstrings in Project data and XML classes 2023-06-03 18:05:04 +02:00
Veronica Berglyd Olsen
d915b1b02c Remove old test reference files 2023-06-03 17:13:54 +02:00
Veronica Berglyd Olsen
4c439910dc Remove the old build tool 2023-06-03 17:03:30 +02:00
Veronica Berglyd Olsen
9514578554 Add the build preview functionality from the old build tool 2023-06-03 16:51:45 +02:00
Veronica Berglyd Olsen
3a2733eee5 Make new code pass docstring linting 2023-06-03 15:46:51 +02:00
Veronica Berglyd Olsen
7ff5ffaebd Remove python 3.12-dev tests again 2023-06-01 15:46:39 +02:00
Veronica Berglyd Olsen
dbb8f4fa5a Remove lxml as a test dependency 2023-06-01 15:41:56 +02:00
Veronica Berglyd Olsen
8631ea3d5a Update test CI jobs 2023-06-01 15:39:42 +02:00
Veronica Berglyd Olsen
58dee60297 Merge branch 'dev' into feature/build_gui 2023-06-01 15:29:00 +02:00
Veronica Berglyd Olsen
0a70adeceb Update ignored error codes for flake8 2023-06-01 15:27:29 +02:00
Veronica Berglyd Olsen
31e76e429b Merge branch 'main' into dev 2023-06-01 15:26:08 +02:00
Veronica Berglyd Olsen
277bd783b1 Clean up workflows 2023-06-01 10:56:11 +02:00
Veronica Berglyd Olsen
3e34721b66 Make gui class debug messages consistent 2023-06-01 00:31:42 +02:00
Veronica Berglyd Olsen
8fdec71f4b Improve how manuscript dialog closing is handled 2023-06-01 00:12:27 +02:00
Veronica Berglyd Olsen
510b6ff6d2 Add simple build preview 2023-05-31 18:10:41 +02:00
Veronica Berglyd Olsen
704fffada3 Move all code to set default text font into the Config class 2023-05-31 17:49:31 +02:00
Veronica Berglyd Olsen
74f46f4633 Update broken test by merge from dev 2023-05-29 22:22:18 +02:00
Veronica Berglyd Olsen
c49e743f4d Merge branch 'dev' into feature/build_gui 2023-05-29 22:20:08 +02:00
Veronica Berglyd Olsen
b7eb4d3567 Remove lxml dependency (#1452) 2023-05-29 22:18:46 +02:00
Veronica Berglyd Olsen
ebc3b1f745 Fix redundant line wrapping in ODT header style 2023-05-29 22:12:55 +02:00
Veronica Berglyd Olsen
af923d6050 Remove references and checks for lxml 2023-05-29 21:52:43 +02:00
Veronica Berglyd Olsen
1d90d6d385 Update XML classes and tests 2023-05-29 21:47:13 +02:00
Veronica Berglyd Olsen
a40275c431 Make the xmlIndent function the permanent solution 2023-05-29 21:35:16 +02:00
Veronica Berglyd Olsen
2a82fd628c Fix logging bug in init 2023-05-29 21:34:48 +02:00
Veronica Berglyd Olsen
a7ffbb0965 Update Odt tests 2023-05-29 20:04:40 +02:00
Veronica Berglyd Olsen
22e0f82654 Replaxe lxml with standard library xml in ODT class 2023-05-29 20:04:28 +02:00
Veronica Berglyd Olsen
47a6ae5031 Remove test runs for Python 3.7 2023-05-29 18:23:00 +02:00
Veronica Berglyd Olsen
652013b622 Fix last broken test 2023-05-29 17:58:23 +02:00
Veronica Berglyd Olsen
af67f5081e Fix test reference files 2023-05-29 17:16:58 +02:00
Veronica Berglyd Olsen
59931c804c Replace lxml with standard xml for project files 2023-05-29 17:00:52 +02:00
Veronica Berglyd Olsen
7c9bff71f0 Make sure main logger only creates a single stream handle 2023-05-24 22:39:24 +02:00
Veronica Berglyd Olsen
ad6b517c1d Rename manuscript build tool file and add build dialog 2023-05-24 22:38:47 +02:00
Veronica Berglyd Olsen
a1837d8153 Clean up old heading format usage 2023-05-24 00:50:05 +02:00
Veronica Berglyd Olsen
cd81ea5fbb Fix tests 2023-05-24 00:27:29 +02:00
Veronica Berglyd Olsen
e3744d31aa Move heading formatting into a separate class 2023-05-24 00:27:09 +02:00
Veronica Berglyd Olsen
fda647da54 Fix a few issues with the build settings dialog 2023-05-23 18:39:52 +02:00
Veronica Berglyd Olsen
6ab734b9e7 Add last tab in build settings and tweak filter tab a little 2023-05-23 18:18:15 +02:00
Veronica Berglyd Olsen
c302162d1f Add build settings Content and Format tabs 2023-05-23 16:39:43 +02:00
Veronica Berglyd Olsen
06b46bb0d3 Update config layout extension class 2023-05-23 16:39:05 +02:00
Veronica Berglyd Olsen
2592423637 Update build dialog and make doc build class compatible with build settings 2023-05-22 21:58:05 +02:00
Veronica Berglyd Olsen
854cc77220 Add list of builds to manuscript build dialog 2023-05-22 18:38:58 +02:00
Veronica Berglyd Olsen
0a2355488e Simplify build settings dialog 2023-05-22 16:25:33 +02:00
Veronica Berglyd Olsen
a212900554 Add a Headings format edit form 2023-05-18 19:30:42 +02:00
Veronica Berglyd Olsen
79a28b9e43 Add handling of build settings and build name 2023-05-18 17:41:29 +02:00
Veronica Berglyd Olsen
90a6cecd52 Merge branch 'dev' into feature/build_gui 2023-05-16 23:45:22 +02:00
Veronica Berglyd Olsen
03a19a882b Rewrite config mocking (#1447) 2023-05-16 23:29:56 +02:00
Veronica Berglyd Olsen
4371d123ac Fix docs URL (#1446) 2023-05-16 23:22:20 +02:00
Veronica Berglyd Olsen
70ea5e0bae Fix broken documentation URL 2023-05-16 23:04:24 +02:00
Veronica Berglyd Olsen
db70394af3 Move all URLs to the nwConst class 2023-05-16 23:02:31 +02:00
Veronica Berglyd Olsen
324b204eaa Drop all mappings of config object into classes now that tests don't need that 2023-05-16 23:00:30 +02:00
Veronica Berglyd Olsen
7f8ffb228e Remove dependency on .mainConf class variable in tests 2023-05-16 00:40:56 +02:00
Veronica Berglyd Olsen
cdb501ae26 Improve debug strings in Config class 2023-05-16 00:34:28 +02:00
Veronica Berglyd Olsen
e8c6e50e92 Remove code for mocking CONFIG object and instead reset it for each test 2023-05-16 00:34:11 +02:00
Veronica Berglyd Olsen
35731ca4f7 Make build settings dialog work with single settings object 2023-05-15 15:27:02 +02:00
Veronica Berglyd Olsen
5685963b59 Modify logic so build settings are edited separately 2023-05-13 20:24:33 +02:00
Veronica Berglyd Olsen
26430e642c Add a new Manuscript Build tool 2023-05-13 19:20:31 +02:00
Veronica Berglyd Olsen
ff0a4b03ae Rename GuiBuildManuscript to GuiBuildSettings 2023-05-13 19:02:21 +02:00
Veronica Berglyd Olsen
a4e5a88686 Add heading format fields 2023-05-13 19:00:10 +02:00
Veronica Berglyd Olsen
50f653fefb Add splitter to filter page and save to options 2023-05-13 17:59:43 +02:00
Veronica K. B. Olsen
a9d5974346 Add root class filtering 2023-05-09 22:00:30 +02:00
Veronica Berglyd Olsen
4c4139078a Add icons to document filters 2023-05-07 19:36:52 +02:00
Veronica Berglyd Olsen
46b4e39bf5 Add code to filter items in build tool based on layout and active status 2023-05-07 19:21:07 +02:00
Veronica Berglyd Olsen
e7a148d20d Merge branch 'dev' into feature/build_gui 2023-05-07 16:57:52 +02:00
Veronica Berglyd Olsen
76daa3f463 Update setup files (#1436) 2023-05-05 00:26:28 +02:00
Veronica Berglyd Olsen
9f22c51c8a Add deprecation info to help output 2023-05-04 23:47:01 +02:00
Veronica Berglyd Olsen
023c0da879 Add deprecation warning about setup.py 2023-05-04 23:32:55 +02:00
Veronica Berglyd Olsen
18cc8b91dc Update documentation on how to install novelWriter from source, and improve build script for pip 2023-05-04 23:17:25 +02:00
Veronica Berglyd Olsen
7a855a3520 Update pyproject.toml according to setuptools docs 2023-05-04 23:09:33 +02:00
Veronica Berglyd Olsen
36352d4a17 Fix a few warnings with setup.cfg and add the zip_safe option 2023-05-04 22:05:01 +02:00
Veronica Berglyd Olsen
b9351dba11 Update package build scripts (#1433) 2023-05-03 22:43:03 +02:00
Veronica Berglyd Olsen
8d4e555374 Fix a few help strings in setup 2023-05-03 22:34:53 +02:00
Veronica Berglyd Olsen
934ebcfc7e Switch shasum command on mac build 2023-05-03 13:29:54 +02:00
Veronica Berglyd Olsen
128092e537 Put all build assets in a single zip file 2023-05-03 12:39:51 +02:00
Veronica Berglyd Olsen
ff22722662 Fix artifact names and add shasum files 2023-05-03 12:36:33 +02:00
Veronica Berglyd Olsen
7159a07f91 Fix build action artifact upload 2023-05-02 12:52:22 +02:00
Veronica Berglyd Olsen
0ae42ef876 Simplify package names 2023-05-02 12:46:58 +02:00
Veronica Berglyd Olsen
d66953d3ac Add a bash script to generate a desktop launcher 2023-04-23 17:23:21 +02:00
Veronica Berglyd Olsen
d1c62e4bbc Docs: Add a note about escape characters for text emphasis 2023-04-22 10:06:23 +02:00
Veronica Berglyd Olsen
f1b764761c Fix error in docstring 2023-04-22 09:52:51 +02:00
Veronica Berglyd Olsen
b0c5fe6509 Make some further minor improvements to Mac build script 2023-04-18 18:57:33 +02:00
Veronica Berglyd Olsen
9daf1f1ca0 Clean up Mac build a bit 2023-04-18 18:44:08 +02:00
Veronica Berglyd Olsen
96bed5b3d5 Update copyright year 2023-04-18 18:43:55 +02:00
Veronica Berglyd Olsen
59f0beeba6 Remove the bundled lupdate6 tool and use the PyQt6 package 2023-04-18 18:17:33 +02:00
Veronica Berglyd Olsen
c7ba7b5d3a Add a link to the regular expression Qt docs for the search/replace tool 2023-04-18 11:07:33 +02:00
Veronica Berglyd Olsen
29386e8595 Add a switch box widget and use it for filter options in build 2023-04-16 21:19:09 +02:00
Veronica Berglyd Olsen
b6dceacaf0 Merge branch 'dev' into feature/build_gui 2023-04-16 19:46:54 +02:00
Veronica Berglyd Olsen
58702a8956 Release 2.0.7 (#1419) 2023-04-16 11:35:33 +02:00
Veronica Berglyd Olsen
8cdb7c245c Bump version to 2.0.7 and update changelog 2023-04-15 20:52:40 +02:00
Veronica Berglyd Olsen
1a716d858b Update translation files 2023-04-15 20:28:01 +02:00
Veronica Berglyd Olsen
c45f786066 Fix escaped markdown not being cleaned up for HTML and ODT (#1418) 2023-04-15 18:55:30 +02:00
Veronica Berglyd Olsen
574ed1b2f0 Improve test coverage 2023-04-15 18:46:32 +02:00
Veronica Berglyd Olsen
38f31d6a64 Remove the tokenizer post processing stage and instead run it where needed (Issue #1412) 2023-04-15 18:30:37 +02:00
Veronica Berglyd Olsen
6d0455bf28 Replace underscores with spaces when running spell checker (#1417) 2023-04-13 19:37:25 +02:00
Veronica Berglyd Olsen
b9d149a56a Improve how underscores are treated by spell checker (#1415) 2023-04-13 19:22:21 +02:00
Veronica Berglyd Olsen
4e64d522a1 Merge branch 'dev' into feature/build_gui 2023-04-13 18:21:41 +02:00
Veronica Berglyd Olsen
5460536bbc Fix CI trigger branches 2023-04-13 18:17:12 +02:00
Veronica Berglyd Olsen
239bc886a5 Fix spell check refresh (for small documents) (#1416) 2023-04-13 18:14:43 +02:00
Veronica Berglyd Olsen
0ffb6eee37 Allow clearing the spell check highlighting also on big docs 2023-04-13 18:11:59 +02:00
Veronica Berglyd Olsen
cf770ff77f Remove the condition that spell checking must be enabled to refresh highlighting (Issue #1414) 2023-04-13 17:57:14 +02:00
Veronica Berglyd Olsen
8c9f84d251 Build AppImage for older Linux distros (#1410) 2023-04-04 20:54:12 +02:00
Veronica Berglyd Olsen
5bb78f3f0d Use pip for build dependencies for assets 2023-04-04 19:51:02 +02:00
Veronica Berglyd Olsen
5e985af37b Add additional manylinux version to appimage build 2023-04-04 19:45:27 +02:00
Veronica Berglyd Olsen
f18b8ed7f3 Update i18n (#1407) 2023-04-04 19:36:00 +02:00
Veronica Berglyd Olsen
304d659c9f Merge branch 'main' into update_i18n 2023-04-04 19:33:13 +02:00
Veronica Berglyd Olsen
3a9d8dea27 Add back in RTD pdf build 2023-04-04 19:19:49 +02:00
Veronica Berglyd Olsen
95713f8e09 Update docs (#1409) 2023-04-04 19:13:09 +02:00
Veronica Berglyd Olsen
660c15bfe9 Simplify the main Readme as most user info is now on the website 2023-04-04 19:09:14 +02:00
Veronica Berglyd Olsen
54806ba753 Clean up documentation a little and point to new doc location 2023-04-04 18:35:39 +02:00
Veronica Berglyd Olsen
42dd7ce0d7 Change doc urls to point to main website instead of RTD 2023-04-04 18:34:37 +02:00
Veronica Berglyd Olsen
33b80244ea Merge branch 'main' into update_i18n 2023-04-04 17:50:36 +02:00
Veronica Berglyd Olsen
860125e19a Turn main into only release branch (#1408) 2023-04-04 17:47:52 +02:00
Veronica Berglyd Olsen
835165f012 Restore last version on main branch 2023-04-04 17:44:25 +02:00
Veronica Berglyd Olsen
3c7775aaa2 Remove dev code from main 2023-04-04 17:35:40 +02:00
Veronica Berglyd Olsen
97bf638b6f Merge branch 'patch' into cleanup_main 2023-04-04 17:31:36 +02:00
Veronica Berglyd Olsen
3873be2927 Add Japanese translation 2023-04-04 10:48:02 +02:00
Veronica Berglyd Olsen
48453bb46b Update latest translations 2023-04-04 10:45:25 +02:00
Veronica Berglyd Olsen
6a0a22b164 Merge branch 'patch' into update_i18n 2023-04-03 22:13:36 +02:00
Veronica Berglyd Olsen
590c03c17d Apply 'new item' rules in project tree (#1406) 2023-04-03 22:12:46 +02:00
Veronica Berglyd Olsen
db1cda65c3 Add check for root class before allowing adding novel documents in project tree new item (#1404) 2023-04-03 22:06:57 +02:00
Veronica Berglyd Olsen
bc1861887e Minor GUI Fixes (#1405) 2023-04-03 21:45:33 +02:00
Veronica Berglyd Olsen
7cd5d2740f Update base translation file 2023-04-03 21:34:58 +02:00
Veronica Berglyd Olsen
740e3be74b Fix project tree rename label (#1403) 2023-04-03 21:34:38 +02:00
Veronica Berglyd Olsen
00abb02ac1 Add the desktopFileName setting to the application for better support for Linux desktops 2023-04-03 21:31:07 +02:00
Veronica Berglyd Olsen
489fa20f18 Update latest translations with some minor additions and changes 2023-04-03 17:30:25 +02:00
Veronica Berglyd Olsen
3a569e0268 Fix typo 2023-03-21 09:17:09 +01:00
Veronica Berglyd Olsen
8bada3c468 Clarify instructions on how to download dictionaries on Windows 2023-03-20 22:36:49 +01:00
Veronica Berglyd Olsen
357d1fa83b Update docs theme from main branch 2023-03-10 16:47:47 +01:00
Veronica Berglyd Olsen
0a68ad1b07 Update docs theme (#1395) 2023-03-10 16:44:53 +01:00
Veronica Berglyd Olsen
8f8498ca6d Switch docs theme to Sphinx Book Theme 2023-03-10 16:29:41 +01:00
Veronica Berglyd Olsen
ab4cb93aaa Fix typo in docs 2023-03-07 23:03:30 +01:00
Veronica Berglyd Olsen
51b45de19e Revert mistake in docs about format changes 2023-03-05 11:44:43 +01:00
Veronica Berglyd Olsen
5639df7efd Add buttons to set filter mode on build items 2023-02-28 23:19:57 +01:00
Veronica Berglyd Olsen
9af273bf8f Add functionality to build project tree in build tool 2023-02-28 22:40:23 +01:00
Veronica Berglyd Olsen
cfd1b950d3 Rename item isInactive to isInactiveClass 2023-02-28 22:40:02 +01:00
Veronica Berglyd Olsen
8a4785d9a3 Add build tool icons to theme 2023-02-28 22:39:09 +01:00
Veronica Berglyd Olsen
ba5b4ece30 Change menu entries so tests run properly 2023-02-28 21:22:24 +01:00
Veronica Berglyd Olsen
0a8ed86b7c Finish the build tool pages and add feature to set selected button 2023-02-28 18:24:09 +01:00
Veronica Berglyd Olsen
d166697622 Merge branch 'main' into feature/build_gui 2023-02-28 18:13:46 +01:00
Veronica Berglyd Olsen
9fdfe7616c Change resize behaviour of main splitter (#1388) 2023-02-28 13:32:18 +01:00
Veronica Berglyd Olsen
21db406cf3 Change resize behaviour of main splitter to only scale editor area 2023-02-28 12:45:42 +01:00
Veronica Berglyd Olsen
eb39f5eeba Add tip in docs on how to get the Ubuntu key imported on Debian 2023-02-27 15:09:16 +01:00
Veronica Berglyd Olsen
3125df95d3 Update translations 2023-02-26 21:50:58 +01:00
Veronica Berglyd Olsen
dfcf23cd26 Merge 2.0.6 (#1384) 2023-02-26 21:37:49 +01:00
Veronica Berglyd Olsen
9d11d479a4 Merge branch 'main' into merge_2.0.6 2023-02-26 21:33:37 +01:00
Veronica Berglyd Olsen
86d324a113 Release 2.0.6 (#1382) 2023-02-26 21:02:22 +01:00
Veronica Berglyd Olsen
026f0b921c Complete changelog and update release notes 2023-02-26 12:00:39 +01:00
Veronica Berglyd Olsen
afa9675644 Merge branch 'patch' into release_2.0.6 2023-02-26 11:53:39 +01:00
Veronica Berglyd Olsen
a7ba0ec575 Backport docs from main (#1381) 2023-02-26 11:51:53 +01:00
Veronica Berglyd Olsen
bba605ee5a Fix link format in tech docs 2023-02-26 11:40:46 +01:00
Veronica Berglyd Olsen
09083ac4f5 Backport document changes from main 2023-02-26 11:37:28 +01:00
Veronica Berglyd Olsen
916f782df9 Bump version and update changelog 2023-02-26 11:15:20 +01:00
Veronica Berglyd Olsen
2f3a8f505f Fix GUI bugs and broken reference links (#1379) 2023-02-26 11:09:10 +01:00
Veronica Berglyd Olsen
4ff8c6a26f Don't set project tree focus when setting selected handle (#1369) 2023-02-26 10:56:06 +01:00
Veronica Berglyd Olsen
1952906829 Switch focus to tree when creating new item (#1376) 2023-02-26 10:35:14 +01:00
Veronica Berglyd Olsen
acd4d44a9e Fix reference panel links (#1378) 2023-02-26 10:30:25 +01:00
Veronica Berglyd Olsen
f14098d87b Merge branch 'main' into feature/build_gui 2023-02-25 18:50:59 +01:00
Veronica Berglyd Olsen
a1c3ab688a Update docs and add HowTo (#1377) 2023-02-25 18:48:37 +01:00
Veronica Berglyd Olsen
1648ad2d02 Add a contributing note to the howto docs 2023-02-25 18:48:04 +01:00
Veronica Berglyd Olsen
cc6636fe3c Add a HowTo section 2023-02-25 18:41:40 +01:00
Veronica Berglyd Olsen
e50bb72dc7 Add some more space above sections 2023-02-25 18:35:39 +01:00
Veronica Berglyd Olsen
fd390c2cba Increase font size for admonitions in docs 2023-02-23 08:19:05 +01:00
Veronica Berglyd Olsen
2365bcbcaf Restore main page link in docs 2023-02-22 22:11:51 +01:00
Veronica Berglyd Olsen
d934f2bb6b Fix download link in docs 2023-02-22 21:24:11 +01:00
Veronica Berglyd Olsen
8b2566b9fe Add signal to paged sidebar 2023-02-22 21:07:01 +01:00
Veronica Berglyd Olsen
a507e64163 No need for the mbuild folder 2023-02-21 18:46:10 +01:00
Veronica Berglyd Olsen
9d61432641 Add a basic build settings class, and add the paged sidebar to the mbuild dialog 2023-02-21 18:15:04 +01:00
Veronica Berglyd Olsen
981111d380 Complete the paged sidebar widget 2023-02-21 18:14:20 +01:00
Veronica Berglyd Olsen
0f0c9eacb1 Rename custom to extensions to avoid import issues 2023-02-21 16:47:30 +01:00
Veronica Berglyd Olsen
7a60d8d867 Add a custom widgets subpackage 2023-02-21 16:06:41 +01:00
Veronica Berglyd Olsen
06407a44d3 Add tabs to manuscript build tool 2023-02-13 21:34:40 +01:00
Veronica Berglyd Olsen
1c17bcc981 Add the Build Manuscript tool and connect it to the main menu 2023-02-13 20:00:56 +01:00
Veronica Berglyd Olsen
e92f2a9141 Copy "Getting Started" docs over from main branch 2023-02-13 19:27:30 +01:00
Veronica Berglyd Olsen
c8182c0293 Update "Getting Started" in docs (#1366) 2023-02-13 19:24:35 +01:00
Veronica Berglyd Olsen
d78f13839e Clean up the gettings started document 2023-02-13 08:46:06 +01:00
Veronica Berglyd Olsen
ed892f3f15 Move the section on setting up Python on Windows to the PyPi part 2023-02-13 08:38:19 +01:00
Veronica Berglyd Olsen
902dcc6ba7 Update MacOS install instructions formatting 2023-02-13 08:34:17 +01:00
Veronica Berglyd Olsen
43fd9db038 Merge branch 'main' into docs/getting_started 2023-02-13 08:22:25 +01:00
Veronica Berglyd Olsen
c6da74b21c Update MacOS instructions in the docs (#1365) 2023-02-13 08:21:31 +01:00
Rachel Powers
5362205605 Add Macos install instructions to the docs 2023-02-12 20:38:34 -07:00
Veronica Berglyd Olsen
30d5be44eb Bump version to 2.1-alpha0 2023-02-13 00:23:54 +01:00
Veronica Berglyd Olsen
9a50303068 Merge branch 'patch' 2023-02-13 00:20:51 +01:00
Veronica Berglyd Olsen
9ec8fea5f1 Improve build workflows (#1364) 2023-02-13 00:18:38 +01:00
Veronica Berglyd Olsen
1aecf19a03 Fix environment vars 2023-02-12 23:49:03 +01:00
Veronica Berglyd Olsen
0ab86913a7 Fix AppImage and MacOS builds 2023-02-12 23:32:11 +01:00
Veronica Berglyd Olsen
8448ec7b61 Add AppImage to build workflow 2023-02-12 23:27:15 +01:00
Veronica Berglyd Olsen
d672ec05e9 Fix artifact names 2023-02-12 22:33:40 +01:00
Veronica Berglyd Olsen
d71a277af7 Change order of macos build, and add more output 2023-02-12 22:11:32 +01:00
Veronica Berglyd Olsen
8488a85288 Update docs info on debian install 2023-02-12 21:46:15 +01:00
Veronica Berglyd Olsen
81e23f6a2a Merge 2.0.5 (#1363) 2023-02-12 17:38:40 +01:00
Veronica Berglyd Olsen
955d8c8fe2 Enable short retention time for build 2023-02-12 17:30:40 +01:00
Veronica Berglyd Olsen
d9057b8581 Fix broken doc build test 2023-02-12 17:30:26 +01:00
Veronica Berglyd Olsen
79f39c1bc3 Merge branch 'main' into merge_2.0.5 2023-02-12 17:24:42 +01:00
Veronica Berglyd Olsen
0b9ba78fac Release 2.0.5 (#1356) 2023-02-12 16:10:48 +01:00
Veronica Berglyd Olsen
c42f2e755c Make ODT tests ignore version number 2023-02-12 16:07:36 +01:00
Veronica Berglyd Olsen
2f0018ddfe Merge branch 'patch' into release_2.0.5 2023-02-12 16:04:10 +01:00
Veronica Berglyd Olsen
c4fd25ba56 Update changelog and release notes 2023-02-12 16:03:43 +01:00
Veronica Berglyd Olsen
f6a9fdd7ca Update completed and new translations (#1341) 2023-02-12 15:55:57 +01:00
Veronica Berglyd Olsen
dcadaddedf Merge branch 'patch' into update_i18n 2023-02-12 15:49:41 +01:00
Veronica Berglyd Olsen
b0952a38be Make ODT build pass validation entries (#1360) 2023-02-12 15:33:44 +01:00
Veronica Berglyd Olsen
7638db21ec Fix tests 2023-02-12 15:12:39 +01:00
Veronica Berglyd Olsen
c39e37c799 Add more meta data to supporet adding fields in LibreOffice 2023-02-12 14:44:01 +01:00
Veronica Berglyd Olsen
5796d55531 Title elements should be paragraph, not heading to be valid ODF 2023-02-12 13:27:43 +01:00
Veronica Berglyd Olsen
cce1ef54d8 Fix Open Document warning on settings.xml and bump version to 1.3 2023-02-12 12:54:05 +01:00
Veronica Berglyd Olsen
4b7a4e0789 Fix capitalisation in Portuguese translation 2023-02-12 08:36:30 +01:00
Veronica Berglyd Olsen
c2dd579eb4 Add Italian translation 2023-02-12 08:32:02 +01:00
Veronica Berglyd Olsen
ee550c2213 Update translations 2023-02-12 08:31:55 +01:00
Veronica Berglyd Olsen
6ed7c6f5a7 Update version and changelog 2023-02-10 21:50:10 +01:00
Veronica Berglyd Olsen
cd4bae976f Merge branch 'patch' into update_i18n 2023-02-10 21:16:07 +01:00
Veronica Berglyd Olsen
917a4375db Fix issues with novel tree last column (#1355) 2023-02-10 21:07:27 +01:00
Veronica Berglyd Olsen
7fe85ddfde Update base translation file 2023-02-10 20:59:26 +01:00
Veronica Berglyd Olsen
c1f1013cfd Improve test coverage 2023-02-10 20:55:37 +01:00
Veronica Berglyd Olsen
cf742a89c0 Add a menu entry to change column size for last column in novel tree 2023-02-10 20:49:47 +01:00
Veronica Berglyd Olsen
fd14c682a9 Allow more than one item in extra column 2023-02-10 20:16:49 +01:00
Veronica Berglyd Olsen
032ab630c1 Fix block formatting issues (#1354) 2023-02-10 20:11:26 +01:00
Veronica Berglyd Olsen
aa3fe96158 Add some comments to explain what's going on in the block formatting 2023-02-10 20:07:52 +01:00
Veronica Berglyd Olsen
5b20061607 Only insert line break for block formats if the block already has text (#1349, #1350) 2023-02-10 20:01:46 +01:00
Veronica Berglyd Olsen
e9876b4d42 Update docs and project file format specs (#1353) 2023-02-10 19:40:55 +01:00
Veronica Berglyd Olsen
faa644b274 Also link filr format speck in tech docs 2023-02-10 19:30:07 +01:00
Veronica Berglyd Olsen
709ea059cb Fix a typo in the index page note 2023-02-10 19:25:50 +01:00
Veronica Berglyd Olsen
723b44b6db Fix some issues with the fila format spec document 2023-02-09 17:22:02 +01:00
Veronica Berglyd Olsen
72574dd8a6 Make some modifications to docs config 2023-02-09 17:21:13 +01:00
Veronica Berglyd Olsen
6aafbbae3e Add a document builder class (#1316) 2023-02-06 23:23:41 +01:00
Veronica Berglyd Olsen
0b93e4a61a Merge branch 'main' into feature/build_class 2023-02-06 23:05:59 +01:00
Veronica Berglyd Olsen
5c30e1ae33 Merge branch 'patch' into update_i18n 2023-02-05 18:48:43 +01:00
Veronica Berglyd Olsen
25ab8ccbce Add project content path check (#1342) 2023-02-05 18:39:36 +01:00
Veronica Berglyd Olsen
492d94ee6e Check that content path exists before returning it from storage class (#1317) 2023-02-05 18:12:50 +01:00
Veronica Berglyd Olsen
6d45194253 Update completed translations and add Russian project file 2023-02-05 14:13:21 +01:00
Veronica Berglyd Olsen
cdbfcafc38 Make patch workflow match main 2023-02-05 00:16:30 +01:00
Veronica Berglyd Olsen
437fe010b0 Add a basic build file to main 2023-02-05 00:15:09 +01:00
Veronica Berglyd Olsen
5f6f853336 Only run packaging workflow on certain tags 2023-02-05 00:00:47 +01:00
Veronica Berglyd Olsen
75b20889f4 Changes to MacOS build (#1340) 2023-02-04 23:46:48 +01:00
Veronica Berglyd Olsen
6b1183392f Try using workflow_dispatch instead 2023-02-04 23:44:03 +01:00
Veronica Berglyd Olsen
652ce3848b Try out using environment in workflow 2023-02-04 23:34:00 +01:00
Veronica Berglyd Olsen
1d90ab9fc1 Reverting som changes that didn't matter 2023-02-04 23:12:14 +01:00
Veronica Berglyd Olsen
cc48f8f8aa Try removeing the python3.1 folder 2023-02-04 22:27:16 +01:00
Veronica Berglyd Olsen
44f624faf4 Try the -a option instead 2023-02-04 20:54:51 +01:00
Veronica Berglyd Olsen
b4813f904a Try the preserve symlinks flag in mac bundle build 2023-02-04 20:45:15 +01:00
Veronica Berglyd Olsen
8a5ff3ab85 Turn off short retention time for now 2023-02-04 19:47:10 +01:00
Veronica Berglyd Olsen
76e1d47d14 Merge branch 'patch' into feature/macos-bundle 2023-02-04 19:33:32 +01:00
Veronica Berglyd Olsen
0e529fd72f Rewrite macOS build workflow and make some changes to build script 2023-02-04 19:33:12 +01:00
Veronica Berglyd Olsen
74ead29433 Move MacOS plist info back to a template file, and simplify stuff in setup.py 2023-02-04 19:33:04 +01:00
Veronica Berglyd Olsen
08bc2938df Add MacOS bundle distribution (#1276) 2023-02-04 17:37:47 +01:00
Veronica Berglyd Olsen
a6d9ed0c8c Merge branch 'patch' into macos-appbundle 2023-02-04 17:35:04 +01:00
Veronica Berglyd Olsen
c9d768e138 Project Details dialog fixes (#1339) 2023-02-04 16:48:18 +01:00
Veronica Berglyd Olsen
4ba3297d17 Update base translation file 2023-02-04 16:45:53 +01:00
Veronica Berglyd Olsen
a5d05ab777 Improve time format of editing time on project details dialog (#1335) 2023-02-04 16:32:41 +01:00
Veronica Berglyd Olsen
4e815a5f86 Make sure project name, title and author cannot be set to string "None" 2023-02-04 16:29:51 +01:00
Veronica Berglyd Olsen
b1bc80a0cd Make sure title and author is always refreshed when project details dialog is opened (#1336) 2023-02-04 16:29:23 +01:00
Veronica Berglyd Olsen
b0f38c3e2f Merge branch 'main' into feature/build_class 2023-02-01 16:58:27 +01:00
Rachel Powers
af1233925e fix icns generation and bundle display name.
while the icns *can* be generated on linux it is much preferable to generate it on macos
it is checked in as a convience

this commit fixes the appbundle not displaying the icon corrected
and corrects the app being displayed as "python" in the top bar when the bundle is run

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-01-31 17:10:36 -07:00
Veronica Berglyd Olsen
71a8e72180 Merge branch 'patch' into macos-appbundle 2023-01-30 12:14:57 +01:00
Veronica Berglyd Olsen
8273fcca1e Update outdated info in main readme 2023-01-30 12:10:04 +01:00
Veronica Berglyd Olsen
9d46dde1c5 Fix typo in 2.0 release notes 2023-01-29 11:53:08 +01:00
Veronica Berglyd Olsen
0702154716 Merge branch 'main' into feature/build_class 2023-01-29 03:15:40 +01:00
Veronica Berglyd Olsen
0ad7dac3d3 Merge 2.0.4 (#1327) 2023-01-29 03:15:12 +01:00
Veronica Berglyd Olsen
f56f990085 Merge branch 'main' into merge_2.0.4 2023-01-29 03:11:30 +01:00
Veronica Berglyd Olsen
f04f4a3e04 Update some comments and docstrings in the index class 2023-01-25 15:05:59 +01:00
Veronica Berglyd Olsen
004828f76c Mention Qt SVG dependency for Arch Linux in the docs (#1320) 2023-01-21 23:00:42 +01:00
Veronica Berglyd Olsen
3d4dbd0bb0 Mention Qt SVG dependency for Arch Linux in the docs (#1319)
Signed-off-by: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com>
2023-01-21 22:52:43 +01:00
Veronica Berglyd Olsen
3a0bae92be Rename the doc build functions 2023-01-12 10:21:36 +01:00
Veronica Berglyd Olsen
f569c66348 Add test coverage of the doc builder class 2023-01-11 12:30:08 +01:00
Veronica Berglyd Olsen
88cde331df Fix a few issues in the doc builder class 2023-01-11 12:29:52 +01:00
Veronica Berglyd Olsen
72e11601a0 Complete the first version of the doc builder class and add test 2023-01-10 17:59:23 +01:00
Veronica Berglyd Olsen
87256ee62f Merge branch 'main' into feature/build_class 2023-01-10 17:59:04 +01:00
Rachel Powers
beb95c49fa fix: fit artifact uploads
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-01-09 00:53:15 -07:00
Rachel Powers
f912d55177 refactor: move plist gen into setup.py
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-01-08 22:09:32 -07:00
Rachel Powers
b7e7a087f8 fix: remove codesign for now, only build on tags
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-01-08 19:27:12 -07:00
Rachel Powers
82dd1c46cf fix: force build on this branch for testing
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-01-08 19:27:12 -07:00
Rachel Powers
a228c4b32a Squashed commit of the following:
commit a1f358b6f0a193be7d3d72fa4082fa09701ebe16
Author: Rachel Powers <508861+Ryex@users.noreply.github.com>
Date:   Thu Dec 1 11:48:38 2022 -0700

    fix: reneable the res of the build

    Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

commit 8ed02b09aeb9c302e30023fcbf73c8b5e3bbc8ff
Author: Rachel Powers <508861+Ryex@users.noreply.github.com>
Date:   Thu Dec 1 11:41:19 2022 -0700

    fix: install qt for tools

    Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

commit d68dc29d49f1a2547912fc97867126f4fc6d96c4
Author: Rachel Powers <508861+Ryex@users.noreply.github.com>
Date:   Thu Dec 1 11:32:07 2022 -0700

    fix: add tex-gyre to texlive install

    Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

commit ff654a2a914cd00c867088baf147f8ccd70a185c
Author: Rachel Powers <508861+Ryex@users.noreply.github.com>
Date:   Thu Dec 1 11:08:46 2022 -0700

    fix: add required latex pkgs

    Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

commit 1a4babc11c274f69c6c04edddfc5011f9162759e
Author: Rachel Powers <508861+Ryex@users.noreply.github.com>
Date:   Thu Dec 1 10:17:31 2022 -0700

    fix: install sphinx via pip3

    Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

commit 4b602b0955fabc2b5067bae46c3408dab0f0dd72
Author: Rachel Powers <508861+Ryex@users.noreply.github.com>
Date:   Thu Dec 1 10:05:46 2022 -0700

    fix: ensure sphinx is properly installed

    Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

commit 59ad26f434d6c5391c2448724aa44587c2cf7a46
Author: Rachel Powers <508861+Ryex@users.noreply.github.com>
Date:   Thu Dec 1 09:59:40 2022 -0700

    feat: install scheme-basic texlive pkg
    run setup.py in proper dir

    Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

commit 16cd50307fbd4519fd6ebdc719e78e99eb37d02b
Author: Rachel Powers <508861+Ryex@users.noreply.github.com>
Date:   Thu Dec 1 09:54:42 2022 -0700

    feat: build manual, translations, and sample project zip

    Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-01-08 19:27:12 -07:00
Rachel Powers
682986d9b9 fix: add entitlements
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-01-08 19:27:12 -07:00
Rachel Powers
b29b6d6eef fix: don't remove the python symlink
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-01-08 19:27:12 -07:00
Rachel Powers
8a9a52da57 fix: pull the version from the python file
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-01-08 19:27:12 -07:00
Rachel Powers
faf302c6d8 feat: add github workflow to build for macos
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-01-08 19:27:12 -07:00
Rachel
f71afb5732 feat: cleanup build script
use python 3.10
use curl over wget (pre-installed)
ensure enchant is installed
cleanup better to limit app bundle size
fix Info.plist

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-01-08 19:27:12 -07:00
Rachel Powers
0eb7185d40 feat: add a macos build script
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-01-08 19:27:12 -07:00
Veronica Berglyd Olsen
286dbff47b Merge 2.0.3 (#1312) 2023-01-08 19:52:09 +01:00
Veronica Berglyd Olsen
3fa9c29d7a Populate build functions in new build class 2022-12-01 22:56:24 +01:00
Veronica Berglyd Olsen
25f6234cf0 Add a new module for a document build class 2022-12-01 16:12:25 +01:00
565 changed files with 56594 additions and 40306 deletions

103
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,103 @@
name: Build
on: workflow_dispatch
jobs:
buildAssets:
runs-on: ubuntu-latest
steps:
- name: Python Setup
uses: actions/setup-python@v4
with:
python-version: "3.11"
architecture: x64
- name: Install Packages (apt)
run: |
sudo apt update
sudo apt install qttools5-dev-tools latexmk texlive texlive-latex-extra
- name: Checkout Source
uses: actions/checkout@v3
- name: Install Packages (pip)
run: pip install -r docs/source/requirements.txt
- name: Build Assets
run: python pkgutils.py qtlrelease sample manual
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: nw-assets
path: |
novelwriter/assets/sample.zip
novelwriter/assets/manual.pdf
novelwriter/assets/i18n/*.qm
if-no-files-found: error
retention-days: 1
buildLinux:
needs: buildAssets
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
linux-tag: ["manylinux_2_24_x86_64", "manylinux_2_28_x86_64"]
steps:
- name: Python Setup
uses: actions/setup-python@v4
with:
python-version: "3.11"
architecture: x64
- name: Install Packages (pip)
run: pip install python-appimage
- name: Checkout Source
uses: actions/checkout@v3
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: nw-assets
path: novelwriter/assets
- name: Build AppImage
run: python pkgutils.py build-appimage --linux-tag ${{ matrix.linux-tag }} --python-version ${{ matrix.python-version }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: novelWriter-Packages
path: |
dist_appimage/novelWriter*.AppImage
dist_appimage/novelWriter*.AppImage.sha256
if-no-files-found: error
retention-days: 1
buildMac:
needs: buildAssets
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: nw-assets
path: novelwriter/assets
- name: Build App Bundle
run: ./setup/macos/build.sh
- name: Upload DMG
uses: actions/upload-artifact@v3
with:
name: novelWriter-Packages
path: |
dist_macos/novelWriter*.dmg
dist_macos/novelWriter*.dmg.sha256
if-no-files-found: error
retention-days: 1

View File

@@ -1,14 +1,14 @@
name: flake8
name: Flake8
on:
push:
branches:
branches:
- main
- patch
- dev
pull_request:
branches:
- main
- patch
- dev
jobs:
checkSyntax:
@@ -23,11 +23,8 @@ jobs:
uses: actions/checkout@v3
- name: Install flake8
run: pip install flake8
- name: Syntax Error Check
- name: Syntax Check
run: |
flake8 novelwriter --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 tests --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Coding Style Violations
run: |
flake8 novelwriter --count --max-line-length=99 --ignore E133,E221,E226,E228,E241,W503 --show-source --statistics
flake8 tests --count --max-line-length=99 --ignore E133,E221,E226,E228,E241,W503 --show-source --statistics
flake8 --version
flake8 novelwriter --count --show-source --statistics
flake8 tests --count --show-source --statistics

View File

@@ -2,19 +2,19 @@ name: Linux
on:
push:
branches:
branches:
- main
- patch
- dev
pull_request:
branches:
- main
- patch
- dev
jobs:
testLinux:
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: ubuntu-latest
steps:
- name: Python Setup
@@ -30,11 +30,9 @@ jobs:
uses: actions/checkout@v3
- name: Install Dependencies (pip)
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -U -r requirements.txt -r tests/requirements.txt
- name: Run Build Commands
run: python setup.py qtlrelease sample
run: python pkgutils.py qtlrelease sample
- name: Run Tests
run: |
export QT_QPA_PLATFORM=offscreen

View File

@@ -1,14 +1,14 @@
name: macOS
name: MacOS
on:
push:
branches:
branches:
- main
- patch
- dev
pull_request:
branches:
- main
- patch
- dev
jobs:
testMac:
@@ -17,19 +17,16 @@ jobs:
- name: Python Setup
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
architecture: x64
- name: Install Packages
- name: Install Packages (brew)
run: |
brew install enchant
- name: Checkout Source
uses: actions/checkout@v3
- name: Install Dependencies
- name: Install Dependencies (pip)
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install pyobjc
pip install -U pyobjc -r requirements.txt -r tests/requirements.txt
- name: Run Tests
run: |
export QT_QPA_PLATFORM=offscreen

View File

@@ -2,13 +2,13 @@ name: Windows
on:
push:
branches:
branches:
- main
- patch
- dev
pull_request:
branches:
- main
- patch
- dev
jobs:
testWin:
@@ -17,15 +17,13 @@ jobs:
- name: Python Setup
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
architecture: x64
- name: Checkout Source
uses: actions/checkout@v3
- name: Install Dependencies
- name: Install Dependencies (pip)
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -U -r requirements.txt -r tests/requirements.txt
- name: Run Tests
run: |
pytest -v --cov=novelwriter --timeout=60

6
.gitignore vendored
View File

@@ -9,6 +9,8 @@
setup.iss
/novelwriter.desktop
/novelWriter.pyw
/setup/macos/Info.plist
.venv
# Translations
/novelwriter/assets/i18n/*.qm
@@ -32,7 +34,6 @@ __pycache__
/novelwriter/assets/sample.zip
/sample/cache
/sample/meta
/sample/versions
*.bak
*.lock
ToC.txt
@@ -43,9 +44,6 @@ ToC.txt
/tests/temp
/tests/lipsum/cache
/tests/lipsum/meta
/tests/minimal/cache
/tests/minimal/meta
/tests/oldproj/cache
/.pytest_cache
/pytestdebug.log

View File

@@ -1,24 +0,0 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml
# Optionally build your docs in additional formats such as PDF
formats:
- htmlzip
- epub
- pdf
# Optionally set the version of Python and requirements required to build your docs
python:
install:
- requirements: docs/source/requirements.txt

File diff suppressed because it is too large Load Diff

View File

@@ -20,6 +20,8 @@ translators for the languages currently available:
* Dutch: Martijn van der Kleijn (@mvdkleijn)
* French: Jan Lüdke (@jyhelle)
* German: Myian (@heymyian)
* Italian: Riccardo Mangili
* Japanese: hebekeg (@hebekeg)
* Latin American Spanish: Tommy Marplatt (@tmarplatt)
* Norwegian: Veronica Berglyd Olsen (@vkbo)
* Portuguese: Bruno Meneguello (@bkmeneguello)
@@ -38,7 +40,6 @@ The following libraries are dependencies of novelWriter:
* [Qt5](https://www.qt.io) by Qt Company
* [PyQt5](https://www.riverbankcomputing.com/software/pyqt) by Riverbank Computing
* [lxml](https://lxml.de) by Martijn Faassen
* [Enchant](https://abiword.github.io/enchant) by Dom Lachowicz
* [PyEnchant](https://pyenchant.github.io/pyenchant) by Dimitri Merejkowsky
@@ -51,6 +52,12 @@ Some of the assets bundled with novelWriter were adapted from the following sour
* [Owl](https://github.com/sdras/night-owl-vscode-theme) syntax themes by Sarah Drasner (MIT License)
* [Solarized](https://github.com/altercation/solarized) themes by Ethan Schoonover (MIT License)
## Fonts
The font used for the main novelWriter logo, mimetype and text banners is:
* Pridi by Cadson Demak (Open Font License, Version 1.1)
## Special Mentions
Additional thanks to @johnblommers who was an early user and who has provided a lot of very useful

View File

@@ -1,7 +1,6 @@
include setup.py
include pkgutils.py
include LICENSE.md
include CREDITS.md
include CHANGELOG.md
recursive-include setup *
recursive-include novelwriter/assets *
recursive-include sample *.nwx *.nwd
recursive-include setup *

166
README.md
View File

@@ -2,16 +2,11 @@
[![Linux](https://github.com/vkbo/novelWriter/actions/workflows/test_linux.yml/badge.svg?branch=main)](https://github.com/vkbo/novelWriter/actions/workflows/test_linux.yml)
[![Windows](https://github.com/vkbo/novelWriter/actions/workflows/test_win.yml/badge.svg?branch=main)](https://github.com/vkbo/novelWriter/actions/workflows/test_win.yml)
[![macOS](https://github.com/vkbo/novelWriter/actions/workflows/test_mac.yml/badge.svg?branch=main)](https://github.com/vkbo/novelWriter/actions/workflows/test_mac.yml)
[![flake8](https://github.com/vkbo/novelWriter/workflows/flake8/badge.svg)](https://github.com/vkbo/novelWriter/actions)
[![codecov](https://codecov.io/gh/vkbo/novelWriter/branch/main/graph/badge.svg)](https://codecov.io/gh/vkbo/novelWriter)
[![docs](https://readthedocs.org/projects/novelwriter/badge/?version=latest)](https://novelwriter.readthedocs.io/en/latest/?badge=latest)
[![release](https://img.shields.io/github/v/release/vkbo/novelwriter)](https://github.com/vkbo/novelWriter/releases)
[![pypi](https://img.shields.io/pypi/v/novelwriter)](https://pypi.org/project/novelWriter)
[![python](https://img.shields.io/pypi/pyversions/novelwriter)](https://pypi.org/project/novelWriter)
[![Crowdin](https://badges.crowdin.net/novelwriter/localized.svg)](https://crowdin.com/project/novelwriter)
[![MacOS](https://github.com/vkbo/novelWriter/actions/workflows/test_mac.yml/badge.svg?branch=main)](https://github.com/vkbo/novelWriter/actions/workflows/test_mac.yml)
[![Flake8](https://github.com/vkbo/novelWriter/workflows/flake8/badge.svg)](https://github.com/vkbo/novelWriter/actions)
[![CodeCov](https://codecov.io/gh/vkbo/novelWriter/branch/main/graph/badge.svg)](https://codecov.io/gh/vkbo/novelWriter)
<img align="left" style="margin: 0 16px 4px 0;" src="https://raw.githubusercontent.com/vkbo/novelWriter/main/setup/novelwriter.png">
<img align="left" style="margin: 0 0 4px 0;" src="https://raw.githubusercontent.com/vkbo/novelWriter/main/setup/novelwriter_readme.png">
novelWriter is a plain text editor designed for writing novels assembled from many smaller text
documents. It uses a minimal formatting syntax inspired by Markdown, and adds a meta data syntax
@@ -23,43 +18,22 @@ synchronisation tools. All text is saved as plain text files with a meta data he
project structure is stored in a single project XML file. Other meta data is primarily saved as
JSON files.
The full documentation is available at
[novelwriter.readthedocs.io](https://novelwriter.readthedocs.io).
For more details, and how to install and use novelWriter, please see the main website and
documentation.
The full credits are listed in
[CREDITS.md](https://github.com/vkbo/novelWriter/blob/main/CREDITS.md).
**Project Links**
You can also follow novelWriter on Mastodon at [fosstodon.org/@novelwriter](https://fosstodon.org/@novelwriter).
* Website: [novelwriter.io](https://novelwriter.io)
* Documentation: [docs.novelwriter.io](https://docs.novelwriter.io)
* Internationalisation: [crowdin.com/project/novelwriter](https://crowdin.com/project/novelwriter)
* PyPi Project: [pypi.org/project/novelWriter](https://pypi.org/project/novelWriter)
* Social Media: [fosstodon.org/@novelwriter](https://fosstodon.org/@novelwriter)
## Implementation
The application is written with Python 3 (3.7+) using Qt5 and PyQt5 (5.10+). It is developed on
Linux, but should in principle work fine on other operating systems as well as long as dependencies
are met. It is regularly tested on Debian and Ubuntu Linux, Windows, and macOS.
## Installation
### Linux Mint, Ubuntu and Debian
The Releases page has a `.deb` package that should install on Mint, Ubuntu and Debian.
You can also use the novelWriter [PPA](https://launchpad.net/~vkbo/+archive/ubuntu/novelwriter).
For more details, check the [Getting Started](https://novelwriter.readthedocs.io/en/latest/int_started.html)
section in the documentation.
### Windows 10+
The Release page has a `setup.exe` file for Windows 10, that should also work on other Windows
versions. The installer includes Python 3.10 and the library dependencies.
### Other Install Options
You can also download and install one of the minimal zip files from the
[Releases](https://github.com/vkbo/novelWriter/releases) page or the
[novelwriter.io](https://novelwriter.io/) website.
The [Getting Started](https://novelwriter.readthedocs.io/en/latest/int_started.html) section of the
documentation has detailed install instructions for these packages, and for installation via the
Python Package Index.
novelWriter is written with Python 3 (3.8+) using Qt5 and PyQt5 (5.10+), and is released on Linux,
Windows and macOS. It can in principle run on any Operating System that also supports Qt, PyQt and
Python.
## Project Contributions
@@ -73,6 +47,8 @@ also be appreciated, but please make an issue or a discussion topic first. Befor
code, please also read the full
[Contributing Guide](https://github.com/vkbo/novelWriter/blob/main/CONTRIBUTING.md).
Project credits are available in [CREDITS.md](https://github.com/vkbo/novelWriter/blob/main/CREDITS.md).
### Translations
New translations are always welcome. This project uses Crowdin to maintain translations, and you
@@ -83,112 +59,10 @@ If you have any questions, feel free to post them to the
For more details, and how to use Qt Linguist for translations, see the
[i18n instructions](https://github.com/vkbo/novelWriter/blob/main/i18n/README.md).
## Key Features
Some key features of novelWriter are listed below. The
[documentation](https://novelwriter.readthedocs.io) has a lot more information.
### Formatting Codes
Although novelWriter is a plain text editor, it uses a Markdown-like syntax to allow for a minimal
set of formatting that is useful for the specific task of writing novels.
| Code | Usage | Description |
|------------|----------|-------------|
| `#` | Prefix | Headings level 1 to 4. |
| `_` | Wrapped | Emphasised (italicised) text. |
| `**` | Wrapped | Strongly emphasised (bold) text. |
| `~~` | Wrapped | Strikethrough text. |
| `%` | Prefix | A comment; does not count towards the word count.<sup>1</sup> |
| `@` | Prefix | The following text is parsed as a keyword/value command for meta data. |
| `>` | Prefix | The paragraph is indented one tab width from the left. |
| `<` | Suffix | The paragraph is indented one tab width from the right. |
| `>>` | Prefix | The paragraph is right-aligned. |
| `<<` | Suffix | The paragraph is left-aligned. |
| `>>`, `<<` | Wrapped | The paragraph is centred. |
<sup>1</sup> If the first word of the comment is `synopsis:`, the comment is indexed and treated as
the synopsis for the section of text where it occurs. These synopsis comments can be used to build
an outline and exported to external documents.
### Export Formats
The core export formats of novelWriter are Open Document and HTML5. Open Document is an open
standard for office type documents that is supported by most office applications. See
[Open Document > Application Support](https://en.wikipedia.org/wiki/OpenDocument#Application_support)
for more details.
You can also export the entire project as a single novelWriter-markup document. These can later be
imported again into novelWriter. In addition, printing and export to PDF is offered through the Qt
library, although with limitations to formatting.
### Colour Themes
The editor has syntax highlighting for the features it supports, and includes a set of different
syntax highlighting themes. Optional GUI themes are also available, including dark themes.
### Easy Organising of Project Files
The structure of the project is shown on the left hand side of the main window. Project files are
organised into root folders, indicating what class of file they are. The most important root folder
is the `Novel` folder, which contains all of the files that make up the novel itself. Each root
folder can have subfolders. Subfolders have no impact on the final project structure, they are
there for you to organise your files in whatever way you want.
The editor supports four levels of headings, which determine what level the following text belongs
to. Headings of level one signify a book or partition title. Headings of level two signify the
start of a new chapter. Headings of level three signify the start of a new scene. Headings of level
four can be used internally in each scene to create separate sections.
See the [documentation](https://novelwriter.readthedocs.io) for further details.
### Project Notes
Supporting notes can be added for the story plot, characters, locations, story timeline, etc. These
have their separate root folders and are optional to use.
### Visualisation of Story Elements
The different notes can be assigned tags, which other files can refer back to using `@`-prefixed
meta keywords. This information can be used to display an outline of the story, showing where each
scene connects to the plot, and which characters, etc. occur in them. In addition, the tags
themselves are clickable in the document view pane, and control-clickable in the editor. They make
it possible to quickly navigate between the documents while writing.
## Installing or Running from Source
If you want to run novelWriter directly from the source code, you must run the `novelWriter.py`
file from command line.
Dependencies can generally be installed from PyPi with:
```bash
pip install -r requirements.txt
```
On Linux, the dependencies are generally available in the standard package repository.
For more details on running or installing from source, see
[Other Setup Methods](https://novelwriter.readthedocs.io/en/latest/setup_other.html).
## Debugging
If you need to debug novelWriter, you must run it from the command line. It takes a few parameters,
which can be listed with the switch `--help`. The `--info`, `--debug` or `--verbose` flags are
particularly useful for increasing logging output for debugging.
## Licence
This is Open Source software, and novelWriter is licenced under GPLv3. See the
[GNU General Public License website](https://www.gnu.org/licenses/gpl-3.0.en.html) for more
details, or consult the [LICENSE](https://github.com/vkbo/novelWriter/blob/main/LICENSE.md) file.
Bundled assets and their licences are listed in
[CREDITS](https://github.com/vkbo/novelWriter/blob/main/CREDITS.md).
## Screenshots
**novelWriter with default system theme:**
![Screenshot 1](https://raw.githubusercontent.com/vkbo/novelWriter/main/docs/source/images/screenshot_default.png)
**novelWriter with dark theme:**
![Screenshot 2](https://raw.githubusercontent.com/vkbo/novelWriter/main/docs/source/images/screenshot_dark.png)
details, or consult the [License](https://github.com/vkbo/novelWriter/blob/main/LICENSE.md)
document. Bundled assets and their licences are listed in the
[Credits](https://github.com/vkbo/novelWriter/blob/main/CREDITS.md) document.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,14 @@
span.guilabel {
font-weight: 400;
}
.nw-sidebar-title {
height: unset;
max-height: unset;
flex-direction: column;
justify-content: center;
gap: .25rem;
font-size: 1.25rem;
font-weight: normal;
text-align: center;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@@ -0,0 +1,3 @@
{% if docstitle %}
<p class="nw-sidebar-title">{{ docstitle }}</p>
{% endif %}

View File

@@ -1,10 +1,7 @@
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
#
"""
Configuration file for the Sphinx documentation builder.
Documentation: http://www.sphinx-doc.org/en/master/config
"""
# -- Imports -----------------------------------------------------------------
@@ -15,7 +12,7 @@ import datetime
# -- Project Information -----------------------------------------------------
project = "novelWriter"
copyright = f"{datetime.date.today().year}, Veronica Berglyd Olsen"
copyright = f"{datetime.date.today().year}"
author = "Veronica Berglyd Olsen"
initFile = os.path.join(
@@ -30,37 +27,45 @@ with open(initFile) as inFile:
else:
release = "unknown"
version = release.split("-")[0]
version = release.partition("-")[0]
# -- General Configuration ---------------------------------------------------
os.environ["TZ"] = "Europe/Oslo"
time.tzset()
needs_sphinx = "4.0"
needs_sphinx = "5.0"
extensions = ["sphinx_design"]
templates_path = ["_templates"]
source_suffix = ".rst"
master_doc = "index"
today_fmt = "%A, %d %B %Y at %H:%M"
language = "en"
exclude_patterns = []
pygments_style = "sphinx"
pygments_dark_style = "monokai"
# -- Options for HTML Output -------------------------------------------------
html_theme = "furo"
html_theme = "sphinx_book_theme"
html_title = f"Version {release}"
html_static_path = ["_static"]
html_css_files = ["custom.css"]
html_theme_options = {
"light_logo": "novelwriter-light.png",
"dark_logo": "novelwriter-dark.png",
"logo": {
"image_light": "_static/novelwriter-light.png",
"image_dark": "_static/novelwriter-dark.png",
},
"show_toc_level": 2,
"show_navbar_depth": 1,
"repository_url": "https://github.com/vkbo/novelwriter",
"navigation_with_keys": True,
"use_repository_button": True,
"use_issues_button": True,
"pygment_light_style": "tango",
"pygment_dark_style": "dracula",
}
html_sidebars = {
"**": ["navbar-logo", "sidebar-title", "sbt-sidebar-nav"],
}
html_title = f"<div style='text-align: center'>Documentation Version {release}</div>"
# -- Options for HTMLHelp Output ---------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = "novelWriterDoc"
# -- Options for LaTeX Output ------------------------------------------------
@@ -73,44 +78,7 @@ latex_elements = {
),
"figure_align": "htbp",
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_logo = "_static/novelwriter-pdf.png"
latex_documents = [(
master_doc, "manual.tex", "novelWriter Documentation",
author, "manual"
master_doc, "manual.tex", "User Guide", author, "manual"
)]
# -- Options for Man Page Output ---------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(
master_doc, "novelwriter", "novelWriter Documentation", [author], 1
)]
# -- Options for Texinfo Output ----------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [(
master_doc, "novelWriter", "novelWriter Documentation", author,
"novelWriter", "Markdown-like editor for novels.", "Miscellaneous"
)]
# -- Options for EPub Output -------------------------------------------------
# Bibliographic Dublin Core info.
epub_title = project
# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
# epub_identifier = ""
# A unique identification for the text.
# epub_uid = ""
# A list of files that should not be packed into the epub file.
epub_exclude_files = ["search.html"]

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 KiB

After

Width:  |  Height:  |  Size: 542 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 539 KiB

After

Width:  |  Height:  |  Size: 562 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 KiB

After

Width:  |  Height:  |  Size: 335 KiB

View File

@@ -1,14 +1,9 @@
#############################
Documentation for novelWriter
#############################
######################
novelWriter User Guide
######################
.. image:: images/novelwriter_logo.png
:align: right
:width: 48
| **For Release:** |release|
| **Last Updated:** |today|
|
| **Release Version:** |release|
| **Updated:** |today|
novelWriter is an open source plain text editor designed for writing novels assembled from many
smaller text documents. It uses a minimal formatting syntax inspired by Markdown, and adds a meta
@@ -17,28 +12,24 @@ editor that allows for easy organisation of text and notes, using human readable
storage for robustness.
.. figure:: images/screenshot_multi.png
:class: dark-light
:align: center
:width: 500
The project storage is suitable for version control software, and also well suited for file
synchronisation tools. All text is saved as plain text files with a meta data header. The core
project structure is stored in a single project XML file. Other meta data is primarily saved as
JSON files. See the :ref:`a_breakdown_storage` section for more details.
project structure is stored in a single project XML file. Other meta data is saved as JSON files.
See the :ref:`a_breakdown_storage` section for more details.
Any operating system that can run Python 3 and has the Qt 5 libraries should be able to run
novelWriter. It runs fine on Linux, Windows and macOS, and users have tested it on other platforms
novelWriter. It runs fine on Linux, Windows and MacOS, and users have tested it on other platforms
as well. novelWriter can also be run directly from the Python source, or installed from packages or
the pip tool. See :ref:`a_started` for more details.
.. note::
Version 1.5 introduced a few changes that will require you to make some minor modifications to
some of the headings in your project. It should be fairly quick and straightforward. Please see
the :ref:`a_prjfmt_1_3` section for more details.
with pip. See :ref:`a_started` for more details.
**Useful Links**
* Website: https://novelwriter.io
* Documentation: https://novelwriter.readthedocs.io
* Documentation: https://docs.novelwriter.io
* Internationalisation: https://crowdin.com/project/novelwriter
* Source Code: https://github.com/vkbo/novelWriter
* Source Releases: https://github.com/vkbo/novelWriter/releases
@@ -47,6 +38,11 @@ the pip tool. See :ref:`a_started` for more details.
* PyPi Project: https://pypi.org/project/novelWriter
* Social Media: https://fosstodon.org/@novelwriter
.. toctree::
:hidden:
Main Page <self>
.. toctree::
:maxdepth: 1
:caption: Introduction
@@ -55,8 +51,9 @@ the pip tool. See :ref:`a_started` for more details.
int_introduction
int_overview
int_started
int_source
int_howto
int_customise
int_glossary
.. toctree::
:maxdepth: 1
@@ -64,7 +61,8 @@ the pip tool. See :ref:`a_started` for more details.
:hidden:
usage_breakdown
usage_interface
usage_project
usage_writing
usage_format
usage_shortcuts
usage_typography
@@ -77,14 +75,15 @@ the pip tool. See :ref:`a_started` for more details.
project_overview
project_structure
project_notes
project_export
project_references
project_manuscript
.. toctree::
:maxdepth: 1
:caption: Under the Hood
:caption: Additional Topics
:hidden:
tech_locations
tech_storage
tech_source
tech_tests

View File

@@ -7,7 +7,7 @@ Customisations
.. _Enchant: https://abiword.github.io/enchant
.. _Free Desktop: https://cgit.freedesktop.org/libreoffice/dictionaries/tree/
There are a few ways you can customise novelWriter youself. Currently, you can add new GUI themes,
There are a few ways you can customise novelWriter yourself. Currently, you can add new GUI themes,
your own syntax themes, and install additional dictionaries.
@@ -16,25 +16,48 @@ your own syntax themes, and install additional dictionaries.
Spell Check Dictionaries
========================
novelWriter uses Enchant_ as the spell checking tool. Depending on you operating system, it may or
may not load installed spell check dictionaries.
novelWriter uses Enchant_ as the spell checking tool. Depending on your operating system, it may or
may not load all installed spell check dictionaries automatically.
Linux
On Linux, you generally only have to install hunspell or aspell dictionaries on your system like
you do for other applications. See your distro's documentation for how to do this. These
dictionaries should then show up as available spell check languages in novelWriter.
Linux and MacOS
---------------
On Linux and MacOS, you generally only have to install hunspell, aspell or myspell dictionaries on
your system like you do for other applications. See your distro or OS documentation for how to do
this. These dictionaries should show up as available spell check languages in novelWriter.
Windows
For Windows, English is included with the installation. For other languages you have to download
and add dictionaries yourself. You can find the various dictionaries on the `Free Desktop`_
website. You should find a folder for your language, if it is available at all, and download the
files ending with ``.aff`` and ``.dic``. These files must then be copied to the following
location:
-------
``C:\Users\<USER>\AppData\Local\enchant\hunspell``
For Windows, English is included with the installation. For other languages you have to download
and add dictionaries yourself.
This assumes your user profile is stored at ``C:\Users\<USER>``. The last one or two folders may
not exist, so you may need to create them.
**Install Tool**
A small tool to assist with this can be found under :guilabel:`Tools > Add Dictionaries`. It will
import spell checking dictionaries from Free Office or Libre Office extensions. The dictionaries
are then installed in the install location for the Enchant library.
**Manual Install**
If you prefer to do this manually or want to use a different source than the ones mentioned above,
You need to get compatible dictionary files for your language. You need two files files ending with
``.aff`` and ``.dic``. These files must then be copied to the following location:
``C:\Users\<USER>\AppData\Local\enchant\hunspell``
This assumes your user profile is stored at ``C:\Users\<USER>``. The last one or two folders may
not exist, so you may need to create them.
You can find the various dictionaries on the `Free Desktop`_ website.
.. note::
The Free Desktop link points to a repository, and what may look like file links inside the
dictionary folder are actually links to web pages. If you right-click and download those, you
get HTML files, not dictionaries!
In order to download the actual dictionary files, right-click the "plain" label at the end of
each line and download that.
.. _a_custom_theme:
@@ -42,8 +65,9 @@ Windows
Syntax and GUI Themes
=====================
Adding your own GUI and syntax themes is relatively easy. The themes are defined by simple plain
text config files with meta data and colour settings.
Adding your own GUI and syntax themes is relatively easy, although it requires that you manually
edit config files with colour values. The themes are defined by simple plain text config files with
meta data and colour settings.
In order to make your own versions, first copy one of the existing files to your local computer and
modify it as you like.
@@ -66,16 +90,16 @@ folders are created the first time you start novelWriter.
Once the files are copied there, they should show up in :guilabel:`Preferences` with the label you
set as ``name`` inside the file.
.. note::
In novelWriter 2.0 the ``icontheme`` value was added to GUI themes. Make sure you set this value
in existing custom themes. Otherwise it defaults to ``typicons_light``, which may not match your
theme colour scheme.
.. versionadded:: 2.0
The ``icontheme`` value was added to GUI themes. Make sure you set this value in existing custom
themes. Otherwise, novelWriter will try to guess your icon theme, and may not pick the most
suitable one.
Gustom GUI and Icons Theme
--------------------------
A GUI theme conf file consists of the follwing settings:
A GUI theme ``.conf`` file consists of the following settings:
.. code-block:: cfg
@@ -115,7 +139,7 @@ In the Main section you must at least define the ``name`` and ``icontheme`` sett
``typicons_light`` or ``typicons_dark``, or to an icon theme in your custom icons directory. The
setting must match the icon theme's folder name.
The Palette values correspond the the Qt enum values for QPalette::ColorRole, see the
The Palette values correspond to the Qt enum values for QPalette::ColorRole, see the
`Qt documentation <https://doc.qt.io/qt-5.15/qpalette.html#ColorRole-enum>`_ for more details. The
colour values are RGB numbers on the format ``r, g, b`` where each is an integer from to 255.
Omitted values are not loaded and will use default values.
@@ -124,7 +148,7 @@ Omitted values are not loaded and will use default values.
Custom Syntax Theme
-------------------
A syntax theme conf file consists of the follwing settings:
A syntax theme ``.conf`` file consists of the following settings:
.. code-block:: cfg
@@ -147,6 +171,7 @@ A syntax theme conf file consists of the follwing settings:
doublequotes = 0, 0, 0
singlequotes = 0, 0, 0
hidden = 0, 0, 0
shortcode = 0, 0, 0
keyword = 0, 0, 0
value = 0, 0, 0
spellcheckline = 0, 0, 0
@@ -154,7 +179,10 @@ A syntax theme conf file consists of the follwing settings:
replacetag = 0, 0, 0
modifier = 0, 0, 0
In the Main section, you must define at least the ``name`` setting. The Syntax colour values are
RGB numbers on the format ``r, g, b`` where each is an integer from to 255. Omitted values are set
RGB numbers of the format ``r, g, b`` where each is an integer from to 255. Omitted values default
to black, except ``background`` which defaults to white,
.. versionadded:: 2.2
The `shortcode` syntax colour entry was added, so you need to update your custom themes if you
made any before version 2.2.

View File

@@ -0,0 +1,64 @@
.. _a_glossary:
********
Glossary
********
.. glossary::
:sorted:
Root Folder
A "Root Folder" is a top level folder of the project tree in novelWriter. Each type of root
folder has a specific icon to identify it. For an overview of available root folder types,
see :ref:`a_proj_roots`.
Novel Documents
These are documents that are created under a "Novel" :term:`root folder`. They behave
differently than :term:`Project Notes`, and have some more restrictions. For instance, they
can not exist in folders intended only for project notes. See the :ref:`a_struct` chapter for
more details.
Project Notes
Project Notes are unrestricted documents that can be placed anywhere in your project. You
should not use these documents for story elements, only for notes. Project notes are the
source files used by the Tags and References system. See the :ref:`a_references` chapter for
more details on how to use them.
Tag
A tag is a user defined value assigned as a tag to a section of your :term:`Project Notes`.
It is optional, and can be defined once per heading. It is set using the :term:`keyword`
syntax ``@tag: value``, where ``value`` is the user defined part. Each tag can be referenced
in another file using one of the :term:`reference` keywords. See :ref:`a_references` chapter
for more details.
Reference
A reference is one of a set of :term:`keywords<keyword>` that can be used to link to a
:term:`tag` in another document. The reference keywords are specific to the different
:term:`root folder` types. A full overview is available in the :ref:`a_references` chapter.
Project Index
The project index is a record of all headings in a project, with all their meta data like
synopsis comments, :term:`tags<tag>` and :term:`references<reference>`. The project index is
kept up to date automatically, but can also be regenerated manually from the
:guilabel:`Tools` menu or by pressing :kbd:`F9`.
Context Menu
A context menu is a menu that pops up when you right click something in the user interface.
In novelWriter, you can often also open a context menu by pressing the keyboard shortcut
:kbd:`Ctrl+.`.
Headings
Each level of headings in :term:`Novel Documents` have a specific meaning in terms of the
structure of the story. That is, they determine what novelWriter considers a partition, a
chapter, a scene or a text section. For :term:`Project Notes`, the header levels don't
matter. For more details on headings in novel documents, see :ref:`a_struct_heads`.
Keyword
A keyword in novelWriter is a special command you put in the text of your documents. They are
not standard Markdown, but are used in novelWriter to add information that is interpreted by
the application. For instance, keywords are used for :term:`tags<tag>` and
:term:`references<reference>`.
Keywords must always be on their own line, and the first character of the line must always be
the ``@`` character. The keyword must also always be followed by a ``:`` character, and the
values passed to the command are added after this, separated by commas.

83
docs/source/int_howto.rst Normal file
View File

@@ -0,0 +1,83 @@
.. _a_howto:
*************
Tips & Tricks
*************
.. _Discussions Page: https://github.com/vkbo/novelWriter/discussions
This is a list of hopefully helpful little tips on how to get the most out of novelWriter.
.. note::
This section will be expanded over time. If you would like to have something added, feel free to
contribute, or start a discussion on the project's `Discussions Page`_.
Managing the Project
====================
.. dropdown:: Merge Multiple Documents Into One
:animate: fade-in-slide-down
If you need to merge a set of documents in your project into a single document, you can achieve
this by first making a new folder for just that purpose, and drag all the files you want merged
into this folder. Then you can right click the folder, select :guilabel:`Transform` and
:guilabel:`Merge Documents in Folder`.
In the dialog that pops up, the documents will be in the same order as in the folder, but you
can also rearrange them here of you wish. See :ref:`a_ui_tree_split_merge` for more details.
Layout Tricks
=============
.. dropdown:: Create a Simple Table
:animate: fade-in-slide-down
The formatting tools available in novelWriter don't allow for complex structures like tables.
However, the editor does render tabs in a similar way that regular word processors do. You can
set the width of a tab in :guilabel:`Preferences`.
The tab key should have the same distance in the editor as in the viewer, so you can align text
in columns using the tab key, and it should look the same when viewed next to the editor.
This is most suitable for your notes, as the result in exported documents cannot be guaranteed
to match.
Organising Your Text
====================
.. dropdown:: Add Introductory Text to Chapters
:animate: fade-in-slide-down
Sometimes chapters have a short preface, like a brief piece of text or a quote to set the stage
before the first scene begins.
If you add separate files for chapters and scenes, the chapter file is the perfect place to add
such text. Separating chapter and scene files also allows you to make scene files child
documents of the chapter (added in novelWriter 2.0).
.. dropdown:: Distinguishing Soft and Hard Scene Breaks
:animate: fade-in-slide-down
Depending on your writing style, you may need to separate between soft and hard scene breaks
within chapters. Like for instance if you switch point-of-view character often.
In such cases you may want to use the scene heading for hard scene breaks and section headings
for soft scene breaks. the :guilabel:`Build Manuscript` tool will let you add separate
formatting for the two when you generate your manuscript. You can for instance add the common
"``* * *``" for hard breaks and select to hide section breaks, which will just insert an empty
paragraph in their place. See :ref:`a_manuscript_settings` for more details.
Other Tools
===========
.. dropdown:: Convert Project to/from yWriter Format
:animate: fade-in-slide-down
There is a tool available that lets you convert a `yWriter <http://spacejock.com/yWriter7.html>`_
project to a novelWriter project, and vice versa.
The tool is available at `peter88213.github.io/yw2nw <https://peter88213.github.io/yw2nw/>`__

View File

@@ -4,63 +4,81 @@
Key Features
************
.. _Snowflake : https://www.advancedfictionwriting.com/articles/snowflake-method/
.. _Snowflake: https://www.advancedfictionwriting.com/articles/snowflake-method/
.. _Markdown: https://en.wikipedia.org/wiki/Markdown
At the core, novelWriter is a multi-document plain text editor. It uses a markup syntax inspired by
Markdown to apply simple formatting to the text. It is designed for writing fiction, so the
formatting features are limited to those relevant for this purpose. It is not suitable for
technical writing.
At its core, novelWriter is a multi-document plain text editor. It uses a markup syntax inspired by
Markdown_ to apply simple formatting to the text. It is designed for writing fiction, so the
formatting features available are limited to those relevant for this purpose. It is *not* suitable
for technical writing, and it is *not* a full-featured Markdown editor.
Your novel project is organised as a collection of separate plain text documents instead of a
single, large document. The idea here is to make it easier to reorganise your project structure
without having to cut and paste text.
single, large document. The idea is to make it easier to reorganise your project structure without
having to cut and paste text between chapters.
You can at any point split documents by their header, or merge multiple documents into single
documents. This makes it easier to use variations of the popular Snowflake_ method for writing.
There are two kinds of documents in your project: :term:`Novel Documents` are documents that are
part of your story. The other kind of documents are :term:`Project Notes`. These are intended for
your notes about your characters, your world building, and so on.
You can at any point split the individual documents by their headers up into multiple documents, or
merge multiple documents into single documents. This makes it easier to use variations of the
Snowflake_ method for writing. You can start by writing larger structure-focused documents, like
one per act for instance, and later effortlessly split these up into scenes by their headers.
Below are some key features of novelWriter.
**Focus on writing**
The aim of the user interface is to let the user focus on writing instead of spending time
formatting text. Formatting is therefore limited to a small set of formatting tags for simple
things like text emphasis and paragraph alignment. When you really want to focus on just
writing, you can switch the editor into :guilabel:`Focus Mode` where only the text editor window
itself is vissible.
The aim of the user interface is to let you focus on writing instead of spending time formatting
text. Formatting is therefore limited to a small set of formatting tags for simple things like
text emphasis and paragraph alignment. When you really want to focus on just writing, you can
switch the editor into :guilabel:`Focus Mode` where only the text editor panel itself is
visible, and the project structure view is hidden away.
**Keep an eye on your notes**
The main window can optionally show a document viewer to the right of the editor. This view
panel is intended for displaying another scene document, you character notes, plot notes, or any
other document you may need to reference while writing.
panel is intended for displaying another scene document, your character notes, plot notes, or any
other document you may need to reference while writing. It is not intended as a preview panel
for the document you're editing, but if you wish, you can also use it for this purpose.
**Organise your documents how you like**
You can split your novel project up into as many individual documents as you want to. When you
build the project, they are all glued together in the top-to-bottom order in which they appear
in the project tree. You can use as few text documents as you like, but splitting the project up
into chapters and scenes means you can easily reorder them using the drag and drop feature. You
can start out with a few documents and then later split the document into multiple documents
based on its headers.
build the project into a manuscript, they are all glued together in the top-to-bottom order in
which they appear in the project tree. You can use as few text documents as you like, but
splitting the project up into chapters and scenes means you can easily reorder them using the
drag-and-drop feature of the project tree. You can also start out with a few documents and then
later split them into multiple documents based on their headers.
**Multi-novel project support**
As of novelWriter 2.0, you can have multiple Novel type root folders in a project. This allows
you to keep a series of individual novels with the same characters and world building in the
same project, and create manuscripts for them individually.
**Keep track of your plot elements**
All notes in your project can be assigned a *tag* you can *reference* from any other document or
note. In fact, you can add a new tag under each heading of a note if you need to be able to
reference a specific section. Note tags are organised into categories with specific reference
keywords.
All notes in your project can be assigned a :term:`tag` that you can :term:`reference` from any
other document or note. In fact, you can add a new tag under each heading of a note if you need
to be able to reference specific sections of it.
**Get an overview of your plot elements**
**Get an overview of your story**
In the :guilabel:`Outline View` on the main window you can see an outline of all the chapters,
scenes, and sections of your project. If they have any references in them, these are listed in
additional columns. You can also add a synopsis to each document, which can be listed here as
well. You have the option to add or remove columns of information from this outline. A subset of
the outline information is also available in the :guilabel:`Novel View` as a replacement for the
main project tree.
additional columns. You can also add a synopsis to each chapter or scene, which can be listed
here as well. You have the option to add or remove columns of information from this outline. A
subset of the outline information is also available in the :guilabel:`Novel View` as an
alternative view to the project tree.
**Get an overview of your story elements**
Under the document viewer panel you will find a series of tabs that shows the different story
elements you have created tags for. The tabs are sorted into Characters, Plots, etc, depending
on which categories you are using in your story. This panel can be hidden when you don't need it
to free up space.
**Building your manuscript**
Whether you want to compile a manuscript, or export all your notes, or generate an outline of
your chapters and scenes with a synopsis, you can use the :guilabel:`Build Novel Project` tool.
The tool lets you select what information you want to include in the generated document, and how
it is formatted. You can send the result to a printer, a PDF, or to an Open Document file that
can be opened by most office type word processors. You can also generate the result as HTML, or
Markdown, both suitable for further conversion to other formats.
Whether you want to assemble a manuscript, or export all your notes, or generate an outline of
your chapters and scenes with a synopsis, you can use the :guilabel:`Build Manuscript` tool to
do so. The tool lets you select what information you want to include in the generated document,
and how it is formatted. You can send the result to a printer, a PDF, or to an Open Document
file that can be opened by most office type word processors. You can also generate the result
as HTML, or Markdown, both suitable for further conversion to other formats.
.. _a_intro_screenshots:
@@ -68,12 +86,12 @@ Below are some key features of novelWriter.
Screenshots
===========
**novelWriter with default theme:**
.. figure:: images/screenshot_default.png
:class: dark-light
.. image:: images/screenshot_default.png
:width: 800
novelWriter with light colour theme
**novelWriter with dark theme:**
.. figure:: images/screenshot_dark.png
:class: dark-light
.. image:: images/screenshot_dark.png
:width: 800
novelWriter with dark colour theme

View File

@@ -10,83 +10,83 @@ Overview
:align: right
:width: 220
novelWriter is built on `Python 3 <https://www.python.org/>`_, a cross platform programming
language that doesn't require a compiler to build and run. That means that the code can run on your
computer right out of the box, or from a zip file.
novelWriter is built as a cross-platform application using `Python 3 <https://www.python.org/>`_ as
the programming language, and `Qt 5 <https://www.qt.io/>`_ for the user interface.
While it is developed for Linux primarily, it runs just fine on Windows as well. It also works fine
on macOS, but the author is not a mac user, so support for mac is dependant on user feedback and
novelWriter is built for Linux first, and this is where it works best. However, it also runs fine
on Windows and MacOS due to the cross-platform framework it's built on. The author of the
application doesn't own a Mac, so on-going Mac support is dependent on user feedback and user
contributions.
In order to run novelWriter, you also need a few additional packages. The user interface is built
with `Qt 5 <https://www.qt.io/>`_, a cross platform library for building graphical user interface
applications. It also uses a third party XML package. If you want spell checking, you also need the
spell check package Enchant developed for AbiWord
Spell checking in novelWriter is provided by a third party library called
`Enchant <https://abiword.github.io/enchant/>`_. Please see the section on :ref:`a_custom_dict` for
how to install spell checking languages.
For install instructions, see :ref:`a_started`.
For information on how to add spell check dictionaries, see :ref:`a_custom_dict`.
Using novelWriter
=================
In order to use novelWriter effectively, you need to know the basics of how it works. The following
sections will explain the main principles. It starts with the basics, and gets more detailed as you
chapters will explain the main principles. It starts with the basics, and gets more detailed as you
read on.
:ref:`a_breakdown` – Essential Information
This section explains the basics of how the application works and what it can and cannot do.
This chapter explains the basics of how the application works and what it can and cannot do.
:ref:`a_ui` – Recommended Reading
This section will give you a more detailed explanation of what the various elements on the user
interface do and how you can use them more effectively.
:ref:`a_ui_project` – Recommended Reading
This chapter will give you a more detailed explanation of how you can use the user interface
components to organise and view your project work.
:ref:`a_ui_writing` – Recommended Reading
This chapter will give you a more detailed explanation of how the text editor and viewer work.
:ref:`a_fmt` – Essential Information
This section covers how you should format your text. The editor is plain text, so text
formatting requires some basic markup. The structure of your novel is also inferred by how you
use headings. Tags and references are implemented by simple codes.
This chapter covers how you should format your text. The editor is plain text, so text
formatting requires some basic markup. The structure of your novel is also inferred from how you
use headings. Tags and references are implemented by special keywords.
:ref:`a_kb` – Optional / Lookup
This section lists all the keyboard shortcuts in novelWriter and what they do. Most of the
shortcuts are also listed next to the menu items inside the app, or in tool tips, so this
section is mostly for reference.
This chapter lists all the keyboard shortcuts in novelWriter and what they do. Most of the
shortcuts are also listed next to their menu entries inside the app, or in tool tips. This
chapter is mostly for reference.
:ref:`a_typ` – Optional
This section gives you an overview of the special typographical symbols available in
This chapter gives you an overview of the special typographical symbols available in
novelWriter. The auto-replace feature can handle the insertion of standard quote symbols for
your language, and other special characters. If you use any symbols aside from these. their
your language, and other special characters. If you use any symbols aside from these, their
intended use is explained here.
:ref:`a_prjfmt` – Optional
This section is more technical and has an overview of changes made to the way your project data
This chapter is more technical and has an overview of changes made to the way your project data
is stored. The format has changed a bit from time to time, and sometimes the changes require
that you make small modifications to your project. Everything you need to know is listed in this
section.
chapter.
Organising Your Projects
========================
In addition to manage a collection of plain text files, novelWriter can interpret and map the
In addition to managing a collection of plain text files, novelWriter can interpret and map the
structure of your novel and show you additional information about its flow and content. In order
to take advantage of these features, you must structure your text in a specific way and add some
meta data for it to extract.
:ref:`a_proj` – Essential Information
This section explains how you organise the content of your project, and how to set up automated
This chapter explains how you organise the content of your project, and how to set up automated
backups of your work.
:ref:`a_struct` – Essential Information
This section covers the way your novel's structure is encoded into the text documents. It
explains how the different levels of headings are used, and how you can include information
about characters, plot elements, and other meta data in your text.
This chapter covers the way your novel's structure is encoded into the text documents. It
explains how the different levels of headings are used, and some special formatting for
different kinds of headings.
:ref:`a_notes` - Recommended Reading
This section briefly describes what novelWriter does with the note files you add to your
project. Generally, the application doesn't do much with them at all aside from looking through
them for tags you've set so that it knows which file to open when you click on a reference.
:ref:`a_references` - Recommended Reading
This chapter explains how you organise your notes, and how the Tags and References system works.
This system lets you cross-link your documents in your project, and display these references in
the application interface.
:ref:`a_export` - Recommended Reading
This section explains in more detail how the build tool works. In particular how you can
control the way chapter titles are formatted, and how scene and section breaks are handled.
:ref:`a_manuscript` - Recommended Reading
This chapter explains how the :guilabel:`Manuscript Build` tool works, how you can control the
way chapter titles are formatted, and how scene and section breaks are handled.

View File

@@ -4,55 +4,54 @@
Getting Started
***************
.. _brew docs: https://docs.brew.sh/Homebrew-and-Python
.. _Enchant: https://abiword.github.io/enchant/
.. _GitHub: https://github.com/vkbo/novelWriter
.. _macOS: https://github.com/vkbo/novelWriter/issues/867
.. _main website: https://novelwriter.io
.. _PPA: https://launchpad.net/~vkbo/+archive/ubuntu/novelwriter
.. _Pre-Release PPA: https://launchpad.net/~vkbo/+archive/ubuntu/novelwriter-pre
.. _PyPi: https://pypi.org/project/novelWriter/
.. _python.org: https://www.python.org/downloads/windows
.. _python.org: https://www.python.org/downloads/
.. _Releases: https://github.com/vkbo/novelWriter/releases
.. _RPM: https://github.com/vkbo/novelWriter/issues/907
.. _AppImage: https://appimage.org/
If you are using Windows or a Debian-based Linux distribtuion, you can install novelWriter from
package installers. If you are on macOS, you have the option to run novelWriter from a standalone
folder. See :ref:`a_started_minimal`. This option is also available for Windows and Linux. The
third option is to install novelWriter from the Python Package Index. See :ref:`a_started_pip`.
Ready-made packages and installers for novelWriter are available for all major platforms, including
Linux, Windows and MacOS. See below for install instructions for each platform.
You can also install novelWriter from the Python Package Index (PyPi). See :ref:`a_started_pip`.
Installing from PyPi does not set up icon launchers, so you will either have to do this yourself,
or start novelWriter from the command line.
Spell checking in novelWriter is provided by a third party library called Enchant_. Generally, it
should pull dictionaries from your operating system automatically. However, on Windows they must be
installed manually. See :ref:`a_custom_dict` for more details.
.. admonition:: Help Wanted
:class: seealso
If you would like to help making more installers, the project is currently looking for people
who can help make releases for Red Hat-based Linux distros (RPM) and for macOS. See the issues
posted for RPM_ and macOS_ on GitHub_.
.. _a_started_windows:
Install on Windows
==================
Installing on Windows
=====================
You can install novelWriter with both Python and library dependencies embedded using the Windows
Installer (setup.exe) file from the `main website`_, or from the Releases_ page on GitHub.
Installer (setup.exe) file from the `main website`_, or from the Releases_ page on GitHub_.
Installing it should be straightforward.
If you have any issues, try uninstalling the previous version and making a fresh install. If you
already had a version installed via a different method, you should uninstall that first.
already had a version installed via a different method, you should uninstall that first as having
multiple installations has been known to cause problems.
.. note::
The novelWriter installer is not signed because Microsoft doesn't currently provide a way for
non-profit open source projects to properly sign their installers. The novelWriter project
doesn't have the funding to pay for commercial software signing certificates. You will therefore
see an additional warning about this when you download the installer.
.. _a_started_linux:
Install on Linux
================
Installing on Linux
===================
A Debian package can be downloaded from the `main website`_, or from the Releases_ page on GitHub.
A Debian package can be downloaded from the `main website`_, or from the Releases_ page on GitHub_.
This package should work on both Debian, Ubuntu and Linux Mint, at least.
If you prefer, you can also add the novelWriter repository on Launchpad to your package manager.
@@ -69,21 +68,21 @@ You can add the Ubuntu PPA_ and install novelWriter with the following commands.
sudo apt update
sudo apt install novelwriter
If you want pre-releases, add the ``ppa:vkbo/novelwriter-pre`` repository instead.
If you want the `Pre-Release PPA`_ instead, add the ``ppa:vkbo/novelwriter-pre`` repository.
Debian and Mint
---------------
Since this is a pure Python package, the Launchpad PPA can in principle also be used on Debian or
Mint. However, the above command will fail to add the signing key.
Mint. However, the above command will fail to add the signing key, as it is Ubuntu-specific.
Instead, run the following commands to add the repository and key:
.. code-block:: bash
sudo gpg --no-default-keyring --keyring /usr/share/keyrings/novelwriter-ppa-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys F19F1FCE50043114
echo "deb [signed-by=/usr/share/keyrings/novelwriter-ppa-keyring.gpg] http://ppa.launchpad.net/vkbo/novelwriter/ubuntu focal main" | sudo tee /etc/apt/sources.list.d/novelwriter.list
echo "deb [signed-by=/usr/share/keyrings/novelwriter-ppa-keyring.gpg] http://ppa.launchpad.net/vkbo/novelwriter/ubuntu jammy main" | sudo tee /etc/apt/sources.list.d/novelwriter.list
Then run the update and install commands as for Ubuntu:
@@ -93,9 +92,16 @@ Then run the update and install commands as for Ubuntu:
sudo apt install novelwriter
.. note::
You may need to use the Ubuntu 20.04 (focal) packages for Debian 11 or earlier. The newer Ubuntu
packages use a different compression algorithm that may not be supported.
Please use the Ubuntu 20.04 (focal) packages for Debian. The newer Ubuntu packages use a
different compression algorithm that Debian doesn't currently support.
.. tip::
If you get an error message like ``gpg: failed to create temporary file`` when importing the key
from the Ubuntu keyserver, try creating the folder it fails on, and import the key again:
.. code-block:: bash
sudo mkdir /root/.gnupg/
AppImage Releases
@@ -105,125 +111,50 @@ For other Linux distros than the ones mentioned above, the primary option is App
completely standalone images for the app that include the necessary environment to run novelWriter.
They can of course be run on any Linux distro, if you prefer this to native packages.
.. _a_started_minimal:
Minimal Package Install
=======================
On the `main website`_ and on the Releases_ page on GitHub you will also find "Minimal Package"
install files for Windows, Linux and macOS. These are zip files of just the files you need to run
novelWriter on that specific platform.
These zip files don't include any dependencies, so you must install them separately.
.. note::
novelWriter generally don't support Python versions that have reached end of life. If your Linux
distro still uses older Python versions and novelWriter won't run, you may want to try the
AppImage instead.
.. _a_started_minimal_windows:
.. _a_started_macos:
Minimal Package on Windows
--------------------------
Installing on MacOS
===================
First, make sure you have Python installed on your system. If you don't, you can download it from
`python.org`_. Python 3.7 or higher is required, but it is recommended that you install the latest
version.
You can install novelWriter with both its Python and library dependencies embedded using the DMG
application image file from the `main website`_, or from the Releases_ page on GitHub_. Installing
it should be straightforward.
Make sure you select the "Add Python to PATH" option during installation, otherwise the ``python``
command will not work in the command line window.
* Download the DMG file and open it. Then drag the novelWriter icon to the :guilabel:`Applications`
folder on the right. This will install it into your :guilabel:`Applications`.
* The first time you try to launch it, it will say that the bundle cannot be verified, simply press
the :guilabel:`Open` button to add an exception.
* If you are not presented with an :guilabel:`Open` button in the dialog launch the application
again by right clicking on the application in Finder and selecting :guilabel:`Open` from the
context menu.
.. figure:: images/python_win_install.png
:align: center
:width: 500
When Python is installed, extract the novelWriter zip file and move the extracted folder to a
suitable location. You should probably not keep it on your desktop or in your downloads folder
where it may be accidentally deleted. Instead, move and rename it to for instance
``C:\novelWriter``.
After you've got the folder where you want it, open it and double-click the file named
``windows_install.bat``. This will open a command line window and run the setup script to install
dependencies, and add desktop and start menu icons.
Running ``windows_uninstall.bat`` will reverse the process if you wish to uninstall. After that,
you can just delete the novelWriter folder.
.. _a_started_minimal_linux:
Minimal Package on Linux
------------------------
On Linux you need to install the following packages on Debian-based distros, including Ubuntu and
Linux Mint:
.. code-block:: bash
sudo apt install python3-pyqt5 python3-lxml python3-enchant
On Fedora, you need the following packages:
.. code-block:: bash
sudo dnf install python3-qt5 python3-lxml python3-enchant
A standard desktop launcher can be installed via the main setup script. It will create the needed
desktop file and add it to the Applications menu. The necessary icons will also be installed, and a
file association with ``.nwx`` project files added.
To set this up, run the following from inside the extracted novelWriter folder:
.. code-block:: bash
python3 setup.py xdg-install
This installs icons for the current user. Run with ``sudo`` to install system-wide.
To uninstall the icons, run:
.. code-block:: bash
python3 setup.py xdg-uninstall
.. _a_started_minimal_mac:
Minimal Package on macOS
------------------------
These instructions assume you're using brew, and have Python and pip set up. If not, see the
`brew docs`_ for help. The main requirements for novelWriter are installed via the requirements
file. You also need to install the ``pyobjc`` package, so you should run:
.. code-block:: bash
pip3 install --user -r requirements.txt
pip3 install --user pyobjc
For spell checking you may also need to install the enchant package. It comes with a lot of default
dictionaries.
.. code-block:: bash
brew install enchant
With the dependencies in place, you can launch the ``novelWriter.py`` script directly to run
novelWriter.
The context menu can also be accessed by option-clicking if you have a one button mouse. This is
done by holding down the option key on your keyboard and clicking on the application in Finder.
.. note::
Right now there isn't a better integration with macOS available. Contributions from someone more
familiar with macOS would be very much appreciated. See the macOS_ issue on GitHub.
The novelWriter DMG is not signed because Apple doesn't currently provide a way for non-profit
open source projects to properly sign their installers. The novelWriter project doesn't have the
funding to pay for commercial software signing certificates.
.. _a_started_pip:
Install from PyPi
=================
Installing from PyPi
====================
novelWriter is also available on the Python Package Index, or PyPi_. This install method works on
all supported operating systems.
To install from PyPi you must first have the ``python`` and ``pip`` commands available on your
system. If you don't, see specific instructions for your operating system in this documentation on
how to get the Python environment set up.
system. You can download Python from `python.org`_. It is recommended that you install the latest
version. If you are on Windows, also make sure to select the "Add Python to PATH" option during
installation.
To install novelWriter from PyPi, use the following command:
@@ -244,7 +175,4 @@ When installing via pip, novelWriter can be launched from command line with:
novelwriter
Make sure the install location for pip is in your PATH variable. This is not always the case by
default.
.. note::
On systems with both Python 2 and 3, you may have to replace the ``pip`` command with ``pip3``.
default, and then you may get a "Not Found" error when running the ``novelwriter`` command.

View File

@@ -1,159 +0,0 @@
.. _a_export:
***********************
Building the Manuscript
***********************
You can at any time build a manuscript, an outline of your notes, or any other type of document
from the text in your project. All of this is handled by the :guilabel:`Build Novel Project` tool.
You can activate it from the sidebar, the :guilabel:`Tools` menu, or by pressing :kbd:`F5`.
.. note::
This tool is scheduled to receive a full update in novelWriter 2.1, adding many new features
requested by users. See the `2.1 Milestone <https://github.com/vkbo/novelWriter/milestone/43>`_
for an overview.
.. _a_export_headers:
Header Formatting
=================
The titles for the five types of headings (the chapter headings come in a numbered and unnumbered
version) of story structure can be formatted collectively in the build tool. This is done through
a series of keyword–replace steps. They are all on the format ``%keyword%``.
``%title%``
This keyword will always be replaced with the title text you put after the ``#`` characters in
your document.
``%ch%``
This will be replaced by a chapter number. The number is incremented by one each time the build
tool sees a new heading of level two in a document, unless the heading formatting code has the
added ``!``. In the latter case, the counter is *not* incremented. This is useful for for
instance Prologue and Epilogue chapters.
``%chw%``
Behaves like ``%ch%``, but the number is represented as a number word. You can select between a
number of different languages.
``%chi%``
Begaves like ``%ch%``, but represented as a lower case Roman number from 1 to 4999.
``%chI%``
Behaves like ``%ch%``, but represented as an upper case Roman number from 1 to 4999.
``%sc%``
This is the number counter equivalent for scenes. These are incremented each time a heading of
level three is encountered, but reset to 1 each time a chapter is encountered. They can thus be
used for counting scenes within a chapter.
``%sca%``
Behaves like ``%sc%``, but the number is *not* reset to 1 for each chapter. Instead it runs from
1 from the beginning of the novel to produce an absolute scene count.
``\\``
This inserts a line break within the title.
.. note::
Header formatting only applies to novel documents. Headings in notes will be left as-is.
**Example**
* The format ``%title%`` just reproduces the title you set in the document.
* The format ``Chapter %ch%: %title%`` produces something like "Chapter 1: My Chapter Title".
* The format ``Scene %ch%.%sc%`` produces something like "Scene 1.2" for scene 2 in chapter 1.
.. _a_export_scenes:
Scene Separators
================
If you don't want any titles for your scenes (or for your sections if you have them), you can leave
the formatting boxes empty. If so, an empty paragraph will be inserted between the scenes or
sections instead, resulting in a gap in the text.
Alternatively, if you want a separator between them, like the common ``* * *``, you can enter the
desired separator text in the formatting box. In fact, if the format is a piece of static text, it
will always be treated as a separator.
.. _a_export_files:
File Selection
==============
Which documents and notes are selected for the build can be controlled from the options on the left
side of the dialog window. In addition, you can select to include the synopsis comments, regular
comments, keywords, and even exclude the body text itself if you just want an outline.
.. tip::
If you for instance want to export a document with an outline of the novel, you can enable
keywords and synopsis export and disable body text, thus getting a document with each heading
followed by the tags and references and the synopsis.
If you need to exclude specific documents from your exports, like draft documents or documents you
want to take out of your manuscript, but don't want to delete, you can set the documents as
"inactive" in the project tree. :guilabel:`Build Novel Project` tool has a switch to collectively
exclude inactive documents.
.. _a_export_print:
Printing
========
The print button allows you to print the content in the preview window. You can either print to one
of your system's printers, or print directly to a file as PDF. You can also print to file from the
regular print dialog. The direct to file option is just a shortcut.
.. note::
The paper format should in all cases default to whatever your system default is. Of you want to
change it, you have to select it from the :guilabel:`Print Preview`` dialog.
.. _a_export_formats:
Export Formats
==============
Currently, six formats are supported.
Open Document Format
The Build tool can produce either an ``.odt`` file, or an ``.fodt`` file. The latter is just a
flat version of the document format as a single XML file. Most rich text editors support the
former, and a few the latter.
novelWriter HTML
The HTML format writes a single ``.htm`` file with minimal style formatting. The HTML document
is suitable for further processing by document conversion tools like Pandoc, for importing in
word processors, or for printing from browser.
novelWriter Markdown
This is simply a concatenation of the project documents selected by the filters. The documents
are stacked together in the order they appear in the project tree, with comments, tags, etc.
included if they are selected. This is a useful format for exporting the project for later
import back into novelWriter.
Standard/GitHub Markdown
The Markdown format comes in both Standard and GitHub flavour. The *only* difference in terms of
novelWriter functionality is the support for strikethrough text, which is not supported by the
Standard flavour, but *is* supported by the GitHub flavour.
.. _a_export_options:
Additional Formats
==================
In addition to the above document formats, the novelWriter HTML and Markdown formats can also be
wrapped in a JSON file. These files will have a meta data entry and a body entry. For HTML, also
the accompanying css styles are included.
The text body is saved in a two-level list. The outer list contains one entry per document, in the
order they appear in the project tree. Each document is then split up into a list as well, with one
entry per paragraph it contains.
These files are mainly intended for scripted post-processing for those who want that option. A JSON
file can be imported directly into a Python dict object or a PHP array, to mentions a few options.

View File

@@ -0,0 +1,185 @@
.. _a_manuscript:
***********************
Building the Manuscript
***********************
You can at any time build a manuscript, an outline of your notes, or any other type of document
from the text in your project. All of this is handled by the :guilabel:`Manuscript Build` tool.
You can activate it from the sidebar, the :guilabel:`Tools` menu, or by pressing :kbd:`F5`.
.. versionadded:: 2.1
This tool is new for version 2.1. A simpler tool was used for earlier versions. The simpler tool
only allows you to define a single set of options for the build, but otherwise has much the same
functionality.
.. _a_manuscript_main:
The Manuscript Build Tool
=========================
.. figure:: images/fig_manuscript_build.png
The :guilabel:`Manuscript Build` tool main window.
The main window of the :guilabel:`Manuscript Build` tool contains a list of all the builds you have
defined, a selection of settings, and a few buttons to generate preview, open the print dialog, or
run the build to create a manuscript document.
.. _a_manuscript_settings:
Build Settings
==============
Each build definition can be edited by opening it in the :guilabel:`Manuscript Build Settings`
dialog, either by double-clicking or by selecting it and pressing the edit button in the toolbar.
.. tip::
You can keep the :guilabel:`Manuscript Build Settings` dialog open while testing the different
options, and just hit the :guilabel:`Apply` button. You can test the result of your settings
by pressing the :guilabel:`Preview` button in the main :guilabel:`Manuscript Build` window.
When you're happy with the result, you can close the settings.
Document Selection
------------------
.. figure:: images/fig_build_settings_selections.png
The :guilabel:`Selections` page of the :guilabel:`Manuscript Build Settings` dialog.
The :guilabel:`Selections` page of the :guilabel:`Manuscript Build Settings` dialog allows you to
fine tune which documents are included in the build. They are indicated by a green arrow icon in
the last column. On the right you have some filter options for selecting content of a specific
type, and a set of switches for which root folders to include.
You can override the result of these filters by marking one or more documents and selecting to
explicitly include or exclude them by using the buttons below the tree view. The last button can be
used to reset the override and return control to the filter settings.
In the figure, the green arrow icon and the blue pin icon indicates which documents are included,
and the red forbidden icon indicates that a document is explicitly excluded.
Formatting Headings
-------------------
.. figure:: images/fig_build_settings_headings.png
The :guilabel:`Headings` page of the :guilabel:`Manuscript Build Settings` dialog.
The :guilabel:`Headings` page of the :guilabel:`Manuscript Build Settings` dialog allows you to set
how the headings in your :term:`Novel Documents` are formatted. By default, the title is just
copied as-is, indicated by the ``{Title}`` format. You can change this to for instance add chapter
numbers and scene numbers like shown int he figure above.
Clicking the edit button next to a format will copy the formatting string into the edit box where
it can be modified, and where a syntax highlighter will help indicate which parts are automatically
generated by the build tool. The :guilabel:`Insert` button is a dropdown list of these formats, and
selecting one will insert it at the position of the cursor.
Any text you add that isn't highlighted in colours will remain in your formatted titles.
``{Title}`` will always be replaced by the text in the heading from your documents.
You can preview the result of these format strings by clicking :guilabel:`Apply`, and then clicking
:guilabel:`Preview` in the :guilabel:`Manuscript Build` tool main window.
Scene Separators
^^^^^^^^^^^^^^^^
If you don't want any titles for your scenes (or for your sections if you have them), you can leave
the formatting boxes empty. If so, an empty paragraph will be inserted between the scenes or
sections instead, resulting in a gap in the text. You can also switch on the :guilabel:`Hide`
setting, which will ignore them completely. That is, there won't even be an extra gap inserted.
Alternatively, if you want a separator text between them, like the common ``* * *``, you can enter
the desired separator text as the format. If the format is any piece of static text, it will always
be treated as a separator.
Output Settings
---------------
The :guilabel:`Content`, :guilabel:`Format` and :guilabel:`Output` pages of the
:guilabel:`Manuscript Build Settings` dialog control a number of other settings for the output.
Some of these only apply to specific output formats, which is indicated by the section headings on
the settings pages.
.. _a_manuscript_build:
Building Manuscript Documents
=============================
.. figure:: images/fig_build_build.png
The :guilabel:`Manuscript Build` dialog used for writing the actual manuscript documents.
When you press the :guilabel:`Build` button on the :guilabel:`Build Manuscript` tool main window, a
special file dialog opens up. This is where you pick your desired output format and where to write
the file.
On the left side of the dialog is a list of all the available file formats, and on the right, a
list of the documents which are included based on the build definition you selected. You can choose
an output path, and set a base file name as well. The file extension will be added automatically.
To generate the manuscript document, press the :guilabel:`Build` button. A small progress bar will
show the build progress, but for small projects it may pass very fast.
File Formats
------------
Currently, four document formats are supported.
Open Document Format
The Build tool can produce either an ``.odt`` file, or an ``.fodt`` file. The latter is just a
flat version of the document format as a single XML file. Most rich text editors support the
former, and only a few the latter.
novelWriter HTML
The HTML format writes a single ``.htm`` file with minimal style formatting. The HTML document
is suitable for further processing by document conversion tools like Pandoc, for importing in
word processors, or for printing from browser.
novelWriter Markup
This is simply a concatenation of the project documents selected by the filters into a ``.txt``
file. The documents are stacked together in the order they appear in the project tree, with
comments, tags, etc. included if they are selected. This is a useful format for exporting the
project for later import back into novelWriter.
Standard/Extended Markdown
The Markdown format comes in both Standard and Extended flavour. The *only* difference in terms
of novelWriter functionality is the support for strikethrough text, which is not supported by
the Standard flavour.
Additional Formats
------------------
In addition to the above document formats, the novelWriter HTML and Markup formats can also be
wrapped in a JSON file. These files will have a meta data entry and a body entry. For HTML, also
the accompanying CSS styles used by the preview are included.
The text body is saved in a two-level list. The outer list contains one entry per document, in the
order they appear in the project tree. Each document is then split up into a list as well, with one
entry per paragraph it contains.
These files are mainly intended for scripted post-processing for those who want that option. A JSON
file can be imported directly into a Python dict object or a PHP array, to mentions a few options.
.. _a_manuscript_print:
Print and PDF
=============
The :guilabel:`Print` button allows you to print the content in the preview window. You can either
print to one of your system's printers, or select PDF as your output format from the printer icon
on the print dialog.
.. note::
The paper format should in all cases default to whatever your system default is. If you want to
change it, you have to select it from the :guilabel:`Print Preview` dialog.

View File

@@ -1,72 +0,0 @@
.. _a_notes:
*************
Project Notes
*************
novelWriter doesn't have a database and complicated forms for filling in details about plot
elements, characters, and all sorts of additional information that isn't a part of the novel text
itself. Instead, all such information is saved in notes that are written and maintained just like
all other text in your project.
The relation between all these additional elements is extracted from the documents and notes by the
project indexer, based on the tags and references you set within them.
Using notes is not required, but making at least minimal notes for each plot element, and adding a
tag to them, makes it possible to use the Outline View to see how each element intersects with each
section of the novel itself, and adds clickable cross-references between documents in the editor
and viewer.
.. _a_notes_tags:
Tags in Notes
=============
Each new heading in a note can have a tag associated with it. The format of a tag is
``@tag: tagname``, where tagname is a unique identifier of your choosing. Tags can then be
referenced in the novel documents, or cross-referenced in other notes, and will show up in the
Outline View and in the back-reference panel when a document is opened in the viewer. See
:ref:`a_struct_tags` for how to reference notes.
The syntax highlighter will alert the user that the keyword is correctly used and that the tag is
allowed, that is, the tag is unique. Duplicate tags should be detected as long as the index is up
to date. An invalid tag should have a green wiggly line under it, and will not receive the syntax
colour that valid tags do.
The tag is the only part of these notes that the application uses. The rest of the document content
is there for the writer to use in whatever way they wish. Of course, the content of the documents
can be added to the manuscript, or an outline document. If you want to compile a single document of
all your notes, you can do this from the :guilabel:`Build Novel Project` tool.
One note can also reference another note in the same way novel documents do. When the note is
opened in the view panel, the references become clickable links, making it easier to follow
connections in the plot. Notes don't show up in the Outline View though, so referencing between
notes is only meaningful if you want to be able to click-navigate between them, or of course if you
just want to highlight that two notes are related.
.. tip::
If you cross-reference between notes and export your project as an HTML document using the
:guilabel:`Build Novel Project` tool, the cross-references become clickable links in the
exported HTML document.
Example of a project note with two headers, with separate tags, and with references to other notes:
.. code-block:: none
:linenos:
# Main Characters
## Jane Doe
@tag: Jane
@location: Earth
Something about Jane ...
## John Doh
@tag: John
@location: Mars
Something about John ...

View File

@@ -5,11 +5,11 @@ Novel Projects
**************
New projects can be created from the :guilabel:`Project` menu by selecting :guilabel:`New Project`.
This will open the :guilabel:`New Project Wizard` that will assist you in creating a barebone
This will open the :guilabel:`New Project Wizard` that will assist you in creating a bare bone
project suited to your needs.
A novelWriter project requires a dedicated folder for storing its files on the local file system.
See :ref:`a_storage` for further details on how files are organised.
If you're interested in the details, you can have a look at the chapter :ref:`a_storage`.
A list of recently opened projects is maintained, and displayed in the :guilabel:`Open Project`
dialog. A project can be removed from this list by selecting it and pressing the :kbd:`Del` key or
@@ -29,92 +29,70 @@ Project Roots
Projects are structured into a set of top level folders called "Root Folders". They are visible in
the project tree at the left side of the main window.
The novel documents go into a root folder of type :guilabel:`Novel`. Project notes go into the
other root folders. These other root folder types are intended for your notes on the various
elements of your story. Using them is of course entirely optional.
The :term:`novel documents` go into a root folder of type :guilabel:`Novel`. :term:`Project notes`
go into the other root folders. These other root folder types are intended for your notes on the
various elements of your story. Using them is of course entirely optional.
A new project may not have all of the root folders present, but you can add the ones you want from
the project tree tool bar.
Each root folder has one or more reference keyword associated with it that is used to reference
them from other documents and notes. The intended usage of each type of root folder is listed
below. However, aside from the :guilabel:`Novel` folder, no restrictions are applied by the
Each root folder has one or more :term:`reference` :term:`keyword` associated with it that is used
to reference them from other documents and notes. The intended usage of each type of root folder is
listed below. However, aside from the :guilabel:`Novel` folder, no restrictions are applied by the
application on what you put in them. You can use them however you want.
.. tip::
You can make multiple root folders of each kind if you wish to split up your notes.
.. note::
It is not the notes themselves that are referenced by the listed reference keywords, but tags
set within the notes. See the examples below and in :ref:`a_struct_tags`.
The root folder system is closely connected to how the Tags and References system works. For more
details, see the :ref:`a_references` chapter.
:guilabel:`Novel`
This is the root folder of all text that goes into the final novel or novels. This class of
This is the root folder type for text that goes into the final novel or novels. This class of
documents have other rules and features than the project notes. See :ref:`a_struct` for more
details.
:guilabel:`Plot`
This is the root folder where main plots can be outlined. It is optional, but adding at least
brief notes can be useful in order to tag plot elements for the Outline View. Tags in this
folder can be references using the ``@plot`` keyword.
This is the root folder type where main plots can be outlined. It is optional, but adding at
least brief notes can be useful in order to tag plot elements for the :guilabel:`Outline View`.
Tags in this folder can be references using the ``@plot`` keyword.
:guilabel:`Characters`
Character notes go in this root folder. These are especially important if you want to use the
Outline View to see which character appears where, and which part of the story is told from a
specific character's point-of-view, or focusing on a particular character's storyline. Tags in
this folder can be referenced using the ``@pov`` keyword for point-of-view characters,
``@focus`` for a focus character, or the ``@char`` keyword for any other characters.
Character notes go in this root folder type. These are especially important if you want to use
the :guilabel:`Outline View` to see which character appears where, which part of the story is
told from a specific character's point-of-view, or focusing on a particular character's
storyline. Tags in this type of folder can be referenced using the ``@pov`` keyword for
point-of-view characters, ``@focus`` for a focus character, or the ``@char`` keyword for any
other character present.
:guilabel:`Locations`
The locations folder is for various scene locations that you want to track. Tags in this folder
can be references using the ``@location`` keyword.
The locations folder type is for various scene locations that you want to track. Tags in this
folder can be references using the ``@location`` keyword.
:guilabel:`Timeline`
If the story has multiple plot timelines or jumps in time within the same plot, this class of
notes can be used to track this. Tags in this folder can be references using the ``@time``
If the story has multiple plot timelines or jumps in time within the same plot, this folder type
can be used to track this. Tags in this type of folder can be references using the ``@time``
keyword.
:guilabel:`Objects`
Important objects in the story, for instance important objects that change hands often, can be
tracked here. Tags in this folder can be references using the ``@object`` keyword.
Important objects in the story, for instance objects that change hands often, can be tracked
here. Tags in this type of folder can be references using the ``@object`` keyword.
:guilabel:`Entities`
Does your plot have many powerful organisations or companies? Or other entities that are part of
the plot? They can be organised here. Tags in this folder can be references using the
the plot? They can be organised here. Tags in this type of folder can be references using the
``@entity`` keyword.
:guilabel:`Custom`
The custom root folder can be used for tracking anything else not covered by the above options.
Tags in this folder can be references using the ``@custom`` keyword.
The custom root folder type can be used for tracking anything else not covered by the above
options. Tags in this folder type can be references using the ``@custom`` keyword.
The root folders correspond to the categories of tags that can be used to reference them. For more
information about the tags listed, see :ref:`a_struct_tags`.
information about the tags listed, see :ref:`a_references_references`.
.. note::
You can rename root folders to whatever you want. However, this doesn't change the reference
keyword.
keyword or what they do.
Example of a character note:
.. code-block:: none
:linenos:
# Jane Doe
@tag: Jane
Some information about the character Jane Doe.
Example of a novel scene referencing the above character:
.. code-block:: none
:linenos:
### Chapter 1, Scene 1
@pov: Jane
When Jane woke up that morning ...
.. versionadded:: 2.0
As of version 2.0, you can make multiple root folders of each kind to split up your project.
.. _a_proj_roots_del:
@@ -124,11 +102,11 @@ Deleted Documents
Deleted documents will be moved into a special :guilabel:`Trash` root folder. Documents in the
trash folder can then be deleted permanently, either individually, or by emptying the trash from
the menu. Documents in the trash folder are removed from the project index and cannot be
the menu. Documents in the trash folder are removed from the :term:`project index` and cannot be
referenced.
A document or a folder can be deleted from the :guilabel:`Project` menu, or by pressing
:kbd:`Ctrl`:kbd:`Shift`:kbd:`Del`. Root folders can only be deleted when they are empty.
:kbd:`Ctrl+Shift+Del`. Root folders can only be deleted when they are empty.
.. _a_proj_roots_out:
@@ -137,15 +115,15 @@ Archived Documents
------------------
If you don't want to delete a document, or put it in the :guilabel:`Trash` folder where it may be
deleted, but still want it out of your main project tree, you can create an :guilabel:`Archive`
root folder.
deleted accidentally, but still want it out of your main project tree, you can create an
:guilabel:`Archive` root folder and move it there.
You can drag any document to this folder and preserve its settings. The document will always be
excluded from the :guilabel:`Build Novel Project` builds. It is also removed from the project
index, so the tags and references defined in it will not show up anywhere else.
excluded from the :guilabel:`Build Manuscript` tool. It is also removed from the
:term:`project index`, so the tags and references defined in it will not show up anywhere else.
.. _a_proj_roots_orph:
.. _a_proj_roots_orphaned:
Recovered Documents
-------------------
@@ -153,19 +131,19 @@ Recovered Documents
If novelWriter crashes or otherwise exits without saving the project state, or if you're using a
file synchronisation tool that runs out of sync, there may be files in the project folder that
aren't tracked in the core project file. These files, when discovered, are recovered and added back
into the project if possible.
into the project.
The discovered files are scanned for meta information that give clues as to where the document may
previously have been located in the project. The project loading routines will try to put them back
The discovered files are scanned for metadata that give clues as to where the document may
previously have been located in the project. The project loading routine will try to put them back
as close as possible to this location, if it still exists. Generally, it will be appended to the
end of the folder where it previously was located. If that folder doesn't exist, it will try to add
it to the correct root folder. If it cannot figure out which root folder is correct, the document
will be added to the :guilabel:`Novel` root folder. Only if the :guilabel:`Novel` folder is
missing will it give up.
it to the correct root folder type. If it cannot figure out which root folder is correct, the
document will be added to the :guilabel:`Novel` root folder. Finally, if the :guilabel:`Novel`
folder is missing, one will be created.
If the title of the document can be recovered, the word "Recovered:" will be added as a prefix. If
the title cannot be determined, the document will be named "Recovered File N" where N is a
sequential number.
If the title of the document can be recovered, the word "Recovered:" will be added as a prefix to
indicate that it may need further attention. If the title cannot be determined, the document will
be named after its internal key, which is a string of characters and numbers.
.. _a_proj_roots_lock:
@@ -173,11 +151,11 @@ sequential number.
Project Lockfile
----------------
To prevent lost documents caused by file conflicts when novelWriter projects are synced with file
synchronisation tools, a project lockfile is written to the project folder. If you try to open a
project which has such a file present, you will be presented with a warning, and some information
about where else novelWriter thinks the project is also open. You will be give the option to ignore
this warning, and continue opening the project at your own risk.
To prevent lost documents caused by file conflicts when novelWriter projects are synchronised via
file synchronisation tools, a project lockfile is written to the project folder. If you try to open
a project which has such a file present, you will be presented with a warning, and some information
about where else novelWriter thinks the project is also open. You will be given the option to
ignore this warning, and continue opening the project at your own risk.
.. note::
If, for some reason, novelWriter crashes, the lock file may remain even if there are no other
@@ -198,18 +176,18 @@ Using Folders in the Project Tree
---------------------------------
Folders, aside from root folders, have no structural significance to the project. When novelWriter
is processing the documents in the novel, like for instance during export, these folders are
ignored. Only the order of the documents themselves matter.
is processing the documents in a project, like for instance when you create a manuscript from it,
these folders are ignored. Only the order of the documents themselves matter.
The folders are there purely as a way for the user to organise the documents in meaningful sections
and to be able to collapse and hide them in the project tree when you're not working on those
The folders are there purely as a way for you to organise the documents in meaningful sections and
to be able to collapse and hide them in the project tree when you're not working on those
documents.
.. tip::
You can add child documents to other documents. This is particularly useful when you create
chapters and scenes. If you add separate scene documents, you should also add separate chapter
documents, even if they only contain a chapter heading. You can then add scene documents as
child items to the chapters.
.. versionadded:: 2.0
As of version 2.0 it is possible to add child documents to other documents. This is particularly
useful when you create chapters and scenes. If you add separate scene documents, you should also
add separate chapter documents, even if they only contain a chapter heading. You can then add
scene documents as child items to the chapters.
.. _a_proj_files:
@@ -217,15 +195,17 @@ documents.
Project Documents
=================
New documents can be created from the tool bar in the Project Tree, or by pressing
:kbd:`Ctrl`:kbd:`N`. This will open the create new item menu and let you choose between a number of
pre-defined documents and folders. You will be prompted for a label for the new item. You can
always rename an item by selecting :guilabel:`Rename Item` from the :guilabel:`Project` menu, or by
pressing :kbd:`F2`.
New documents can be created from the toolbar in the :guilabel:`Project Tree`, or by pressing
:kbd:`Ctrl+N`. This will open the create new item menu and let you choose between a number of
pre-defined documents and folders. You will be prompted for a label for the new item.
You can always rename an item by selecting :guilabel:`Rename Item` from the :guilabel:`Project`
menu, or by pressing :kbd:`F2`.
Other settings for project items are available from the context menu that you can activate by
right-clicking on an item in the Project Tree. The :guilabel:`Transform` submenu includes options
for converting, splitting, or merging items.
right-clicking on an item in the tree. The :guilabel:`Transform` submenu includes options for
converting, splitting, or merging items. See :ref:`a_ui_tree_split_merge` for more details on the
latter two.
.. _a_proj_files_counts:
@@ -234,17 +214,18 @@ Word Counts
-----------
A character, word and paragraph count is maintained for each document, as well as for each section
of a document following a header. The word count and change of words in the current session is
displayed in the footer of any document open in the editor, and all stats are shown in the details
panel below the project tree for any document selected in the project or novel tree.
of a document following a :term:`heading<headings>`. The word count and change of words in the
current session is displayed in the footer of any document open in the editor, and all stats are
shown in the details panel below the :guilabel:`Project Tree` for any document selected in the
project or novel trees.
The word counts are not updated in real time, but run in the background every few seconds for as
long as the document is being actively edited.
A total project word count is displayed in the status bar. The total count depends on the sum of
the values in the project tree, which again depend on an up to date index. If the counts seem
wrong, a full project word recount can be initiated by rebuilding the project's index. Either form
the :guilabel:`Tools` menu, or by pressing :kbd:`F9`.
the values in the project tree, which again depend on an up to date :term:`project index`. If the
counts seem wrong, a full project word recount can be initiated by rebuilding the project's index.
Either from the :guilabel:`Tools` menu, or by pressing :kbd:`F9`.
.. _a_proj_settings:
@@ -253,7 +234,7 @@ Project Settings
================
The :guilabel:`Project Settings` can be accessed from the :guilabel:`Project` menu, or by pressing
:kbd:`Ctrl`:kbd:`Shift`:kbd:`,`. This will open a dialog box, with a set of tabs.
:kbd:`Ctrl+Shift+,`. This will open a dialog box, with a set of tabs.
Settings Tab
@@ -263,26 +244,26 @@ The :guilabel:`Settings` tab holds the project name, title, and author settings.
The :guilabel:`Project Name` can be set to a different value than the :guilabel:`Novel Title`. The
difference between them is simply that the :guilabel:`Project Name` is used for the GUI (main
window title) and for generating the backup files. The intention is that the
:guilabel:`Project Name` should remain unchanged throughout the project's lifetime, otherwise the
name of exported files and backup files may change too.
window title) and for generating backup files. The intention is that the :guilabel:`Project Name`
should remain unchanged throughout the project's lifetime, otherwise the name of exported files and
backup files may change too.
The :guilabel:`Novel Title` and :guilabel:`Authors` settings are used when building the manuscript,
for some formats.
If your project is in a different language than your main spell checking is set to, you can
override the default spell checking language here. You can also override the automatic backup
setting.
If your project is in a different language than your main spell checking language is set to, you
can override the default setting here. You can also override the automatic backup setting. The
project language can also be changed from the :guilabel:`Tools` menu.
Status and Importance Tabs
--------------------------
Each document or folder of type :guilabel:`Novel` can be given a *Status*_* label accompanied by a
Each document or folder of type :guilabel:`Novel` can be given a *Status* label accompanied by a
coloured icon, and each document or folder of the remaining types can be given an *Importance*
label.
These are purely there for the user's convenience, and you are not required to use them for any
These labels are there purely for your convenience, and you are not required to use them for any
other features to work. No other part of novelWriter accesses this information. The intention is to
use these to indicate at what stage of completion each novel document is, or how important the
content of a note is to the story. You don't have to use them this way, that's just what they were
@@ -302,7 +283,7 @@ A set of automatically replaced keywords can be added in this tab. The keywords
will be replaced by the text in the right column when documents are opened in the viewer. They will
also be applied to manuscript builds.
The auto-replace feature will replace text in angle brackets that are in this list. The syntax
The auto-replace feature will replace text in angle brackets that is in this list. The syntax
highlighter will add an alternate colour to text matching the syntax, but it doesn't check if the
text is in this list.
@@ -332,7 +313,7 @@ It is also possible to disable automated backups for a given project in
.. note::
For the backup to be able to run, the :guilabel:`Project Name` must be set in
:guilabel:`Project Settings`. This value is used to generate the folder name for the zip files.
:guilabel:`Project Settings`. This value is used to generate the name and path of the backups.
Without it, the backup will not run at all, but it will produce a warning message.
@@ -343,19 +324,19 @@ Writing Statistics
When you work on a project, a log file records when you opened it, when you closed it, and the
total word counts of your novel documents and notes at the end of the session, provided that the
session lasted either more than 5 minutes, or that the total word count changed. You can view this
file in the ``meta`` folder in the directory where you saved your project. The file is named
``sessionStats.log``.
session lasted either more than 5 minutes, or that the total word count changed. For more details
about the log file, see :ref:`a_storage`.
A tool to view the content of this file is available in the :guilabel:`Tools` menu under
A tool to view the content of the log file is available in the :guilabel:`Tools` menu under
:guilabel:`Writing Statistics`. You can also launch it by pressing :kbd:`F6`, or find it on the
Sidebar.
sidebar.
The tool will show a list of all your sessions, and a set of filters to apply to the data. You can
also export the filtered data to a JSON file or to a CSV file that can be opened by a spreadsheet
application like for instance Libre Office Calc.
application like for instance Libre Office Calc or Excel.
As of version 1.2, the log file also stores how much of the session time was spent idle. The
definition of idle here is that the novelWriter main window loses focus, or the user hasn't made
any changes to the currently open document in five minutes. The number of minutes can be altered in
:guilabel:`Preferences`.
.. versionadded:: 1.2
As of version 1.2, the log file also stores how much of the session time was spent idle. The
definition of idle here is that the novelWriter main window loses focus, or the user hasn't made
any changes to the currently open document in five minutes. The number of minutes can be altered
in :guilabel:`Preferences`.

View File

@@ -0,0 +1,202 @@
.. _a_references:
*******************
Tags and References
*******************
In novelWriter there are no forms or tables to fill in to define the characters, locations and
other elements of your story. Instead, you can mark your :term:`project notes` as representing
these story elements by creating a :term:`tag`. Whenever you want to link a piece of your story to
a note defining a story element, like a character, you create a :term:`reference` back to that tag.
You can also cross-link your project notes in the same way.
This is perhaps one of the features that makes novelWriter different from other, similar
applications. It is therefore not always obvious to new users how this is supposed to work, so
this chapter hopes to explains in more detail how to use the tags and references system.
.. tip::
If you find the Tags and Reference system difficult to follow just from reading this chapter,
you can create a new project in novelWriter and select to "Fill the project with example files"
in the :guilabel:`New Project Wizard`. The example project contains several examples of tags and
references.
.. _a_references_metadata:
Metadata in novelWriter
=======================
The structure of your novelWriter project is inferred from the :term:`headings` within the
documents, not the documents themselves. See :ref:`a_struct_heads` for more details. Therefore,
metadata is also associated with headings, and not the documents directly.
If you split your project into separate documents for each scene, this distinction may not matter.
However, there are several benefits to using documents at a larger structural scale when starting
your project. For instance, it may make more sense to define all your scenes, and even chapters, in
a single document at first, or perhaps a document per act. You can later split these documents up
using the document split feature. See :ref:`a_ui_tree_split_merge` for more details.
The implication here is that you can treat each heading as an independent element of your notes
that can be referenced somewhere else. In order to make it possible to reference a header section,
you need to assign it a tag.
.. _a_references_tags:
How to Use Tags
===============
A "tag" in novelWriter is a word or phrase that you define as belonging to a heading. Tags are set
by using the ``@tags`` :term:`keyword`. The full format of a tag is ``@tag: tagname``, where
``tagname`` is an identifier of your choosing. You can only set *one* tag per heading, and the tag
has to be unique across all documents in the project.
.. versionadded:: 2.2
Tags are now case insensitive.
After the tags have been defined, they can then be referenced in the novel documents, or
cross-referenced in other notes. they will also show up in the :guilabel:`Outline View` and in the
back-reference panel when a document is opened in the viewer.
The syntax highlighter will indicate to you that the keyword is correctly used and that the tag is
allowed, that is, the tag is unique. Duplicate tags should be detected as long as the index is up
to date. An invalid tag should have a green wiggly line under it, and will not receive the syntax
colour that valid tags do.
The tag is the only part of these notes that novelWriter uses. The rest of the document content is
there for you to use in whatever way you wish. Of course, the content of the documents can be added
to the manuscript, or an outline document. If you want to compile a single document of all your
notes, you can do this from the :guilabel:`Manuscript Build` tool.
Example of a heading with a tag for a character of the story:
.. code-block:: none
# Jane Doe
@tag: Jane
Some information about the character Jane Doe.
When this is done in a document in a :term:`Root Folder` of type "Characters", the tag is
automatically treated as an available character in your project, and you will be able to reference
it in any of your other documents using the reference keywords for characters. It will also show up
in the Character tab in the Reference panel below the document viewer, and in the reference
auto-completer menu in the editor when you fill in references. See :ref:`a_ui_view` and
:ref:`a_references_completer`.
It is the root folder type that defines what category of story elements the tag is indexed under.
See the :ref:`a_proj_roots` section for an overview of available root folder types. They are also
covered in the next section.
.. _a_references_references:
How to Use References
=====================
Each heading of any level in your project can contain references to tags set in project notes. The
references are gathered by the indexer and used to generate the :guilabel:`Outline View`, among
other things.
References are set as a :term:`keyword` and a list of corresponding tags. The valid keywords are
listed below. The format of a reference line is ``@keyword: value1, [value2] ... [valueN]``. All
reference keywords allow multiple values.
``@pov``
The point-of-view character for the current section. The target must be a note tag in a
:guilabel:`Character` type root folder.
``@focus``
The character that has the focus for the current section. This can be used in cases where the
focus is not a point-of-view character. The target must be a note tag in a :guilabel:`Character`
type root folder.
``@char``
Other characters in the current section. The target must be a note tag in a
:guilabel:`Character` type root folder. This should not include the point-of-view or focus
character if those references are used.
``@plot``
The plot or subplot advanced in the current section. The target must be a note tag in a
:guilabel:`Plot` type root folder.
``@time``
The timelines touched by the current section. The target must be a note tag in a
:guilabel:`Timeline` type root folder.
``@location``
The location the current section takes place in. The target must be a note tag in a
:guilabel:`Locations` type root folder.
``@object``
Objects present in the current section. The target must be a note tag in a :guilabel:`Object`
type root folder.
``@entity``
Entities present in the current section. The target must be a note tag in a
:guilabel:`Entities` type root folder.
``@custom``
Custom references in the current section. The target must be a note tag in a :guilabel:`Custom`
type root folder. The custom folder are for any other category of notes you may want to use.
The syntax highlighter will alert the user that the tags and references are used correctly, and
that the tags referenced exist.
.. note::
The highlighter may be mistaken if the index of defined tags is out of date. If so, press
:kbd:`F9` to regenerate it, or select :guilabel:`Rebuild Index` from the :guilabel:`Tools` menu.
In general, the index for a document is regenerated when it is saved, so this shouldn't normally
be necessary.
.. tip::
If you add a reference in the editor to a tag that doesn't yet exist, you can right-click it and
select :guilabel:`Create Note for Tag`. This will generate a new project note automatically with
the new tag defined. In order for this to be possible, a root folder for that category of
references must already exist.
One note can also reference another note in the same way novel documents do. When the note is
opened in the document viewer, the references become clickable links, making it easier to follow
connections in the plot. You can follow links in the document editor by clicking them with the
mouse while holding down the :kbd:`Ctrl` key. Clicked links are always opened in the view panel.
Project notes don't show up in the :guilabel:`Outline View`, so referencing between notes is only
meaningful if you want to be able to click-navigate between them, or of course if you just want to
highlight that two notes are related.
.. tip::
If you cross-reference between notes and export your project as an HTML document using the
:guilabel:`Manuscript Build` tool, the cross-references become clickable links in the exported
HTML document as well.
Example of a novel document with references to characters and plots:
.. code-block:: none
## Chapter 1
@pov: Jane
### Scene 1
@char: John, Sam
@plot: Main
Once upon a time ...
.. _a_references_completer:
The References Auto-Completer
-----------------------------
An auto-completer context menu will show up automatically in the document editor when you type the
character ``@`` on a new line. It will first suggest tag or reference keywords for you to add, and
after the ``:`` has been added, suggest references from the list of tags you have already defined.
You can use the auto-completer to add multiple references with a ``,`` between them, and even type
new ones. New references can be created by right-clicking on them and selecting
:guilabel:`Create Note for Tag` from the menu.
.. versionadded:: 2.2

View File

@@ -4,10 +4,15 @@
Novel Structure
***************
This section covers the structure of a novel project.
This chapter covers the structure of a novel project.
It concerns documents under the :guilabel:`Novel` type root folder only. There are some
restrictions and features that only apply to these types of documents.
There are two different types of documents in a project, :guilabel:`Novel Documents` and
:guilabel:`Project Notes`. Novel documents can only live in a :guilabel:`Novel` type root folder.
You can also move them to :guilabel:`Archive` and :guilabel:`Trash` of course.
The :guilabel:`Project Tree` can distinguish between the different header levels of the novel
documents using coloured icons, and optionally add emphasis on the label, set in
:guilabel:`Preferences`.
.. _a_struct_heads:
@@ -16,15 +21,16 @@ Importance of Headings
======================
Subfolders under root folders have no impact on the structure of the novel itself. The structure is
instead dictated by the heading level of the headers within the documents.
instead dictated by the heading level of the headings within the documents.
Four levels of headings are supported, signified by the number of hashes (``#``) preceding the
title. See also the :ref:`a_fmt` section for more details about the markdown syntax.
title. See also the :ref:`a_fmt` section for more details about the markup syntax.
.. note::
The header levels are not only important when generating the manuscript, they are also used by
the indexer when building the outline tree in the Outline as well as the Novel Tree. Each
heading also starts a new region where new references and tags can be defined.
the indexer when building the outline tree in the :guilabel:`Outline View` as well as in the
:guilabel:`Novel Tree`. Each heading also starts a new region where new Tags and References
can be defined. See :ref:`a_references` for more details.
The syntax for the four basic header types, and the two special header types, is listed in section
:ref:`a_fmt_head`. The meaning of the four levels for the structure of your novel is as follows:
@@ -32,7 +38,7 @@ The syntax for the four basic header types, and the two special header types, is
**Header Level 1: Partition**
This header level signifies that the text refers to a top level partition. This is useful when
you want to split the manuscript up into books, parts, or acts. These headings are not required.
The novel title itself should use the special header level explained in :ref:`a_fmt_head`.
The novel title itself should use the special header level ``#!`` covered in :ref:`a_fmt_head`.
**Header Level 2: Chapter**
This header level signifies a chapter level partition. Each time you want to start a new
@@ -49,18 +55,19 @@ The syntax for the four basic header types, and the two special header types, is
**Header Level 4: Section**
This header level signifies a sub-scene level partition, usually called a "section" in the
documentation and the user interface. These can be useful if you want to change tag references
documentation and the user interface. These can be useful if you want to change references
mid-scene, like if you change the point-of-view character. You are free to use sections as you
wish, and you can filter them out of the final manuscript just like with scene titles.
Page breaks are automatically added before level 1 and 2 headers when you build your project to a
format that supports page breaks, or when you print the document directly from the build tool. If
you want page breaks in other places, you have to specify them manually. See :ref:`a_fmt_break`.
format that supports page breaks, or when you print the document directly from the
:guilabel:`Manuscript Build` tool. If you want page breaks in other places, you have to specify
them manually. See :ref:`a_fmt_break`.
.. tip::
There are multiple options of how to process novel titles when building the manuscript. For
instance, chapter numbers can be applied automatically, and so can scene numbers if you want
them in a draft manuscript. See the :ref:`a_export` page for more details.
them in a draft manuscript. See the :ref:`a_manuscript` page for more details.
.. _a_struct_heads_title:
@@ -89,13 +96,13 @@ Unnumbered Chapter Headings
---------------------------
If you use the automatic numbering feature for your chapters, but you want to keep some special
chapters separate from this, you cam add a ``!`` to the level 2 header formatting code to tell the
chapters separate from this, you cam add an ``!`` to the level 2 header formatting code to tell the
build tool to skip these chapters.
``##! Unnumbered Chapter Title``
There is a separate formatting feature for such chapters in the :guilabel:`Build Novel Project`
tool as well. See the :ref:`a_export` page for more details. When building a document of a format
There is a separate formatting feature for such chapters in the :guilabel:`Manuscript Build` tool
as well. See the :ref:`a_manuscript` page for more details. When building a document of a format
that supports page breaks, also unnumbered chapters will have a page break added just like for
normal chapters.
@@ -104,105 +111,3 @@ normal chapters.
the first character of the chapter title itself. This feature has been dropped in favour of the
current format in order to keep level 1 and 2 headers consistent. Please update your chapter
headings if you've used this syntax.
.. _a_struct_tags:
Note References
===============
Each text partition, indicated by a heading of any level, can contain references to tags set in the
project notes of the project. The references are gathered by the indexer and used to generate the
Outline View. This section covers how to make references to tags. See :ref:`a_notes_tags` for how
to define tags the references can point to.
References and tags are also clickable in the document editor and viewer, making it easy to
navigate between reference notes while writing. Clicked links are always opened in the view panel.
References are set as a keyword and a list of corresponding tags. The valid keywords are listed
below. The format of a reference line is ``@keyword: value1, [value2] ... [valueN]``. All keywords
allow multiple values.
``@pov``
The point-of-view character for the current section. The target must be a note tag in a
:guilabel:`Character` type root folder.
``@focus``
The character that has the focus for the current section. This can be used in cases where the
focus is not a point-of-view character. The target must be a note tag in a :guilabel:`Character`
type root folder.
``@char``
Other characters in the current section. The target must be a note tag in a
:guilabel:`Character` type root folder. This should not include the point-of-view or focus
character if those references are used.
``@plot``
The plot or subplot advanced in the current section. The target must be a note tag in a
:guilabel:`Plot` type root folder.
``@time``
The timelines touched by the current section. The target must be a note tag in a
:guilabel:`Timeline` type root folder.
``@location``
The location the current section takes place in. The target must be a note tag in a
:guilabel:`Locations` type root folder.
``@object``
Objects present in the current section. The target must be a note tag in a :guilabel:`Object`
type root folder.
``@entity``
Entities present in the current section. The target must be a note tag in a
:guilabel:`Entities` type root folder.
``@custom``
Custom references in the current section. The target must be a note tag in a :guilabel:`Custom`
type root folder. The custom folder are for any other category of notes you may want to use.
The syntax highlighter will alert the user that the tags and references are used correctly, and
that the tags referenced exist.
The highlighter may be mistaken if the index of defined tags is out of date. If so, press :kbd:`F9`
to regenerate it, or select :guilabel:`Rebuild Index` from the :guilabel:`Tools` menu. In general,
the index for a document is regenerated when it is saved, so this shouldn't normally be necessary.
Example of a novel document with references to characters and plots:
.. code-block:: none
:linenos:
## Chapter 1
@pov: Jane
### Scene 1
@char: John, Sam
@plot: Main
Once upon a time ...
.. _a_struct_layout:
Document Layout
===============
All documents in the project can have a layout format set. Previously, there were multiple layouts
available to change how the documents where formatted on export. These have now been reduced to
just two layouts: :guilabel:`Novel Document` and :guilabel:`Project Note`.
Novel documents can only live in a :guilabel:`Novel` type root folder. You can also move them to
:guilabel:`Archive` and :guilabel:`Trash` of course. Project notes can be added anywhere in the
project.
The project tree can distinguish between the different layouts and header levels of the documents
using coloured icons, and optionally add emphasis on the label (See the :guilabel:`Preferences`.)
For novel documents, the heading level of the first heading is recorded, and indicated by the icon.
.. tip::
You can always start writing with a coarse setup with one or a few documents, and then later use
the split tool to split the documents into separate chapter and scene documents. You can split a
document on any of the four header levels.

View File

@@ -1,4 +1,6 @@
furo
sphinx>=4.0
sphinx-book-theme
sphinx>=5.0
sphinx-favicon
sphinx-design
pygments>=2.7
docutils==0.17.1
docutils>=0.17.1

View File

@@ -7,7 +7,7 @@ File Locations
.. _QStandardPaths: https://doc.qt.io/qt-5/qstandardpaths.html
novelWriter will create a few files on your system outside of the application folder itself. These
file locations are described in this document.
file locations are described in this chapter.
.. _a_locations_conf:
@@ -17,15 +17,16 @@ Configuration
The general configuration of novelWriter, including everything that is in :guilabel:`Preferences`,
is saved in one central configuration file. The location of this file depends on your operating
system. The system paths are provided by the Qt QStandardPaths_ class and its ConfigLocation value.
system. The system paths are provided by the Qt QStandardPaths_ class and its ``ConfigLocation``
value.
The standard paths are:
* Linux: ``~/.config/novelwriter/novelwriter.conf``
* macOS: ``~/Library/Preferences/novelwriter/novelwriter.conf``
* MacOS: ``~/Library/Preferences/novelwriter/novelwriter.conf``
* Windows: ``C:\Users\<USER>\AppData\Local\novelwriter\novelwriter.conf``
Here, ``~`` corresponds to the user's home directory on Linux and macOS, and ``<USER>`` is the
Here, ``~`` corresponds to the user's home directory on Linux and MacOS, and ``<USER>`` is the
user's username on Windows.
.. note::
@@ -40,15 +41,16 @@ Application Data
novelWriter also stores a bit of data that is generated by the user's actions. This includes the
list of recent projects form the :guilabel:`Open Project` dialog. Custom themes should also be
saved here. The system paths are provided by the Qt QStandardPaths_ class and its AppDataLocation.
saved here. The system paths are provided by the Qt QStandardPaths_ class and its
``AppDataLocation`` value.
The standard paths are:
* Linux: ``~/.local/share/novelwriter/``
* macOS: ``~/Library/Application Support/novelwriter/``
* MacOS: ``~/Library/Application Support/novelwriter/``
* Windows: ``C:\Users\<USER>\AppData\Roaming\novelwriter\``
Here, ``~`` corresponds to the user's home directory on Linux and macOS, and ``<USER>`` is the
Here, ``~`` corresponds to the user's home directory on Linux and MacOS, and ``<USER>`` is the
user's username on Windows.
.. note::

View File

@@ -4,18 +4,25 @@
Running from Source
*******************
.. _main website: https://novelwriter.io
.. _GitHub: https://github.com/vkbo/novelWriter/releases
.. _PyPi: https://pypi.org/project/novelWriter/
.. _Sphinx Docs: https://www.sphinx-doc.org/
This section describes various ways of running novelWriter directly from the source code, and how
This chapter describes various ways of running novelWriter directly from the source code, and how
to build the various components like the translation files and documentation.
.. note::
The text below assumes the command ``python`` corresponds to a Python 3 executable. Python 2 is
now deprecated, but many systems still have both Python 2 and 3. For such systems, the command
``python3`` may be needed instead. Likewise, ``pip`` may need to be replaced with ``pip3``.
now deprecated, but on many systems the command ``python3`` may be needed instead. Likewise,
``pip`` may need to be replaced with ``pip3``.
Most of the custom commands for building packages of novelWriter, or building assets, are contained
in the ``pkgutils.py`` script in the root of the source code. You can list the available commands
by running:
.. code-block:: bash
python pkgutils.py help
.. _a_source_depend:
@@ -23,20 +30,17 @@ to build the various components like the translation files and documentation.
Dependencies
============
novelWriter has been designed to rely on as few dependencies as possible. Aside from the packages
needed to communicate with the Qt GUI libraries, only one package is required for handling the XML
format of the main project file. Everything else is handled with standard Python libraries.
novelWriter has been designed to rely on as few dependencies as possible. Only the Python wrapper
for the Qt GUI libraries is required. The package for spell checking is optional, but recommended.
Everything else is handled with standard Python libraries.
The following Python packages are needed to run novelWriter:
The following Python packages are needed to run all features of novelWriter:
* ``PyQt5`` – needed for connecting with the Qt5 libraries.
* ``lxml`` – needed for full XML support.
* ``PyEnchant`` – needed for spell checking (optional).
PyQt/Qt should be at least 5.10, but ideally 5.13 or higher for all features to work. For instance,
searching using regular expressions with full Unicode support requires 5.13. There is no known
minimum version requirement for package ``lxml``, but the code was originally written with 4.2,
which is therefore set as the minimum. It may work on lower versions. You have to test it.
searching using regular expressions with full Unicode support requires 5.13.
If you want spell checking, you must install the ``PyEnchant`` package. The spell check library
must be at least 3.0 to work with Windows. On Linux, 2.0 also works fine.
@@ -49,7 +53,6 @@ source, dependencies can still be installed from PyPi with:
pip install -r requirements.txt
.. note::
On Linux distros, the Qt library is usually split up into multiple packages. In some cases,
secondary dependencies may not be installed automatically. For novelWriter, the library files
for renderring the SVG icons may be left out and needs to be installed manually. This is the
@@ -58,37 +61,35 @@ source, dependencies can still be installed from PyPi with:
.. _a_source_install:
Install from Source
===================
Build and Install from Source
=============================
You can download the latest version of novelWriter from the source repository on GitHub_ and run
the setup manually. It is equivalent to what the ``pip install`` command does, and it installs
novelWriter to the default location for Python packages.
This step requires that you have ``setuptools`` installed on your system. If you don't have it
installed, it can usually be installed from your distro's repository. For Debian and Ubuntu this is
achieved with:
If you want to install novelWriter directly from the source available on GitHub_, you must first
build the package using the Python Packaging Authority's build tool. It can be installed with:
.. code-block:: bash
sudo apt install python3-setuptools
pip install build
The package is also available from PyPi:
On Debian-based systems the tool can also be installed with:
.. code-block:: bash
pip install --user setuptools
sudo apt install python3-build
With ``setuptools`` in place, novelWriter can be installed to the user space with:
With the tool installed, run the following command from the root of the novelWriter source code:
.. code-block:: bash
python setup.py install --user
python -m build --wheel
.. tip::
This should generate a ``.whl`` file in the ``dist/`` folder at your current location. The wheel
file can then be installed on your system. Here with example version number 2.0.7, but yours may be
different:
The main setup script has a number of options that may be useful to you. You can list them by
running ``python setup.py help``.
.. code-block:: bash
pip install --user dist/novelWriter-2.0.7-py3-none-any.whl
.. _a_source_i18n:
@@ -105,7 +106,7 @@ You can build the ``.qm`` files with:
.. code-block:: bash
python setup.py qtlrelease
python pkgutils.py qtlrelease
This requires that the Qt Linguist tool is installed on your system. On Ubuntu and Debian, the
needed package is called ``qttools5-dev-tools``.
@@ -122,11 +123,12 @@ Building the Example Project
============================
In order to be able to create new projects from example files, you need a ``sample.zip`` file in
the ``assets`` folder of the source. This file can be built from setup script by running:
the ``assets`` folder of the source. This file can be built from the ``pkgutils.py`` script by
running:
.. code-block:: bash
python setup.py sample
python pkgutils.py sample
.. _a_source_docs:
@@ -134,12 +136,12 @@ the ``assets`` folder of the source. This file can be built from setup script by
Building the Documentation
==========================
A local copy of this documentation can be generated as HTML. This requires the following Python
A local copy of this documentation can be generated as HTML. This requires installing some Python
packages from PyPi:
.. code-block:: bash
pip install furo sphinx
pip install -r docs/source/requirements.txt
The documentation can then be built from the root folder in the source code by running:
@@ -150,11 +152,11 @@ The documentation can then be built from the root folder in the source code by r
If successful, the documentation should be available in the ``docs/build/html`` folder and you can
open the ``index.html`` file in your browser.
You can also build a PDF manual from the documentation using the setup script:
You can also build a PDF manual from the documentation using the ``pkgutils.py`` script:
.. code-block:: bash
python setup.py manual
python pkgutils.py manual
This will build the documentation as a PDF using LaTeX. The file will then be copied into the
assets folder and made available in the :guilabel:`Help` menu in novelWriter. The Sphinx build

View File

@@ -4,7 +4,9 @@
How Data is Stored
******************
This section contains details of how novelWriter stores and handles the project data.
.. _documentation: https://docs.novelwriter.io/
This chapter contains details of how novelWriter stores and handles the project data.
Project Structure
@@ -21,56 +23,61 @@ Main Project File
-----------------
The project itself requires a dedicated folder for storing its files, where novelWriter will create
its own "file system" where the folder and file hierarchy is described in a project XML file. This
is the main project file in the project's root folder with the name ``nwProject.nwx``. This file
also contains all the meta data required for the project, and a number of related project settings.
its own "file system" where the project's folder and file hierarchy is described in a project XML
file. This is the main project file in the project's root folder with the name ``nwProject.nwx``.
This file also contains all the meta data required for the project (except the index data), and a
number of related project settings.
If this file is lost or corrupted, the structure of the project is lost, although not the text
itself. It is important to keep this file backed up, either through the built-in backup tool, or
your own backup solution.
.. tip::
The novelWriter project folder is structured so that it can easily be added to a version control
system like git. If you do so, you may want to add a `.gitignore` file to exclude files with the
extensions `.json` as JSON files are used to cache the index and various run-time settings and
are generally large files that change often.
The project XML file is indent-formatted, and is suitable for diff tools and version control since
most of the file will stay static, although a timesetamp is set in the meta section on line 2, and
various meta data entries incremented, on each save.
.. only:: not html
A full project file format specification is available in the online documentation_.
.. only:: html
A full description of the current file format is available in the
:download:`File Format Spec 1.5 <fileformatspec15.pdf>` document, available as a PDF.
Project Documents
=================
All the project documents are saved in a folder in the main project folder named ``content``. Each
document has a file handle based on a 52 bit random number, represented as a hexadecimal string.
The documents are saved with a filename assembled from this handle and the file extension ``.nwd``.
All the project documents are saved in a subfolder of the main project folder named ``content``.
Each document has a file handle based on a 52 bit random number, represented as a hexadecimal
string. The documents are saved with a filename assembled from this handle and the file extension
``.nwd``.
If you wish to find the file system location of a document in the project, you can either look it
up in the project XML file, select :guilabel:`Show File Details` from the :guilabel:`Document` menu
when having the document open, or look in the ``ToC.txt`` file in the root of the project folder.
The ``ToC.txt`` file has a list of all documents in the project, referenced by their label, and
where they are saved.
when having the document open in the editor, or look in the ``ToC.txt`` file in the root of the
project folder. The ``ToC.txt`` file has a list of all documents in the project, referenced by
their label, and where they are saved.
The reason for this cryptic file naming is to avoid issues with file naming conventions and
restrictions on different operating systems, and also to have a file name that does not depend on
what the user names the document within the project, or changes it to. This is particularly useful
when using a versioning system.
what you name the document within the project, or changes it to. This is particularly useful when
using a versioning system.
Each document file contains a plain text version of the text from the editor. The file can in
principle be edited in any text editor, and is suitable for diffing and version control if so
desired. Just make sure the file remains in utf-8 encoding, otherwise unicode characters may
become mangled when the file is opened in novelWriter again.
Editing these files is generally not recommended outside of special circumstances, whatever they
may be. The reason for this is that the index will not be automatically updated when doing so,
which means novelWriter doesn't know you've altered the file. If you do edit a file in this manner,
you should rebuild the index when you next open the project in novelWriter.
Editing these files is generally not recommended. The reason for this is that the index will not be
automatically updated when doing so, which means novelWriter doesn't know you've altered the file.
If you *do* edit a file in this manner, you should rebuild the index when you next open the project
in novelWriter.
The first lines of the file may contain some meta data starting with the characters ``%%~``. These
lines are mainly there to restore some information if it is lost from the project file, and the
information may be helpful if you do open the file in an external editor as it contains the
lines are mainly there to restore some information if the file is lost from the main project file,
and the information may be helpful if you do open the file in an external editor as it contains the
document label and the document class and layout. The lines can be deleted without any consequences
to the rest of the content of the file, and will be added back the next time the document is saved
in novelWriter.
@@ -80,9 +87,9 @@ The File Saving Process
-----------------------
When saving the project file, or any of the documents, the data is first saved to a temporary file.
If successful, the old data file is then removed, and the temporary file becomes the new file. This
ensures that the previously saved data is only replaced when the new data has been successfully
saved to the storage medium.
If successful, the old data file is then removed, and the temporary file replaces it. This ensures
that the previously saved data is only replaced when the new data has been successfully saved to
the storage medium.
For the project XML file, a ``.bak`` file is in addition kept, which will always contain the
previous version of the file, although when auto-save is enabled, they may have the same content.
@@ -95,19 +102,19 @@ Project Meta Data
The project folder contains a subfolder named ``meta``, containing a number of files. The meta
folder contains semi-important files. That is, they can be lost with only minor impact to the
project.
project. All files in this folder are JSON or JSON Lines files, although some other files may
remain from earlier versions of novelWriter as they haven't all been JSON files in the past.
If you use version control software on your project, you can exclude this folder, although you may
want to track the session log file and the custom words list. The JSON files within this folder can
safely be ignored as they will be automatically regenerated if lost.
want to track the session log file and the custom words list.
The Project Index
-----------------
Between writing sessions, the project index is saved in a JSON file in ``meta/tagsIndex.json``.
This file is not critical. If it is lost, it can be rebuilt from within novelWriter from the
:guilabel:`Tools` menu.
Between writing sessions, the project index is saved in a JSON file in ``meta/index.json``.
This file is not critical. If it is lost, it can be completely rebuilt from within novelWriter from
the :guilabel:`Tools` menu.
The index is maintained and updated whenever a document or note is saved in the editor. It contains
all references and tags in documents and notes, as well as the location of all headers in the
@@ -120,10 +127,17 @@ check somehow fails and novelWriter keeps crashing, you can delete the file manu
the index. If this too fails, you have likely encountered a bug.
Build Definitions
-----------------
The build definitions from the :guilabel:`Manuscript Build` tool are kept in the
``meta/builds.json`` file. If this file is lost, all custom build definitions are lost too.
Cached GUI Options
------------------
A file named ``meta/guiOptions.json`` contains the latest state of various GUI buttons, switches,
A file named ``meta/options.json`` contains the latest state of various GUI buttons, switches,
dialog window sizes, column sizes, etc, from the GUI. These are the GUI settings that are specific
to the project. Global GUI settings are stored in the main config file.
@@ -134,7 +148,7 @@ settings.
Custom Word List
----------------
A file named ``meta/wordlist.txt`` contains all the custom words you've added to the project for
A file named ``meta/userdict.json`` contains all the custom words you've added to the project for
spell checking purposes. The content of the file can be edited from the :guilabel:`Tools` menu. If
you lose this file, all your custom spell check words will be lost too.
@@ -142,18 +156,10 @@ you lose this file, all your custom spell check words will be lost too.
Session Stats
-------------
The writing progress is saved in the ``meta/sessionStats.log`` file. This file records the length
The writing progress is saved in the ``meta/sessions.jsonl`` file. This file records the length
and word counts of each writing session on the given project. The file is used by the
:guilabel:`Writing Statistics` tool. If this file is lost, the history it contains is also lost,
but it has otherwise no impact on the project.
Project Cache
=============
The project ``cache`` folder contains non-critical files. If these files are lost, there is no
impact on the functionality of novelWriter or the history of the project. It contains temporary
files, like the preview document in the :guilabel:`Build Novel Project` tool.
It should be excluded from version control tools if such are used. The folder will be removed
entirely in novelWriter 2.1.
Each session is recorded as a JSON object on a single line of the file. Each session record is
appended tot he file.

View File

@@ -15,7 +15,7 @@ The dependencies for running the tests can be installed with:
.. code-block:: bash
pip install -r requirements-dev.txt
pip install -r tests/requirements.txt
This will install a couple of extra packages for coverage and test management. The minimum
requirement is ``pytest`` and ``pytest-qt``.
@@ -34,12 +34,11 @@ Since several of the tests involve opening up the novelWriter GUI, you may want
for the duration of the test run. Moving your mouse while the tests are running may otherwise
interfere with the execution of some tests.
You can disable the renderring of the GUI by setting the flag ``export QT_QPA_PLATFORM=offscreen``,
or alternatively run the tests with the ``xvfb`` package, like so:
You can disable the renderring of the GUI by setting the flag ``QT_QPA_PLATFORM=offscreen``:
.. code-block:: bash
xvfb-run pytest
export QT_QPA_PLATFORM=offscreen pytest
Advanced Options
@@ -51,7 +50,7 @@ You can also add coverage report generation. For instance to HTML:
.. code-block:: bash
xvfb-run pytest -v --cov=novelwriter --cov-report=html
export QT_QPA_PLATFORM=offscreen pytest -v --cov=novelwriter --cov-report=html
Other useful report formats are ``xml``, and ``term`` for terminal output.
@@ -60,7 +59,7 @@ subpackage groups are ``base``, ``core``, and ``gui``. Consider for instance:
.. code-block:: bash
xvfb-run pytest -v --cov=novelwriter --cov-report=html -m core
export QT_QPA_PLATFORM=offscreen pytest -v --cov=novelwriter --cov-report=html -m core
This will only run the tests of the "core" package, that is, all the classes that deal with the
project data of a novelWriter project. The "gui" tests, likewise, will run the tests for the GUI
@@ -71,7 +70,7 @@ You can also filter the tests with the ``-k`` switch. The following will do the
.. code-block:: bash
xvfb-run pytest -v --cov=novelwriter --cov-report=html -k testCore
export QT_QPA_PLATFORM=offscreen pytest -v --cov=novelwriter --cov-report=html -k testCore
All tests are named in such a way that you can filter them by adding more bits of the test names.
They all start with the word "test". Then comes the group: "Core", "Base", "Dlg", "Tool", or "Gui".
@@ -80,6 +79,6 @@ file. For instance, running the following will run all tests for the document ed
.. code-block:: bash
xvfb-run pytest -v --cov=novelwriter --cov-report=html -k testGuiEditor
export QT_QPA_PLATFORM=offscreen pytest -v --cov=novelwriter --cov-report=html -k testGuiEditor
To run a single test, simply add the full test name to the ``-k`` switch.

View File

@@ -6,12 +6,11 @@ How it Works
.. _Fusion: https://doc.qt.io/qt-6/gallery.html
.. _Pandoc: https://pandoc.org/
.. _Typicons: https://github.com/stephenhutchings/typicons.font
.. _Open Document: https://en.wikipedia.org/wiki/OpenDocument
The main features of novelWriter are listed in the :ref:`a_intro` section. Here, we go into some
more details on how they are implemented. This is intended as an overview. Later on in this
documentation, these features will be covered in even more detail.
The main features of novelWriter are listed in the :ref:`a_intro` chapter. In this chapter, we go
into some more details on how they are implemented. This is intended as an overview. Later on in
this documentation, these features will be covered in more detail.
.. _a_breakdown_design:
@@ -20,97 +19,116 @@ GUI Layout and Design
=====================
The user interface of novelWriter is intended to be as minimalistic as practically possible, while
at the same time provide a complete set of features needed for writing a novel.
at the same time provide useful features needed for writing a novel.
The main window does not have an editor toolbar like many other applications do. This reduces
clutter, and since the documents are formatted with style tags, is more or less redundant. However,
most formatting features supported are available through convenient keyboard shortcuts. They are
also available in the main menu so you don't have to look up formatting codes every time you need
them. For reference, a list of all shortcuts can be found in the :ref:`a_kb` section.
clutter, and since the documents are formatted with style tags, it is more or less redundant.
Most formatting features supported are available through convenient keyboard shortcuts. They are
also available in the main menu, so you don't have to look up formatting codes every time you need
them. For reference, a list of all shortcuts can be found in the :ref:`a_kb` chapter.
.. note::
novelWriter is not intended to be a full office type word processor. It doesn't support images,
links, tables, and other complex structures and objects often needed for such documents.
Formatting is limited to headers, emphasis, text alignment, and a few other simple features.
On the left edge of the main window, you will find a sidebar. This bar has buttons for the standard
views you can switch between, a quick link to the :guilabel:`Build Novel Project` tool, and a set
of project-related tools as well as quick access to settings at the bottom.
On the left side of the main window, you will find a sidebar. This bar has buttons for the standard
views you can switch between, a quick link to the :guilabel:`Build Manuscript` tool, and a set of
project-related tools and quick access to settings at the bottom.
.. versionadded:: 2.2
A number of new formatting options were added in 2.2 to allow for some special formatting cases.
At the same time, a small formatting toolbar was added in the editor. It is hidden by default,
but can be opened by pressing the three dots icon in the top right corner.
Project Tree View
-----------------
Project Tree and Editor View
----------------------------
.. figure:: images/fig_project_tree_view.png
A screenshot of the Project Tree and Editor View.
When in :guilabel:`Project Tree View` mode, the main work area of the main window is split in two,
or optionally three, panels. The left-most panel contains the project tree and all the documents in
your project. The second panel is the document editor. An optional third panel on the right is a
document viewer which can view any document in your project independently of what is open in the
document editor. This panel is not intended as a preview window, although you can use it for this
if you wish as it will apply the formatting tags you have specified. The main purpose of the viewer
is for viewing your notes next to your editor while you're writing.
your project. The second panel is the document editor.
An optional third panel on the right contains a document viewer which can view any document in your
project independently of what is open in the document editor. This panel is not intended as a
preview window, although you can use it for this purpose if you wish as it will apply the
formatting tags you have specified. The main purpose of the viewer is for viewing your notes next
to your editor while you're writing.
The editor also has a :guilabel:`Focus Mode` you can toggle either from the menu, from the icon in
the editor header, or by pressing :kbd:`F8`. When :guilabel:`Focus Mode` is enabled, all the user
the editor's header, or by pressing :kbd:`F8`. When :guilabel:`Focus Mode` is enabled, all the user
interface elements other than the document editor itself are hidden away.
Novel Tree View
---------------
Novel Tree and Editor View
--------------------------
When in :guilabel:`Novel Tree View` mode, the project tree is replaces by an overview of your novel
structure. Instead of showing individual documents, the tree now shows all headings of your novel
text. This includes multiple headings within the same document.
.. figure:: images/fig_novel_tree_view.png
A screenshot of the Novel Tree View.
When in :guilabel:`Novel Tree View` mode, the project tree is replaced by an overview of your novel
structure for a specific Novel :term:`root folder`. Instead of showing individual documents, the
tree now shows all headings of your novel text. This includes multiple headings within the same
document.
Each heading is indented according to the heading level. You can open and edit your novel documents
from this view as well. All headings contained in the currently open document should be highlighted
in the view to indicate which ones belong together.
in the view to indicate which ones belong together in the same document.
If you have multiple Novel root folders, the header of the novel view becomes a droopdown box. You
can then switch between them by clicking the "Outline of ..." text. You can also click the novel
icon button next to it.
If you have multiple Novel root folders, the header of the novel view becomes a dropdown box. You
can then switch between them by clicking the :guilabel:`Outline of ...` text. You can also click
the novel icon button next to it.
Generally, the novel view should update when you make changes to the novel structure, including
edits of the current document in the editor. The information is only updated when the automatic
save of the document is initiated though. You can adjust the aut-save interval in
:guilabel:`Preferences`. You can also regenerate the whole novel view by pressing the refresh
button at the top.
save of the document is triggered, or you manually press :kbd:`Ctrl+S` to save changes. (You can
adjust the auto-save interval in :guilabel:`Preferences`.) You can also regenerate the whole novel
view by pressing the refresh button at the top of the side panel.
It is possible to show an optional third column in the novel view, The settings are available from
the menu button ath the top.
the menu button in the toolbar.
If you click the arrow icon to the right of each item, a tooltip will pop up showing you all the
meta data collected for that heading entry.
If you click the arrow icon to the right of each item, a tooltip will pop out showing you all the
meta data collected for that heading.
Novel Outline View
------------------
.. figure:: images/fig_outline_view.png
A screenshot of the Novel Outline View.
When in :guilabel:`Novel Outline View` mode, the tree, editor and viewer will be replaced by a
large table that shows the entire novel structure with all the tags and references listed. Pretty
much all collected meta data is available here in different columns.
You can select which novel root folder to display from the dropdown box, and you can select which
columns to show or hide from the menu button. You can also rearrange the columns by drag and drop.
The app will remember you column order and size between sessions, and for each individual project.
The app will remember your column order and size between sessions, and for each individual project.
Colour Themes
-------------
The default colour theme of the user interface is the default theme from the Qt library. By
default, novelWriter is loaded with the Fusion_ style setting. (You can override this with the
``--style=`` setting when starting novelWriter.)
By default, novelWriter will use the colour theme provided by the Qt library, which is determined
by the Fusion_ style setting. You can also choose between a standard dark and light theme that have
neutral colours from :guilabel:`Preferences`. Other colour themes are also available. More themes
can be contributed to novelWriter on GitHub.
There is a standard dark theme provided as well, which is similar to the default Qt theme. Some
other light and dark colour themes are also provided. You can select which one you prefer from in
:guilabel:`Preferences` .
A number of syntax highlighting themes are also available in :guilabel:`Preferences`. These are
separate settings because there are a lot more options for syntax highlighting.
Switching the GUI colour theme does not affect the colours of the editor and viewer. They have
separate colour themes called :guilabel:`Editor Themes`. They are separated because there are a lot
more options to choose from for the editor and viewer.
.. note::
If you switch to dark mode on the GUI, you should also switch syntax highlighting theme to
match, otherwise icons may be hard to see in the editor and viewer.
If you switch to dark mode on the GUI, you should also switch editor theme to match, otherwise
icons may be hard to see in the editor and viewer.
.. _a_breakdown_project:
@@ -122,28 +140,33 @@ This is a brief introduction to how you structure your writing projects. All of
covered in more detail later.
The main point of novelWriter is that you are free to organise your project documents as you wish
into subfolders or subdocuments, and split the text between these documents in whatever way suits
into sub-folders or sub-documents, and split the text between these documents in whatever way suits
you. All that matters to novelWriter is the linear order the documents appear at in the project
tree (top to bottom). The chapters, scenes and sections of the novel are determined by the headings
within those documents.
.. figure:: images/fig_header_levels.png
An illustration of how header levels correspond to the novel structure.
The four heading levels (**H1** to **H4**) are treated as follows:
* **H1** is used for the book title, and for partitions.
* **H1** is used for the novel title, and for partitions.
* **H2** is used for chapter tiles.
* **H3** is used for scene titles – optionally replaced by separators.
* **H3** is used for scene titles -- optionally replaced by separators.
* **H4** is for section titles within scenes, if such granularity is needed.
The project tree will select an icon for the document based on the first heading in it.
This header level structure is only taken into account for novel documents. For the project notes,
the header levels have no structural meaning, and the user is free to do whatever they want. See
:ref:`a_struct` and :ref:`a_notes` for more details.
This header level structure is only taken into account for :term:`novel documents`. For
:term:`project notes`, the header levels have no structural meaning, and you are free to use them
however you want. See :ref:`a_struct` and :ref:`a_references` for more details.
.. note::
You can add documents as child items of other documents if you wish. This is often more useful
than adding folders, since you anyway may want to have the chapter heading in a separate
document from your individual scene documents.
.. versionadded:: 2.0
You can add documents as child items of other documents. This is often more useful than adding
folders, since you anyway may want to have the chapter heading in a separate document from your
individual scene documents so that you can rearrange scene documents freely without affecting
chapter placement.
.. _a_breakdown_export:
@@ -152,23 +175,25 @@ Building the Manuscript
=======================
The project can at any time be assembled into a range of different formats through the
:guilabel:`Build Novel Project` tool. Natively, novelWriter supports `Open Document`_, HTML5, and
:guilabel:`Build Manuscript` tool. Natively, novelWriter supports `Open Document`_, HTML5, and
various flavours of Markdown.
The HTML5 format is suitable for conversion by a number of other tools like Pandoc_, or for
importing into word processors if the Open Document format isn't suitable. In addition, printing
and printing to PDF is also possible.
importing into word processors if the Open Document format isn't suitable. The Open Document format
is supported by most Office type applications. In addition, printing is also possible. Print to PDF
is available from the print dialog.
You can also export the content of the project to a JSON file. This is useful if you want to write
your own processing script in for instance Python, as the entire novel can be read into a Python
dictionary with a couple of lines of code. The JSON file can be populated either with HTML
formatted text, or with the raw text as typed into the novel documents. See :ref:`a_export_options`
for more details.
In addition, you can export the content of the project to a JSON file. This is useful if you want
to write your own custom processing script in for instance Python, as the entire novel can be read
into a Python dictionary with a couple of lines of code. The JSON file can be populated with either
HTML formatted text, or with the raw text as typed into the novel documents.
A number of filter options can be applied to the :guilabel:`Build Novel Project` tool, allowing you
to make a draft manuscript, a reference document of notes, an outline based on chapter and scene
titles with a synopsis each, and so on. See :ref:`a_export` for more details on build features and
formats.
See :ref:`a_manuscript` for more details.
.. versionadded:: 2.1
You can now define multiple build definitions in the :guilabel:`Build Manuscript` tool. This
allows you to define specific settings for various types of draft documents, outline documents,
and manuscript formats. See :ref:`a_manuscript` for more details.
.. _a_breakdown_storage:
@@ -178,32 +203,35 @@ Project Storage
The files of a novelWriter project are stored in a dedicated project folder. The project structure
is kept in a file at the root of this folder called ``nwProject.nwx``. All the document files and
associated meta data is stored in the other folders below the project folder. For more technical
associated meta data is stored in other folders below the project folder. For more technical
details about what all the files mean and how they're organised, see the :ref:`a_storage` section.
This way of storing data was chosen for several reasons. Firstly, all the text you add to your
project is saved directly to your project folder in separate files. Only the project structure and
the text you are currently editing is stored in memory at any given time. Secondly, having multiple
small files means it is very easy to sync them between computers with standard file synchronisation
tools. Thirdly, if you use version control software to track the changes to your project, the file
formats used for the files are well suited. Also the JSON documents have line breaks and indents,
which makes it easier to track them with version control software.
This way of storing data was chosen for several reasons.
Firstly, all the text you add to your project is saved directly to your project folder in separate
files. Only the project structure and the text you are currently editing is stored in memory at any
given time, which means there is a smaller risk of losing data if the application or your computer
crashes.
Secondly, having multiple small files means it is very easy to synchronise them between computers
with standard file synchronisation tools.
Thirdly, if you use version control software to track the changes to your project, the file formats
used for the files are well suited. Also the JSON documents have line breaks and indents, which
makes it easier to track them with version control software.
.. note::
Since novelWriter has to keep track of a bunch of files and folders when a project is open, it
may not run well on some virtual file systems. A file or folder must be accessible with exactly
the path it was saved or created with. An example where this is not the case is the way Google
Drive is mapped on Linux Gnome desktops using gvfs/gio.
.. caution::
You should not add additional files to the project folder yourself. Nor should you, as a rule,
manually edit files within it. If you really must manually edit the text files, e.g. with some
automated task you want to perform, you need to rebuild the :term:`Project Index` when you open
the project again.
You should not add additional files to the project folder yourself. Nor should you manually edit
files within it as a general rule. If you really must manually edit the text files, e.g. with
some automated task you want to perform, you need to rebuild the index when you open the project
again.
Editing text files in the ``content`` folder is less risky as they are just plain text. Editing
Editing text files in the ``content`` folder is less risky as these are just plain text. Editing
the main project XML file, however, may make the project file unreadable and you may crash
novelWriter and lose project structure information and project settings.

View File

@@ -7,11 +7,12 @@ Formatting Your Text
The novelWriter text editor is a plain text editor that uses formatting codes for setting meta data
values and allowing for some text formatting. The syntax is based on Markdown, but novelWriter is
*not* a Markdown editor. It supports basic formatting like emphasis (italic), strong importance
(bold) and strikethrough text, as well as four levels of headings.
(bold) and strike through text, as well as four levels of headings. Form some further complex
formatting needs, a set of shortcodes can be used.
In addition to formatting codes, novelWriter allows for comments, a synopsis tag, and a set of
keyword and value sets used for tags and references. There are also some codes that apply two whole
paragraphs. See :ref:`a_fmt_text` below for more details.
keyword and value sets used for :term:`tags<tag>` and :term:`references<reference>`. There are also
some codes that apply to whole paragraphs. See :ref:`a_fmt_text` for more details.
.. _a_fmt_hlight:
@@ -20,16 +21,21 @@ Syntax Highlighting
===================
The editor has a syntax highlighter feature that is meant to help you know when you've used the
formtatting tags or other features correctly. It will change the colour and font size of your
formatting tags or other features correctly. It will change the colour and font size of your
headings, change the text colour of emphasised text, and it can also show you where you have
dialogue in your text.
.. figure:: images/fig_references.png
An example of the colour highlighting of references. "Bob" is not defined, and "@blabla" is not
a valid reference type.
When you use the commands to set tags and references, these also change colour. Correct commands
have a dedicated colour, and the references themselves will get a colour if they are valid. Invalid
have a distinct colour, and the references themselves will get a colour if they are valid. Invalid
references will get a squiggly error line underneath. The same applies to duplicate tags.
There are a number of syntax highlighter colour themes available, both for light and dark GUIs. You
can select them for :guilabel:`Preferences`.
can select them from :guilabel:`Preferences`.
.. _a_fmt_head:
@@ -37,10 +43,14 @@ can select them for :guilabel:`Preferences`.
Headings
========
Four levels of headings are allowed. For project notes, they are free to be used as you see fit.
That is, novelWriter doesn't assign the different headings any particular meaning. However, for
novel documents they indicate the structural level of the novel and must be used correctly to
produce the intended result. See :ref:`a_struct_heads` for more details.
.. figure:: images/fig_header_levels.png
An illustration of how header levels correspond to the novel structure.
Four levels of headings are allowed. For :term:`project notes`, they are free to be used as you see
fit. That is, novelWriter doesn't assign the different headings any particular meaning. However,
for :term:`novel documents` they indicate the structural level of the novel and must be used
correctly to produce the intended result. See :ref:`a_struct_heads` for more details.
``# Title Text``
Heading level one. For novel documents, the header level indicates the start of a new partition.
@@ -56,14 +66,14 @@ produce the intended result. See :ref:`a_struct_heads` for more details.
``#### Title Text``
Heading level four. For novel documents, the header level indicates the start of a new section.
Section titles can be replaced by separators or removed completely when building the manuscript.
Section titles can be replaced by separators or ignored completely when building the manuscript.
For headers level one and two, adding a ``!`` modifies the behaviour of the heading:
``#! Title Text``
This tells the build tool that the level one heading is intended to be used for the novel's
main title, like for instance on the front page. When building the manuscript, this will use a
different styling and will exclude the title from for instance a Table of Contents in Libre
different styling and will exclude the title from, for instance, a Table of Contents in Libre
Office.
``##! Title Text``
@@ -85,12 +95,11 @@ A text paragraph is indicated by a blank line. That is, you need two line breaks
fragments of text into two paragraphs. Single line breaks are treated as line breaks within a
paragraph.
In addition, the editor supports a few additional types of whitespaces:
In addition, the editor supports a few additional types of white spaces:
* A non-breaking space can be inserted with :kbd:`Ctrl`:kbd:`K`, :kbd:`Space`.
* Thin spaces are also supported, and can be inserted with :kbd:`Ctrl`:kbd:`K`,
:kbd:`Shift`:kbd:`Space`.
* Non-breaking thin space can be inserted with :kbd:`Ctrl`:kbd:`K`, :kbd:`Ctrl`:kbd:`Space`.
* A non-breaking space can be inserted with :kbd:`Ctrl+K`, :kbd:`Space`.
* Thin spaces are also supported, and can be inserted with :kbd:`Ctrl+K`, :kbd:`Shift+Space`.
* Non-breaking thin space can be inserted with :kbd:`Ctrl+K`, :kbd:`Ctrl+Space`.
These are all insert features, and the :guilabel:`Insert` menu has more. They are also listed
in :ref:`a_kb_ins`.
@@ -109,7 +118,7 @@ background, depending on the selected theme.
Text Emphasis
=============
A minimal set of text emphasis styles are supported.
A minimal set of text emphasis styles are supported for text paragraphs.
``_text_``
The text is rendered as emphasised text (italicised).
@@ -118,9 +127,9 @@ A minimal set of text emphasis styles are supported.
The text is rendered as strongly important text (bold).
``~~text~~``
Strikethrough text.
Strike through text.
In markdown guides it is often recommended to differentiate between strong importance and emphasis
In Markdown guides it is often recommended to differentiate between strong importance and emphasis
by using ``**`` for strong and ``_`` for emphasis, although Markdown generally also supports ``__``
for strong and ``*`` for emphasis. However, since the differentiation makes the highlighting and
conversion significantly simpler and faster, in novelWriter this is a rule, not just a
@@ -128,15 +137,56 @@ recommendation.
In addition, the following rules apply:
1. The emphasis and strikethrough formatting tags do not allow spaces between the words and the tag
itself. That is, ``**text**`` is valid, ``**text **`` is not.
1. The emphasis and strike through formatting tags do not allow spaces between the words and the
tag itself. That is, ``**text**`` is valid, ``**text **`` is not.
2. More generally, the delimiters must be on the outer edge of words. That is, ``some **text in
bold** here`` is valid, ``some** text in bold** here`` is not.
3. If using both ``**`` and ``_`` to wrap the same text, the underscore must be the inner wrapper.
This is due to the underscore also being a valid word character, so if they are on the outside,
they violate rule 2.
3. If using both ``**`` and ``_`` to wrap the same text, the underscore must be the *inner*
wrapper. This is due to the underscore also being a valid word character, so if they are on the
outside, they violate rule 2.
4. Text emphasis does not span past line breaks. If you need to add emphasis to multiple lines or
paragraphs, you must apply it to each of them in turn.
5. Text emphasis can only be used in plain paragraphs. Comments, titles, and meta data tags don't
allow for formatting, and any formatting markup will be rendered as-is.
.. tip::
novelWriter supports standard escape syntax for the emphasis markup characters in case the
editor misunderstands your intended usage of them. That is, ``\*``, ``\_`` and ``\~`` will
generate a plain ``*``, ``_`` and ``~``, respectively, without interpreting them as part of the
markup.
.. _a_fmt_shortcodes:
Extended Formatting with Shortcodes
===================================
For additional formatting options, you can use shortcodes. Shortcodes is a form of in-line codes
that can be used to change the format of the text that follows and opening code, and last until
that formatting region is ended with a closing code.
These shortcodes are intended for special formatting cases, or more complex cases that cannot be
solved with simple Markdown-like formatting codes. Available shortcodes are listed below.
.. csv-table:: Shortcodes Formats
:header: "Syntax", "Description"
:widths: 40, 60
:class: "tight-table"
"``[b]text[/b]``", "Text is rendered as bold text."
"``[i]text[/i]``", "Text is rendered as italicised text."
"``[s]text[/s]``", "Text is rendered as strike through text."
"``[u]text[/u]``", "Text is rendered as underlined text."
"``[sup]text[/sup]``", "Text is rendered as superscript text."
"``[sub]text[/sub]``", "Text is rendered as subscript text."
Unlike Markdown style codes, these can be used anywhere within a paragraph. Even in the middle of a
word if you need to. You can also freely combine them to form more complex formatting.
The shortcodes are available from the :guilabel:`Format` menu and in the editor toolbar, which can
be activated by clicking the three dots in the editor header.
.. versionadded:: 2.2
.. _a_fmt_comm:
@@ -149,23 +199,29 @@ The text of a comment is ignored by the word counter. The text can also be filte
building the manuscript or viewing the document.
If the first word of a comment is ``Synopsis:`` (with the colon included), the comment is treated
specially and will show up in the :ref:`a_ui_outline` in a dedicated column. The word ``synopsis``
is not case sensitive. If it is correctly formatted, the syntax highlighter will indicate this by
altering the colour of the word.
in a special manner and will show up in the :ref:`a_ui_outline` in a dedicated column. The word
``synopsis`` is not case sensitive. If it is correctly formatted, the syntax highlighter will
indicate this by altering the colour of the word.
``% text...``
This is a comment. The text is not renderred by default (this can be overridden), seen in the
``% text ...``
This is a comment. The text is not rendered by default (this can be overridden), seen in the
document viewer, or counted towards word counts.
``% Synopsis: text...``
``%Synopsis: text ...``
This is a synopsis comment. It is generally treated in the same way as a regular comment, except
that it is also captured by the indexing algorithm and displayed in the :ref:`a_ui_outline`. It
can also be filtered separately when building the project to for instance generate an outline
document of the whole project.
``%Short: text ...``
This is a short description comment. It is identical to the synopsis comment, but is intended to
be used for project notes. The text shows up in the Reference panel below the document viewer in
the last column labelled :guilabel:`Short Description`.
.. note::
Only one comment can be flagged as a synopsis comment for each heading. If multiple comments are
flagged as synopsis comments, the last one will be used and the rest ignored.
Only one comment can be flagged as a synopsis or short comment for each heading. If multiple
comments are flagged as synopsis or short comments, the last one will be used and the rest
ignored.
.. _a_fmt_tags:
@@ -174,15 +230,23 @@ Tags and References
===================
The document editor supports a set of keywords used for setting tags, and making references between
documents. The tag can be set once per section defined by a heading. Setting it multiple times
under the same heading will just override the previous setting. References can be set anywhere
within a section, and are collected according to their category.
documents.
Tags use the command ``@tag:`` to define a tag. The tag can be set once per section defined by a
heading. Setting it multiple times under the same heading will just override the previous setting.
``@tag: value``
A tag command followed by the tag value, like for instance the name of a character.
References can be set anywhere within a section, and are collected according to their category.
References are in the form:
``@keyword: value``
A keyword argument followed by a value, or a comma separated list of values.
A reference keyword followed by a value, or a comma separated list of values.
The available tag and reference keywords are listed in the :ref:`a_struct_tags` section. They can
also be inserted at the cursor position in the editor via the :guilabel:`Insert` menu.
Tags and references are covered in detail in the :ref:`a_references` chapter. The keywords can be
inserted at the cursor position in the editor via the :guilabel:`Insert` menu. If you start typing
an ``@`` on a new line, and auto-complete menu will also pop up suggesting keywords.
.. _a_fmt_align:
@@ -191,7 +255,7 @@ Paragraph Alignment and Indentation
===================================
All documents have the text by default aligned to the left or justified, depending on your
Preferences.
settings in :guilabel:`Preferences`.
You can override the default text alignment on individual paragraphs by specifying alignment tags.
These tags are double angle brackets. Either ``>>`` or ``<<``. You put them either before or after
@@ -213,7 +277,7 @@ Examples:
"``>> Centred text <<``", "The text paragraph is centred."
"``> Left indented text``", "The text has an increased left margin."
"``Right indented text <``", "The text has an increased right margin."
"``> Left/right indented text <``", "The text has an both margins increased."
"``> Left/right indented text <``", "The text has both margins increased."
.. note::
The text editor will not show the alignment and indentation live. But the viewer will show them
@@ -239,10 +303,24 @@ headers of level two for novel documents, i.e. chapters, but not for project not
If you need to add a page break somewhere else, put the text ``[NEW PAGE]`` on a line by itself
before the text you wish to start on a new page.
Page breaks are automatically added to partition, chapter and unnumbered chapter headers of novel
documents. If you want such breaks for scenes and sections, you must add them manually.
If you want page breaks for scenes and sections, you must add them manually.
.. note::
The page break code is applied to the text that follows it. It adds a "page break before" mark
to the text when exporting to HTML or Open Document. This means that a ``[NEW PAGE]`` which has
no text following it, it will not result in a page break.
**Example:**
.. code-block:: markdown
This is a text paragraph.
[VSPACE:2]
This is another text paragraph, but there will be two empty paragraphs
in-between them.
[NEWPAGE]
This text will always start on a new page if the build format has pages.

View File

@@ -1,271 +0,0 @@
.. _a_ui:
******************
The User Interface
******************
.. _Compose Key: https://en.wikipedia.org/wiki/Compose_key
This sections covers in more detail what all the information on the user interface is for, and how
you can organise your project, and how you use the editor, viewer and outline panel.
.. _a_ui_tree:
The Project Tree
================
The main window contains a project tree in the left-most panel. It shows the entire structure of
the project, and has four columns:
**Column 1**
The first column shows the icon and label of each folder, document, or note in your project. The
label is not the same as the title you set inside the document. However, the document's label
will appear in the header above the document text itself so you know where in the project an
open document belongs. The icon is selected based on the type of item, and for novel documents,
the level of the first header in the document text.
**Column 2**
The second column shows the word count of the document, or the sum of words of the child items
for folders and documents with subdocuments. If the counts seem incorrect, they can be updated
by rebuilding the project index from the :guilabel:`Tools` menu, or by pressing :kbd:`F9`.
**Column 3**
The third column indicates whether the document is considered active or inactive in the project.
You can use this flag to indicate that a document is still in the project, but should not be
considered an active part of it. When you run the :guilabel:`Build Novel Project` tool, you can
filter based on this flag. You can change this value from the context menu.
**Column 4**
The fourth column shows the user-defined status or importance labels you've assigned to each
project item. See :ref:`a_ui_tree_status` for more details. You can change these labels from the
context menu.
Right-clicking an item in the project tree will open a context menu under the cursor, displaying
a selection of actions that can be performed on the selected item.
At the top of the tree, you will find a set of buttons.
* The first button is a quick links button that will show you a dropdown menu of all the root
folders in your project. Selecting one will move to that position in the tree. You can also
activate this menu by pressing :kbd:`Ctrl`:kbd:`L`.
* The next two buttons can be used to move items up and down in the project tree. This is the only
way to move root folders.
* The next button opens a dropdown menu for adding new items to the tree. This includes root
folders. You can also activate this dropdown menu by pressing :kbd:`Ctrl`:kbd:`N`.
* The last button is a menu of further actions on the entire project tree.
.. tip::
Under the :guilabel:`Transform` submenu in the context menu of an item, you will find several
options on how to change a document or folder. This includes changing between document and note,
splitting them into multiple documents, or merging child items into a single document.
Below the project tree you will find a small details panel showing the full information of the
currently selected item. This panel also includes the latest paragraph and character counts in
addition to the word count.
.. _a_ui_tree_novel:
The Novel Tree
--------------
An alternative way to view the project structure is the novel tree. You can switch to this view by
selecting the :guilabel:`Novel Tree View` button in the sidebar. This view is a simplified version
of the view in the :guilabel:`Outline`. It is convenient when you want to browse the structure of
the story itself rather than the document files.
.. note::
You cannot reorganise the entries in the novel tree, or add any new documents, as that would
imply restructuring the content of the document files. Any editing must be done in the project
tree. However, you can add new headings to existing documents, or change references, which will
be updated in this view.
.. _a_ui_tree_status:
Document Importance and Status
------------------------------
Each document or folder in your project can have either a "Status" or "Importance" flag set. These
are flags that you control and define yourself. The app doesn't do anything with them at all. To
modify the labels, go to their respective tabs in :guilabel:`Project Settings`.
The "Status" flag is intended to tag a Novel document as for instance a draft or as completed, and
the "Importance" flag is intended to tag character notes, or other notes, as for instance a main,
major or minor character.
Whether a document uses a "Status" or "Importance" flag depends on which root folder it lives in.
If it's in the :guilabel:`Novel` folder, it uses the "Status" flag, otherwise it uses an
"Importance" flag. Some folders, like :guilabel:`Trash` and :guilabel:`Archive` allow both.
.. _a_ui_tree_dnd:
Project Tree Drag & Drop
------------------------
The project tree allows drag & drop to a certain extent to allow you to reorder your documents and
folders. Moving a document in the project tree will affect the text's position when you assemble
your manuscript in the build tool.
Drag & drop has only limited support for moving documents. In general, bulk actions are not
allowed. This is deliberate to avoid accidentally messing up your project. If you make a mistake,
the last move action can be undone by pressing :kbd:`Ctrl`:kbd:`Shift`:kbd:`Z`.
Documents and their folders can be rearranged freely within their root folders. If you move a Novel
documents out of a Novel folder, it will be converted to a project note. Notes can be moved freely
between all root folders, but keep in mind that if you move a note into a :guilabel:`Novel` root
folder, its "Importance" setting will be switched with a "Status" setting. See
:ref:`a_ui_tree_status`. The old value will not be overwritten though, and should be restored if
you move it back at some point.
Root folders in the project tree cannot be dragged & dropped at all. If you want to reorder them,
you can move them up or down with respect to eachother from the arrow buttons at the top of the
project tree, or by pressing :kbd:`Ctrl`:kbd:`Shift` and the :kbd:`Up` or :kbd:`Down` key.
.. _a_ui_edit:
Editing and Viewing Documents
=============================
To edit a document, double-click it in the project tree, or press the :kbd:`Return` key while
having it selected. This will open the document in the document editor. The editor uses a
Markdown-like syntax for some features, and a novelWriter-specific syntax for others. The syntax
format is described in the :ref:`a_fmt` section.
The editor has a maximise button (toggles the :guilabel:`Focus Mode`) and a close button in the
top–right corner. On the top–left side you will find an edit button that opens the
:guilabel:`Item Label` dialog for the currently open document, and a search button to open the
search dialog.
Any document in the project tree can also be viewed in parallel in a right hand side document
viewer. To view a document, press :kbd:`Ctrl`:kbd:`R`, or select :guilabel:`View Document` in the
menu or context menu. If you have a middle mouse button, middle-clicking on the document will also
open it in the viewer.
The document viewed does not have to be the same document as currently being edited. However, If
you *are* viewing the same document, pressing :kbd:`Ctrl`:kbd:`R` again will update the document
with your latest changes. You can also press the reload button in the top–right corner of the view
panel, next to the close button, to achieve the same thing.
Both the document editor and viewer will show the label of the document in the header at the top of
the edit or view panel. Optionally, the full project path to the document can be shown. This can be
set in :guilabel:`Preferences`.
.. tip::
Clicking on the document title bar will select the document in the project tree and reveal its
location, making it easier to locate in a large project.
Any tag reference in the editor can be opened in the viewer by moving the cursor to the label and
pressing :kbd:`Ctrl`:kbd:`Return`. You can also control-click them with your mouse. In the viewer,
the references become clickable links. Clicking them will replace the content of the viewer with
the content of the document the reference points to.
The document viewer keeps a history of viewed documents, which you can navigate with the arrow
buttons in the top–left corner of the viewer. If your mouse has backward and forward navigation
buttons, these can be used as well. They work just like the backward and forward features in a
browser.
At the bottom of the view panel there is a :guilabel:`References` panel. (If it is hidden, click
the icon to reveal it.) This panel will show links to all documents referring back to the one
you're currently viewing, if any has been defined. The :guilabel:`Sticky` button will freeze the
content of the panel to the current document, even if you navigate to another document. This is
convenient if you want to quickly look through all documents in the list in the
:guilabel:`References` panel without losing the list in the process.
.. note::
The :guilabel:`References` panel relies on an up-to-date index of the project. The index is
maintained automatically. However, if anything is missing, or seems wrong, the index can always
be rebuilt by selecting :guilabel:`Rebuild Index` from the :guilabel:`Tools` menu, or by
pressing :kbd:`F9`.
.. _a_ui_edit_search:
Search & Replace
----------------
The document editor has a search and replace tool that can be activated with :kbd:`Ctrl`:kbd:`F`
for search mode or :kbd:`Ctrl`:kbd:`H` for search and replace mode.
Pressing :kbd:`Return` while in the search box will search for the next occurrence of the word, and
:kbd:`Shift`:kbd:`Return` for the previous. Pressing :kbd:`Return` in the replace box, will replace
the highlighted text and move to the next result.
There are a number of settings for the search tool available as toggle switches above the search
box. They allow you to search for, in order: matched case only, whole word results only, search
using regular expressions, loop search when reaching the end of the document, and move to the next
document when reaching the end. There is also a switch that will try to match the case of the word
when the replacement is made. That is, it will try to keep the word upper, lower, or capitalised to
match the word being replaced.
The regular expression search is somewhat dependant on which version of Qt your system has. If you
have Qt 5.13 or higher, there is better support for unicode symbols in the search.
.. _a_ui_edit_auto:
Auto-Replace as You Type
========================
A few auto-replace features are supported by the editor. You can control every aspect of the
auto-replace feature from :guilabel:`Preferences`. You can also disable this feature entirely if
you wish.
.. tip::
If you don't like auto-replacement, all symbols inserted by this feature are also available in
the :guilabel:`Insert` menu, and via convenient :ref:`a_kb_ins`. You may also be using a
`Compose Key`_ setup, which means you may not need the auto-replace feature.
The editor is able to replace two and three hyphens with short and long dashes, triple points with
ellipsis, and replace straight single and double quotes with user-defined quote symbols. It will
also try to determine whether to use the opening or closing symbol, although this feature isn't
always accurate. Especially distinguishing between closing single quote and apostrophe can be
tricky for languages that use the same symbol for these, like English does.
.. tip::
If the auto-replace feature changes a symbol when you did not want it to change, pressing
:kbd:`Ctrl`:kbd:`Z` immediately after the auto-replacement will undo it without undoing the
character you typed.
.. _a_ui_outline:
Project Outline View
====================
The project's Outline view is available as another view option from the views bar. The outline
provides an overview of the novel structure, displaying a tree hierarchy of the elements of the
novel, that is, the level 1 to 4 headings representing partitions, chapters, scenes and sections.
The document containing the heading can also be displayed as a separate column, as well as the line
number where it occurs. Double-clicking an entry will open the corresponding document in the
editor.
You can select which novel folder to display from the dropdown menu. You can optionally also choose
to show a combination of all novel folders.
.. note::
Since the internal structure of the novel does not depend directly on the folder and document
structure of the project tree, these will not necessarily look the same, depending on how you
choose to organise your documents. See the :ref:`a_struct` page for more details.
Various meta data and information extracted from tags can be displayed in columns in the outline.
A default set of such columns is visible, but you can turn on or off more columns from the menu
button in the toolbar. The order of the columns can also be rearranged by dragging them to a
different position. You column settings are saved between sessions on a per-project basis.
.. note::
The :guilabel:`Title` column cannot be disabled or moved.
The information viewed in the outline is based on the project's main index. While novelWriter does
its best to keep the index up to date when contents change, you can always rebuild it manually by
pressing :kbd:`F9` if something isn't right.
The outline view itself can be regenerated by pressing the refresh button. By default, the content
is refreshed each time you switch to this view.
The :guilabel:`Synopsis` column of the outline view takes its information from a specially
formatted comment. See :ref:`a_fmt_comm`.

View File

@@ -0,0 +1,231 @@
.. _a_ui_project:
*************
Project Views
*************
This chapter covers in more detail the different project views available in novelWriter.
.. figure:: images/fig_project_tree_detailed.png
The Project Tree as it appears when loading a sample project.
.. _a_ui_tree:
The Project Tree
================
The main window contains a project tree in the left-most panel. It shows the entire structure of
the project, and has four columns.
**Column 1**
The first column shows the icon and label of each folder, document, or note in your project. The
label is not the same as the title you set inside the document. However, the document's label
will appear in the header above the document text itself so you know where in the project an
open document belongs. The icon is selected based on the type of item, and for novel documents,
the level of the first header in the document text.
**Column 2**
The second column shows the word count of the document, or the sum of words of the child items
for folders and documents with sub-documents. If the counts seem incorrect, they can be updated
by rebuilding the :term:`project index` from the :guilabel:`Tools` menu, or by pressing
:kbd:`F9`.
**Column 3**
The third column indicates whether the document is considered active or inactive in the project.
You can use this flag to indicate that a document is still in the project, but should not be
considered an active part of it. When you run the :guilabel:`Build Manuscript` tool, you can
include or exclude documents based on this flag. You can change this value from the
:term:`context menu`.
**Column 4**
The fourth column shows the user-defined status or importance labels you've assigned to each
project item. See :ref:`a_ui_tree_status` for more details on how to uses these labels. You can
change these labels from the :term:`context menu`.
Right-clicking an item in the project tree will open a context menu under the cursor, displaying
a selection of actions that can be performed on the selected item.
At the top of the tree, you will find a set of buttons.
* The first button is a quick links button that will show you a dropdown menu of all the
:term:`root folders<root folder>` in your project. Selecting one will move to that position in
the tree. You can also activate this menu by pressing :kbd:`Ctrl+L`.
* The next two buttons can be used to move items up and down in the project tree. This is the only
way to move root folders.
* The next button opens a dropdown menu for adding new items to the tree. This includes root
folders. You can also activate this dropdown menu by pressing :kbd:`Ctrl+N`.
* The last button is a menu of further actions you can apply to the project tree.
Below the project tree you will find a small details panel showing the full information of the
currently selected item. This panel also includes the latest paragraph and character counts in
addition to the word count.
.. tip::
If you want to set the label of a document to be the same as a header within it, you can
right-click a header in the document when it is open in the editor and select
:guilabel:`Set as Document Name` from the context menu.
.. _a_ui_tree_split_merge:
Splitting and Merging Documents
-------------------------------
Under the :guilabel:`Transform` submenu in the context menu of an item in the project tree, you
will find several options on how to change a document or folder. This includes changing between
document and note, but also splitting them into multiple documents, or merging child items into a
single document.
Splitting Documents
^^^^^^^^^^^^^^^^^^^
.. figure:: images/fig_project_split_tool.png
The :guilabel:`Split Document` dialog.
The :guilabel:`Split Document by Header` option will open a dialog that allows you to split the
selected document into multiple new documents based on the headings it contains. You can select at
which heading level the split is to be performed from the dropdown box. The list box will preview
which headings will be split into new documents.
You are given the option to create a folder for these new documents, and whether or not to create a
hierarchy of documents. That is, put sections under scenes, and scenes under chapters.
The source document *is not* deleted in the process, but you have the option to let the tool move
the source document to the :guilabel:`Trash` folder.
Merging Documents
^^^^^^^^^^^^^^^^^
.. figure:: images/fig_project_merge_tool.png
The :guilabel:`Merge Documents` dialog.
You have two options for merging documents that are child elements of another document. You can
either :guilabel:`Merge Child Items into Self` and :guilabel:`Merge Child Items into New`. The
first option will pull all content of child items and merge them into the parent document, while
the second option will create a new document in the process.
When merging documents in a folder, you only have the latter process is possible, so only the
choice :guilabel:`Merge Documents in Folder` is available.
In either case, the :guilabel:`Merge Documents` dialog will let you exclude documents you don't
want to include, and it also lets you reorder them if you wish.
.. _a_ui_tree_status:
Document Importance and Status
------------------------------
Each document or folder in your project can have either a "Status" or "Importance" flag set. These
are flags that you control and define yourself. novelWriter doesn't do anything with them at all.
To modify the labels, go to their respective tabs in :guilabel:`Project Settings`.
The "Status" flag is intended to tag a :term:`novel document<novel documents>` as for instance a
draft or as completed, and the "Importance" flag is intended to tag character notes, or other
:term:`project notes`, as for instance a main, major, or minor character or story element.
Whether a document uses a "Status" or "Importance" flag depends on which :term:`root folder` it
lives in. If it's in a :guilabel:`Novel` folder, it uses the "Status" flag, otherwise it uses an
"Importance" flag. Some folders, like :guilabel:`Trash` and :guilabel:`Archive` allow both.
.. _a_ui_tree_dnd:
Project Tree Drag & Drop
------------------------
The project tree allows drag & drop to a certain extent to allow you to reorder your documents and
folders. Moving a document in the project tree will affect the text's position when you assemble
your manuscript in the :guilabel:`Manuscript Build` tool.
.. versionadded:: 2.2
You can now select multiple items in the project tree by holding down the :kbd:`Ctrl` or
:kbd:`Shift` key while selecting items.
You can drag and drop documents and regular folders, but not root folders. If you select multiple
items, they can only be dragged and dropped if they are siblings. That is, they have the same
parent item in the project. This is due to the way drag and drop is implemented in the user
interface framework novelWriter is built upon.
Documents and their folders can be rearranged freely within their root folders. If you move a Novel
document out of a Novel folder, it will be converted to a project note. Notes can be moved freely
between all root folders, but keep in mind that if you move a note into a :guilabel:`Novel` root
folder, its "Importance" setting will be switched with a "Status" setting. See
:ref:`a_ui_tree_status`. The old value will not be overwritten though, and should be restored if
you move it back at some point.
Root folders in the project tree cannot be dragged and dropped at all. If you want to reorder them,
you can move them up or down with respect to each other from the arrow buttons at the top of the
project tree, or by pressing :kbd:`Ctrl+Shift+Up` or :kbd:`Ctrl+Shift+Down` when they are selected.
.. _a_ui_tree_novel:
The Novel Tree
==============
.. figure:: images/fig_novel_tree_view.png
A screenshot of the Novel Tree View.
An alternative way to view the project structure is the novel tree. You can switch to this view by
selecting the :guilabel:`Novel Tree View` button in the sidebar. This view is a simplified version
of the view in the :guilabel:`Outline View`. It is convenient when you want to browse the structure
of the story itself rather than the document files.
.. note::
You cannot reorganise the entries in the novel tree, or add any new documents, as that would
imply restructuring the content of the document files themselves. Any such editing must be done
in the project tree. However, you can add new headings to existing documents, or change
references, which will be updated in this view when the document is saved.
.. _a_ui_outline:
Project Outline View
====================
.. figure:: images/fig_outline_view.png
A screenshot of the Novel Outline View.
The project's :guilabel:`Outline View` is available as another view option from the sidebar. The
outline provides an overview of the novel structure, displaying a tree hierarchy of the elements of
the novel, that is, the level 1 to 4 headings representing partitions, chapters, scenes and
sections.
The document containing the heading can also be displayed as a separate column, as well as the line
number where the heading is defined. Double-clicking an entry will open the corresponding document
in the editor and switch to :guilabel:`Project Tree View` mode.
You can select which novel folder to display from the dropdown menu. You can optionally also choose
to show a combination of all novel folders.
.. note::
Since the internal structure of the novel does not depend directly on the folder and document
structure of the project tree, this view will not necessarily look the same, depending on how
you choose to organise your documents. See the :ref:`a_struct` page for more details.
Various meta data and information extracted from :term:`tags<tag>` can be displayed in columns in
the outline. A default set of such columns is visible, but you can turn on or off more columns from
the menu button in the toolbar. The order of the columns can also be rearranged by dragging them to
a different position. You column settings are saved between sessions on a per-project basis.
.. note::
The :guilabel:`Title` column cannot be disabled or moved.
The information viewed in the outline is based on the :term:`project index`. While novelWriter does
its best to keep the index up to date when contents change, you can always rebuild it manually by
pressing :kbd:`F9` if something isn't right.
The outline view itself can be regenerated by pressing the refresh button. By default, the content
is refreshed each time you switch to this view.
The :guilabel:`Synopsis` column of the outline view takes its information from a specially
formatted comment. See :ref:`a_fmt_comm`.

View File

@@ -5,21 +5,20 @@ Project Format Changes
**********************
.. _File Format Spec 1.5: _static/fileformatspec15.pdf
.. _documentation: https://novelwriter.readthedocs.io
.. _documentation: https://docs.novelwriter.io/
Most of the changes to the file formats over the history of novelWriter have no impact on the
user-side of things. The project files are generally updated automatically. However, some of the
user side of things. The project files are generally updated automatically. However, some of the
changes require minor actions from the user.
The key changes in the formats are listed below, as well as the user actions required, where
applicable.
The key changes in the formats are listed in this chapter, as well as the user actions required,
where applicable.
.. only:: not html
A full project file format specification is available in the online documentation_.
.. caution::
When you update a project from one format version to the next, the project can no longer be
opened by a version of novelWriter prior to the version where the new file format was
introduced. You will get a notification about any updates to your project file format and will
@@ -29,7 +28,8 @@ applicable.
**For Developers**
A full description of the current file format is available in the `File Format Spec 1.5`_
A full description of the current file format is available in the
:download:`File Format Spec 1.5 <fileformatspec15.pdf>`
document, available as a PDF. This document is intended for contributors to novelWriter, those
building project conversion tools, either to or from tne novelWriter format, and for those who
wish to make their own templating system.
@@ -70,7 +70,7 @@ Format 1.3 Changes
This project format was introduced in novelWriter version 1.5.
With this format, the number of document layouts was reduced from 8 to 2. The conversion of
With this format, the number of document layouts was reduced from eight to two. The conversion of
document layouts is performed automatically when the project is opened.
Due to the reduction of layouts, some features that were previously controlled by these layouts
@@ -84,7 +84,7 @@ should be used only a few places in any given project. These are as follows:
* The formatting of the level one title on the title page must be changed from ``# Title Text`` to
``#! Title Text`` in order to retain the previous functionality. See :ref:`a_fmt_head`.
* Any text that was previously centred on the page must be manually centred using the new text
* Any text that was previously centred on the page must be manually centred using the text
alignment feature. See :ref:`a_fmt_align`.
**Unnumbered Chapters**

View File

@@ -4,143 +4,195 @@
Keyboard Shortcuts
******************
Most features in novelWriter are available as keyboard shortcuts. This is a reference list if these
shortcuts. Most of them are also listed in the application.
Most features in novelWriter are available as keyboard shortcuts. This is a reference list of those
shortcuts. Most of them are also listed in the application's user interface.
.. note::
On MacOS, replace :kbd:`Ctrl` with :kbd:`Cmd`.
.. _a_kb_main:
Main Shortcuts
==============
Main Window Shortcuts
=====================
The main shorcuts are as follows:
.. csv-table:: Keyboard Shortcuts
.. csv-table::
:header: "Shortcut", "Description"
:widths: 22, 78
:class: "tight-table"
":kbd:`F1`", "Open the online user manual."
":kbd:`F2`", "If in the project tree, edit an item's label."
":kbd:`F3`", "Find next occurrence of search word in current document."
":kbd:`F5`", "Open the :guilabel:`Build Novel Project` dialog."
":kbd:`F6`", "Open the :guilabel:`Writing Statistics` dialog."
":kbd:`F7`", "Re-run spell checker."
":kbd:`F8`", "Toggle :guilabel:`Focus Mode`."
":kbd:`F9`", "Re-build the project index."
":kbd:`F11`", "Toggle full screen mode."
":kbd:`Return`", "If in the project tree, open a document for editing."
":kbd:`Alt`:kbd:`1`", "Switch focus to the project tree. On Windows, use :kbd:`Ctrl`:kbd:`Alt`:kbd:`1`."
":kbd:`Alt`:kbd:`2`", "Switch focus to document editor. On Windows, use :kbd:`Ctrl`:kbd:`Alt`:kbd:`2`."
":kbd:`Alt`:kbd:`3`", "Switch focus to document viewer. On Windows, use :kbd:`Ctrl`:kbd:`Alt`:kbd:`3`."
":kbd:`Alt`:kbd:`4`", "Switch focus to outline view. On Windows, use :kbd:`Ctrl`:kbd:`Alt`:kbd:`4`."
":kbd:`Alt`:kbd:`Left`", "Move backward in the view history of the document viewer."
":kbd:`Alt`:kbd:`Right`", "Move forward in the view history of the document viewer."
":kbd:`Ctrl`:kbd:`.`", "Open the context menu in the project tree or the document editor."
":kbd:`Ctrl`:kbd:`,`", "Open the :guilabel:`Preferences` dialog."
":kbd:`Ctrl`:kbd:`/`", "Toggle block format as comment."
":kbd:`Ctrl`:kbd:`0`", "Remove block formatting for block under cursor."
":kbd:`Ctrl`:kbd:`1`", "Change block format to header level 1."
":kbd:`Ctrl`:kbd:`2`", "Change block format to header level 2."
":kbd:`Ctrl`:kbd:`3`", "Change block format to header level 3."
":kbd:`Ctrl`:kbd:`4`", "Change block format to header level 4."
":kbd:`Ctrl`:kbd:`5`", "Change block alignment to left-aligned."
":kbd:`Ctrl`:kbd:`6`", "Change block alignment to centred."
":kbd:`Ctrl`:kbd:`7`", "Change block alignment to right-aligned."
":kbd:`Ctrl`:kbd:`8`", "Add a left margin to the block."
":kbd:`Ctrl`:kbd:`9`", "Add a right margin to the block."
":kbd:`Ctrl`:kbd:`A`", "Select all text in the document."
":kbd:`Ctrl`:kbd:`B`", "Format selected text, or word under cursor, with strong emphasis (bold)."
":kbd:`Ctrl`:kbd:`C`", "Copy selected text to clipboard."
":kbd:`Ctrl`:kbd:`D`", "Strikethrough selected text, or word under cursor."
":kbd:`Ctrl`:kbd:`F`", "Open the search bar and search for the selected word, if any is selected."
":kbd:`Ctrl`:kbd:`G`", "Find next occurrence of search word in current document."
":kbd:`Ctrl`:kbd:`H`", "Open the search and replace tool and search for the selected word, if any is selected. (On Mac, this is :kbd:`Cmd`:kbd:`=`.)"
":kbd:`Ctrl`:kbd:`I`", "Format selected text, or word under cursor, with emphasis (italic)."
":kbd:`Ctrl`:kbd:`K`", "Activate the insert commands. The commands are listed in :ref:`a_kb_ins`."
":kbd:`Ctrl`:kbd:`L`", "Open the :guilabel:`Quick Links` menu in the Project Tree."
":kbd:`Ctrl`:kbd:`N`", "Open the Create New Item menu in the Project Tree."
":kbd:`Ctrl`:kbd:`O`", "Open selected document."
":kbd:`Ctrl`:kbd:`Q`", "Exit novelWriter."
":kbd:`Ctrl`:kbd:`R`", "If in the project tree, open a document for viewing. If in the editor, open current document for viewing."
":kbd:`Ctrl`:kbd:`S`", "Save the current document in the document editor."
":kbd:`Ctrl`:kbd:`V`", "Paste text from clipboard to cursor position."
":kbd:`Ctrl`:kbd:`W`", "Close the current document in the document editor."
":kbd:`Ctrl`:kbd:`X`", "Cut selected text to clipboard."
":kbd:`Ctrl`:kbd:`Y`", "Redo latest undo."
":kbd:`Ctrl`:kbd:`Z`", "Undo latest changes."
":kbd:`Ctrl`:kbd:`F7`", "Toggle spell checking."
":kbd:`Ctrl`:kbd:`Up`", "Move item one step up in the project tree."
":kbd:`Ctrl`:kbd:`Down`", "Move item one step down in the project tree."
":kbd:`Ctrl`:kbd:`Del`", "Delete next word in editor."
":kbd:`Ctrl`:kbd:`Backspace`", "Delete previous word in editor."
":kbd:`Ctrl`:kbd:`'`", "Wrap selected text, or word under cursor, in single quotes."
":kbd:`Ctrl`:kbd:`""`", "Wrap selected text, or word under cursor, in double quotes."
":kbd:`Ctrl`:kbd:`Return`", "Open the tag or reference under the cursor in the Viewer."
":kbd:`Ctrl`:kbd:`Shift`:kbd:`,`", "Open the :guilabel:`Project Settings` dialog."
":kbd:`Ctrl`:kbd:`Shift`:kbd:`/`", "Remove block formatting for block under cursor."
":kbd:`Ctrl`:kbd:`Shift`:kbd:`1`", "Replace occurrence of search word in current document, and search for next occurrence."
":kbd:`Ctrl`:kbd:`Shift`:kbd:`A`", "Select all text in current paragraph."
":kbd:`Ctrl`:kbd:`Shift`:kbd:`G`", "Find previous occurrence of search word in current document."
":kbd:`Ctrl`:kbd:`Shift`:kbd:`I`", "Import text to the current document from a text file."
":kbd:`Ctrl`:kbd:`Shift`:kbd:`O`", "Open a project."
":kbd:`Ctrl`:kbd:`Shift`:kbd:`R`", "Close the document viewer."
":kbd:`Ctrl`:kbd:`Shift`:kbd:`S`", "Save the current project."
":kbd:`Ctrl`:kbd:`Shift`:kbd:`W`", "Close the current project."
":kbd:`Ctrl`:kbd:`Shift`:kbd:`Z`", "Undo move of project tree item."
":kbd:`Ctrl`:kbd:`Shift`:kbd:`Del`", "If in the project tree, move an item to Trash."
":kbd:`Shift`:kbd:`F1`", "Open the local user manual (PDF) if it is available."
":kbd:`Shift`:kbd:`F3`", "Find previous occurrence of search word in current document."
":kbd:`Shift`:kbd:`F6`", "Open the :guilabel:`Project Details` dialog."
":kbd:`F1`", "Open the online user manual"
":kbd:`F5`", "Open the :guilabel:`Build Manuscript` tool"
":kbd:`F6`", "Open the :guilabel:`Writing Statistics` tool"
":kbd:`F8`", "Toggle :guilabel:`Focus Mode`"
":kbd:`F9`", "Re-build the project index"
":kbd:`F11`", "Toggle full screen mode"
":kbd:`Ctrl+,`", "Open the :guilabel:`Preferences` dialog"
":kbd:`Ctrl+E`", "Switch focus to the document editor"
":kbd:`Ctrl+T`", "Switch focus to the project/novel tree"
":kbd:`Ctrl+Q`", "Exit novelWriter"
":kbd:`Ctrl+Shift+,`", "Open the :guilabel:`Project Settings` dialog"
":kbd:`Ctrl+Shift+O`", "Open a project"
":kbd:`Ctrl+Shift+S`", "Save the current project"
":kbd:`Ctrl+Shift+T`", "Switch focus to the outline view"
":kbd:`Ctrl+Shift+W`", "Close the current project"
":kbd:`Shift+F1`", "Open the local user manual (PDF) if it is available"
":kbd:`Shift+F6`", "Open the :guilabel:`Project Details` dialog"
.. note::
On macOS, replace :kbd:`Ctrl` with :kbd:`Cmd`.
.. _a_kb_tree:
Project Tree Shortcuts
======================
.. csv-table::
:header: "Shortcut", "Description"
":kbd:`F2`", "Edit the label of the selected item"
":kbd:`Return`", "Open the selected document in the editor"
":kbd:`Alt+Up`", "Jump or go to the previous item at same level in the tree"
":kbd:`Alt+Down`", "Jump or go to the next item at same level in the tree"
":kbd:`Alt+Left`", "Jump to the parent item in the tree"
":kbd:`Alt+Right`", "Jump to the first child item in the project tree"
":kbd:`Ctrl+.`", "Open the context menu on the selected item"
":kbd:`Ctrl+L`", "Open the :guilabel:`Quick Links` menu"
":kbd:`Ctrl+N`", "Open the :guilabel:`Create New Item` menu"
":kbd:`Ctrl+O`", "Open selected document"
":kbd:`Ctrl+R`", "Open the selected document in the viewer"
":kbd:`Ctrl+Up`", "Move selected item one step up in the tree"
":kbd:`Ctrl+Down`", "Move selected item one step down in the tree"
":kbd:`Ctrl+Shift+Del`", "Move the selected item to Trash"
":kbd:`Ctrl+Shift+Z`", "Undo the last move of a project item, if possible"
.. _a_kb_editor:
Document Editor Shortcuts
=========================
Text Search Shortcuts
---------------------
.. csv-table::
:header: "Shortcut", "Description"
":kbd:`F3`", "Find the next occurrence of the search word"
":kbd:`Ctrl+F`", "Open the search bar and search for the selected word, if any is selected"
":kbd:`Ctrl+G`", "Find the next occurrence of the search word"
":kbd:`Ctrl+H`", "Open the search tool and populate with the selected word (Mac :kbd:`Cmd+=`)"
":kbd:`Ctrl+Shift+1`", "Replace selected occurrence of the search word, and move to the next"
":kbd:`Ctrl+Shift+G`", "Find the previous occurrence of the search word"
":kbd:`Shift+F3`", "Find the previous occurrence of the search word"
Text Formatting Shortcuts
-------------------------
.. csv-table::
:header: "Shortcut", "Description"
":kbd:`Ctrl+'`", "Wrap selected text, or word under cursor, in single quotes"
":kbd:`Ctrl+""`", "Wrap selected text, or word under cursor, in double quotes"
":kbd:`Ctrl+/`", "Toggle block format as comment"
":kbd:`Ctrl+0`", "Remove block formatting for block under cursor"
":kbd:`Ctrl+1`", "Change block format to header level 1"
":kbd:`Ctrl+2`", "Change block format to header level 2"
":kbd:`Ctrl+3`", "Change block format to header level 3"
":kbd:`Ctrl+4`", "Change block format to header level 4"
":kbd:`Ctrl+5`", "Change block alignment to left-aligned"
":kbd:`Ctrl+6`", "Change block alignment to centred"
":kbd:`Ctrl+7`", "Change block alignment to right-aligned"
":kbd:`Ctrl+8`", "Add a left margin to the block"
":kbd:`Ctrl+9`", "Add a right margin to the block"
":kbd:`Ctrl+B`", "Format selected text, or word under cursor, with strong emphasis (bold)"
":kbd:`Ctrl+D`", "Strike through selected text, or word under cursor"
":kbd:`Ctrl+I`", "Format selected text, or word under cursor, with emphasis (italic)"
":kbd:`Ctrl+Shift+/`", "Remove block formatting for block under cursor"
Other Editor Shortcuts
----------------------
.. csv-table::
:header: "Shortcut", "Description"
":kbd:`F7`", "Re-run the spell checker"
":kbd:`Ctrl+.`", "Open the context menu at the current cursor location"
":kbd:`Ctrl+A`", "Select all text in the document"
":kbd:`Ctrl+C`", "Copy selected text to clipboard"
":kbd:`Ctrl+K`", "Activate the insert commands (see list in :ref:`a_kb_ins`)"
":kbd:`Ctrl+R`", "Open or reload the current document in the viewer"
":kbd:`Ctrl+S`", "Save the current document"
":kbd:`Ctrl+V`", "Paste text from clipboard to cursor position"
":kbd:`Ctrl+W`", "Close the current document"
":kbd:`Ctrl+X`", "Cut selected text to clipboard"
":kbd:`Ctrl+Y`", "Redo latest undo"
":kbd:`Ctrl+Z`", "Undo latest changes"
":kbd:`Ctrl+Backspace`", "Delete the word before the cursor"
":kbd:`Ctrl+Del`", "Delete the word after the cursor"
":kbd:`Ctrl+F7`", "Toggle spell checking"
":kbd:`Ctrl+Return`", "Open the tag or reference under the cursor in the viewer"
":kbd:`Ctrl+Shift+A`", "Select all text in the current paragraph"
":kbd:`Ctrl+Shift+I`", "Import text to the current document from a text file"
.. _a_kb_ins:
Insert Shortcuts
================
----------------
A set of insert features are also available through shortcuts, but they require a double
combination of key sequences. The insert feature is activated with :kbd:`Ctrl`:kbd:`K`, followed by
combination of key sequences. The insert feature is activated with :kbd:`Ctrl+K`, followed by
a key or key combination for the inserted content.
.. csv-table:: Keyboard Shortcuts
.. csv-table::
:header: "Shortcut", "Description"
:widths: 30, 70
:class: "tight-table"
":kbd:`Ctrl`:kbd:`K`, :kbd:`−`", "Insert a short dash (en dash)."
":kbd:`Ctrl`:kbd:`K`, :kbd:`_`", "Insert a long dash (em dash)."
":kbd:`Ctrl`:kbd:`K`, :kbd:`Ctrl`:kbd:`_`", "Insert a horizontal bar (quotation dash)."
":kbd:`Ctrl`:kbd:`K`, :kbd:`~`", "Insert a figure dash (same width as a number)."
":kbd:`Ctrl`:kbd:`K`, :kbd:`1`", "Insert a left single quote."
":kbd:`Ctrl`:kbd:`K`, :kbd:`2`", "Insert a right single quote."
":kbd:`Ctrl`:kbd:`K`, :kbd:`3`", "Insert a left double quote."
":kbd:`Ctrl`:kbd:`K`, :kbd:`4`", "Insert a right double quote."
":kbd:`Ctrl`:kbd:`K`, :kbd:`'`", "Insert a modifier apostrophe."
":kbd:`Ctrl`:kbd:`K`, :kbd:`.`", "Insert an ellipsis."
":kbd:`Ctrl`:kbd:`K`, :kbd:`Ctrl`:kbd:`'`", "Insert a prime."
":kbd:`Ctrl`:kbd:`K`, :kbd:`Ctrl`:kbd:`""`", "Insert a double prime."
":kbd:`Ctrl`:kbd:`K`, :kbd:`Space`", "Insert a non-breaking space."
":kbd:`Ctrl`:kbd:`K`, :kbd:`Shift`:kbd:`Space`", "Insert a thin space."
":kbd:`Ctrl`:kbd:`K`, :kbd:`Ctrl`:kbd:`Space`", "Insert a thin non-breaking space."
":kbd:`Ctrl`:kbd:`K`, :kbd:`*`", "Insert a list bullet."
":kbd:`Ctrl`:kbd:`K`, :kbd:`Ctrl`:kbd:`−`", "Insert a hyphen bullet (alternative bullet)."
":kbd:`Ctrl`:kbd:`K`, :kbd:`Ctrl`:kbd:`*`", "Insert a flower mark (alternative bullet)."
":kbd:`Ctrl`:kbd:`K`, :kbd:`%`", "Insert a per mille symbol."
":kbd:`Ctrl`:kbd:`K`, :kbd:`Ctrl`:kbd:`O`", "Insert a degree symbol."
":kbd:`Ctrl`:kbd:`K`, :kbd:`Ctrl`:kbd:`X`", "Insert a times sign."
":kbd:`Ctrl`:kbd:`K`, :kbd:`Ctrl`:kbd:`D`", "Insert a division sign."
":kbd:`Ctrl`:kbd:`K`, :kbd:`G`", "Insert a ``@tag`` keyword."
":kbd:`Ctrl`:kbd:`K`, :kbd:`V`", "Insert a ``@pov`` keyword."
":kbd:`Ctrl`:kbd:`K`, :kbd:`F`", "Insert a ``@focus`` keyword."
":kbd:`Ctrl`:kbd:`K`, :kbd:`C`", "Insert a ``@char`` keyword."
":kbd:`Ctrl`:kbd:`K`, :kbd:`P`", "Insert a ``@plot`` keyword."
":kbd:`Ctrl`:kbd:`K`, :kbd:`S`", "Insert a synopsis comment."
":kbd:`Ctrl`:kbd:`K`, :kbd:`T`", "Insert a ``@time`` keyword."
":kbd:`Ctrl`:kbd:`K`, :kbd:`L`", "Insert a ``@location`` keyword."
":kbd:`Ctrl`:kbd:`K`, :kbd:`O`", "Insert an ``@object`` keyword."
":kbd:`Ctrl`:kbd:`K`, :kbd:`E`", "Insert an ``@entity`` keyword."
":kbd:`Ctrl`:kbd:`K`, :kbd:`X`", "Insert a ``@custom`` keyword."
":kbd:`Ctrl+K`, :kbd:`Space`", "Insert a non-breaking space"
":kbd:`Ctrl+K`, :kbd:`_`", "Insert a long dash (em dash)"
":kbd:`Ctrl+K`, :kbd:`.`", "Insert an ellipsis"
":kbd:`Ctrl+K`, :kbd:`'`", "Insert a modifier apostrophe"
":kbd:`Ctrl+K`, :kbd:`*`", "Insert a list bullet"
":kbd:`Ctrl+K`, :kbd:`%`", "Insert a per mille symbol"
":kbd:`Ctrl+K`, :kbd:`~`", "Insert a figure dash (same width as a number)"
":kbd:`Ctrl+K`, :kbd:`−`", "Insert a short dash (en dash)"
":kbd:`Ctrl+K`, :kbd:`1`", "Insert a left single quote"
":kbd:`Ctrl+K`, :kbd:`2`", "Insert a right single quote"
":kbd:`Ctrl+K`, :kbd:`3`", "Insert a left double quote"
":kbd:`Ctrl+K`, :kbd:`4`", "Insert a right double quote"
":kbd:`Ctrl+K`, :kbd:`C`", "Insert a ``@char`` keyword"
":kbd:`Ctrl+K`, :kbd:`E`", "Insert an ``@entity`` keyword"
":kbd:`Ctrl+K`, :kbd:`F`", "Insert a ``@focus`` keyword"
":kbd:`Ctrl+K`, :kbd:`G`", "Insert a ``@tag`` keyword"
":kbd:`Ctrl+K`, :kbd:`H`", "Insert a short description comment"
":kbd:`Ctrl+K`, :kbd:`L`", "Insert a ``@location`` keyword"
":kbd:`Ctrl+K`, :kbd:`O`", "Insert an ``@object`` keyword"
":kbd:`Ctrl+K`, :kbd:`P`", "Insert a ``@plot`` keyword"
":kbd:`Ctrl+K`, :kbd:`S`", "Insert a synopsis comment"
":kbd:`Ctrl+K`, :kbd:`T`", "Insert a ``@time`` keyword"
":kbd:`Ctrl+K`, :kbd:`V`", "Insert a ``@pov`` keyword"
":kbd:`Ctrl+K`, :kbd:`X`", "Insert a ``@custom`` keyword"
":kbd:`Ctrl+K`, :kbd:`Ctrl+Space`", "Insert a thin non-breaking space"
":kbd:`Ctrl+K`, :kbd:`Ctrl+_`", "Insert a horizontal bar (quotation dash)"
":kbd:`Ctrl+K`, :kbd:`Ctrl+'`", "Insert a prime"
":kbd:`Ctrl+K`, :kbd:`Ctrl+""`", "Insert a double prime"
":kbd:`Ctrl+K`, :kbd:`Ctrl+*`", "Insert a flower mark (alternative bullet)"
":kbd:`Ctrl+K`, :kbd:`Ctrl+−`", "Insert a hyphen bullet (alternative bullet)"
":kbd:`Ctrl+K`, :kbd:`Ctrl+D`", "Insert a division sign"
":kbd:`Ctrl+K`, :kbd:`Ctrl+O`", "Insert a degree symbol"
":kbd:`Ctrl+K`, :kbd:`Ctrl+X`", "Insert a times sign"
":kbd:`Ctrl+K`, :kbd:`Shift+Space`", "Insert a thin space"
.. _a_kb_viewer:
Document Viewer Shortcuts
=========================
.. csv-table::
:header: "Shortcut", "Description"
":kbd:`Alt+Left`", "Move backward in the view history"
":kbd:`Alt+Right`", "Move forward in the view history"
":kbd:`Ctrl+C`", "Copy selected text to clipboard"
":kbd:`Ctrl+Shift+A`", "Select all text in the current paragraph"
":kbd:`Ctrl+Shift+R`", "Close the document viewer"

View File

@@ -30,8 +30,8 @@ Dashes and Ellipsis
With the auto-replace feature enabled (see :ref:`a_ui_edit_auto`), multiple hyphens are converted
automatically to short and long dashes, and three dots to ellipsis. The last auto-replace can
always be reverted with the undo command :kbd:`Ctrl`:kbd:`Z`, reverting the text to what you typed
before the automatic replacement occurred.
always be reverted with the undo command :kbd:`Ctrl+Z`, reverting the text to what you typed before
the automatic replacement occurred.
In addition, "Figure Dash" is available. The Figure Dash is a dash that has the same width as the
numbers of the same font, for most fonts. It helps to align numbers nicely in columns when you need
@@ -59,9 +59,9 @@ Single and Double Prime
------------------------
Both single and double prime symbols are available in the :guilabel:`Insert` menu. These symbols
are the correct symbols to use for unit symbols for feet, inches, minutes and seconds. The usage of
these is described in more detail on the Wikipedia Prime_ page. They look very similar to single
and double straight quotes, and may be renderred similarly by the font, but they have different
are the correct symbols to use for unit symbols for feet, inches, minutes, and seconds. The usage
of these is described in more detail on the Wikipedia Prime_ page. They look very similar to single
and double straight quotes, and may be rendered similarly by the font, but they have different
codes. Using these correctly will also prevent the auto-replace and dialogue highlighting features
misunderstanding their meaning in the text.
@@ -74,14 +74,14 @@ even if it is intended as an apostrophe. This also includes the syntax highlight
assume the first following apostrophe is the closing symbol of a single quoted region of text.
To get around this, an alternative apostrophe is available. It is a special Unicode character that
is not categorised as punctuation, but as a modifier. It is usually renderred the same way as the
is not categorised as punctuation, but as a modifier. It is usually rendered the same way as the
right single quotation marks, depending on the font. There is a Wikipedia article for the
`Modifier letter apostrophe`_ with more details.
.. note::
On export with the :guilabel:`Build Novel Project` tool, these apostrophes will be replaced
On export with the :guilabel:`Build Manuscript` tool, these apostrophes will be replaced
automatically with the corresponding right hand single quote symbol as is generally recommended.
Therefore it doesn't really matter if you only use them to correct highlighting.
Therefore it doesn't really matter if you only use them to correct syntax highlighting.
Special Space Symbols

View File

@@ -0,0 +1,152 @@
.. _a_ui_writing:
*********************
The Editor and Viewer
*********************
.. _Compose Key: https://en.wikipedia.org/wiki/Compose_key
This chapter covers in more detail how the document editor and viewer panels work.
.. _a_ui_edit:
Editing a Document
==================
.. figure:: images/fig_editor.png
A screenshot of the Document Editor panel.
To edit a document, double-click it in the project tree, or press the :kbd:`Return` key while
having it selected. This will open the document in the document editor. The editor uses a
Markdown-like syntax for some features, and a novelWriter-specific syntax for others. The syntax
format is described in the :ref:`a_fmt` chapter.
The editor has a maximise button (toggles the :guilabel:`Focus Mode`) and a close button in the
top--right corner. On the top--left side you will find a tools button that opens a toolbar with a
few buttons for applying text formatting, and a search button to open the search dialog.
Both the document editor and viewer will show the label of the currently open document in the
header at the top of the edit or view panel. Optionally, the full project path to the document can
be shown. This can be set in :guilabel:`Preferences`.
.. tip::
Clicking on the document title bar will select the document in the project tree and thus reveal
its location there, making it easier to find in a large project.
Any :term:`references<reference>` in the editor can be opened in the viewer by moving the cursor to
the label and pressing :kbd:`Ctrl+Return`. You can also control-click them with your mouse.
Editor Auto-Completer
---------------------
If you type the character ``@`` on a new line, a context menu will appear showing the different
available keywords. The list will shorten as you type. Once a keyword command has been selected or
typed, the editor may suggest further content based on your project content. See
:ref:`a_references_completer` for more details.
.. versionadded:: 2.2
The auto-completer feature was added.
.. _a_ui_view:
Viewing a Document
==================
.. figure:: images/fig_viewer.png
A screenshot of the Document Viewer panel.
Any document in the project tree can also be viewed in parallel in a right hand side document
viewer. To view a document, press :kbd:`Ctrl+R`, or select :guilabel:`View Document` in the menu or
context menu. If you have a middle mouse button, middle-clicking on the document will also open it
in the viewer.
The document viewed does not have to be the same document as the one currently being edited.
However, If you *are* viewing the same document, pressing :kbd:`Ctrl+R` again will update the
document with your latest changes. You can also press the reload button in the top--right corner of
the viewer panel, next to the close button, to achieve the same thing.
In the viewer :term:`references<reference>` become clickable links. Clicking them will replace the
content of the viewer with the content of the document the reference points to.
The document viewer keeps a history of viewed documents, which you can navigate with the arrow
buttons in the top--left corner of the viewer. If your mouse has backward and forward navigation
buttons, these can be used as well. They work just like the backward and forward features in a
browser.
At the bottom of the view panel there is a :guilabel:`References` panel. (If it is hidden, click
the button on the left side of the footer area to reveal it.) This panel contains a References tab
with links to all documents referring back to the one you're currently viewing, if any has been
defined. If you have created root folders and tags for various story elements like characters and
plot points, these will appear as additional tabs in this panel.
.. note::
The :guilabel:`References` panel relies on an up-to-date :term:`index<project index>` of the
project. The index is maintained automatically. However, if anything is missing, or seems wrong,
the index can always be rebuilt by selecting :guilabel:`Rebuild Index` from the
:guilabel:`Tools` menu, or by pressing :kbd:`F9`.
.. versionadded:: 2.2
The reference panel was redesigned and the additional tabs added.
.. _a_ui_edit_search:
Search & Replace
================
.. figure:: images/fig_editor_search.png
A screenshot of the Document Editor search box.
The document editor has a search and replace tool that can be activated with :kbd:`Ctrl+F` for
search mode or :kbd:`Ctrl+H` for search and replace mode.
Pressing :kbd:`Return` while in the search box will search for the next occurrence of the word, and
:kbd:`Shift+Return` for the previous. Pressing :kbd:`Return` in the replace box, will replace the
highlighted text and move to the next result.
There are a number of settings for the search tool available as toggle switches above the search
box. They allow you to search for, in order: matched case only, whole word results only, search
using regular expressions, loop search when reaching the end of the document, and move to the next
document when reaching the end. There is also a switch that will try to match the case of the word
when the replacement is made. That is, it will try to keep the word upper, lower, or capitalised to
match the word being replaced.
The regular expression search is somewhat dependant on which version of Qt your system has. If you
have Qt 5.13 or higher, there is better support for Unicode symbols in the search.
.. seealso::
For more information on the capabilities of the Regular Expression option, see the Qt
documentation for the `QRegularExpression <https://doc.qt.io/qt-5/qregularexpression.html>`_
class.
.. _a_ui_edit_auto:
Auto-Replace as You Type
========================
A few auto-replace features are supported by the editor. You can control every aspect of the
auto-replace feature from :guilabel:`Preferences`. You can also disable this feature entirely if
you wish.
.. tip::
If you don't like auto-replacement, all symbols inserted by this feature are also available in
the :guilabel:`Insert` menu, and via :ref:`a_kb_ins`. You may also be using a `Compose Key`_
setup, which means you may not need the auto-replace feature at all.
The editor is able to replace two and three hyphens with short and long dashes, triple points with
ellipsis, and replace straight single and double quotes with user-defined quote symbols. It will
also try to determine whether to use the opening or closing symbol, although this feature isn't
always accurate. Especially distinguishing between closing single quote and apostrophe can be
tricky for languages that use the same symbol for these, like English does.
.. tip::
If the auto-replace feature changes a symbol when you did not want it to change, pressing
:kbd:`Ctrl+Z` once after the auto-replacement will undo it without undoing the character
you typed before it.

View File

@@ -48,6 +48,7 @@ instance `en_GB` for British English.
You will need the translation tool Qt 5 Linguist on your system.
For Ubuntu/Debian, run:
```bash
sudo apt install qttools5-dev-tools
```
@@ -75,8 +76,9 @@ The `i18n` folder at the root of the repository contains the `nw_XX.ts` translat
Whether to add a new language to the translation framework, or to update the file against the
current source code, you must first run the `qtlupdate` command:
```bash
python3 setup.py qtlupdate i18n/nw_XX.ts
python3 pkgutils.py qtlupdate i18n/nw_XX.ts
```
The file name must be in the correct format. All translation files must be located in the `i18n`
@@ -86,6 +88,10 @@ be a valid ISO language code, otherwise novelWriter will not accept the file.
For instance, the French translation uses the language code `fr_FR`, so its translation file will
be `nw_fr_FR.ts`
Note: The `qtlupdate` command needs the `lupdate` tool provided by PyQt6, which uses the latest
TS file format. The tool in PyQt5 generates an older file format. On Debian/Ubuntu it is provided
by the package `pyqt6-dev-tools`.
### Edit the Translation File in Qt Linguist
@@ -100,8 +106,9 @@ Please select "English" and "United Kingdom" as the _source_ language if prompte
The application does not use `.ts` files directly. The `novelwriter/assets/i18n/nw_XX.qm` files are
the actual files used to translate the GUI into another language other than the default British
English. These files are not generated by default, but they can be built with:
```bash
python3 setup.py qtlrelease
python3 pkgutils.py qtlrelease
```
You can now test the translation in novelWriter. The Preferences dialog should list the newly added

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

4835
i18n/nw_it_IT.ts Normal file

File diff suppressed because it is too large Load Diff

4835
i18n/nw_ja_JP.ts Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +0,0 @@
# PyQt6 Linguist Tool
This is a copy of the `pylupdate` tool from PyQt6 version 6.2.1 from
[PyPi](https://pypi.org/project/PyQt6/).
The tool is stripped down to run for novelWriter.
PyQt6 is licensed under GPL 3.0

View File

@@ -1,22 +0,0 @@
# Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
#
# This file is part of PyQt6.
#
# This file may be used under the terms of the GNU General Public License
# version 3.0 as published by the Free Software Foundation and appearing in
# the file LICENSE included in the packaging of this file. Please review the
# following information to ensure the GNU General Public License version 3.0
# requirements will be met: http://www.gnu.org/copyleft/gpl.html.
#
# If you do not wish to use this file under the terms of the GPL version 3.0
# then you may purchase a commercial license. For more information contact
# info@riverbankcomputing.com.
#
# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
# The public API.
from .lupdate import lupdate
__all__ = ["lupdate"]

View File

@@ -1,90 +0,0 @@
# Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
#
# This file is part of PyQt6.
#
# This file may be used under the terms of the GNU General Public License
# version 3.0 as published by the Free Software Foundation and appearing in
# the file LICENSE included in the packaging of this file. Please review the
# following information to ensure the GNU General Public License version 3.0
# requirements will be met: http://www.gnu.org/copyleft/gpl.html.
#
# If you do not wish to use this file under the terms of the GPL version 3.0
# then you may purchase a commercial license. For more information contact
# info@riverbankcomputing.com.
#
# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
import fnmatch
import os
# from .designer_source import DesignerSource
from .python_source import PythonSource
from .translation_file import TranslationFile
from .user import UserException
def lupdate(
sources, translation_files, no_obsolete=False, no_summary=True, verbose=False, excludes=None
):
""" Update a sequence of translation (.ts) files from a sequence of Python
source (.py) files, Designer source (.ui) files or directories containing
source files.
"""
if excludes is None:
excludes = ()
# Read the .ts files.
translations = [
TranslationFile(ts, no_obsolete=no_obsolete, no_summary=no_summary, verbose=verbose)
for ts in translation_files
]
# Read the sources.
source_files = []
for source in sources:
if os.path.isdir(source):
for dirpath, _, filenames in os.walk(source):
for fn in filenames:
# Apply any exclusion patterns.
for exclude in excludes:
if fnmatch.fnmatch(fn, exclude):
fn = None
break
if fn is None:
continue
filename = os.path.join(dirpath, fn)
if filename.endswith('.py'):
source_files.append(PythonSource(filename=filename, verbose=verbose))
# UI file support is disabled
# elif filename.endswith('.ui'):
# source_files.append(
# DesignerSource(filename=filename,
# verbose=verbose))
elif verbose:
print("Ignoring", filename)
elif source.endswith('.py'):
source_files.append(PythonSource(filename=source, verbose=verbose))
# UI file support is disabled
# elif source.endswith('.ui'):
# source_files.append(
# DesignerSource(filename=source, verbose=verbose))
else:
raise UserException("{0} must be a directory or a .py or a .ui file".format(source))
# Update each translation for each source.
for t in translations:
for s in source_files:
t.update(s)
t.write()

View File

@@ -1,362 +0,0 @@
# Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
#
# This file is part of PyQt6.
#
# This file may be used under the terms of the GNU General Public License
# version 3.0 as published by the Free Software Foundation and appearing in
# the file LICENSE included in the packaging of this file. Please review the
# following information to ensure the GNU General Public License version 3.0
# requirements will be met: http://www.gnu.org/copyleft/gpl.html.
#
# If you do not wish to use this file under the terms of the GPL version 3.0
# then you may purchase a commercial license. For more information contact
# info@riverbankcomputing.com.
#
# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
import ast
import re
import tokenize
from .source_file import SourceFile
from .translations import Context, EmbeddedComments, Message
from .user import User, UserException
class PythonSource(SourceFile, User):
""" Encapsulate a Python source file. """
# The regular expression to extract a PEP 263 encoding.
_PEP_263 = re.compile(rb'^[ \t\f]*#.*?coding[:=][ \t]*([-_.a-zA-Z0-9]+)')
def __init__(self, **kwargs):
""" Initialise the object. """
super().__init__(**kwargs)
# Read the source file.
self.progress("Reading {0}...".format(self.filename))
with open(self.filename, 'rb') as f:
source = f.read()
# Implement universal newlines.
source = source.replace(b'\r\n', b'\n').replace(b'\r', b'\n')
# Try and extract a PEP 263 encoding.
encoding = 'UTF-8'
for line_nr, line in enumerate(source.split(b'\n')):
if line_nr > 1:
break
match = re.match(self._PEP_263, line)
if match:
encoding = match.group(1).decode('ascii')
break
# Decode the source according to the encoding.
try:
source = source.decode(encoding)
except LookupError:
raise UserException("Unsupported encoding '{0}'".format(encoding))
# Parse the source file.
self.progress("Parsing {0}...".format(self.filename))
try:
tree = ast.parse(source, filename=self.filename)
except SyntaxError as e:
raise UserException(
"Invalid syntax at line {0} of {1}:\n{2}".format(
e.lineno, e.filename, e.text.rstrip()
)
)
# Look for translation contexts and their contents.
visitor = Visitor(self)
visitor.visit(tree)
# Read the file again as a sequence of tokens so that we see the
# comments.
with open(self.filename, 'rb') as f:
current = None
for token in tokenize.tokenize(f.readline):
if token.type == tokenize.COMMENT:
# See if it is an embedded comment.
parts = token.string.split(' ', maxsplit=1)
if len(parts) == 2:
if parts[0] == '#:':
if current is None:
current = EmbeddedComments()
current.extra_comments.append(parts[1])
elif parts[0] == '#=':
if current is None:
current = EmbeddedComments()
current.message_id = parts[1]
elif parts[0] == '#~':
parts = parts[1].split(' ', maxsplit=1)
if len(parts) == 1:
parts.append('')
if current is None:
current = EmbeddedComments()
current.extras.append(parts)
elif token.type == tokenize.NL:
continue
elif current is not None:
# Associate the embedded comment with the line containing
# this token.
line_nr = token.start[0]
# See if there is a message on that line.
for context in self.contexts:
for message in context.messages:
if message.line_nr == line_nr:
break
else:
message = None
if message is not None:
message.embedded_comments = current
break
current = None
class Visitor(ast.NodeVisitor):
""" A visitor that extracts translation contexts. """
def __init__(self, source):
""" Initialise the visitor. """
self._source = source
self._context_stack = []
super().__init__()
def visit_Call(self, node):
""" Visit a call. """
# Parse the arguments if a translation function is being called.
call_args = None
if isinstance(node.func, ast.Attribute):
name = node.func.attr
if name == 'tr':
call_args = self._parse_tr(node)
elif name == 'translate':
call_args = self._parse_translate(node)
elif isinstance(node.func, ast.Name):
name = node.func.id
if name == 'QT_TR_NOOP':
call_args = self._parse_QT_TR_NOOP(node)
elif name == 'QT_TRANSLATE_NOOP':
call_args = self._parse_QT_TRANSLATE_NOOP(node)
# Update the context if the arguments are usable.
if call_args is not None and call_args.source != '':
call_args.context.messages.append(
Message(
self._source.filename, node.lineno,
call_args.source, call_args.disambiguation,
(call_args.numerus)
)
)
self.generic_visit(node)
def visit_ClassDef(self, node):
""" Visit a class. """
try:
name = self._context_stack[-1].name + '.' + node.name
except IndexError:
name = node.name
self._context_stack.append(Context(name))
self.generic_visit(node)
context = self._context_stack.pop()
if context.messages:
self._source.contexts.append(context)
def _get_current_context(self):
""" Return the current Context object if there is one. """
return self._context_stack[-1] if self._context_stack else None
@classmethod
def _get_first_str(cls, args):
""" Get the first of a list of arguments as a str. """
# Check that there is at least one argument.
if not args:
return None
return cls._get_str(args[0])
def _get_or_create_context(self, name):
""" Return the Context object for a name, creating it if necessary. """
for context in self._source.contexts:
if context.name == name:
return context
context = Context(name)
self._source.contexts.append(context)
return context
@staticmethod
def _get_str(node, allow_none=False):
""" Return the str from a node or None if it wasn't an appropriate
node.
"""
if isinstance(node, ast.Str):
return node.s
if isinstance(node, ast.Constant):
if isinstance(node.value, str):
return node.value
if allow_none and node.value is None:
return ''
return None
def _parse_QT_TR_NOOP(self, node):
""" Parse the arguments to QT_TR_NOOP(). """
# Ignore unless there is a current context.
context = self._get_current_context()
if context is None:
return None
call_args = self._parse_noop_without_context(node.args, node.keywords)
if call_args is None:
return None
call_args.context = context
return call_args
def _parse_QT_TRANSLATE_NOOP(self, node):
""" Parse the arguments to QT_TRANSLATE_NOOP(). """
# Get the context.
name = self._get_first_str(node.args)
if name is None:
return None
call_args = self._parse_noop_without_context(node.args[1:], node.keywords)
if call_args is None:
return None
call_args.context = self._get_or_create_context(name)
return call_args
def _parse_tr(self, node):
""" Parse the arguments to tr(). """
# Ignore unless there is a current context.
context = self._get_current_context()
if context is None:
return None
call_args = self._parse_without_context(node.args, node.keywords)
if call_args is None:
return None
call_args.context = context
return call_args
def _parse_translate(self, node):
""" Parse the arguments to translate(). """
# Get the context.
name = self._get_first_str(node.args)
if name is None:
return None
call_args = self._parse_without_context(node.args[1:], node.keywords)
if call_args is None:
return None
call_args.context = self._get_or_create_context(name)
return call_args
def _parse_without_context(self, args, keywords):
""" Parse arguments for a message source and optional disambiguation
and n.
"""
# The source is required.
source = self._get_first_str(args)
if source is None:
return None
if len(args) > 1:
disambiguation = self._get_str(args[1], allow_none=True)
else:
for kw in keywords:
if kw.arg == 'disambiguation':
disambiguation = self._get_str(kw.value, allow_none=True)
break
else:
disambiguation = ''
# Ignore if the disambiguation is specified but isn't a string.
if disambiguation is None:
return None
if len(args) > 2:
numerus = True
else:
numerus = 'n' in keywords
if len(args) > 3:
return None
return CallArguments(source, disambiguation, numerus)
def _parse_noop_without_context(self, args, keywords):
""" Parse arguments for a message source. """
# There must be exactly one positional argument.
if len(args) != 1 or len(keywords) != 0:
return None
source = self._get_str(args[0])
if source is None:
return None
return CallArguments(source)
class CallArguments:
""" Encapsulate the possible arguments of a translation function. """
def __init__(self, source, disambiguation='', numerus=False):
""" Initialise the object. """
self.context = None
self.source = source
self.disambiguation = disambiguation
self.numerus = numerus

View File

@@ -1,29 +0,0 @@
# Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
#
# This file is part of PyQt6.
#
# This file may be used under the terms of the GNU General Public License
# version 3.0 as published by the Free Software Foundation and appearing in
# the file LICENSE included in the packaging of this file. Please review the
# following information to ensure the GNU General Public License version 3.0
# requirements will be met: http://www.gnu.org/copyleft/gpl.html.
#
# If you do not wish to use this file under the terms of the GPL version 3.0
# then you may purchase a commercial license. For more information contact
# info@riverbankcomputing.com.
#
# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class SourceFile:
""" The base class for any source file that provides translation contexts.
"""
def __init__(self, filename, **kwargs):
""" Initialise the object. """
super().__init__(**kwargs)
self.filename = filename
self.contexts = []

View File

@@ -1,390 +0,0 @@
# Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
#
# This file is part of PyQt6.
#
# This file may be used under the terms of the GNU General Public License
# version 3.0 as published by the Free Software Foundation and appearing in
# the file LICENSE included in the packaging of this file. Please review the
# following information to ensure the GNU General Public License version 3.0
# requirements will be met: http://www.gnu.org/copyleft/gpl.html.
#
# If you do not wish to use this file under the terms of the GPL version 3.0
# then you may purchase a commercial license. For more information contact
# info@riverbankcomputing.com.
#
# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
import os
from xml.etree import ElementTree
from .user import User, UserException
class TranslationFile(User):
""" Encapsulate a translation file. """
def __init__(self, ts_file, no_obsolete, no_summary, **kwargs):
""" Initialise the translation file. """
super().__init__(**kwargs)
if os.path.isfile(ts_file):
self.progress("Reading {0}...".format(ts_file))
try:
self._root = ElementTree.parse(ts_file).getroot()
except Exception as e:
raise UserException(
"{}: {}: {}".format(ts_file, "invalid translation file", str(e))
)
else:
self._root = ElementTree.fromstring(_EMPTY_TS)
self._ts_file = ts_file
self._no_obsolete = no_obsolete
self._no_summary = no_summary
self._updated_contexts = {}
# Create a dict of contexts keyed by the context name and having the
# list of message elements as the value.
self._contexts = {}
# Also create a dict of existing translations so that they can be
# re-used.
self._translations = {}
context_els = []
for context_el in self._root:
if context_el.tag != 'context':
continue
context_els.append(context_el)
name = ''
message_els = []
for el in context_el:
if el.tag == 'name':
name = el.text
elif el.tag == 'message':
message_els.append(el)
if name:
self._contexts[name] = message_els
for message_el in message_els:
source_el = message_el.find('source')
if source_el is None or not source_el.text:
continue
translation_el = message_el.find('translation')
if translation_el is None or not translation_el.text:
continue
self._translations[source_el.text] = translation_el.text
# Remove the context elements but keep everything else in the root
# (probably set by Linguist).
for context_el in context_els:
self._root.remove(context_el)
# Clear the summary statistics.
self._nr_new = 0
self._nr_new_duplicates = 0
self._nr_new_using_existing_translation = 0
self._nr_existing = 0
self._nr_kept_obsolete = 0
self._nr_discarded_obsolete = 0
self._nr_discarded_untranslated = 0
# Remember all new messages so we can make the summary less confusing
# than it otherwise might be.
self._new_message_els = []
def update(self, source):
""" Update the translation file from a SourceFile object. """
self.progress("Updating {0} from {1}...".format(self._ts_file, source.filename))
for context in source.contexts:
# Get the messages that we already know about for this context.
try:
message_els = self._contexts[context.name]
except KeyError:
message_els = []
# Get the messages that have already been updated.
updated_message_els = self._get_updated_message_els(context.name)
for message in context.messages:
message_el = self._find_message(message, message_els)
if message_el is not None:
# Move the message to the updated list.
message_els.remove(message_el)
self._add_message_el(message_el, updated_message_els)
else:
# See if this is a new message. If not then we just have
# another location for an existing message.
message_el = self._find_message(message, updated_message_els)
if message_el is None:
message_el = self._make_message_el(message)
updated_message_els.append(message_el)
self.progress("Added new message '{0}'".format(self.pretty(message.source)))
self._nr_new += 1
else:
self.progress("Updated message '{0}'".format(self.pretty(message.source)))
# Don't count another copy of a new message as an existing
# one.
if message_el in self._new_message_els:
self._nr_new_duplicates += 1
else:
self._nr_existing += 1
message_el.insert(0, self._make_location_el(message))
def write(self):
""" Write the translation file back to the filesystem. """
# If we are keeping obsolete messages then add them to the updated
# message elements list.
for name, message_els in self._contexts.items():
updated_message_els = None
for message_el in message_els:
source = self.pretty(message_el.find('source').text)
translation_el = message_el.find('translation')
if translation_el is not None and translation_el.text:
if self._no_obsolete:
self.progress("Discarded obsolete message '{0}'".format(source))
self._nr_discarded_obsolete += 1
else:
translation_el.set('type', 'vanished')
if updated_message_els is None:
updated_message_els = self._get_updated_message_els(name)
self._add_message_el(message_el, updated_message_els)
self.progress("Kept obsolete message '{0}'".format(source))
self._nr_kept_obsolete += 1
else:
self.progress("Discarded untranslated message '{0}'".format(source))
self._nr_discarded_untranslated += 1
# Created the sorted context elements.
for name in sorted(self._updated_contexts.keys()):
context_el = ElementTree.Element('context')
name_el = ElementTree.Element('name')
name_el.text = name
context_el.append(name_el)
context_el.extend(self._updated_contexts[name])
self._root.append(context_el)
self.progress("Writing {0}...".format(self._ts_file))
with open(self._ts_file, 'w', encoding='utf-8', newline='\n') as f:
f.write('<?xml version="1.0" encoding="utf-8"?>\n')
f.write('<!DOCTYPE TS>\n')
# Python v3.9 and later.
if hasattr(ElementTree, 'indent'):
ElementTree.indent(self._root)
ElementTree.ElementTree(self._root).write(f, encoding='unicode')
f.write('\n')
if not self._no_summary:
self._summary()
@staticmethod
def _add_message_el(message_el, updated_message_els):
""" Add a message element to a list of updated message elements. """
# Remove all the location elements.
for location_el in message_el.findall('location'):
message_el.remove(location_el)
# Add the message to the updated list.
updated_message_els.append(message_el)
@classmethod
def _find_message(cls, message, message_els):
""" Return the message element for a message from a list. """
for message_el in message_els:
source = ''
comment = ''
extra_comment = ''
extras = []
# Extract the data from the element.
for el in message_el:
if el.tag == 'source':
source = el.text
elif el.tag == 'comment':
comment = el.text
elif el.tag == 'extracomment':
extra_comment = el.text
elif el.tag.startswith('extra-'):
extras.append([el.tag[6:], el.text])
# Compare with the message.
if source != message.source:
continue
if comment != message.comment:
continue
if extra_comment != cls._get_message_extra_comments(message):
continue
if extras != message.embedded_comments.extras:
continue
return message_el
return None
@staticmethod
def _get_message_extra_comments(message):
""" Return a message's extra comments as they appear in a .ts file. """
return ' '.join(message.embedded_comments.extra_comments)
def _get_updated_message_els(self, name):
""" Return the list of updated message elements for a context. """
try:
updated_message_els = self._updated_contexts[name]
except KeyError:
updated_message_els = []
self._updated_contexts[name] = updated_message_els
return updated_message_els
def _make_location_el(self, message):
""" Return a 'location' element. """
return ElementTree.Element(
'location',
filename=os.path.relpath(
message.filename, start=os.path.dirname(os.path.abspath(self._ts_file))
),
line=str(message.line_nr)
)
def _make_message_el(self, message):
""" Return a 'message' element. """
attrs = {}
if message.embedded_comments.message_id:
attrs['id'] = message.embedded_comments.message_id
if message.numerus:
attrs['numerus'] = 'yes'
message_el = ElementTree.Element('message', attrs)
source_el = ElementTree.Element('source')
source_el.text = message.source
message_el.append(source_el)
if message.comment:
comment_el = ElementTree.Element('comment')
comment_el.text = message.comment
message_el.append(comment_el)
if message.embedded_comments.extra_comments:
extracomment_el = ElementTree.Element('extracomment')
extracomment_el.text = self._get_message_extra_comments(message)
message_el.append(extracomment_el)
translation_el = ElementTree.Element('translation', type='unfinished')
# Try and find another message with the same source and use its
# translation if it has one.
translation = self._translations.get(message.source)
if translation:
translation_el.text = translation
self.progress("Reused existing translation for '{0}'".format(
self.pretty(message.source))
)
self._nr_new_using_existing_translation += 1
if message.numerus:
translation_el.append(ElementTree.Element('numerusform'))
message_el.append(translation_el)
for field, value in message.embedded_comments.extras:
el = ElementTree.Element('extra-' + field)
el.text = value
message_el.append(el)
self._new_message_els.append(message_el)
return message_el
def _summary(self):
""" Display the summary of changes to the user. """
summary_lines = []
# Display a line of the summary and the heading if not already done.
def summary(line):
nonlocal summary_lines
if not summary_lines:
summary_lines.append("Summary of changes to {ts}:".format(ts=self._ts_file))
summary_lines.append(" " + line)
if self._nr_new:
if self._nr_new_duplicates:
summary("{0} new messages were added (and {1} duplicates)".format(
self._nr_new, self._nr_new_duplicates))
else:
summary("{0} new messages were added".format(self._nr_new))
if self._nr_new_using_existing_translation:
summary("{0} messages reused existing translations".format(
self._nr_new_using_existing_translation))
if self._nr_existing:
summary("{0} existing messages were found".format(
self._nr_existing))
if self._nr_kept_obsolete:
summary("{0} obsolete messages were kept".format(
self._nr_kept_obsolete))
if self._nr_discarded_obsolete:
summary("{0} obsolete messages were discarded".format(
self._nr_discarded_obsolete))
if self._nr_discarded_untranslated:
summary("{0} untranslated messages were discarded".format(
self._nr_discarded_untranslated))
if not summary_lines:
summary_lines.append("{ts} was unchanged".format(ts=self._ts_file))
print(os.linesep.join(summary_lines))
# The XML of an empty .ts file. This is what a current lupdate will create
# with an empty C++ source file.
_EMPTY_TS = '''<TS version="2.1">
</TS>
'''

View File

@@ -1,51 +0,0 @@
# Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
#
# This file is part of PyQt6.
#
# This file may be used under the terms of the GNU General Public License
# version 3.0 as published by the Free Software Foundation and appearing in
# the file LICENSE included in the packaging of this file. Please review the
# following information to ensure the GNU General Public License version 3.0
# requirements will be met: http://www.gnu.org/copyleft/gpl.html.
#
# If you do not wish to use this file under the terms of the GPL version 3.0
# then you may purchase a commercial license. For more information contact
# info@riverbankcomputing.com.
#
# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class Context:
""" Encapsulate a message context. """
def __init__(self, name):
""" Initialise the context. """
self.name = name
self.messages = []
class EmbeddedComments:
""" Encapsulate information for a translator embedded in comments. """
def __init__(self):
""" Initialise the object. """
self.message_id = ''
self.extra_comments = []
self.extras = []
class Message:
""" Encapsulate a message. """
def __init__(self, filename, line_nr, source, comment, numerus):
""" Initialise the message. """
self.filename = filename
self.line_nr = line_nr
self.source = source
self.comment = comment
self.numerus = numerus
self.embedded_comments = EmbeddedComments()

View File

@@ -1,47 +0,0 @@
# Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
#
# This file is part of PyQt6.
#
# This file may be used under the terms of the GNU General Public License
# version 3.0 as published by the Free Software Foundation and appearing in
# the file LICENSE included in the packaging of this file. Please review the
# following information to ensure the GNU General Public License version 3.0
# requirements will be met: http://www.gnu.org/copyleft/gpl.html.
#
# If you do not wish to use this file under the terms of the GPL version 3.0
# then you may purchase a commercial license. For more information contact
# info@riverbankcomputing.com.
#
# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class UserException(Exception):
""" Encapsulate an exception ultimate caused by the user. """
pass
class User:
""" A mixin that provides methods for communicating with the user. """
def __init__(self, verbose, **kwargs):
""" Initialise the object. """
super().__init__(**kwargs)
self._verbose = verbose
@staticmethod
def pretty(text):
""" Returns a pretty-fied version of some text suitable for displaying
to the user.
"""
return text.replace('\n', '\\n')
def progress(self, message):
""" Display a progress message. """
if self._verbose:
print(message)

View File

@@ -1,7 +1,6 @@
"""
novelWriter – Init File
=======================
Application initialisation
File History:
Created: 2018-09-22 [0.0.1]
@@ -22,6 +21,7 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
from __future__ import annotations
import sys
import getopt
@@ -31,27 +31,10 @@ from PyQt5.QtWidgets import QApplication, QErrorMessage
from novelwriter.error import exceptionHandler, logException
from novelwriter.config import Config
from novelwriter.shared import SharedData
##
# Version Scheme
# ================
# Generally follows PEP 440
# Hex Version:
# - Digit 1,2 : Major Version (01-ff)
# - Digit 3,4 : Minor Version (01-ff)
# - Digit 5,6 : Patch Version (01-ff)
# - Digit 7 : Release Type (a: aplha, b: beta, c: candidate, f: final)
# - Digit 8 : Release Number (0-f)
#
# Example : Full Short Description
# --------------------------------------------------------------------
# 0x010200a0 : 1.2-alpha0 1.2a0 Use while developing next release
# 0x010200a1 : 1.2-alpha1 1.2a1 First alpha release
# 0x010200b1 : 1.2-beta1 1.2b1 First beta release
# 0x010200c1 : 1.2-rc1 1.2rc1 First release candidate
# 0x010200f0 : 1.2.0 1.2.0 Final release
# 0x010201f0 : 1.2.1 1.2.1 Patch release
##
# Package Meta
# ============
__package__ = "novelwriter"
__copyright__ = "Copyright 2018–2023, Veronica Berglyd Olsen"
@@ -59,17 +42,11 @@ __license__ = "GPLv3"
__author__ = "Veronica Berglyd Olsen"
__maintainer__ = "Veronica Berglyd Olsen"
__email__ = "code@vkbo.net"
__version__ = "2.0.4"
__hexversion__ = "0x020004f0"
__date__ = "2023-01-29"
__version__ = "2.2"
__hexversion__ = "0x020200f0"
__date__ = "2023-12-17"
__status__ = "Stable"
__domain__ = "novelwriter.io"
__url__ = "https://novelwriter.io"
__sourceurl__ = "https://github.com/vkbo/novelWriter"
__issuesurl__ = "https://github.com/vkbo/novelWriter/issues"
__helpurl__ = "https://github.com/vkbo/novelWriter/discussions"
__releaseurl__ = "https://github.com/vkbo/novelWriter/releases/latest"
__docurl__ = "https://novelwriter.readthedocs.io"
logger = logging.getLogger(__name__)
@@ -78,13 +55,13 @@ logger = logging.getLogger(__name__)
# Main Program
##
# Load the main config as a global object
# Global config and data singletons
CONFIG = Config()
SHARED = SharedData()
def main(sysArgs=None):
"""Parse command line, set up logging, and launch main GUI.
"""
def main(sysArgs: list | None = None):
"""Parse command line, set up logging, and launch main GUI."""
if sysArgs is None:
sysArgs = sys.argv[1:]
@@ -99,6 +76,7 @@ def main(sysArgs=None):
"config=",
"data=",
"testmode",
"meminfo"
]
helpMsg = (
@@ -115,6 +93,7 @@ def main(sysArgs=None):
" -v, --version Print program version and exit.\n"
" --info Print additional runtime information.\n"
" --debug Print debug output. Includes --info.\n"
" --meminfo Show memory usage information in the status bar.\n"
" --style= Sets Qt5 style flag. Defaults to 'Fusion'.\n"
" --config= Alternative config file.\n"
" --data= Alternative user data path.\n"
@@ -150,6 +129,7 @@ def main(sysArgs=None):
elif inOpt == "--info":
logLevel = logging.INFO
elif inOpt == "--debug":
CONFIG.isDebug = True
logLevel = logging.DEBUG
logFormat = "[{asctime:}] {filename:>17}:{lineno:<4d} {levelname:8} {message:}"
elif inOpt == "--style":
@@ -160,23 +140,26 @@ def main(sysArgs=None):
dataPath = inArg
elif inOpt == "--testmode":
testMode = True
elif inOpt == "--meminfo":
CONFIG.memInfo = True
# Set Logging
cHandle = logging.StreamHandler()
cHandle.setFormatter(logging.Formatter(fmt=logFormat, style="{"))
# Setup Logging
pkgLogger = logging.getLogger(__package__)
pkgLogger.addHandler(cHandle)
pkgLogger.setLevel(logLevel)
if len(pkgLogger.handlers) == 0:
# Make sure we only create one logger (mostly an issue with tests)
cHandle = logging.StreamHandler()
cHandle.setFormatter(logging.Formatter(fmt=logFormat, style="{"))
pkgLogger.addHandler(cHandle)
logger.info("Starting novelWriter %s (%s) %s", __version__, __hexversion__, __date__)
# Check Packages and Versions
errorData = []
errorCode = 0
if sys.hexversion < 0x030700f0:
if sys.hexversion < 0x030800f0:
errorData.append(
"At least Python 3.7 is required, found %s" % CONFIG.verPyString
"At least Python 3.8 is required, found %s" % CONFIG.verPyString
)
errorCode |= 0x04
if CONFIG.verQtValue < 0x050a00:
@@ -190,18 +173,12 @@ def main(sysArgs=None):
)
errorCode |= 0x10
try:
import lxml # noqa: F401
except ImportError:
errorData.append("Python module 'lxml' is missing")
errorCode |= 0x20
if errorData:
errApp = QApplication([])
errDlg = QErrorMessage()
errDlg.resize(500, 300)
errDlg.showMessage((
"<h3>A critical error has been encountered</h3>"
"<h3>A critical error was encountered</h3>"
"<p>novelWriter cannot start due to the following issues:<p>"
"<p>&nbsp;-&nbsp;%s</p>"
"<p>Shutting down ...</p>"
@@ -246,12 +223,17 @@ def main(sysArgs=None):
nwApp.setApplicationName(CONFIG.appName)
nwApp.setApplicationVersion(__version__)
nwApp.setOrganizationDomain(__domain__)
nwApp.setOrganizationName(__domain__)
nwApp.setDesktopFileName(CONFIG.appName)
# Connect the exception handler before making the main GUI
sys.excepthook = exceptionHandler
# Launch main GUI
# Run Config steps that require the QApplication
CONFIG.initLocalisation(nwApp)
CONFIG.setTextFont(CONFIG.textFont, CONFIG.textSize) # Makes sure these are valid
# Launch main GUI
nwGUI = GuiMain()
nwGUI.postLaunchTasks(cmdOpen)

View File

@@ -2,6 +2,16 @@
"Synopsis": "Synopsis",
"Comment": "Kommentar",
"Notes": "Notizen",
"Tag": "Schlagwort",
"Point of View": "Perspektive",
"Focus": "Mittelpunkt",
"Characters": "Charaktere",
"Plot": "Handlungen",
"Timeline": "Zeitleiste",
"Locations": "Schauplätze",
"Objects": "Objekte",
"Entities": "Organisationen",
"Custom": "Benutzerdefiniert",
"0": "Null",
"1": "Eins",
"2": "Zwei",

View File

@@ -1,7 +1,18 @@
{
"Synopsis": "Synopsis",
"Short Description": "Short Description",
"Comment": "Comment",
"Notes": "Notes",
"Tag": "Tag",
"Point of View": "Point of View",
"Focus": "Focus",
"Characters": "Characters",
"Plot": "Plot",
"Timeline": "Timeline",
"Locations": "Locations",
"Objects": "Objects",
"Entities": "Entities",
"Custom": "Custom",
"0": "Zero",
"1": "One",
"2": "Two",

View File

@@ -1,7 +1,18 @@
{
"Synopsis": "Synopsis",
"Short Description": "Short Description",
"Comment": "Comment",
"Notes": "Notes",
"Tag": "Tag",
"Point of View": "Point of View",
"Focus": "Focus",
"Characters": "Characters",
"Plot": "Plot",
"Timeline": "Timeline",
"Locations": "Locations",
"Objects": "Objects",
"Entities": "Entities",
"Custom": "Custom",
"0": "Zero",
"1": "One",
"2": "Two",

View File

@@ -1,7 +1,18 @@
{
"Synopsis": "Sinopsis",
"Short Description": "Breve Descripción",
"Comment": "Comentario",
"Notes": "Notas",
"Tag": "Etiqueta",
"Point of View": "Punto de Vista",
"Focus": "Foco",
"Characters": "Personajes",
"Plot": "Argumento",
"Timeline": "Línea de Tiempo",
"Locations": "Lugares",
"Objects": "Objetos",
"Entities": "Entidades",
"Custom": "Otros",
"0": "Cero",
"1": "Uno",
"2": "Dos",

View File

@@ -1,7 +1,18 @@
{
"Synopsis": "Synopsis",
"Short Description": "Description sommaire",
"Comment": "Commentaire",
"Notes": "Notes",
"Tag": "Étiquette",
"Point of View": "Point de vue",
"Focus": "Focus",
"Characters": "Personnages",
"Plot": "Intrigue",
"Timeline": "Chronologie",
"Locations": "Lieux",
"Objects": "Objets",
"Entities": "Entités",
"Custom": "Personnalisé",
"0": "Zero",
"1": "Un",
"2": "Deux",

View File

@@ -0,0 +1,116 @@
{
"Synopsis": "Sinossi",
"Short Description": "Breve descrizione",
"Comment": "Commento",
"Notes": "Note",
"Tag": "Etichetta",
"Point of View": "Punto di vista",
"Focus": "Focus",
"Characters": "Personaggi",
"Plot": "Trama",
"Timeline": "Sequenza temporale",
"Locations": "Luoghi",
"Objects": "Oggetti",
"Entities": "Enti",
"Custom": "Personalizzato",
"0": "Zero",
"1": "Uno",
"2": "Due",
"3": "Tre",
"4": "Quattro",
"5": "Cinque",
"6": "Sei",
"7": "Sette",
"8": "Otto",
"9": "Nove",
"10": "Dieci",
"11": "Undici",
"12": "Dodici",
"13": "Tredici",
"14": "Quattordici",
"15": "Quindici",
"16": "Sedici",
"17": "Diciassette",
"18": "Diciotto",
"19": "Diciannove",
"20": "Venti",
"21": "Ventuno",
"22": "Ventidue",
"23": "Ventitré",
"24": "Ventiquattro",
"25": "Venticinque",
"26": "Ventisei",
"27": "Ventisette",
"28": "Ventotto",
"29": "Ventinove",
"30": "Trenta",
"31": "Trentuno",
"32": "Trentadue",
"33": "Trentatré",
"34": "Trentaquattro",
"35": "Trentacinque",
"36": "Trentasei",
"37": "Trentasette",
"38": "Trentotto",
"39": "Trentanove",
"40": "Quaranta",
"41": "Quarantuno",
"42": "Quarantadue",
"43": "Quarantatré",
"44": "Quarantaquattro",
"45": "Quarantacinque",
"46": "Quarantasei",
"47": "Quarantasette",
"48": "Quarantotto",
"49": "Quarantanove",
"50": "Cinquanta",
"51": "Cinquantuno",
"52": "Cinquantadue",
"53": "Cinquantatré",
"54": "Cinquantaquattro",
"55": "Cinquantacinque",
"56": "Cinquantasei",
"57": "Cinquantasette",
"58": "Cinquantotto",
"59": "Cinquantanove",
"60": "Sessanta",
"61": "Sessantuno",
"62": "Sessantadue",
"63": "Sessantatre",
"64": "Sessantaquattro",
"65": "Sessantacinque",
"66": "Sessantasei",
"67": "Sessantasette",
"68": "Sessantotto",
"69": "Sessantanove",
"70": "Settanta",
"71": "Settantuno",
"72": "Settantadue",
"73": "Settantatré",
"74": "Settantaquattro",
"75": "Settantacinque",
"76": "Settantasei",
"77": "Settantasette",
"78": "Settantotto",
"79": "Settantanove",
"80": "Ottanta",
"81": "Ottantuno",
"82": "Ottantadue",
"83": "Ottantatré",
"84": "Ottantaquattro",
"85": "Ottantacinque",
"86": "Ottantasei",
"87": "Ottantasette",
"88": "Ottantotto",
"89": "Ottantanove",
"90": "Novanta",
"91": "Novantuno",
"92": "Novantadue",
"93": "Novantatré",
"94": "Novantaquattro",
"95": "Novantacinque",
"96": "Novantasei",
"97": "Novantasette",
"98": "Novantotto",
"99": "Novantanove"
}

View File

@@ -0,0 +1,116 @@
{
"Synopsis": "あらすじ",
"Short Description": "短い説明",
"Comment": "コメント ",
"Notes": "ノート",
"Tag": "タグ",
"Point of View": "視点",
"Focus": "焦点",
"Characters": "キャラクター",
"Plot": "プロット",
"Timeline": "タイムライン",
"Locations": "場所",
"Objects": "オブジェクト",
"Entities": "エンティティ",
"Custom": "カスタム",
"0": "零",
"1": "一",
"2": "二",
"3": "三",
"4": "四",
"5": "五",
"6": "六",
"7": "七",
"8": "八",
"9": "九",
"10": "十",
"11": "十一",
"12": "十二",
"13": "十三",
"14": "十四",
"15": "十五",
"16": "十六",
"17": "十七",
"18": "十八",
"19": "十九",
"20": "二十",
"21": "二十一",
"22": "二十二",
"23": "二十三",
"24": "二十四",
"25": "二十五",
"26": "二十六",
"27": "二十七",
"28": "二十八",
"29": "二十九",
"30": "三十",
"31": "三十一",
"32": "三十二",
"33": "三十三",
"34": "三十四",
"35": "三十五",
"36": "三十六",
"37": "三十七",
"38": "三十八",
"39": "三十九",
"40": "四十",
"41": "四十一",
"42": "四十二",
"43": "四十三",
"44": "四十四",
"45": "四十五",
"46": "四十六",
"47": "四十七",
"48": "四十八",
"49": "四十九",
"50": "五十",
"51": "五十一",
"52": "五十二",
"53": "五十三",
"54": "五十四",
"55": "五十五",
"56": "五十六",
"57": "五十七",
"58": "五十八",
"59": "五十九",
"60": "六十",
"61": "六十一",
"62": "六十二",
"63": "六十三",
"64": "六十四",
"65": "六十五",
"66": "六十六",
"67": "六十七",
"68": "六十八",
"69": "六十九",
"70": "七十",
"71": "七十一",
"72": "七十二",
"73": "七十三",
"74": "七十四",
"75": "七十五",
"76": "七十六",
"77": "七十七",
"78": "七十八",
"79": "七十九",
"80": "八十",
"81": "八十一",
"82": "八十二",
"83": "八十三",
"84": "八十四",
"85": "八十五",
"86": "八十六",
"87": "八十七",
"88": "八十八",
"89": "八十九",
"90": "九十",
"91": "九十一",
"92": "九十二",
"93": "九十三",
"94": "九十四",
"95": "九十五",
"96": "九十六",
"97": "九十七",
"98": "九十八",
"99": "九十九"
}

View File

@@ -1,7 +1,18 @@
{
"Synopsis": "Sammendrag",
"Short Description": "Kort beskrivelse",
"Comment": "Kommentar",
"Notes": "Notat",
"Tag": "Knagg",
"Point of View": "Perspektiv",
"Focus": "Fokus",
"Characters": "Karakterer",
"Plot": "Plott",
"Timeline": "Tidslinje",
"Locations": "Lokasjoner",
"Objects": "Objekter",
"Entities": "Enheter",
"Custom": "Annet",
"0": "null",
"1": "én",
"2": "to",

View File

@@ -2,6 +2,16 @@
"Synopsis": "Samandrag",
"Comment": "Kommentar",
"Notes": "Notat",
"Tag": "Knagg",
"Point of View": "Perspektiv",
"Focus": "Fokus",
"Characters": "Karakterar",
"Plot": "Plott",
"Timeline": "Tidslinje",
"Locations": "Lokasjonar",
"Objects": "Objekt",
"Entities": "Eining",
"Custom": "Anna",
"0": "null",
"1": "ein",
"2": "to",

View File

@@ -0,0 +1,105 @@
{
"Synopsis": "Сводка",
"Comment": "Комментарий",
"Notes": "Заметки",
"0": "Ноль",
"1": "Один",
"2": "Два",
"3": "Три",
"4": "Четыре",
"5": "Пять",
"6": "Шесть",
"7": "Семь",
"8": "Восемь",
"9": "Девять",
"10": "Десять",
"11": "Одиннадцать",
"12": "Двенадцать",
"13": "Тринадцать",
"14": "Четырнадцать",
"15": "Пятнадцать",
"16": "Шестнадцать",
"17": "Семнадцать",
"18": "Восемнадцатая",
"19": "Девятнадцать",
"20": "Двадцать",
"21": "Двадцать один",
"22": "Двадцать два",
"23": "Двадцать три",
"24": "Двадцать четыре",
"25": "Двадцать пять",
"26": "Двадцать шесть",
"27": "Двадцать семь",
"28": "Двадцать восемь",
"29": "Двадцать девять",
"30": "Тридцать",
"31": "Тридцать один",
"32": "Тридцать два",
"33": "Тридцать три",
"34": "Тридцать четыре",
"35": "Тридцать пятая",
"36": "Тридцать пять",
"37": "Тридцать семь",
"38": "Тридцать восемь",
"39": "Тридцать девять",
"40": "Сорок",
"41": "Сорок один",
"42": "Сорок два",
"43": "Сорок три",
"44": "Сорок четыре",
"45": "Сорок пять",
"46": "Сорок шесть",
"47": "Сорок семь",
"48": "Сорок восемь",
"49": "Сорок девять",
"50": "Пятьдесят",
"51": "Пятьдесят один",
"52": "Пятьдесят два",
"53": "Пятьдесят три",
"54": "Пятьдесят четыре",
"55": "Пятьдесят пять",
"56": "Пятьдесят шесть",
"57": "Пятьдесят семь",
"58": "Пятьдесят восемь",
"59": "Пятьдесят девять",
"60": "Шестьдесят",
"61": "Шестьдесят один",
"62": "Шестьдесят два",
"63": "Шестьдесят три",
"64": "Шестьдесят четыре",
"65": "Шестьдесят пять",
"66": "Шестьдесят шесть",
"67": "Шестьдесят семь",
"68": "Шестьдесят восемь",
"69": "Шестьдесят девять",
"70": "Семьдесят",
"71": "Семьдесят один",
"72": "Семьдесят два",
"73": "Семьдесят три",
"74": "Семьдесят четыре",
"75": "Семьдесят пять",
"76": "Семьдесят шесть",
"77": "Семьдесят семь",
"78": "Семьдесят восемь",
"79": "Семьдесят девять",
"80": "Восемьдесят",
"81": "Восемьдесят один",
"82": "Восемьдесят два",
"83": "Восемьдесят три",
"84": "Восемьдесят четыре",
"85": "Восемьдесят пять",
"86": "Восемьдесят шесть",
"87": "Восемьдесят семь",
"88": "Восемьдесят восемь",
"89": "Восемьдесят девять",
"90": "Девяносто",
"91": "Девяносто один",
"92": "Девяносто два",
"93": "Девяносто три",
"94": "Девяносто четыре",
"95": "Девяносто пять",
"96": "Девяносто шесть",
"97": "Девяносто семь",
"98": "Девяносто восемь",
"99": "Девяносто девять"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 167 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

@@ -17,8 +17,16 @@ licenseurl = https://creativecommons.org/licenses/by-sa/4.0/
[Map]
add = typ_plus.svg
alert_error = typ_delete-full.svg
alert_info = typ_lightbulb-full.svg
alert_question = typ_directions-full.svg
alert_warn = typ_warning-full.svg
backward = typ_chevron-left.svg
bookmark = typ_bookmark.svg
browse = typ_folder-open.svg
build_excluded = typ_cancel.svg
build_filtered = typ_arrow-forward.svg
build_included = typ_pin.svg
bullet-off = typ_media-record-outline.svg
bullet-on = typ_media-record.svg
checked = mixed_input-checked.svg
@@ -37,11 +45,22 @@ cls_world = typ_location.svg
cross = typ_times.svg
down = typ_chevron-down.svg
edit = typ_pencil.svg
export = typ_export.svg
fmt_bold = nw_tb-bold.svg
fmt_bold-md = nw_tb-bold-md.svg
fmt_italic = nw_tb-italic.svg
fmt_italic-md = nw_tb-italic-md.svg
fmt_strike = nw_tb-strike.svg
fmt_strike-md = nw_tb-strike-md.svg
fmt_subscript = nw_tb-subscript.svg
fmt_superscript = nw_tb-superscript.svg
fmt_underline = nw_tb-underline.svg
forward = typ_chevron-right.svg
maximise = typ_arrow-maximise.svg
menu = typ_th-menu.svg
menu = typ_th-dot-menu.svg
minimise = typ_arrow-minimise.svg
noncheckable = mixed_input-none.svg
panel = nw_panel.svg
proj_chapter = mixed_document-chapter.svg
proj_details = typ_th-list-grey.svg
proj_document = typ_document-text.svg
@@ -51,9 +70,9 @@ proj_scene = mixed_document-scene.svg
proj_section = mixed_document-section.svg
proj_stats = typ_chart-bar-grey.svg
proj_title = mixed_document-title.svg
reference = typ_at.svg
refresh = typ_refresh.svg
remove = typ_minus.svg
revert = typ_refresh-flipped.svg
search = typ_search.svg
search_cancel = typ_cancel-grey.svg
search_case = nw_search-case.svg
@@ -73,14 +92,21 @@ sticky-off = typ_pin-outline.svg
sticky-on = typ_pin.svg
unchecked = mixed_input-unchecked.svg
up = typ_chevron-up.svg
view_build = typ_export.svg
view = typ_eye.svg
view_build = typ_export-grey.svg
view_editor = mixed_edit.svg
view_novel = typ_book-grey.svg
view_outline = typ_puzzle-outline.svg
deco_doc_h0 = nw_deco-h0.svg
deco_doc_h0_n = nw_deco-h0.svg
deco_doc_h1 = nw_deco-h1.svg
deco_doc_h1_n = nw_deco-h1.svg
deco_doc_h2 = nw_deco-h2.svg
deco_doc_h2_n = nw_deco-h2-narrow.svg
deco_doc_h3 = nw_deco-h3.svg
deco_doc_h3_n = nw_deco-h3-narrow.svg
deco_doc_h4 = nw_deco-h4.svg
deco_doc_h4_n = nw_deco-h4-narrow.svg
deco_doc_more = nw_deco-noveltree-more.svg
deco_doc_nt_n = nw_deco-note.svg

Some files were not shown because too many files have changed in this diff Show More