novelWriter 2.3rc1__py3-none-any.whl → 2.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. {novelWriter-2.3rc1.dist-info → novelWriter-2.4.dist-info}/METADATA +5 -6
  2. {novelWriter-2.3rc1.dist-info → novelWriter-2.4.dist-info}/RECORD +119 -109
  3. {novelWriter-2.3rc1.dist-info → novelWriter-2.4.dist-info}/WHEEL +1 -1
  4. novelWriter-2.4.dist-info/entry_points.txt +2 -0
  5. novelwriter/__init__.py +17 -10
  6. novelwriter/assets/i18n/nw_de_DE.qm +0 -0
  7. novelwriter/assets/i18n/nw_en_US.qm +0 -0
  8. novelwriter/assets/i18n/nw_es_419.qm +0 -0
  9. novelwriter/assets/i18n/nw_fr_FR.qm +0 -0
  10. novelwriter/assets/i18n/nw_it_IT.qm +0 -0
  11. novelwriter/assets/i18n/nw_ja_JP.qm +0 -0
  12. novelwriter/assets/i18n/nw_nb_NO.qm +0 -0
  13. novelwriter/assets/i18n/nw_nl_NL.qm +0 -0
  14. novelwriter/assets/i18n/nw_pt_BR.qm +0 -0
  15. novelwriter/assets/i18n/nw_zh_CN.qm +0 -0
  16. novelwriter/assets/i18n/project_nl_NL.json +11 -0
  17. novelwriter/assets/i18n/project_pt_BR.json +11 -0
  18. novelwriter/assets/icons/none.svg +4 -0
  19. novelwriter/assets/icons/typicons_dark/icons.conf +4 -0
  20. novelwriter/assets/icons/typicons_dark/nw_tb-mark.svg +7 -0
  21. novelwriter/assets/icons/typicons_dark/typ_refresh-flipped.svg +1 -1
  22. novelwriter/assets/icons/typicons_dark/typ_refresh.svg +1 -1
  23. novelwriter/assets/icons/typicons_dark/typ_search-grey.svg +4 -0
  24. novelwriter/assets/icons/typicons_dark/typ_times.svg +1 -1
  25. novelwriter/assets/icons/typicons_dark/typ_unfold-hidden.svg +4 -0
  26. novelwriter/assets/icons/typicons_dark/typ_unfold-visible.svg +4 -0
  27. novelwriter/assets/icons/typicons_light/icons.conf +4 -0
  28. novelwriter/assets/icons/typicons_light/nw_tb-mark.svg +7 -0
  29. novelwriter/assets/icons/typicons_light/typ_refresh-flipped.svg +1 -1
  30. novelwriter/assets/icons/typicons_light/typ_refresh.svg +1 -1
  31. novelwriter/assets/icons/typicons_light/typ_search-grey.svg +4 -0
  32. novelwriter/assets/icons/typicons_light/typ_times.svg +1 -1
  33. novelwriter/assets/icons/typicons_light/typ_unfold-hidden.svg +4 -0
  34. novelwriter/assets/icons/typicons_light/typ_unfold-visible.svg +4 -0
  35. novelwriter/assets/manual.pdf +0 -0
  36. novelwriter/assets/sample.zip +0 -0
  37. novelwriter/assets/syntax/cyberpunk_night.conf +26 -0
  38. novelwriter/assets/syntax/default_dark.conf +1 -0
  39. novelwriter/assets/syntax/default_light.conf +1 -0
  40. novelwriter/assets/syntax/grey_dark.conf +1 -0
  41. novelwriter/assets/syntax/grey_light.conf +1 -0
  42. novelwriter/assets/syntax/light_owl.conf +1 -0
  43. novelwriter/assets/syntax/night_owl.conf +1 -0
  44. novelwriter/assets/syntax/solarized_dark.conf +1 -0
  45. novelwriter/assets/syntax/solarized_light.conf +1 -0
  46. novelwriter/assets/syntax/tango.conf +23 -0
  47. novelwriter/assets/syntax/tomorrow.conf +1 -0
  48. novelwriter/assets/syntax/tomorrow_night.conf +1 -0
  49. novelwriter/assets/syntax/tomorrow_night_blue.conf +1 -0
  50. novelwriter/assets/syntax/tomorrow_night_bright.conf +1 -0
  51. novelwriter/assets/syntax/tomorrow_night_eighties.conf +1 -0
  52. novelwriter/assets/text/credits_en.htm +25 -23
  53. novelwriter/assets/themes/cyberpunk_night.conf +29 -0
  54. novelwriter/common.py +12 -4
  55. novelwriter/config.py +47 -16
  56. novelwriter/constants.py +5 -6
  57. novelwriter/core/buildsettings.py +64 -44
  58. novelwriter/core/coretools.py +97 -13
  59. novelwriter/core/docbuild.py +74 -7
  60. novelwriter/core/document.py +24 -3
  61. novelwriter/core/index.py +31 -112
  62. novelwriter/core/project.py +11 -15
  63. novelwriter/core/projectxml.py +3 -2
  64. novelwriter/core/sessions.py +2 -2
  65. novelwriter/core/spellcheck.py +3 -3
  66. novelwriter/core/status.py +6 -5
  67. novelwriter/core/storage.py +16 -6
  68. novelwriter/core/tohtml.py +22 -25
  69. novelwriter/core/tokenizer.py +417 -237
  70. novelwriter/core/tomd.py +17 -8
  71. novelwriter/core/toodt.py +386 -351
  72. novelwriter/core/tree.py +8 -8
  73. novelwriter/dialogs/about.py +10 -12
  74. novelwriter/dialogs/docmerge.py +17 -14
  75. novelwriter/dialogs/docsplit.py +20 -19
  76. novelwriter/dialogs/editlabel.py +5 -4
  77. novelwriter/dialogs/preferences.py +32 -40
  78. novelwriter/dialogs/projectsettings.py +31 -28
  79. novelwriter/dialogs/quotes.py +10 -9
  80. novelwriter/dialogs/wordlist.py +18 -15
  81. novelwriter/enum.py +17 -14
  82. novelwriter/error.py +14 -12
  83. novelwriter/extensions/circularprogress.py +12 -8
  84. novelwriter/extensions/configlayout.py +23 -3
  85. novelwriter/extensions/modified.py +51 -2
  86. novelwriter/extensions/pagedsidebar.py +16 -14
  87. novelwriter/extensions/simpleprogress.py +3 -1
  88. novelwriter/extensions/statusled.py +3 -1
  89. novelwriter/extensions/switch.py +10 -9
  90. novelwriter/extensions/switchbox.py +14 -13
  91. novelwriter/extensions/versioninfo.py +1 -1
  92. novelwriter/gui/doceditor.py +433 -496
  93. novelwriter/gui/dochighlight.py +54 -33
  94. novelwriter/gui/docviewer.py +162 -175
  95. novelwriter/gui/docviewerpanel.py +20 -37
  96. novelwriter/gui/editordocument.py +15 -4
  97. novelwriter/gui/itemdetails.py +51 -54
  98. novelwriter/gui/mainmenu.py +37 -17
  99. novelwriter/gui/noveltree.py +31 -37
  100. novelwriter/gui/outline.py +120 -98
  101. novelwriter/gui/projtree.py +114 -112
  102. novelwriter/gui/search.py +362 -0
  103. novelwriter/gui/sidebar.py +36 -45
  104. novelwriter/gui/statusbar.py +14 -14
  105. novelwriter/gui/theme.py +116 -34
  106. novelwriter/guimain.py +216 -207
  107. novelwriter/shared.py +31 -6
  108. novelwriter/text/counting.py +138 -0
  109. novelwriter/tools/dictionaries.py +15 -14
  110. novelwriter/tools/lipsum.py +20 -17
  111. novelwriter/tools/manusbuild.py +43 -35
  112. novelwriter/tools/manuscript.py +381 -104
  113. novelwriter/tools/manussettings.py +263 -125
  114. novelwriter/tools/noveldetails.py +21 -19
  115. novelwriter/tools/welcome.py +59 -57
  116. novelwriter/tools/writingstats.py +61 -55
  117. novelwriter/types.py +90 -0
  118. novelWriter-2.3rc1.dist-info/entry_points.txt +0 -5
  119. novelwriter/core/__init__.py +0 -3
  120. novelwriter/dialogs/__init__.py +0 -3
  121. novelwriter/extensions/__init__.py +0 -3
  122. novelwriter/gui/__init__.py +0 -3
  123. novelwriter/tools/__init__.py +0 -3
  124. {novelWriter-2.3rc1.dist-info → novelWriter-2.4.dist-info}/LICENSE.md +0 -0
  125. {novelWriter-2.3rc1.dist-info → novelWriter-2.4.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="m9.8767 17.723 5.8157-5.723-5.8157-5.723c-0.18462-0.18462-0.46155-0.27693-0.64616-0.27693-0.18462 0-0.46155 0.092309-0.64616 0.27693-0.18462 0.18462-0.27693 0.36924-0.27693 0.64616v10.154c0 0.27693 0.092309 0.46154 0.27693 0.64616 0.18462 0.18462 0.46155 0.27693 0.64616 0.27693 0.18462 0 0.46155-0.09231 0.64616-0.27693z" fill="#aeaeae" stroke-width=".92309"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="m6.277 9.8767 5.723 5.8157 5.723-5.8157c0.18462-0.18462 0.27693-0.46155 0.27693-0.64616 0-0.18462-0.092309-0.46155-0.27693-0.64616-0.18462-0.18462-0.36924-0.27693-0.64616-0.27693h-10.154c-0.27693 0-0.46155 0.092309-0.64616 0.27693-0.18462 0.18462-0.27693 0.46155-0.27693 0.64616 0 0.18462 0.092309 0.46155 0.27693 0.64616z" fill="#aeaeae" stroke-width=".92309"/>
4
+ </svg>
@@ -53,6 +53,7 @@ fmt_bold = nw_tb-bold.svg
53
53
  fmt_bold-md = nw_tb-bold-md.svg
54
54
  fmt_italic = nw_tb-italic.svg
55
55
  fmt_italic-md = nw_tb-italic-md.svg
56
+ fmt_mark = nw_tb-mark.svg
56
57
  fmt_strike = nw_tb-strike.svg
57
58
  fmt_strike-md = nw_tb-strike-md.svg
58
59
  fmt_subscript = nw_tb-subscript.svg
@@ -99,12 +100,15 @@ status_time = typ_stopwatch-grey.svg
99
100
  sticky-off = typ_pin-outline.svg
100
101
  sticky-on = typ_pin.svg
101
102
  unchecked = mixed_input-unchecked.svg
103
+ unfold-hide = typ_unfold-hidden.svg
104
+ unfold-show = typ_unfold-visible.svg
102
105
  up = typ_chevron-up.svg
103
106
  view = typ_eye.svg
104
107
  view_build = typ_export-grey.svg
105
108
  view_editor = mixed_edit.svg
106
109
  view_novel = typ_book-grey.svg
107
110
  view_outline = typ_puzzle-outline.svg
111
+ view_search = typ_search-grey.svg
108
112
 
109
113
  deco_doc_h0 = nw_deco-h0.svg
110
114
  deco_doc_h0_n = nw_deco-h0.svg
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="24" height="24" version="1.1" viewBox="0 0 6.35 6.35" xmlns="http://www.w3.org/2000/svg">
3
+ <rect x=".26458" y=".79375" width="5.8208" height="4.7625" fill="#ad8700" fill-opacity=".8" stroke-linecap="round" stroke-width=".1354"/>
4
+ <path d="m1.3229 5.2917v-4.2333h0.98087l0.6397 1.8829q0.060924 0.18829 0.11576 0.38957 0.054831 0.19479 0.11576 0.38957h0.024369q0.060924-0.19479 0.10966-0.38957 0.054831-0.20128 0.11576-0.38957l0.62752-1.8829h0.97478v4.2333h-0.81638v-1.5518q0-0.15583 0.012185-0.34412 0.012185-0.18829 0.030462-0.37658 0.018277-0.19479 0.036554-0.37658 0.018277-0.18829 0.036554-0.34412h-0.02437l-0.3229 1.0064-0.56659 1.6167h-0.49348l-0.56659-1.6167-0.3168-1.0064h-0.024369q0.018277 0.15583 0.036554 0.34412 0.018277 0.1818 0.036554 0.37658 0.018277 0.18829 0.030462 0.37658 0.012185 0.18829 0.012185 0.34412v1.5518z" fill-opacity=".78039" stroke-linecap="round" stroke-width=".11793"/>
5
+ <path d="m4.9555 5.5562v-0.43195h0.54619v-3.8986h-0.54619v-0.43195h1.1299v4.7624z" fill="#4271ae" stroke-width="1.1186"/>
6
+ <path d="m0.26458 5.5562v-4.7624h1.1299v0.43195h-0.54083v3.8986h0.54083v0.43195z" fill="#4271ae" stroke-width="1.1186"/>
7
+ </svg>
@@ -1,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
3
- <path d="m10.837 12.256h-6.8373v-6.8347c0.010667-1.5131 0.89467-1.877 1.964-0.80652l1.5387 1.5437c1.3533-1.0598 3.0093-1.6397 4.7547-1.6397 2.0667 0 4.012 0.80518 5.472 2.2676 1.4653 1.4557 2.2707 3.4034 2.2707 5.4696 0 2.0703-0.80533 4.0153-2.268 5.475-1.4627 1.4624-3.4067 2.2689-5.4747 2.2689-2.0667 0-4.012-0.80652-5.4747-2.2702-0.39467-0.39593-0.744-0.82784-1.04-1.2864-0.46267-0.7212-0.25333-1.6797 0.46667-2.1396 0.71867-0.46125 1.6773-0.25195 2.1387 0.46658 0.17733 0.27595 0.38933 0.53323 0.624 0.77319 0.87867 0.87717 2.0453 1.3597 3.2853 1.3597s2.4067-0.48124 3.2853-1.3597c0.876-0.87717 1.36-2.0436 1.36-3.2861 0-1.2398-0.48267-2.4062-1.36-3.2807-0.87867-0.87717-2.0453-1.3611-3.2853-1.3611-0.91733 0-1.7947 0.26795-2.5453 0.76252l1.9307 1.9343c1.0707 1.0691 0.70667 1.9436-0.80533 1.9436z" fill="#718c00" stroke-width="1.3332"/>
3
+ <path d="m10.692 12.288h-7.692v-7.689c0.012-1.7022 1.0065-2.1116 2.2095-0.90734l1.731 1.7367c1.5225-1.1923 3.3855-1.8447 5.349-1.8447 2.325 0 4.5135 0.90583 6.156 2.5511 1.6485 1.6377 2.5545 3.8288 2.5545 6.1533 0 2.3291-0.906 4.5172-2.5515 6.1594-1.6455 1.6452-3.8325 2.5525-6.159 2.5525-2.325 0-4.5135-0.90734-6.159-2.554-0.444-0.44542-0.837-0.93132-1.17-1.4472-0.5205-0.81135-0.285-1.8897 0.525-2.4071 0.8085-0.51891 1.887-0.28344 2.406 0.5249 0.1995 0.31044 0.438 0.59988 0.702 0.86984 0.9885 0.98682 2.301 1.5297 3.696 1.5297 1.395 0 2.7075-0.5414 3.696-1.5297 0.9855-0.98682 1.53-2.2991 1.53-3.6969 0-1.3948-0.543-2.707-1.53-3.6908-0.9885-0.98682-2.301-1.5312-3.696-1.5312-1.032 0-2.019 0.30144-2.8635 0.85784l2.172 2.1761c1.2045 1.2027 0.795 2.1866-0.906 2.1866z" fill="#718c00" stroke-width="1.4998"/>
4
4
  </svg>
@@ -1,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
3
- <path d="m13.163 12.256h6.8373v-6.8347c-0.010667-1.5131-0.89467-1.877-1.964-0.80652l-1.5387 1.5437c-1.3533-1.0598-3.0093-1.6397-4.7547-1.6397-2.0667 0-4.012 0.80518-5.472 2.2676-1.4653 1.4557-2.2707 3.4034-2.2707 5.4696 0 2.0703 0.80533 4.0153 2.268 5.475 1.4627 1.4624 3.4067 2.2689 5.4747 2.2689 2.0667 0 4.012-0.80652 5.4747-2.2702 0.39467-0.39593 0.744-0.82784 1.04-1.2864 0.46267-0.7212 0.25333-1.6797-0.46667-2.1396-0.71867-0.46125-1.6773-0.25195-2.1387 0.46658-0.17733 0.27595-0.38933 0.53323-0.624 0.77319-0.87867 0.87717-2.0453 1.3597-3.2853 1.3597s-2.4067-0.48124-3.2853-1.3597c-0.876-0.87717-1.36-2.0436-1.36-3.2861 0-1.2398 0.48267-2.4062 1.36-3.2807 0.87867-0.87717 2.0453-1.3611 3.2853-1.3611 0.91733 0 1.7947 0.26795 2.5453 0.76252l-1.9307 1.9343c-1.0707 1.0691-0.70667 1.9436 0.80533 1.9436z" fill="#718c00" stroke-width="1.3332"/>
3
+ <path d="m13.308 12.288h7.692v-7.689c-0.012001-1.7022-1.0065-2.1116-2.2095-0.90734l-1.731 1.7367c-1.5225-1.1923-3.3855-1.8447-5.349-1.8447-2.325 0-4.5135 0.90583-6.156 2.5511-1.6485 1.6377-2.5545 3.8288-2.5545 6.1533 0 2.3291 0.906 4.5172 2.5515 6.1594 1.6455 1.6452 3.8325 2.5525 6.159 2.5525 2.325 0 4.5135-0.90734 6.159-2.554 0.444-0.44542 0.837-0.93132 1.17-1.4472 0.5205-0.81135 0.285-1.8897-0.525-2.4071-0.8085-0.51891-1.887-0.28344-2.406 0.5249-0.1995 0.31044-0.438 0.59988-0.702 0.86984-0.9885 0.98682-2.301 1.5297-3.696 1.5297-1.395 0-2.7075-0.5414-3.696-1.5297-0.9855-0.98682-1.53-2.2991-1.53-3.6969 0-1.3948 0.543-2.707 1.53-3.6908 0.9885-0.98682 2.301-1.5312 3.696-1.5312 1.032 0 2.019 0.30144 2.8635 0.85784l-2.172 2.1761c-1.2045 1.2027-0.795 2.1866 0.906 2.1866z" fill="#718c00" stroke-width="1.4998"/>
4
4
  </svg>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="m20.547 14.707-0.7017-0.703-0.98054-0.98185c0.29717-0.90068 0.46343-1.859 0.46343-2.8578 0-5.0519-4.112-9.1639-9.1639-9.1639s-9.1639 4.112-9.1639 9.1639c0 5.0519 4.112 9.1639 9.1639 9.1639 0.99887 0 1.9585-0.16626 2.8591-0.46343l0.98185 0.98054 1.9794 1.9768 0.07986 0.07986 0.08378 0.072c0.78679 0.66242 1.7647 1.0264 2.7544 1.0264 2.2596 0 4.0976-1.838 4.0976-4.0989 0-1.0997-0.4294-2.1313-1.2096-2.9037zm-16.93-4.5427c0-3.6093 2.9364-6.5457 6.5457-6.5457s6.5457 2.9364 6.5457 6.5457-2.9364 6.5457-6.5457 6.5457-6.5457-2.9364-6.5457-6.5457z" fill-opacity=".78039" stroke-width="1.3091"/>
4
+ </svg>
@@ -1,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
3
- <path d="m19.041 4.9586c-1.0144-1.0157-2.6635-1.0157-3.678 0l-3.3632 3.3632-3.3632-3.3632c-1.0144-1.0157-2.6635-1.0157-3.678 0-1.0157 1.0157-1.0157 2.6622 0 3.678l3.3619 3.3632-3.3619 3.3632c-1.0157 1.0157-1.0157 2.6622 0 3.678 0.50722 0.50852 1.1731 0.76212 1.839 0.76212 0.66588 0 1.3318-0.25361 1.839-0.76212l3.3632-3.3632 3.3632 3.3632c0.50722 0.50852 1.1731 0.76212 1.839 0.76212 0.66588 0 1.3318-0.25361 1.839-0.76212 1.0157-1.0157 1.0157-2.6622 0-3.678l-3.3619-3.3632 3.3619-3.3632c1.0157-1.0157 1.0157-2.6622 0-3.678z" fill="#c82829" stroke-width="1.3006"/>
3
+ <path d="m20.121 3.8786c-1.17-1.1715-3.072-1.1715-4.2421 0l-3.879 3.8791-3.879-3.8791c-1.17-1.1715-3.072-1.1715-4.2421 0-1.1715 1.1715-1.1715 3.0705 0 4.2421l3.8776 3.879-3.8776 3.879c-1.1715 1.1715-1.1715 3.0705 0 4.2421 0.58502 0.58652 1.353 0.87902 2.1211 0.87902 0.76801 0 1.5361-0.29251 2.1211-0.87902l3.879-3.879 3.879 3.879c0.58502 0.58652 1.353 0.87902 2.1211 0.87902 0.76801 0 1.5361-0.29251 2.1211-0.87902 1.1715-1.1715 1.1715-3.0705 0-4.2421l-3.8776-3.879 3.8776-3.879c1.1715-1.1715 1.1715-3.0705 0-4.2421z" fill="#c82829" stroke-width="1.5001"/>
4
4
  </svg>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="m9.8767 17.723 5.8157-5.723-5.8157-5.723c-0.18462-0.18462-0.46155-0.27693-0.64616-0.27693-0.18462 0-0.46155 0.092309-0.64616 0.27693-0.18462 0.18462-0.27693 0.36924-0.27693 0.64616v10.154c0 0.27693 0.092309 0.46154 0.27693 0.64616 0.18462 0.18462 0.46155 0.27693 0.64616 0.27693 0.18462 0 0.46155-0.09231 0.64616-0.27693z" fill-opacity=".78039" stroke-width="1.6923"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="m6.277 9.8767 5.723 5.8157 5.723-5.8157c0.18462-0.18462 0.27693-0.46155 0.27693-0.64616 0-0.18462-0.09231-0.46155-0.27693-0.64616-0.18462-0.18462-0.36924-0.27693-0.64616-0.27693h-10.154c-0.27693 0-0.46155 0.092309-0.64616 0.27693-0.18462 0.18462-0.27693 0.46155-0.27693 0.64616 0 0.18462 0.092309 0.46155 0.27693 0.64616z" fill-opacity=".78039" stroke-width="1.6923"/>
4
+ </svg>
Binary file
Binary file
@@ -0,0 +1,26 @@
1
+ [Main]
2
+ name = Cyberpunk Night
3
+ author = Anders Lemvigh
4
+ url = https://github.com/alemvigh
5
+ license = CC BY-SA 4.0
6
+ licenseurl = https://creativecommons.org/licenses/by-sa/4.0/
7
+
8
+ [Syntax]
9
+ background = 0, 0, 0
10
+ text = 150, 150, 150
11
+ link = 77, 077, 255
12
+ headertext = 255, 255, 255
13
+ headertag = 50, 0, 180
14
+ emphasis = 0, 255, 255
15
+ straightquotes = 7, 27, 219
16
+ doublequotes = 0, 255, 0
17
+ singlequotes = 0, 140, 255
18
+ hidden = 77, 77, 100
19
+ shortcode = 255, 255, 0
20
+ keyword = 255, 100, 255
21
+ value = 255, 150, 10
22
+ spellcheckline = 242, 72, 23
23
+ errorline = 186, 218, 4
24
+ replacetag = 0, 0, 180
25
+ modifier = 144, 142, 176
26
+ optional = 180, 180, 180
@@ -25,3 +25,4 @@ spellcheckline = 200, 46, 0
25
25
  errorline = 46, 200, 0
26
26
  replacetag = 0, 184, 46
27
27
  modifier = 200, 120, 0
28
+ texthighlight = 136, 200, 0, 96
@@ -25,3 +25,4 @@ spellcheckline = 200, 0, 0
25
25
  errorline = 0, 150, 0
26
26
  replacetag = 0, 150, 0
27
27
  modifier = 150, 110, 30
28
+ texthighlight = 150, 150, 0, 96
@@ -25,3 +25,4 @@ spellcheckline = 200, 46, 0
25
25
  errorline = 46, 200, 0
26
26
  replacetag = 225, 225, 225
27
27
  modifier = 225, 225, 225
28
+ texthighlight = 255, 255, 255, 64
@@ -25,3 +25,4 @@ spellcheckline = 200, 0, 0
25
25
  errorline = 0, 150, 0
26
26
  replacetag = 0, 0, 0
27
27
  modifier = 0, 0, 0
28
+ texthighlight = 0, 0, 0, 64
@@ -45,3 +45,4 @@ spellcheckline = 222, 61, 58
45
45
  errorline = 8, 145, 106
46
46
  replacetag = 42, 162, 152
47
47
  modifier = 224, 175, 5
48
+ texthighlight = 218, 170, 1, 96
@@ -45,3 +45,4 @@ spellcheckline = 247, 140, 108
45
45
  errorline = 173, 219, 103
46
46
  replacetag = 127, 219, 202
47
47
  modifier = 236, 196, 141
48
+ texthighlight = 255, 235, 149, 96
@@ -25,3 +25,4 @@ spellcheckline = 203, 75, 22
25
25
  errorline = 220, 50, 47
26
26
  replacetag = 133, 153, 0
27
27
  modifier = 181, 137, 0
28
+ texthighlight = 181, 137, 0, 96
@@ -25,3 +25,4 @@ spellcheckline = 203, 75, 22
25
25
  errorline = 220, 50, 47
26
26
  replacetag = 133, 153, 0
27
27
  modifier = 181, 137, 0
28
+ texthighlight = 181, 137, 0, 96
@@ -0,0 +1,23 @@
1
+ [Main]
2
+ name = Tango
3
+ author = Veronica Berglyd Olsen (adaptation)
4
+
5
+ [Syntax]
6
+ background = 48, 48, 47
7
+ text = 238, 238, 236
8
+ link = 115, 159, 207
9
+ headertext = 115, 159, 207
10
+ headertag = 52, 101, 164
11
+ emphasis = 196, 160, 0
12
+ straightquotes = 239, 41, 41
13
+ doublequotes = 138, 226, 52
14
+ singlequotes = 252, 233, 79
15
+ hidden = 143, 143, 141
16
+ shortcode = 115, 159, 207
17
+ keyword = 239, 41, 41
18
+ value = 173, 127, 168
19
+ optional = 115, 159, 207
20
+ spellcheckline = 239, 41, 41
21
+ errorline = 138, 226, 52
22
+ replacetag = 51, 226, 226
23
+ modifier = 196, 160, 0
@@ -45,3 +45,4 @@ spellcheckline = 240, 40, 41
45
45
  errorline = 113, 140, 0
46
46
  replacetag = 62, 153, 159
47
47
  modifier = 245, 135, 31
48
+ texthighlight = 234, 183, 0, 96
@@ -45,3 +45,4 @@ spellcheckline = 204, 102, 102
45
45
  errorline = 181, 189, 104
46
46
  replacetag = 138, 190, 183
47
47
  modifier = 222, 147, 95
48
+ texthighlight = 240, 198, 116, 96
@@ -45,3 +45,4 @@ spellcheckline = 255, 157, 164
45
45
  errorline = 209, 241, 169
46
46
  replacetag = 153, 255, 255
47
47
  modifier = 255, 197, 143
48
+ texthighlight = 255, 238, 173, 96
@@ -45,3 +45,4 @@ spellcheckline = 213, 78, 83
45
45
  errorline = 185, 202, 74
46
46
  replacetag = 112, 192, 177
47
47
  modifier = 231, 140, 69
48
+ texthighlight = 231, 197, 71, 128
@@ -45,3 +45,4 @@ spellcheckline = 242, 119, 122
45
45
  errorline = 153, 204, 153
46
46
  replacetag = 102, 204, 204
47
47
  modifier = 249, 145, 57
48
+ texthighlight = 255, 204, 102, 96
@@ -8,9 +8,9 @@
8
8
  <h3>Contributors</h3>
9
9
 
10
10
  <p>
11
- <b>Concept:</b> Marian Lückhof (<a href="https://github.com/Number042">@Number042</a>)<br>
12
- <b>Internationalisation:</b> Bruno Meneguello (<a href="https://github.com/bkmeneguello">@bkmeneguello</a>)<br>
13
- <b>Setup and Packaging:</b> Rachel Powers (<a href="https://github.com/Ryex">@Ryex</a>)
11
+ &nbsp;&bull;&nbsp;<b>Concept:</b> Marian Lückhof (<a href="https://github.com/Number042">@Number042</a>)<br>
12
+ &nbsp;&bull;&nbsp;<b>Internationalisation:</b> Bruno Meneguello (<a href="https://github.com/bkmeneguello">@bkmeneguello</a>)<br>
13
+ &nbsp;&bull;&nbsp;<b>Setup and Packaging:</b> Rachel Powers (<a href="https://github.com/Ryex">@Ryex</a>)
14
14
  </p>
15
15
  <p>For other contributions, see the project's
16
16
  <a href="https://github.com/vkbo/novelWriter/graphs/contributors">Contributors</a> page.</p>
@@ -24,20 +24,20 @@
24
24
  <p>The default language is English (UK) with English (US) as an option. These are the original
25
25
  translators for the languages currently available:</p>
26
26
  <p>
27
- <b>Dutch:</b> Martijn van der Kleijn (<a href="https://github.com/mvdkleijn">@mvdkleijn</a>)<br>
28
- <b>French:</b> Jan Lüdke (<a href="https://github.com/jyhelle">@jyhelle</a>)<br>
29
- <b>German:</b> Myian (<a href="https://github.com/heymyian">@heymyian</a>)<br>
30
- <b>Italian:</b> Riccardo Mangili<br>
31
- <b>Japanese:</b> hebekeg (<a href="https://github.com/hebekeg">@hebekeg</a>)<br>
32
- <b>Latin American Spanish:</b> Tommy Marplatt (<a href="https://github.com/tmarplatt">@tmarplatt</a>)<br>
33
- <b>Norwegian:</b> Veronica Berglyd Olsen (<a href="https://github.com/vkbo">@vkbo</a>)<br>
34
- <b>Portuguese:</b> Bruno Meneguello (<a href="https://github.com/bkmeneguello">@bkmeneguello</a>)<br>
35
- <b>Simplified Chinese:</b> Qianzhi Long (<a href="https://github.com/longqzh">@longqzh</a>)
27
+ &nbsp;&bull;&nbsp;<b>Dutch:</b> Martijn van der Kleijn (<a href="https://github.com/mvdkleijn">@mvdkleijn</a>)<br>
28
+ &nbsp;&bull;&nbsp;<b>French:</b> Jan Lüdke (<a href="https://github.com/jyhelle">@jyhelle</a>)<br>
29
+ &nbsp;&bull;&nbsp;<b>German:</b> Myian (<a href="https://github.com/heymyian">@heymyian</a>)<br>
30
+ &nbsp;&bull;&nbsp;<b>Italian:</b> Riccardo Mangili<br>
31
+ &nbsp;&bull;&nbsp;<b>Japanese:</b> hebekeg (<a href="https://github.com/hebekeg">@hebekeg</a>)<br>
32
+ &nbsp;&bull;&nbsp;<b>Latin American Spanish:</b> Tommy Marplatt (<a href="https://github.com/tmarplatt">@tmarplatt</a>)<br>
33
+ &nbsp;&bull;&nbsp;<b>Norwegian:</b> Veronica Berglyd Olsen (<a href="https://github.com/vkbo">@vkbo</a>)<br>
34
+ &nbsp;&bull;&nbsp;<b>Portuguese:</b> Bruno Meneguello (<a href="https://github.com/bkmeneguello">@bkmeneguello</a>)<br>
35
+ &nbsp;&bull;&nbsp;<b>Simplified Chinese:</b> Qianzhi Long (<a href="https://github.com/longqzh">@longqzh</a>)
36
36
  </p>
37
37
 
38
38
  <p>Additional larger translation contributions:</p>
39
39
  <p>
40
- <b>French:</b> Albert Aribaud (<a href="https://github.com/aaribaud">@aaribaud</a>)
40
+ &nbsp;&bull;&nbsp;<b>French:</b> Albert Aribaud (<a href="https://github.com/aaribaud">@aaribaud</a>)
41
41
  </p>
42
42
 
43
43
  <p>Translations are managed on <a href="https://crowdin.com/project/novelwriter">Crowdin</a>, and
@@ -47,27 +47,29 @@ more contributions are listed on the project's <a href="https://crowdin.com/proj
47
47
 
48
48
  <p>The following libraries are dependencies of novelWriter:</p>
49
49
  <p>
50
- <a href="https://www.qt.io">Qt5</a> by Qt Company<br>
51
- <a href="https://www.riverbankcomputing.com/software/pyqt">PyQt5</a> by Riverbank Computing<br>
52
- <a href="https://abiword.github.io/enchant">Enchant</a> by Dom Lachowicz<br>
53
- <a href="https://pyenchant.github.io/pyenchant">PyEnchant</a> by Dimitri Merejkowsky
50
+ &nbsp;&bull;&nbsp;<a href="https://www.qt.io">Qt5</a> by Qt Company<br>
51
+ &nbsp;&bull;&nbsp;<a href="https://www.riverbankcomputing.com/software/pyqt">PyQt5</a> by Riverbank Computing<br>
52
+ &nbsp;&bull;&nbsp;<a href="https://abiword.github.io/enchant">Enchant</a> by Dom Lachowicz<br>
53
+ &nbsp;&bull;&nbsp;<a href="https://pyenchant.github.io/pyenchant">PyEnchant</a> by Dimitri Merejkowsky
54
54
  </p>
55
55
 
56
56
  <h3>Assets</h3>
57
57
 
58
58
  <p>Some of the assets bundled with novelWriter were adapted from the following sources:</p>
59
59
  <p>
60
- <a href="https://github.com/stephenhutchings/typicons.font">Typicons</a> icons by Stephen Hutchings (CC BY-SA 4.0)<br>
61
- <a href="https://github.com/chriskempson/base16">Tomorrow</a> syntax themes by Chris Kempson (MIT License)<br>
62
- <a href="https://github.com/sdras/night-owl-vscode-theme">Owl</a> syntax themes by Sarah Drasner (MIT License)<br>
63
- <a href="https://github.com/altercation/solarized">Solarized</a> themes by Ethan Schoonover (MIT License)
60
+ &nbsp;&bull;&nbsp;<a href="https://github.com/stephenhutchings/typicons.font">Typicons</a> icons by Stephen Hutchings (CC BY-SA 4.0)<br>
61
+ &nbsp;&bull;&nbsp;<a href="https://github.com/chriskempson/base16">Tomorrow</a> syntax themes by Chris Kempson (MIT License)<br>
62
+ &nbsp;&bull;&nbsp;<a href="https://github.com/sdras/night-owl-vscode-theme">Owl</a> syntax themes by Sarah Drasner (MIT License)<br>
63
+ &nbsp;&bull;&nbsp;<a href="https://github.com/altercation/solarized">Solarized</a> themes by Ethan Schoonover (MIT License)
64
64
  </p>
65
65
 
66
66
  <h3>Fonts</h3>
67
67
 
68
- <p>The font used for the main novelWriter logo, mimetype and text banners is:</p>
68
+ <p>The font used for the main novelWriter logo, mimetype and text banners is Pridi. Other fonts are
69
+ used on buttons and icons.</p>
69
70
  <p>
70
- Pridi by Cadson Demak (Open Font License, Version 1.1)
71
+ &nbsp;&bull;&nbsp;Pridi by Cadson Demak (Open Font License, Version 1.1)<br>
72
+ &nbsp;&bull;&nbsp;Source Sans Pro by Paul D. Hunt (SIL Open Font License)
71
73
  </p>
72
74
 
73
75
  <h3>Special Mentions</h3>
@@ -0,0 +1,29 @@
1
+ [Main]
2
+ name = Cyberpunk Night
3
+ description = A taste of the future 80s
4
+ author = Anders Lemvigh
5
+ url = https://github.com/alemvigh
6
+ license = CC BY-SA 4.0
7
+ licenseurl = https://creativecommons.org/licenses/by-sa/4.0/
8
+ icontheme = typicons_dark
9
+
10
+ [Palette]
11
+ window = 0, 0, 0
12
+ windowtext = 150, 150, 150
13
+ base = 0, 0, 0
14
+ alternatebase = 30, 20, 45
15
+ text = 150, 150, 150
16
+ tooltipbase = 40, 20, 70
17
+ tooltiptext = 255, 255, 255
18
+ button = 5, 0, 10
19
+ buttontext = 150, 150, 150
20
+ brighttext = 255, 255, 255
21
+ highlight = 50, 30, 80
22
+ highlightedtext = 255, 255, 255
23
+ link = 77, 77, 255
24
+ linkvisited = 50, 0, 80
25
+
26
+ [GUI]
27
+ statusnone = 50, 50, 50
28
+ statussaved = 77, 255, 77
29
+ statusunsaved = 255, 77, 77
novelwriter/common.py CHANGED
@@ -36,7 +36,7 @@ from configparser import ConfigParser
36
36
  from urllib.parse import urljoin
37
37
  from urllib.request import pathname2url
38
38
 
39
- from PyQt5.QtGui import QDesktopServices
39
+ from PyQt5.QtGui import QColor, QDesktopServices
40
40
  from PyQt5.QtCore import QCoreApplication, QUrl
41
41
 
42
42
  from novelwriter.enum import nwItemClass, nwItemType, nwItemLayout
@@ -255,7 +255,7 @@ def formatFileFilter(extensions: list[str | tuple[str, str]]) -> str:
255
255
  result = []
256
256
  for ext in extensions:
257
257
  if isinstance(ext, str):
258
- result.append(f"{trConst(nwLabels.FILE_FILTERS.get(ext))} ({ext})")
258
+ result.append(f"{trConst(nwLabels.FILE_FILTERS.get(ext, 'ERR'))} ({ext})")
259
259
  elif isinstance(ext, tuple) and len(ext) == 2:
260
260
  result.append(f"{ext[0]} ({ext[1]})")
261
261
  return ";;".join(result)
@@ -382,6 +382,11 @@ def numberToRoman(value: int, toLower: bool = False) -> str:
382
382
  return roman.lower() if toLower else roman
383
383
 
384
384
 
385
+ def cssCol(col: QColor, alpha: int | None = None) -> str:
386
+ """Convert a QColor object to an rgba entry to use in CSS."""
387
+ return f"rgba({col.red()}, {col.green()}, {col.blue()}, {alpha or col.alpha()})"
388
+
389
+
385
390
  ##
386
391
  # Encoder Functions
387
392
  ##
@@ -444,7 +449,7 @@ def xmlIndent(tree: ET.Element | ET.ElementTree) -> None:
444
449
 
445
450
  indentations = ["\n"]
446
451
 
447
- def indentChildren(elem, level):
452
+ def indentChildren(elem: ET.Element, level: int) -> None:
448
453
  chLevel = level + 1
449
454
  try:
450
455
  chIndent = indentations[chLevel]
@@ -467,6 +472,8 @@ def xmlIndent(tree: ET.Element | ET.ElementTree) -> None:
467
472
  if last is not None:
468
473
  last.tail = indentations[level]
469
474
 
475
+ return
476
+
470
477
  if len(tree):
471
478
  indentChildren(tree, 0)
472
479
  tree.tail = "\n"
@@ -529,8 +536,9 @@ class NWConfigParser(ConfigParser):
529
536
  helper functions, and support for lists.
530
537
  """
531
538
 
532
- def __init__(self):
539
+ def __init__(self) -> None:
533
540
  super().__init__()
541
+ return
534
542
 
535
543
  def rdStr(self, section: str, option: str, default: str) -> str:
536
544
  """Read string value."""
novelwriter/config.py CHANGED
@@ -30,6 +30,7 @@ import logging
30
30
 
31
31
  from time import time
32
32
  from pathlib import Path
33
+ from datetime import datetime
33
34
 
34
35
  from PyQt5.QtGui import QFontDatabase
35
36
  from PyQt5.QtCore import (
@@ -60,8 +61,12 @@ class Config:
60
61
  self.appHandle = "novelwriter"
61
62
 
62
63
  # Set Paths
63
- confRoot = Path(QStandardPaths.writableLocation(QStandardPaths.ConfigLocation))
64
- dataRoot = Path(QStandardPaths.writableLocation(QStandardPaths.AppDataLocation))
64
+ confRoot = Path(QStandardPaths.writableLocation(
65
+ QStandardPaths.StandardLocation.ConfigLocation)
66
+ )
67
+ dataRoot = Path(QStandardPaths.writableLocation(
68
+ QStandardPaths.StandardLocation.AppDataLocation)
69
+ )
65
70
 
66
71
  self._confPath = confRoot.absolute() / self.appHandle # The user config location
67
72
  self._dataPath = dataRoot.absolute() / self.appHandle # The user data location
@@ -82,10 +87,13 @@ class Config:
82
87
  # Localisation
83
88
  # Note that these paths must be strings
84
89
  self._nwLangPath = self._appPath / "assets" / "i18n"
85
- self._qtLangPath = QLibraryInfo.location(QLibraryInfo.TranslationsPath)
90
+ self._qtLangPath = QLibraryInfo.location(QLibraryInfo.LibraryLocation.TranslationsPath)
86
91
 
87
- wantedLocale = self._nwLangPath / f"nw_{QLocale.system().name()}.qm"
88
- self._qLocale = QLocale.system() if wantedLocale.exists() else QLocale("en_GB")
92
+ hasLocale = (self._nwLangPath / f"nw_{QLocale.system().name()}.qm").exists()
93
+ self._qLocale = QLocale.system() if hasLocale else QLocale("en_GB")
94
+ self._dLocale = QLocale.system()
95
+ self._dShortDate = self._dLocale.dateFormat(QLocale.FormatType.ShortFormat)
96
+ self._dShortDateTime = self._dLocale.dateTimeFormat(QLocale.FormatType.ShortFormat)
89
97
  self._qtTrans = {}
90
98
 
91
99
  # PDF Manual
@@ -179,17 +187,19 @@ class Config:
179
187
  # State
180
188
  self.showViewerPanel = True # The panel for the viewer is visible
181
189
  self.showEditToolBar = False # The document editor toolbar visibility
182
- self.useShortcodes = False # Use shortcodes for basic formatting
183
190
  self.viewComments = True # Comments are shown in the viewer
184
191
  self.viewSynopsis = True # Synopsis is shown in the viewer
185
192
 
186
- # Search Bar Switches
187
- self.searchCase = False
188
- self.searchWord = False
189
- self.searchRegEx = False
190
- self.searchLoop = False
191
- self.searchNextFile = False
192
- self.searchMatchCap = False
193
+ # Search Box States
194
+ self.searchCase = False
195
+ self.searchWord = False
196
+ self.searchRegEx = False
197
+ self.searchLoop = False
198
+ self.searchNextFile = False
199
+ self.searchMatchCap = False
200
+ self.searchProjCase = False
201
+ self.searchProjWord = False
202
+ self.searchProjRegEx = False
193
203
 
194
204
  # System and App Information
195
205
  # ==========================
@@ -363,7 +373,7 @@ class Config:
363
373
  elif self.osDarwin and "Helvetica" in fontFam:
364
374
  self.textFont = "Helvetica"
365
375
  else:
366
- self.textFont = fontDB.systemFont(QFontDatabase.GeneralFont).family()
376
+ self.textFont = fontDB.systemFont(QFontDatabase.SystemFont.GeneralFont).family()
367
377
  else:
368
378
  self.textFont = family
369
379
  return
@@ -380,6 +390,10 @@ class Config:
380
390
  """Un-scale fixed gui sizes by the screen scale factor."""
381
391
  return int(value/self.guiScale)
382
392
 
393
+ def homePath(self) -> Path:
394
+ """The user's home folder."""
395
+ return self._homePath
396
+
383
397
  def dataPath(self, target: str | None = None) -> Path:
384
398
  """Return a path in the data folder."""
385
399
  if isinstance(target, str):
@@ -414,6 +428,14 @@ class Config:
414
428
  self._errData = []
415
429
  return message
416
430
 
431
+ def localDate(self, value: datetime) -> str:
432
+ """Return a localised date format."""
433
+ return self._dLocale.toString(value, self._dShortDate)
434
+
435
+ def localDateTime(self, value: datetime) -> str:
436
+ """Return a localised datetime format."""
437
+ return self._dLocale.toString(value, self._dShortDateTime)
438
+
417
439
  def listLanguages(self, lngSet: int) -> list[tuple[str, str]]:
418
440
  """List localisation files in the i18n folder. The default GUI
419
441
  language is British English (en_GB).
@@ -496,6 +518,11 @@ class Config:
496
518
  QLocale.setDefault(self._qLocale)
497
519
  self._qtTrans = {}
498
520
 
521
+ hasLocale = (self._nwLangPath / f"nw_{self._qLocale.name()}.qm").exists()
522
+ self._dLocale = self._qLocale if hasLocale else QLocale.system()
523
+ self._dShortDate = self._dLocale.dateFormat(QLocale.FormatType.ShortFormat)
524
+ self._dShortDateTime = self._dLocale.dateTimeFormat(QLocale.FormatType.ShortFormat)
525
+
499
526
  langList = [
500
527
  (self._qtLangPath, "qtbase"), # Qt 5.x
501
528
  (str(self._nwLangPath), "nw"), # novelWriter
@@ -602,7 +629,6 @@ class Config:
602
629
  sec = "State"
603
630
  self.showViewerPanel = conf.rdBool(sec, "showviewerpanel", self.showViewerPanel)
604
631
  self.showEditToolBar = conf.rdBool(sec, "showedittoolbar", self.showEditToolBar)
605
- self.useShortcodes = conf.rdBool(sec, "useshortcodes", self.useShortcodes)
606
632
  self.viewComments = conf.rdBool(sec, "viewcomments", self.viewComments)
607
633
  self.viewSynopsis = conf.rdBool(sec, "viewsynopsis", self.viewSynopsis)
608
634
  self.searchCase = conf.rdBool(sec, "searchcase", self.searchCase)
@@ -611,6 +637,9 @@ class Config:
611
637
  self.searchLoop = conf.rdBool(sec, "searchloop", self.searchLoop)
612
638
  self.searchNextFile = conf.rdBool(sec, "searchnextfile", self.searchNextFile)
613
639
  self.searchMatchCap = conf.rdBool(sec, "searchmatchcap", self.searchMatchCap)
640
+ self.searchProjCase = conf.rdBool(sec, "searchprojcase", self.searchProjCase)
641
+ self.searchProjWord = conf.rdBool(sec, "searchprojword", self.searchProjWord)
642
+ self.searchProjRegEx = conf.rdBool(sec, "searchprojregex", self.searchProjRegEx)
614
643
 
615
644
  # Check Values
616
645
  # ============
@@ -708,7 +737,6 @@ class Config:
708
737
  conf["State"] = {
709
738
  "showviewerpanel": str(self.showViewerPanel),
710
739
  "showedittoolbar": str(self.showEditToolBar),
711
- "useshortcodes": str(self.useShortcodes),
712
740
  "viewcomments": str(self.viewComments),
713
741
  "viewsynopsis": str(self.viewSynopsis),
714
742
  "searchcase": str(self.searchCase),
@@ -717,6 +745,9 @@ class Config:
717
745
  "searchloop": str(self.searchLoop),
718
746
  "searchnextfile": str(self.searchNextFile),
719
747
  "searchmatchcap": str(self.searchMatchCap),
748
+ "searchprojcase": str(self.searchProjCase),
749
+ "searchprojword": str(self.searchProjWord),
750
+ "searchprojregex": str(self.searchProjRegEx),
720
751
  }
721
752
 
722
753
  # Write config file
novelwriter/constants.py CHANGED
@@ -23,8 +23,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
23
23
  """
24
24
  from __future__ import annotations
25
25
 
26
- import re
27
-
28
26
  from PyQt5.QtCore import QCoreApplication, QT_TRANSLATE_NOOP
29
27
 
30
28
  from novelwriter.enum import nwBuildFmt, nwItemClass, nwItemLayout, nwOutline
@@ -55,6 +53,7 @@ class nwConst:
55
53
 
56
54
  # Gui Settings
57
55
  STATUS_MSG_TIMEOUT = 15000 # milliseconds
56
+ MAX_SEARCH_RESULT = 1000
58
57
 
59
58
  # Dialogs
60
59
  DLG_FINISHED = 2
@@ -67,12 +66,9 @@ class nwRegEx:
67
66
  FMT_EI = r"(?<![\w\\])(_)(?![\s_])(.+?)(?<![\s\\])(\1)(?!\w)"
68
67
  FMT_EB = r"(?<![\w\\])([\*]{2})(?![\s\*])(.+?)(?<![\s\\])(\1)(?!\w)"
69
68
  FMT_ST = r"(?<![\w\\])([~]{2})(?![\s~])(.+?)(?<![\s\\])(\1)(?!\w)"
70
- FMT_SC = r"(?i)(?<!\\)(\[[\/\!]?(?:i|b|s|u|sup|sub)\])"
69
+ FMT_SC = r"(?i)(?<!\\)(\[[\/\!]?(?:i|b|s|u|m|sup|sub)\])"
71
70
  FMT_SV = r"(?<!\\)(\[(?i)(?:fn|footnote):)(.+?)(?<!\\)(\])"
72
71
 
73
- # Pre-Compiled RegEx
74
- RX_SC = re.compile(FMT_SC)
75
-
76
72
  # END Class nwRegEx
77
73
 
78
74
 
@@ -86,6 +82,8 @@ class nwShortcode:
86
82
  STRIKE_C = "[/s]"
87
83
  ULINE_O = "[u]"
88
84
  ULINE_C = "[/u]"
85
+ MARK_O = "[m]"
86
+ MARK_C = "[/m]"
89
87
  SUP_O = "[sup]"
90
88
  SUP_C = "[/sup]"
91
89
  SUB_O = "[sub]"
@@ -408,6 +406,7 @@ class nwUnicode:
408
406
  U_THNBSP = "\u202f" # Thin non-breaking space
409
407
  U_ENSP = "\u2002" # Short (en) space
410
408
  U_EMSP = "\u2003" # Long (em) space
409
+ U_MMSP = "\u205f" # Medium mathematical space
411
410
  U_LSEP = "\u2028" # Line separator
412
411
  U_PSEP = "\u2029" # Paragraph separator
413
412