Released some small improvements:

  • somehow it was impossible to save tags: that is now fixed
  • links are now opened in a new tab/window

This new version contains a new layout setup. I see some room still for further improvement, but for now we get

  • better use of complete screen estate
  • faster loading of first page (as we start loading book after rendering the rest first)
  • books only get loaded when they are needed

Hope you like it.

What is next:

  • showing a clickable tag-cloud
  • making sure the sidebar and header is always visible

As always, I am happy to hear your suggestions and ideas.

Released 0.0.18 includes:

  • improved Markdown editor with immediate preview
  • some smaller improvements: you can now click on links immediately, flash-messages disappear, notes show the creation-date

Nextup I will most likely tackle the general layout. Replace the tabs by something smaller. Make more use of the screen in general.

Release 0.0.16 includes:

  • added search functionality
  • after import, jump to imported book

Note that you can always follow-up on the status and vote for changes on my ticket-board.

Yesterday I released 0.0.15, nothing much new, just further improved the import from Google Notebook, after I received some feedback.

I also started using Trello to keep track of “things to do”. Check it out here.

When you check the Trello-board, you will notice I plan to work on some search functionality next, and I want to do something about the layout. Too much space is lost now.

Release 0.0.14:

  • fixed a problem when a Google Notebook contained links. In the atom xml they look like this:
    <link rel="related" href="http://some.link.com" title="Some title">
    

    These can now be imported correctly. Note that if you want to click links inside a note, it will immediately try to edit the note. Currently the work-around is to right-click on the link. I am thinking about a cleaner solution.

  • improved the explanation on the Import page a little

Also, if you would be worried, you can export your Google Notebook for at least a few months.

Release 0.0.13:

  • fixed a problem with line-endings when importing from Google Notebook
  • adding a new note now behaves as it should
  • added a link to this blog
  • various cosmetic improvements

Next up:

  • delete items to a trash-can, so you can always restore them later
  • allow exporting –if a users wants to leave her data/notes are not lost. But for now, I want the users to find it first :)
  • upon importing jump to the uploaded page
  • allow moving/reordering notes
  • some more cosmetic fixes:
    • remember me: label is not clickable
    • flashes should disappear or be closeable
    • the delete-note link should be styled/placed better

If you have more suggestions, problems, ideas: I would be happy to hear them.

I just released 0.0.12.

Google Notebook Importing

Importing from Google Notebook now is decent.

  • upon importing the layout is converted to Markdown, and this is pretty close. Google Notebook had some weird ways to store the layout, so some things are not completely as it was. If you are having troubles with it, please contact me.
  • from the Atom XML it seems impossible for me to deduce the original order, so I order them on the last updated date. So if you have been moving stuff around, that order is lost. I will make sure you can reorder the items soon.

Next steps

  • Improve robustness and looks
  • allow exporting –if a users wants to leave her data/notes are not lost. But for now, I want the users to find it first :)
  • upon importing jump to the uploaded page
  • allow moving/reordering notes
  • still not quite sure if the tabs is the best solution. For now it is ok. Can get messy with a lot of books (as I have)

And I guess a lot more will come up later. If you have any suggestions, let me know.

Until recently I was an avid Google Notebook user. I liked the simplicity. I just used it to collect ideas, links, scraps, jottings, but also important stuff I should not forget. I never really used the formatting, and neither the tags. Plain and simple.

When I heard it would be discontinued, I looked around for a plain and simple alternative, and decided to build my own. Jottinx is the result of this.

Jottinx in short:

  • dead-easy
  • note-taking and nothing more
  • uses markdown for formatting
  • imports your data from Google Notebook
  • is and will always be free
  • you remain the owner of your data, so you can always export your data back out again

For the moment it still very much is a work in progress, but I hope you will give it a try.

I normally do not do a lot of view specs, but at least I want to make sure that my view renders without errors. And sometimes I really need to make sure that some link is shown or hidden depending on e.g. the role of the user or linked objects.

For example,

  describe "posts/show.html.haml" do
    context "without any comments" do
      it "displays no comments" do
        @post = Factory(:post)
        render
        rendered.should contain(I18n.t('posts.show.no_comments'))
      end
    end
  end

So we check the rendered result, whether it contains a specific text.

But what happens if your view is rendering different yield regions? Like a body (the default region) and a sidebar.

Let’s use a view like this :

  =show_for @post do |p|
    = p.attribute :title
    = p.attribute :content  

  - if @post.comments 
    = render :partial => 'comments'
  - else
    = t('posts.show.no_comments')

  =content_for :sidebar do
    = link_to 'Edit', edit_post(@post) if is_allowed_to?(:edit)

It renders the attributes using the show_for gem, and then renders inside the sidebar a link if the current user is allowed to edit it.

Now I want to test what is rendered into the sidebar. To my dismay I found that neither content_for or content_for?
worked at all inside rspec. And rendered does not contain the data for the other regions.

So somehow I would want to get to the content for :sidebar.

It appears that the different regions are actually stored inside an instance variable of the view. Once I figured that out, the rest was easy:

  describe "posts/show.html.haml" do
    def rendered_content_for(name)
      view.instance_variable_get(:@_content_for)[name]
    end

    context "with enough rights" do
      it "displays a link to edit the post" do
        @post = Factory(:post)
        view.stub(:is_allowed_to?) { true }
        render
        rendered_content_for(:sidebar).should contain('Edit')
      end
    end
    context "with no rights" do
      it "does not display a link to edit the post" do
        @post = Factory(:post)
        view.stub(:is_allowed_to?) { false }
        render
        rendered_content_for(:sidebar).should_not contain('Edit')
      end
    end
  end

Hope that this helps somebody. Or did you find a better way?