Export to GitHub

keepnote - issue #364

Ability to view and edit attached html files


Posted on Nov 17, 2010 by Swift Hippo

What steps will reproduce the problem?

I frequently take quick notes in tomboy and then like to preserve useful notes in keepnote. But unfortunately cut-pasting directly from tomboy does not preserve the bulleting and fonts etc.

So i have been exporting the tomboy notes to html and then attaching them in keepnote. Alas, keepnote does not render the html but instead just outputs the full html source in the editor.

Since keepnote allows cutpasting html from the web, my hunch was that it should not be a huge effort to render the attached html files.

Please find attached a patch-file which I generated against keepnote-0.6.6 and which contains my changes/fixes to allow html to be rendered, edited and saved correctly. I have documented the major changes with comments prefixed with the keyword 'Arun'. The changed files can be seen below in the output of 'patch'.

Additionally, the patch also contains fixes to syntax errors (misspelled variables / cut-paste errors etc) that i found in the code.

I note that rendering all types of html and css is a huge challenge but for now htmls exported from tomboy can be viewed correctly sans some of the css. This is working well for my setup as of now.

What version of the product are you using? On what operating system? keepnote-0.6.6 , python-2.6.5 , Ubuntu 10.04

Please provide any additional information below.

Follow these steps to patch using the diff file:

  1. Untar a clean copy of keepnote-0.6.6
  2. cd into the top-level directory. 3. /tmp/keepnote-0.6.6$ patch --dry-run -p1 -i keepnote-0.6.6-patch-arun.diff patching file bin/keepnote patching file keepnote/gui/editor_multi.py patching file keepnote/gui/editor_richtext.py patching file keepnote/gui/editor_sourceview.py patching file keepnote/gui/editor_text.py patching file keepnote/gui/richtext/init.py patching file keepnote/gui/richtext/richtextbuffer.py patching file keepnote/gui/richtext/richtext_html.py patching file keepnote/gui/richtext/textbuffer_tools.py patching file keepnote/gui/three_pane_viewer.py patching file keepnote/init.py patching file keepnote/notebook/init.py
Attachments

Comment #1

Posted on Dec 9, 2010 by Quick Elephant

(No comment was entered for this change.)

Status: New

Labels:
Type-Enhancement Priority-Medium