Dear Edward,
after some days I came again to test the last modifications of the
bibtex.py plugin. I am trying with the build Leo 5.0-final, build
20141214175420, Sun Dec 14 17:54:20 CST 2014, which I downloaded using git
(the same I downloaded from the Leo snapshots).
I tested it today and noted that there is still an error: the template for
certain predefined bibliography type (@book, etc.) is written at the level
of the @bibtex node. Choosing/changing the type of bibliography entry
overwrites the former entry. In the bibtex.py plugin the content of the new
node is asked using the code in the onHeadKey section:
if h[:h.find(' ')] in templates.keys() and not p.b:
Writing the text under p.b fails in the next lines. Reading/writing .bib
files works. Writing could be somehow "smarter" to avoid of accidental
overwriting of existing files.
Furthermore when I choose the option Plugins --> bibtex of the Leo's GUI,
the following error appears in the log pane:
Traceback (most recent call last):
File
"/dn/home2/Sistem/Leo/leoSnapshots/leo-editor-master/leo/core/leoCommands.py",
line 556, in doCommand
val = command(event)
File
"/dn/home2/Sistem/Leo/leoSnapshots/leo-editor-master/leo/plugins/plugins_menu.py",
line 342, in about
c.putHelpFor(msg,short_title=self.name)
File
"/dn/home2/Sistem/Leo/leoSnapshots/leo-editor-master/leo/core/leoCommands.py",
line 8378, in putHelpFor
assert vr # For unit testing.
AssertionError
I hope this suggestions and comments help to improve the plugin.
Best regards, Juaco
Am Donnerstag, 11. Dezember 2014 14:13:56 UTC+1 schrieb Edward K. Ream:
>
> On Wed, Dec 10, 2014 at 2:07 PM, Juaco <[email protected] <javascript:>>
> wrote:
>
>
>>
>> File "/dn/home2/Leo/leoGit/leo-editor5.0_20141210/leo/plugins/bibtex.py",
>> line 221, in writeTreeAsBibTex
>> typestring = h[:h.find(' ')].lower()
>>
>> TypeError: Type str doesn't support the buffer API
>>
>
> Fixed at rev 15a1945. Tested on both Python 2 and 3. I also brought the
> code up to modern Leonine coding style.
>
> Edward
>
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.