I need your feedback on how you think tags should be used.
* Each bookmark item could have the tags in its name like "Gmail [tags: mail]"
* We could also have each tag as an object that you can enter and browse separately (like tracker tags)
Both suggestions can be implemented at the same time.
Kupfer's firefox plugin is in fact not upgraded for Firefox 3, it needs to be rewritten to parse Firefox' JSON bookmarks backup (which is going to be much more convenient than parsing HTML).
Here is a very simple patch you can try (tags are already parsed but not used). I don't think this solution works so well, it would be better to put the list of tags in the description and match them there, but you can try and see what you think.
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
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.
>
"That's why the simple prototype simply appends [tags: python, tag2] to the URL name." - this feature can be optional (configurable) and could be implemented by this way for a time. What do you think?
Hi, thanks for the idea.
I need your feedback on how you think tags should be used.
* Each bookmark item could have the tags in its name like "Gmail [tags: mail]"
* We could also have each tag as an object that you can enter and browse separately (like tracker tags)
Both suggestions can be implemented at the same time.
Kupfer's firefox plugin is in fact not upgraded for Firefox 3, it needs to be rewritten to parse Firefox' JSON bookmarks backup (which is going to be much more convenient than parsing HTML).