All importers are ready for real testing

51 views
Skip to first unread message

Edward K. Ream

unread,
Dec 5, 2016, 10:07:53 AM12/5/16
to leo-editor
Rev 4824283 completes work on the new javascript importer.  All importers have now been converted to the new code base. All relevant unit tests pass.  Many tests are considerably strong than before.

Please report any problems with any importer immediately.  I plan no further work on the importers, except for a few nits related to minor commands.

The documentation for the importers, markdown.md, is also complete. Feel free to comment or ask questions. I recommend you skim the docs, then read look at the outline structure of the code.

Edward

Largo84

unread,
Dec 6, 2016, 12:40:51 PM12/6/16
to leo-editor
@auto-rst files are not reading correctly. I'm even getting the dreaded (wasn't getting that before):

Loading big text: 34834 characters. Limit is 30000.


Beware of a Qt bug: You will **lose data** if you change the text

before it is fully loaded (before the scrollbar stops moving).


The @auto-md files are restoring fine, but all of the @auto-rst files are coming in 'flat'.


Rob.........

Edward K. Ream

unread,
Dec 6, 2016, 1:00:39 PM12/6/16
to leo-editor
On Tue, Dec 6, 2016 at 11:40 AM, Largo84 <Lar...@gmail.com> wrote:
@auto-rst files are not reading correctly. I'm even getting the dreaded
​ [big text warning].
 
The @auto-md files are restoring fine, but all of the @auto-rst files are coming in 'flat'.
 
​Thanks for the report.  I'll attempt a fix today.

EKR

Edward K. Ream

unread,
Dec 6, 2016, 6:22:30 PM12/6/16
to leo-editor

Rev cd0fcb4 is that attempt. How does it work for you?

Here is the checkin log:

QQQQQ
Fixed several serious bugs in the rst importer/writer. Improved unit tests all pass.
   
    1. The reader and writer now use a common set of underlines, defined at the top level of importers.leo_rst.

       This set *does* include '#' at the very end, so that:
       a) The reader always recognizes '#' as an over/underline.
       b) The writer effectively reserves '#' for the user.
   
    2. rst_i.find_parent now inserts placeholder lines as needed.
       And they *could* be needed if the input file is inconsistently
       underlined.  This won't happen when the writer writes the file,
       but it could happen when files are created outside of Leo.
   
    3. Fixed a serious bug in rst_i.is_lookahead_line, that prevented,
       for example, the following from being recognized as underlined:
   
        top
        ====
QQQQQ

Edward

Largo84

unread,
Dec 7, 2016, 5:04:53 PM12/7/16
to leo-editor
The .rst files are still coming in flat (all of them) and still getting the Qt large text warning. I don't know if the files got changed after the last 'fix', but I don't think so as the timestamp doesn't suggest that. Any other suggestions to try before I attempt to rebuild the files?

Leo 5.4, Tue, 6 Dec 2016 17:17:22 -0600
Git commit: after cd0fcb4f
Python 3.4.3, PyQt version 5.4.1
Windows 8 AMD64 (build 6.2.9200) 

Edward K. Ream

unread,
Dec 8, 2016, 5:17:03 AM12/8/16
to leo-editor
On Wed, Dec 7, 2016 at 4:04 PM, Largo84 <Lar...@gmail.com> wrote:
The .rst files are still coming in flat (all of them) and still getting the Qt large text warning.

​Please send me one of the files.

Edward

Largo84

unread,
Dec 8, 2016, 11:57:00 AM12/8/16
to leo-editor
Before I do that, is it possible that it's not working because they all have .txt instead of .rst as a file extension? It didn't matter before, maybe now it does? I will change the file file extensions and try reloading and see if that works and will report.

Rob.........

Largo84

unread,
Dec 8, 2016, 12:08:34 PM12/8/16
to leo-editor
Looks like that fixed it, will report back if there are other issues. BTW, I liked using .txt because it was easier for other programs and mobile text apps to recognize the file type and open them outside of Leo.

Rob..........

Edward K. Ream

unread,
Dec 8, 2016, 4:10:42 PM12/8/16
to leo-editor
On Thu, Dec 8, 2016 at 10:57 AM, Largo84 <Lar...@gmail.com> wrote:
Before I do that, is it possible that it's not working because they all have .txt instead of .rst as a file extension?

​Not sure. If you use @auto-rst everything should work regardless of extension.
 
It didn't matter before, maybe now it does? I will change the file file extensions and try reloading and see if that works and will report.

​Thanks.

Edward

Edward K. Ream

unread,
Dec 8, 2016, 4:12:34 PM12/8/16
to leo-editor
On Thu, Dec 8, 2016 at 11:08 AM, Largo84 <Lar...@gmail.com> wrote:
Looks like that fixed it, will report back if there are other issues. BTW, I liked using .txt because it was easier for other programs and mobile text apps to recognize the file type and open them outside of Leo.

​I think there is something going on with the infrastructure, not the importers themselves.  You should be able to use @auto-rst.  Hmm.  I wonder if there is a special case that isn't being handled.  The rst importer (and writer) must be called leo_rst, so as not to conflict with docutils...

EKR
Reply all
Reply to author
Forward
0 new messages