everpad icon indicating copy to clipboard operation
everpad copied to clipboard

Everpad is breaking lists and sublists markup

Open franck-grenier opened this issue 10 years ago • 3 comments

Hello, Everpad breaks lists and sublists markup when it sends to Evernotes.

On the other side, when Everpad receives this kind of markup from Evernotes, it's OK in Everpad.

Looks like Everpad does not write lists and sublists as Evernotes expects it to.

I run Everpad on Ubuntu 12.04.

franck-grenier avatar Jun 10 '14 13:06 franck-grenier

Same problem here - Xubuntu 14.04

3ruce avatar Jul 04 '14 08:07 3ruce

Bad to see this issue is still open. I have the same problem and it took me a while to find out where exactly it goes wrong.

wimpunk avatar Jan 02 '15 13:01 wimpunk

I've done some test with a little python script which didn't do much more than this:

#!/usr/bin/python
from evernote.api.client import EvernoteClient
from evernote.edam.notestore.ttypes import NoteFilter, NotesMetadataResultSpec
from evernote.edam.type.ttypes import NoteSortOrder
from BeautifulSoup import BeautifulStoneSoup

auth_token = 'my-token-on-sandbox'
client = EvernoteClient(token=auth_token)
userStore = client.get_user_store()
user = userStore.getUser()
print user.username

note_store = client.get_note_store()

updated_filter = NoteFilter(order=NoteSortOrder.UPDATED)
offset = 0
max_notes = 10
result_spec = NotesMetadataResultSpec(includeTitle=True)
result_list = note_store.findNotesMetadata(auth_token, updated_filter, offset, max_notes, result_spec)

# note is an instance of NoteMetadata
# result_list is an instance of NotesMetadataList
for note in result_list.notes:
    print note.title
    print note

content = note_store.getNoteContent(auth_token, "ddad0df1-1831-4179-a14d-0803fd9b3dfd")
print content
soup = BeautifulStoneSoup(content)
print(soup.prettify())

The contents looked like

  • one
  • two
    • two.one
    • two.two
    • two.three
  • three
  • four

And that was the result when showing the content but when the contents got handled by BeautifulStoneSoup, there was a closing tag for <li> and <ul> after the two. The returned result looked like

 <ul>
  <li>
   one
  </li>
  <li>
   two
  </li>
 </ul>
 <ul>
  <li>
   two.one
  </li>
  <li>
   two.two
  </li>
  <li>
   two.three
  </li>
 </ul>
 <li>
  three
 </li>
 <li>
  four
 </li>

It looks like this is a BeautifulStoneSoup issue but I currently haven't find a way to fix it.

wimpunk avatar Jan 02 '15 19:01 wimpunk