Kupfer (pandora's box)

Comment 7 for bug 429059

Oh, that's not good. Kupfer is mishandling strings there. The patch
should work successfully if you remove exactly '[:mlen]', leaving only
 title = u"%s%s" % (book["title"], tagstr)

The patch doesn't apply to c15, since firefox parsing was updated and
changed. It still is possible to implement the same thing there, the
problem is the interface.

In short, for Kupfer to match an item against a query (say query is
"python"), it has to contain that somewhere in its name. That's why
the simple prototype simply appends [tags: python, tag2] to the URL
name. However, it is not so pretty.

Ulrik

2009/9/20 Stanislav German-Evtushenko <email address hidden>:
> I've tried this patch with c14
>
> Exception in thread Thread-13:
> Traceback (most recent call last):
>  File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner
>    self.run()
>  File "/usr/lib/python2.6/threading.py", line 477, in run
>    self.__target(*self.__args, **self.__kwargs)
>  File "/usr/lib/python2.6/site-packages/kupfer/data.py", line 200, in rescan_source
>    items = source.get_leaves(force_update=True)
>  File "/usr/lib/python2.6/site-packages/kupfer/objects.py", line 805, in get_leaves
>    self.cached_items = aslist(sort_func(self.get_items()))
>  File "/usr/lib/python2.6/site-packages/kupfer/objects.py", line 152, in aslist
>    seq = list(seq)
>  File "/usr/lib/python2.6/site-packages/kupfer/plugin/firefox.py", line 30, in get_items
>    title = u"%s%s" % (book["title"][:mlen], tagstr)
> UnicodeDecodeError: 'utf8' codec can't decode byte 0xd0 in position 119: unexpected end of data
>
> Patching c15 wasn't going.
>
> --
> Improve firefox bookmarks plugin: search by tags
> https://bugs.launchpad.net/bugs/429059
> You received this bug notification because you are the registrant for
> kupfer.
>