Commit graph

696 commits

Author SHA1 Message Date
TheJackiMonster 029dfe2056
Potential workaround for manuskriptw.exe
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2022-08-10 00:29:49 +02:00
TheJackiMonster 6916f27d60
Fixed issue #1042
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2022-08-09 14:37:18 +02:00
TheJackiMonster 0e342337dd
Updated translation files and added more labels to translation
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2022-08-09 13:44:53 +02:00
TheJackiMonster ecf4d6b0b4
Changed default behavior to save projects
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2022-07-18 09:27:24 +02:00
TheJackiMonster 276d9dbabc
========== manuskript-0.14.0 ==========
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2022-06-08 15:04:17 +02:00
TheJackiMonster 934205c46e
Update ui file of about dialog
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2022-06-08 13:35:18 +02:00
Tobias Frisch d4bedd5003
Merge pull request #1007 from jdanielp/fix-olivierkes-996
Change welcome page spacer size policy to allow welcome to expand to fill most of screen (fixes olivierkes#996)
2022-06-08 13:28:51 +02:00
Tobias Frisch 692995f51c
Merge pull request #831 from zeth/loadsave_test
Write a test for ParseMMDFile function.
2022-06-08 13:24:47 +02:00
Tobias Frisch e780963891
Merge pull request #1002 from olivierkes/duplicate_ids
Potential fix for #719, #1001: data loss when reordering items in upward direction
2022-05-28 12:03:58 +02:00
TheJackiMonster a33249fc9d
Added guard to catch errors with translation
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2022-05-17 11:43:22 +02:00
TheJackiMonster e45314ba2d
Catch indexing issue in log level conversion
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2022-05-03 14:10:37 +02:00
Tobias Frisch cb5ee702d3
Merge pull request #1015 from amconners/develop
catch AttributeError in plotTreeView double click event (fixes #1014)
2022-03-31 02:27:11 +02:00
Tobias Frisch daf456e11a
Merge pull request #1004 from jdanielp/fix-olivierkes-950
Fix crash when files are locked for writing (Fixes olivierkes#950)
2022-03-30 22:49:04 +02:00
Tobias Frisch b859631a50
Replaced try & catch with early exit on NoneType
This should fix the issue without exception handling.
2022-03-30 22:44:12 +02:00
Megan Conners 6fd6a68d9d catch AttributeError in plotTreeView double click event 2022-02-19 11:41:19 -05:00
Jonathan Pietkiewicz 750b96e18e apply patch per PR feedback to avoid segfault (fixes olivierkes#950) 2022-02-09 22:09:42 -06:00
Jonathan Pietkiewicz 80490b34ce Change welcome page spacer size policy to allow welcome to expand to fill most of screen (fixes olivierkes#996) 2022-01-29 22:48:36 -06:00
Tobias Frisch 9e8e7a234f
Merge pull request #1003 from jdanielp/develop
Fix crash when regex is not valid (Fixes olivierkes#989)
2022-01-30 03:23:42 +01:00
Jonathan Pietkiewicz 5a6d68e139 Fix crash on open with locked files (fixex olivierkes#950) 2022-01-29 14:23:14 -06:00
Jonathan Pietkiewicz f63acafe4e Add generic list dialog, use it to show files that cannot be saved (fixes olivierkes#950) 2022-01-29 14:02:16 -06:00
Jonathan Pietkiewicz 50e305aa2f Update search feedback when menu is triggered 2022-01-25 22:08:01 -06:00
Jonathan Pietkiewicz 23ded19d58 Change text color to red when the regex is not correct
updated everytime the text changes in the lineedit
2022-01-25 21:57:54 -06:00
Jonathan Pietkiewicz e0a3d01091 move import outside try-catch 2022-01-25 21:16:32 -06:00
Jonathan Pietkiewicz 37667ed70f Fix crash when files are locked for writing (Fixes olivierkes#950)
Wrap file opens in try-catch
Applied fix for project file as well as other files that are opened during save
2022-01-25 14:47:41 -06:00
Jonathan Pietkiewicz 795e1fa9c0 Fix crash when regex is not valid (Fixes olivierkes#989)
Wrap regex preparation in try-catch
Log when there is a problem preparing the regex
2022-01-25 14:05:50 -06:00
Olivier Keshavjee 0330336311 Does not simply warn of duplicate IDs, but fixes them. 2022-01-22 09:53:36 +01:00
Olivier Keshavjee 47b55ba164 Potential fix for #719, #1001 2022-01-21 16:49:04 +01:00
Daniele Scasciafratte b66208791a feat(pandoc): hard_line_breaks support 2022-01-17 15:33:24 +01:00
Megan Conners 01036e4540 fixes #992 and #998 with explicit int casts 2022-01-16 12:31:16 -05:00
TheJackiMonster 9ccf665e12
========== manuskript-0.13.1 ========== 2021-12-13 14:30:49 +01:00
TheJackiMonster dc86e3b14e
Adjusted fixes for python 3.10 to not crash immediately
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-12-13 14:27:59 +01:00
TheJackiMonster c9c18fae57
========== manuskript-0.13.0 ========== 2021-12-13 13:57:26 +01:00
TheJackiMonster d56c2225a3
Fixed issue #865 by adjusting the available IDs in an items constructor
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-12-11 01:34:39 +01:00
TheJackiMonster 77eee852de
Fixed issue #808 by resetting POV once the character gets deleted
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-11-30 23:40:31 +01:00
TheJackiMonster a63da8d0a8
Fixed issue #937
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-11-30 23:08:59 +01:00
TheJackiMonster 08e8714f1d
Delegated export stderr output without exit code zero to warnings and fixed one crash during loading
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-11-27 23:03:31 +01:00
TheJackiMonster 25adfd2437
Adjusted inconsistent pandoc behavior depending on installed version
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-11-27 16:47:38 +01:00
TheJackiMonster c52dab475c
Updated indonesian qt language files and ui files
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-11-27 01:39:53 +01:00
TheJackiMonster 7e5edf98ed
Fixed translation files which got messed up by last update
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-11-07 00:32:07 +01:00
Tobias Frisch 23ead413c1
Merge pull request #895 from zeth/bug-891
Kill old insecure pickle setting files (untested)
2021-11-06 22:56:39 +01:00
TheJackiMonster 15edb6efb7
Fixed issue #957 enforcing types supported by spec for QColor
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-11-04 00:50:44 +01:00
TheJackiMonster 1af7d89d2a
Fixed issue #931, updated ui files and updated translation files
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-10-23 16:15:58 +02:00
Jan Wester d6e472b939 Implemented fix for failed cursor iteration (#729)
A long time ago, I identified this failure but wasn't sure why it was
failing. I still don't know why, but the emergency fix at least prevents
other people from running into it. As a bonus, since we have a proper
logging facility now, we can actually log it as I desired to do back
then!

This commit tentatively fixes issue 729.
2021-07-10 19:01:58 +02:00
Jan Wester 32caf6aa04 Partial fix for erroneous nbsp->space conversion
QDocument::toPlainText() has the stupid decision to convert nbsp to
spaces in it, which our users obviously hate. Unfortunately, this is
out of our control to fix completely. It is a very deep rabbit hole. :(

Typing non-breaking spaces in the editor now works. Reopening these
files at a later point has these characters remain intact.

What does NOT work is copy-pasting non-breaking spaces. These will end
up looking like normal spaces when you paste them somewhere else, be it
in Manuskript or some other document. In other words: it is impossible
for users to verify whether something is a non-breaking space or an
ordinary one.

I realize that it makes this partial fix meaningless for many. Sorry. :/

Partially fixes issue 738.
2021-07-10 19:01:58 +02:00
Jan Wester 87f1fc0187 Bugfix for filtering on POV characters
If a project only had one character, and it was marked as a POV
character, then that could lead to the accessing of a non-existent
second character. (Yes. That code was very broken.)

Fixes issues 843, 875, 896.
2021-07-10 19:01:58 +02:00
Jan Wester 0ea4c0d174 Share OpenGL contexts to make Qt WebEngine happy
This takes care of the following warning in our log file:

Qt WebEngine seems to be initialized from a plugin. Please set
Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute before
constructing QGuiApplication
2021-07-10 19:01:58 +02:00
Jan Wester 0a0ffb6d54 Fix broken filename argument handling (issue #898)
In addition to fixing the bug, related code that allowed this one to
slip under the radar has been cleaned up. Validation of the FILENAME
argument is now performed during parsing.
2021-07-10 19:01:58 +02:00
Tobias Frisch 4bfd663886
Merge pull request #894 from zeth/race-condition
Deal with race condition.
2021-06-21 18:38:35 +02:00
Tobias Frisch 9a5117be38
Fixed identation to match other code 2021-06-21 14:34:41 +02:00
Zeth Green 6f841f9655 Everyone with really old projects will lose their settings but will get a new settings file. 2021-06-21 03:48:28 +01:00
Zeth Green 8acb9b3839 Deal with race condition. 2021-06-21 02:56:16 +01:00
Zeth Green bc10cd3671 Someone was in a JavaScript mood? 2021-06-21 02:43:09 +01:00
TheJackiMonster a58de3b1f6
Optimized counting words and characters via regex
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-06-01 15:17:54 +02:00
TheJackiMonster 7e05b72d83
Hotfix of unhandled exception by language_tool_python (#870)
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-04-30 20:46:30 +02:00
TheJackiMonster 1eab9890b5
========== manuskript-0.12.0 ==========
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-04-30 16:43:17 +02:00
Belug 96a3d282cc Fix missing root when using world building template 2021-04-20 18:57:36 -04:00
TheJackiMonster fc08e9b740
Fix changing language in LanguageTool spellchecker
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-04-16 19:44:24 +02:00
TheJackiMonster 3beac4a50e
Generated QML from translations
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-04-16 13:47:51 +02:00
worstje b2817b5f08
Friendly logging for end users (#859)
* Changed default logging behaviour

We now log by default to a timestamped file in $datadir/logs/. No longer
shall restarting Manuskript after a crash wipe a very useful logfile.

Logs older than 35 days in the $datadir/logs/ directory are pruned
during startup. In case of subtle corruption detected a few weeks after
the fact, relevant logs might still exist to explain what had happened...
yet it does not come at the cost of infinitely gobbling up a users
storage space, either.

The --logfile (-L) argument can now utilize strftime() specifiers. A
special modifier %# is also supported which will insert the process id.
Besides being an added factor of uniqueness for a filename, it can also
be relevant to help identify the log file belonging to a misbehaving
Manuskript process.

* Added support-related items to Help menu

The 'Technical Support' item should lead to a landing page that will
guide the user to the most efficient way to resolve their problem.
How to report bugs and submit logs would be one of those.

The 'Locate Log File' item should open a file manager window with the
logfile of this session highlighted. Because Manuskript is still writing
to it, we first remind them of its limited use until Manuskript is
closed.

This approach was chosen because users might want to locate the file
prior to reproducing a bug, or because they'd like to look at other logs
from previous sessions.

* Updated translation files and added german translation

Co-authored-by: TheJackiMonster <thejackimonster@gmail.com>
2021-04-13 13:32:46 +02:00
Belug 9bb64d2471 Fix errors when language tool isn't installed 2021-04-11 11:07:20 -04:00
TheJackiMonster b090c11a9c
Fixed multiple processes for LanguageTool by using one instance only
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-04-11 16:02:41 +02:00
Alexandre 4107c48ea9
Fix 860 languagetool get locale language (#861)
* Fix #860 missing get_locale_language on languagetool

* Update spellchecker.py

Co-authored-by: Tobias Frisch <thejackimonster@gmail.com>
2021-04-11 14:31:06 +02:00
DarkRedman 49f0c298c3
Fixed pandoc command arguments (#790)
* Fixed pandoc command arguments

`--base-header-level` throws a new export error because it is deprecated, now we should use `--shift-heading-level-by`

* Adjusted default and min value for base-header

Co-authored-by: Tobias Frisch <thejackimonster@gmail.com>
2021-04-10 14:58:00 +02:00
TheJackiMonster 173531ef2c
Combined #777 with changes from #827
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-04-10 14:46:03 +02:00
Tobias Frisch 653357d2e9
Merge pull request #777 from siliconserf/Issue-324-NoID-Fix
Update abstractModel.py
2021-04-10 14:39:50 +02:00
Belug d22eb3bcb9 Fixing the tests for travis-CI 2021-04-09 19:19:03 -04:00
Alexandre f5fa60c50c
Fix #855 - Avoid a crash when there's no model (#856)
* Fix #855 - Avoid a crash when there's no model

* Moved the update id to the AbstactItem class
2021-04-09 16:03:59 +02:00
Alexandre 40e6bf0793
Fix #846 close Fullscreen when exiting main editor (#854)
* Fix #846 close Fullscreen when exiting main screen

* Removing debug code and initializing _fullscreen

* Removing the print
2021-04-09 16:03:31 +02:00
Tobias Frisch 0a615bdef2
Merge pull request #667 from worstje/arguments-and-logging
Logging and command-line arguments
2021-04-08 19:37:09 +02:00
Jan Wester 2d622792f3 Additional logging centered around sys module
Due to my struggles reproducing the official build, I felt it might be
useful to log extra information regarding the version of PyInstaller.

Unfortunately, such information is not available due to the way things
work. However, during that process I came across some other interesting
details that would likely be useful when logged.
2021-04-08 18:44:28 +02:00
Jan Wester 5117f7d476 Logging uncaught & unraisable exceptions
When implementing most of the logging code weeks ago, I got so caught up
in implementing and testing the Qt bits that I completely blanked on
actually implementing the Python-side of catching exceptions.

Unfortunately, it is not exactly trivial. PyQt complicates things, but
also Python itself isn't very helpful in older versions which will rob
the ability to properly log errors from threads. By the time I realized
we don't actually use the threading module and that catching the errors
on there does not actually help to fix the weirdness I was seeing, it
was already implemented. Thank you PyQt for surprising me yet again! :-)

I have tested this on Python 3.7 by raising random exceptions in various
parts of the codebase to make sure it behaves as expected. I haven't
quite gotten around to installing Python 3.8 yet but this gets it out
for testing. I'll hopefully not forget to do more tests in 3.8 when I do
the final squashing prior to a merge.
2021-04-08 18:44:28 +02:00
Jan Wester 0910246899 Write log file in UTF-8 to fix encoding errors
Some log messages use characters in the Unicode character set that
aren't typically represented in the older encodings. One such example
was  the messages that happen when renaming an item and saving the
project.

Positive note though: errors while logging might not end up in the log
file when the log file is the cause, but they still showed on the
terminal with excessive detail. Also, despite the exceptions and errors,
the project I was testing successfully completed its saving procedures
as a subsequent reload showed. I am personally quite happy with the
degree of thought and care put into the Python logging system. :-)
2021-04-08 18:44:28 +02:00
Jan Wester c797b5a18b Log the git revision if applicable
During development, the version number does not have much meaning... but
when faced with a reported issue, you would still like to know in more
detail what version of the Manuskript code was at work there.

Knowing the exact git revision will hopefully make it easier to
troubleshoot such issues in the future.

Note: this code takes special care to not rely on external modules
(we have enough dependencies) or even the git executable (invoking a
program can be relatively slow on some operating systems). It might not
handle all the edge cases, but I think it should cover our needs well
enough.
2021-04-08 18:44:28 +02:00
Jan Wester 239e66e7cb Comprehensively log all version information
Manuskript now logs the versions of modules and libraries powering them
for as far those are easily accessible. This includes all the optional
modules, too. None of this is visible on the terminal of course - unless
Manuskript is run with the --verbose flag. This clears up the last bit
of unnecessary console spam, leaving our users blissfully unaware.

Until we (and/or Qt) break something again, that is...
2021-04-08 18:44:28 +02:00
Jan Wester 37becdf80a Converted version_1.py to new logging style
It had its own mini-logging facility to suppress the most useless debug
messages. Since the new facility does not show debug messages to the
user, but still allows them to end up in the log file, I replaced it
entirely with DEBUG-level logging.

Some spots have received an extra ERROR-level logging on top for the
sake of alerting the user to issues we would like to hear about, and to
avoid breaking up the hierarchical indenting done by the DEBUG-level
messages.
2021-04-08 18:44:28 +02:00
Jan Wester ff2cbca028 Converted most print statements to use logging
Some snippets have yet to be converted due to the more complex nature
of those snippets, and to keep things neat a separate commit makes more
sense for those.
2021-04-08 18:44:28 +02:00
Tobias Frisch 7c93567279
Merge branch 'develop' into develop 2021-04-08 18:33:27 +02:00
Jan Wester 8884bac0ed Added logging & proper argument parsing.
Sometimes you want to do just one thing, and in the process of
implementing that one thing, you implement several others. This is one
of those types of commits.

Implementing the argparse library is for the sake of controlling the
logging behaviour as well as other future I have yet to implement.

It has all the standard goodies you'd expect, and I have also ported
over the existing commandline arguments. (They may need a bit of polish
still, but there is no regression compared to before, only improvement.)

The logger is because it really needed to happen for numerous reasons.

It still logs to the terminal, but by default it only does so for
messages classified WARNING and above. These are the things we actively
want users to see. But if this is not good enough, adding the --verbose
flag will increasingly show more (-v shows INFO level and -vv also shows
the DEBUG messages) so that us coders don't have to miss anything in the
most convenient location.

It also logs to a file with the very original filename manuskript.log. I
may have to add commandline and/or settings arguments to improve that at
some point in the future, but there distractions are endless.

The log file contains timestamps and module information for easy
interpretation that are not present on the terminal, and it contains all
messages classified DEBUG and up. Ideally users will just be able to
attach it to an issue(*) to deliver us all the information we need to
help them with their inquiry.

Last but not least, the other reason I needed logging implemented is
that Qt has its own logging framework, and I needed to figure out how to
siphon out the data and make it shut up. But there was no point in doing
that as long as our own logging facilities were lacking...

(*) I have yet to convert all existing print statements over to the new
system, but that is probably going to be the next commit. This one has
enough change in it already.
2021-04-08 18:29:15 +02:00
Jan Wester b41fb00b0d Several tiny things squashed into one
All Models should have only one object managing them, and it is not the
class responsible for doing the welcome-related tasks.

Small .gitignore update
2021-04-08 18:28:53 +02:00
emgineering bee24d45b0 Change ID assignment method for Outline 2021-04-08 09:57:36 -06:00
Tobias Frisch 2545f9c7a3
Merge pull request #793 from FrancoisDuchene/notEnoughArgsFix
Fix for TypeErrors when using certain app styles
2021-04-08 14:46:59 +02:00
Belug 696678e25d Fix #456 - Force the distraction free window to be display on the same screen as the main window 2021-04-07 20:43:37 -04:00
TheJackiMonster 83fae3f286
Fixed LanguageTool spellchecker working with newer versions
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-04-04 22:30:33 +02:00
Robert Barlow a266b1bfff
Fixed project not opening with missing background
This is the quick way to patch this. I'd recommend changing the findFirstFile function in functions/__init__.py for a more permanent solution, but this should suffice for now.
2021-04-04 13:48:54 -04:00
Moisés J 1e52af54e2 Add global search 2021-04-02 14:15:17 +01:00
Ling Samuel 41ebf87471
setup signal handler to avoid accident data loss
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
2021-02-23 16:53:49 +08:00
bentleyjoakes 7e9fbf27fb Properly disconnect add person connection. 2021-02-22 21:31:15 +01:00
TheJackiMonster 3effe5c7fa
Added more consistency to the context menu 2021-02-22 03:18:45 +01:00
nagolinc 22fdab3f46 added 3 buttons to the textEditView that allow quickly adding new items
add character takes parameter name
2021-02-21 20:06:17 -05:00
TheJackiMonster 0cb65c452e
Fixed cursor selection without suggestions 2021-02-22 01:26:07 +01:00
TheJackiMonster ad21d5faa5
Fixed finding suggestions using enchant and word selection without external dictionary 2021-02-22 01:13:19 +01:00
TheJackiMonster d27910449d
Fixed issue #817 with the settings style picking 2021-02-21 23:59:23 +01:00
TheJackiMonster 12be4c3a3d
Fixed all Python syntax warnings 2021-02-21 23:45:34 +01:00
bentleyjoakes 06e35cd969 Clones importance setting.
When creating a new character, sets an appropriate importance level.
* If a character is selected, the new character has the same importance level.
* If a top-level importance level is selected, the new character has that level
* Otherwise, the importance level is zero
2021-02-21 21:09:20 +01:00
Tobias Frisch 13d1f1bddd
Merge pull request #735 from johnbintz/select-newly-added-world-item
Select newly added world items, opening branches as necessary
2021-02-21 18:14:41 +01:00
Tobias Frisch e8c61e74ba
Merge branch 'develop' into optional-pov 2021-02-19 16:02:45 +01:00
TheJackiMonster 61734c1afa
Enabling/Disabling POV for a specific character 2021-02-19 16:01:30 +01:00
Tobias Frisch ca5a987e3c
Merge pull request #747 from TheJackiMonster/languagetool
Added basic support for LanguageTool via 'language_check' as advanced spellchecker
2021-02-19 15:46:47 +01:00
TheJackiMonster ac8cb3e403
Added support for LanguageTool via 'language_check' as advanced spellchecker 2021-02-19 15:44:38 +01:00
Tobias Frisch 1b62288982
Merge branch 'develop' into charcount 2021-02-19 15:08:51 +01:00