Commit graph

53 commits

Author SHA1 Message Date
Jonathan Pietkiewicz 750b96e18e apply patch per PR feedback to avoid segfault (fixes olivierkes#950) 2022-02-09 22:09:42 -06: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 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
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
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 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
emgineering bee24d45b0 Change ID assignment method for Outline 2021-04-08 09:57:36 -06:00
TheJackiMonster 12be4c3a3d
Fixed all Python syntax warnings 2021-02-21 23:45:34 +01:00
TheJackiMonster 61734c1afa
Enabling/Disabling POV for a specific character 2021-02-19 16:01:30 +01:00
Jan Wester 34f84126df Fixed race when closing an auto-saving project.
Turning off the timer for saveTimerNoChanges just like the code
already did in closeProject() for saveTimer fixes this bug. Easy.

But how to prevent this kind of race condition in the future?

Several related routines have been adjusted to fail gracefully or report
a bug to the console when something goes wrong, depending on what is
most suitable for that bit of logic.
2019-08-12 10:35:07 -06:00
Sebastian Rasmussen dfe88a9681 Fix typos in code comments, invisible to end-users. 2018-01-29 10:30:41 -07:00
Curtis Gedak 60cc6c59aa Skip loading directory and file names that begin with a period
See issue #281.

When loading a project that has the setting **Save to one single
file** disabled, Manuskript tries to read all directories and files
under the project directory.

Manuskript expects all files to contain valid unicode characters.

However if a file containing non-unicode characters is read then
Manuskript will crash.

The error message displayed on the console is similar to the
following:

----- begin snippet -----
Traceback (most recent call last):
  File "/home/gedakc/workspace/manuskript.olivierkes/bin/../manuskript/ui/welcome.py", line 134, in loadRecentFile
    self.mw.loadProject(act.data())
  File "/home/gedakc/workspace/manuskript.olivierkes/bin/../manuskript/mainWindow.py", line 566, in loadProject
    self.loadDatas(project)
  File "/home/gedakc/workspace/manuskript.olivierkes/bin/../manuskript/mainWindow.py", line 793, in loadDatas
    errors = loadSave.loadProject(project)
  File "/home/gedakc/workspace/manuskript.olivierkes/bin/../manuskript/loadSave.py", line 66, in loadProject
    v1.loadProject(project, zip=isZip)
  File "/home/gedakc/workspace/manuskript.olivierkes/bin/../manuskript/load_save/version_1.py", line 657, in loadProject
    files[os.path.join(p, f)] = fo.read()
  File "/usr/lib/python3.5/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 3131: invalid start byte
----- end snippet -----

There are at least two known situations in which files with
non-unicode characters can arise:

A. The project is on Mac OS X and the operating system automatically
   creates a .DS_Store file.

B. The project is under git version control and contains a .git
   subdirectory.

This enhancement prevents the Manuskript crash on project load by
ignoring all directory and file names that start with a period.
2018-01-14 11:51:50 -07:00
Olivier Keshavjee cf4c1c83bf Changes every Enum to IntEnum 2017-11-15 21:05:48 +01:00
Olivier Keshavjee 9e95196cc5 Changes Outline enums to IntEnum 2017-11-15 20:58:12 +01:00
Olivier Keshavjee bc0d6f5760 Creates base classes 2017-11-15 20:34:05 +01:00
Olivier Keshavjee fd0cd2cd4f Improves the Mind Map importer #208 2017-11-13 22:55:33 +01:00
Olivier Keshavjee 276559bc04 Fixes a bug in #169: crash when moving around folders with the same name 2017-10-27 12:27:12 +02:00
Olivier Keshavjee c7e6a2d53e Fixes again: Crash when permissions don't allow saving #138 2017-10-15 21:39:36 +02:00
Olivier Keshavjee f2aa9abc85 Fixes: Crash when permissions don't allow saving #138 2017-10-14 12:17:03 +02:00
Curtis Gedak cdcf184c10 Fixes: epiphany section in basic infos for characters not saved #43 2017-05-07 12:57:48 -06:00
Olivier Keshavjee 6fdfeaf6d0 Bug corrected: old file format type when loading old documents 2016-04-08 13:31:48 +02:00
Olivier Keshavjee 6ac9966ad0 Fixes bug: if not specifing encoding, python open files with OS dependent default codec 2016-04-01 01:00:16 +02:00
Olivier Keshavjee 747f169a2b Corrects bug when saving empty plots 2016-03-31 16:09:37 +02:00
Olivier Keshavjee cf6e021ed1 Minor tweak in file format 2016-03-31 10:49:56 +02:00
Olivier Keshavjee 7e954eab5e Purging types from outlineModel and others 2016-03-30 11:26:31 +02:00
Olivier Keshavjee 54ab5f0455 Purging types from file loader 2016-03-30 11:14:05 +02:00
Olivier Keshavjee e9fcb967f5 Fixes bug in new file format 2016-03-30 10:00:09 +02:00
Olivier Keshavjee 2c0e3074ce Adds: UI setting to change project format (single file, or directory) 2016-03-29 19:13:51 +02:00
Olivier Keshavjee a27e5db6f5 Needs to do the Markdown syntax highlighter now... 2016-03-11 15:45:51 +01:00
Olivier Keshavjee 0cd7c08f1a Bug corrected 2016-03-11 14:56:16 +01:00
Olivier Keshavjee e02c5fe6fe One more bug corrected 2016-03-10 15:35:41 +01:00
Olivier Keshavjee a3f1d11324 Bug corrected 2016-03-10 14:45:42 +01:00
Olivier Keshavjee 482641c7f2 Adds a few FIXME as roadmap 2016-03-10 14:15:03 +01:00
Olivier Keshavjee fa386896db Saving 2.0 works. 2016-03-10 14:11:28 +01:00
Olivier Keshavjee b26de717a9 Seems that loading works 2016-03-10 13:10:31 +01:00
Olivier Keshavjee b2a51e1a09 Reads characters 2016-03-10 11:45:40 +01:00
Olivier Keshavjee ed7e5f69b5 Saves revision even in non-zip format 2016-03-09 17:20:43 +01:00
Olivier Keshavjee fc89207ca8 Saving seems to be done 2016-03-09 16:02:22 +01:00
Olivier Keshavjee b29fbebd25 PEP8 cleaning 2016-03-09 15:54:01 +01:00
Olivier Keshavjee dc1b757770 Saving seems to work kind of smoothly 2016-03-09 15:48:59 +01:00
Olivier Keshavjee da5bfb8951 Removes deleted character's files when saving 2016-03-09 14:10:22 +01:00
Olivier Keshavjee 97903b2781 Never thought it would be so boring to code that part 2016-03-09 13:20:52 +01:00
Olivier Keshavjee 05715a26e0 Writes outline 2016-03-08 09:21:44 +01:00
Olivier Keshavjee c31681a724 Saves plots, correctly. 2016-03-06 16:27:03 +01:00
Olivier Keshavjee 8949d7b8e3 Changes subplots to steps 2016-03-06 16:10:25 +01:00
Olivier Keshavjee 599a60ecff Changes some more 'persos' to 'characters' 2016-03-06 09:26:59 +01:00
Olivier Keshavjee b45a32cfde Saves World Model. Still work in progress, but a step closer. 2016-03-05 17:46:02 +01:00