nortmas / chrome-bookmarks Goto Github PK
View Code? Open in Web Editor NEWGoogle Chrome bookmarks extension for the Ulauncher
Google Chrome bookmarks extension for the Ulauncher
This extension doesn't work on Ubuntu 19.10.
Python 2.7.17
Python 3.7.5
My Chrome-Bookmarks extension stopped working, so I tried to remove and add it again.
When I try to save the extension I get following Error:
Message: 'com.github.nortmas.chrome-bookmarks'
Error Name: UnhandledError
Type: KeyError
Stacktrace:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 198, in on_scheme_callback
resp = rt.dispatch(self, scheme_request.get_uri())
File "/usr/lib/python3/dist-packages/ulauncher/utils/Router.py", line 49, in dispatch
return callback(context, url_params)
File "/usr/lib/python3/dist-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 433, in prefs_extension_update_prefs
controller = ExtensionServer.get_instance().get_controller(ext_id)
File "/usr/lib/python3/dist-packages/ulauncher/api/server/ExtensionServer.py", line 76, in get_controller
return self.controllers[extension_id]
KeyError: 'com.github.nortmas.chrome-bookmarks'
Pop_OS 20.04
Ulauncher v5.7.5
Message: 'com.github.nortmas.chrome-bookmarks'
Error Name: UnhandledError
Type: KeyError
Stacktrace:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 198, in on_scheme_callback
resp = rt.dispatch(self, scheme_request.get_uri())
File "/usr/lib/python3.9/site-packages/ulauncher/utils/Router.py", line 49, in dispatch
return callback(context, url_params)
File "/usr/lib/python3.9/site-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 444, in prefs_extension_update_prefs
controller = ExtensionServer.get_instance().get_controller(ext_id)
File "/usr/lib/python3.9/site-packages/ulauncher/api/server/ExtensionServer.py", line 76, in get_controller
return self.controllers[extension_id]
KeyError: 'com.github.nortmas.chrome-bookmarks'
File "~/.local/share/ulauncher/extensions/com.github.nortmas.chrome-bookmarks/ChromeBookmarks.py", line 86, in get_items
for bookmark in matches:
TypeError: 'NoneType' object is not iterable
Meaning it's found the bookmarks file but is not parsing it properly.
Browser: Chromium Version 83.0.4103.61 (Official Build) Arch Linux (64-bit)
I ran into an issue, that the extension should not find any bookmarks. In the end I looked through the code and found out, that the extension relies on the locate command, which requires the mlocate utility to be installed on the system. This was not the case for me (ubuntu focal fossa minimal installation).
The docs should note all the requirements necessary to run the extension successfully. This will make it easier for others get it working.
sudo apt install -y mlocate
Seems to recognize the keyword (bb), but does not find any matching bookmarks. I verified that mlocate is installed. Not sure what I'm doing wrong. I don't see any options or switches to tell it I'm using Brave. Any suggestions?
Brave Version 1.24.84 Chromium: 90.0.4430.93 (Official Build) (64-bit)
uname -a (Linux Mint 20.1)
Linux david 5.8.0-53-generic #60~20.04.1-Ubuntu SMP Thu May 6 09:52:46 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
inxi
CPU: 8-Core AMD Ryzen 7 3700X (-MT MCP-) speed/min/max: 2192/2200/3600 MHz
Kernel: 5.8.0-53-generic x86_64 Up: 26m Mem: 5667.0/32119.8 MiB (17.6%)
Storage: 953.87 GiB (21.3% used) Procs: 427 Shell: bash 5.0.17 inxi: 3.0.38
Currently only "bookmark_bar" part of the bookmarks is considered when doing the lookup.
Chrome also has the "other" category.
So the part of your code should look like follows.
Current:
data = json.load(data_file)
bookmark_bar = data['roots']['bookmark_bar']
matches = self.find_rec(bookmark_bar, query, matches)
Should be:
data = json.load(data_file)
bookmark_bar = data['roots']['bookmark_bar']
other = data['roots']['other']
self.find_rec(other, query, matches)
matches = self.find_rec(bookmark_bar, query, matches)
If you want, I can also create a PR.
Hi,
the extension works great if you only have one chrome profile or you want to have open the default profiles' bookmarks via Ulauncher.
However, if you have a second Chrome profile, you currently can not open the bookmarks from this second Chrome profile via Ulauncher.
I think, it would be great to
(I would prefer option 1).
What do you think?
If you find no time to implement that, I might be able to take a look and provide a PR.
When I search for a bookmark starting with a capital letter, the search won't find any results.
E.g.:
--> no results
The extension can find all bookmark case insensitively.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.