--- blog title line (top) ---

Sunday, April 10, 2011

Tomboy add-in: Table of Contents

Tomboy is a neat note taking software, combining simplicity and power. It works on Linux, Mac OS X and Windows. A very interesting feature is that tomboy makes it super easy to link to other notes (like in a wiki, but better) and recognizes many URLs. So from one note, you are just one click away from any resources you like: another note, a web page, a file on your computer, an email, etc.

Tomboy

It's hard to navigate through long notes

After some time of usage I have a few rather long notes. I naturally organized them into sections and subsections. Sections are marked by a header with huge and bold font, and subsections with large and bold font. The same way HTML pages would render H2 and H3 headers. However navigating between sections by scrolling is not practical and a waste of time.

It's easy to write Tomboy add-ins

So I decided to write a Tomboy Addin that would scroll for me. It will display the Table of Content in a menu, and will jump to the selected section or subsection. Simple, yet powerful.

The add-in is available under GNU LGPL license. It means that you are free to use it, to modify it, to redistribute it, including modified copies; as long as you grant the same freedom to the others. You will find the source code at github/tomboy/branch/TableOfContent. To use it, you can also just drop the compiled TableOfContent.dll (rename it as TableOfContent.dll) into

  • for Linux: ~/.config/tomboy/addins/
  • for MacOS X: ~/Library/Preferences/Tomboy/
  • for Windows: %APPDATA%\Tomboy\config\
Then restart Tomboy.

I hope it is useful to you too. Enjoy!

UPDATE

2013-04-27
There have been over 2.000 downloads of TableOfContent.dll. It let me think that the add-in is widely used and well appreciated. Thanks!

20 comments

  1. Great stuff, works very well. Many thanks. Ian

    ReplyDelete
  2. It seems cool :) Gonna give it a try, thanks!!

    ReplyDelete
  3. Nice one, could use more levels (Huge+Bold>Huge only>Large+Bold>Large only> bold+Italic, for example)

    ReplyDelete
  4. Thank you all :)

    Anonymous, the number of levels and the associated marking could be made configurable. If you are developer, would you like to give it a try?

    ReplyDelete
  5. Absolutely useful tool! Highly recommended. Thanks!

    ReplyDelete
  6. it will by nice to see table of contents at top of note (like in book)

    ReplyDelete
  7. Yes, though I think this would require some changes in the code base. Would you like to give it a try?

    In the latest version you can access the table of content
    - in the tools menu (as before)
    - with Ctrl-Alt-1,
    then you can select with arrow up/down, and Enter to jump
    - in the mouse context menu (right click)

    ReplyDelete
  8. Hi Luc - I am running the latest Tomboy 1.13.5 on Windows 7 (I use tomboy at work on Windows, and at home on Linux); I downloaded the DLL using the tomboy add-in wiki and copied it to the add-in folder

    C:\Users\myusername\AppData\Roaming\Tomboy\config\addins

    and then restarted tomboy. Nothing happened - I don't see the add-in listed in Preferences > Add-ins

    Is this add-in still working on recent tomboy versions?

    I have huge notes and this add-in seems to be exactly what I was looking for.

    Thanks!

    ReplyDelete
    Replies
    1. Hi Ariel,

      Does it work on your linux box?

      One thing, you have to make sure that the file is named TableOfContent.dll (and NOT TableOfContent-0.5.dll)

      Tell me if this helps!

      I am using Tomboy 1.9.8, but there should be no reason why it would not work with more recent ones.

      Delete
    2. I have tested it with Tomboy 1.12.0, it works fine. From the 1.13.5 release notes, what could possibly go wrong is: "Rev .NET version from 3.5 to 4.0 in Windows build"

      Could you check if
      - other add-ins work on Windows?
      - TableOfContent.dll works on your linux box?

      Delete
    3. Hi Luc! thanks for following up. I just tried the addon on Windows 7, Tomboy 1.14 (final).

      I copied the .dll file, renamed to TableOfContent.dll, to the following folder:

      C:\Users\ariel\AppData\Roaming\Tomboy\config\addins

      Still the addon is not listed in Preferences > Add-ins

      The integrated add-ins work fine (they are listed, and can be enabled/disabled etc).

      I will try and test this in my linux desktop as well.

      Delete
    4. Hi Luc, I tried the addon in a linux desktop, Ubuntu 13.04 with Tomboy 1.12, and it does work, it is really cool (none of the keyboard shortcuts (ctrl-1, ctrl-2, and ctrl-alt-2) worked though).

      Kudos for your design! I really like the simplicity and functionality. Can't wait to start using this at work.

      I retested on windows 7, tomboy 1.14, and it doesn't work. All other addins (the ones that come by default) work fine in windows. TableOfContents does not even show up in the list of available addins.

      Did you (or anybody reading this) try this addin on Windows 7 or 8 with a recent stable Tomboy?

      Delete
    5. I do not have access to a Windows machine. I suspect that the recent Tomboy upgrade broke compatibility with older add-ins. Do you have any other **add-in not by default** working? I think you should ask on Tomboy mailing list. You will get better answers from Windows users.

      With Ubuntu, I suspect you use IBus for input methods. There is a bug in my add-in. I noticed it recently when I upgraded to 13.04. I must make an update.

      Note that I started to use gnote, where the add-in is now more up-to-date. But I'll make a Tomboy update though.


      Thank you for your feedback!

      Delete
    6. I made an update for the IBus issue with Ctrl-1/2 and Ctrl-Alt-1. Downloads

      Delete
    7. Ariel, could you test on Windows the 0.7pre build?

      See the download page

      Delete
  9. Thanks Luc! Just saw your posting.

    Tested in Ubuntu 13.04 + gnome-shell ppa, and the fix for the shorcuts worked like a charm.

    Will test the windows version at work tomorrow, thanks for keeping the add on alive!

    ReplyDelete
    Replies
    1. Thank you Ariel!

      For the Windows version, I had a long discussion with Tomboy developers. It seems that there is a problem with the latest GTK#. But it still does not explain why stock add-ins would work and others won't.

      If you still have problems under Windows, please, contact the Tomboy developers on the mailing list (you need to subscribe, it's easy). I will support you there.

      Delete
    2. Thanks Luc. Just tested on Windows, no luck. Will join the mailing list and describe

      Delete
  10. Hi, just to advise that the issue is still there, sadly. New laptop, Windows 7 enterprise, latest tomboy (1.15.1) running, this add-on still crashing when trying to open a note. I will post the debug in the dev mailing list.

    ReplyDelete
    Replies
    1. Hi Ariel,
      thank you for the update. I truly hope that the windows developers can help you with this.

      Delete

You can use the following HTML tags in your comments:
<b> for bold text, <i> for italic text, and <a href=""> for links.

(my little blog robot)