dhruvmanila / browser-bookmarks.nvim Goto Github PK
View Code? Open in Web Editor NEWA Neovim plugin to open your browser bookmarks right from the editor!
License: MIT License
A Neovim plugin to open your browser bookmarks right from the editor!
License: MIT License
Just installing plugin.
Getting an error from the background job about rate limit being exceeded. Turns out that Raindrop limits it to 120 per user per second. https://developer.raindrop.io
I have way more than that in terms of stored bookmarks.
Their return codes indicating this look clear enough.
(I'm new to LUA. may have a crack at a simple rate limiter handle for their status code if I get the time)
Thanks
Love the plugin!
Would be great to have support for Min. Saves me from importing my bookmarks to one of the supported browsers.
I use the Raindrop.io bookmark manager which is far more powerful than any browser-based bookmark manager I've tried. Plus, since it's in the cloud, it works across browsers.
Would it be possible to support Raindrop.io in the future?
Here's a link to the feature request I made for this in Raindrop.io. The author of Raindrop.io (Rustem Mussabekov) is very responsive if you reach out to him at [email protected].
Either of the following routes can be taken:
vim.ui.select
provider = 'telescope'
I'm leaning more towards (1) as most providers provide support to override the default implementation.
This will require updating the plugin name as well. For backwards compatibility, the telescope extension code will still be maintained.
Whenever I try to run
lua require('telescope.builtin').builtin({include_extensions = true})
this particular extension will raise an error with the following message:
5108: Error executing lua ...lugged/telescope.nvim/lua/telescope/builtin/internal.lua:46: bad argument #1 to 'getinfo' (function or level expected)
I've narrowed it down to this line https://github.com/nvim-telescope/telescope.nvim/blob/master/lua/telescope/builtin/internal.lua#L44, not sure what that fn is expecting to get though
Its very similar to firefox, i was wondering if profile support for this could also work ? Similarly to firefox ?
Il tinker around and see if i can get something working :)
thank you for the awesome plugin!
I can't seem to get the plugin working consistently; I'm now reliably getting this error.
No Google Chrome bookmarks file found at: /Users/alexwoods/Library/Application Support/BraveSoftware/Br
ave-Browser/Default/Bookmarks
Here's my config
require('telescope').load_extension('bookmarks')
require('telescope').setup {
extensions = {
bookmarks = {
selected_browser = 'google_chrome',
},
}
}
Even this Ex command gets that error:
:lua require('telescope').extensions.bookmarks.bookmarks({selected_browser='google_chrome'})
The only real difference I see between this and the documentation is the added {
after the word extensions; I was thinking that's syntax error.
eef8e53
v0.5.1
Hello,
extension doesn't work with my firefox.
When I try to run Telescope bookmarks
it will end up with:
E5108: Error executing lua ...nvim/site/pack/packer/opt/sqlite.lua/lua/sqlite/stmt.lua:35: sqlite.lua: sq
l statement parse, , stmt: `select name from sqlite_master where name= ?`, err: `(`database is locked`)`
The same error is here when I try to use places.sqlite
database using sqlite3
utility:
➜ hbo9xv4w.default sqlite3 places.sqlite
SQLite version 3.37.0 2021-11-27 14:13:22
Enter ".help" for usage hints.
sqlite> .tables
Error: database is locked
NOTE: The error is present only when the Firefox is running. When I close FF the database is locked error is not present anymore.
POSSIBLE SOLUTION:
I tried to open sqlite database using immutable
flag and it works:
sqlite3 'file:places.sqlite?immutable=1'
Most of the browsers when installed using the default installer will follow the XDG spec to store the data. But, if a package manager is used to install the browser, it might be stored in some specific directory depending on the package manager.
A config option should be provided which allow user to provide the directory to look for the bookmarks file. The structure of the directory where the browser stores the data will be similar and we can use this fact in implementing the feature. A detailed warning should be provided if there's some kind of mismatch.
Getting [telescope-bookmarks] No Google Chrome bookmarks file found at: [my home path]/Library/Application Support/BraveSoftware/Brave-Browser/Default/Bookmarks
on MacOS + selected_browser = 'google_chrome'
.
It seems (based on my limit knowledge of Lua and reading the source code) that here state.selected_browser
is correctly set to google_chrome
:
but than here is it reset back to brave
🤷
A keyboard shortcut to delete the selected bookmark(s) would be useful, especially for people who like to have a "Read Later" folder for reviewing tutorials, pull-requests, etc.
If this is possible, ideally it would have an optional confirmation prompt and maybe a second shortcut or option to automatically delete and open at the same time (to not have to go back into it to delete later).
Thanks for this very useful plugin!
Hi @dhruvmanila ,
Thanks for all your work in making the Raindrop bookmarks available, it works amazingly and I really appreciate it!
After using it for a bit, two ideas occurred to me that might make it even better.
Edit: To help with 2, I did the logical thing and created an autocommand to start loading my bookmarks as soon as Nvim loads -- might be good to mention in the setup docs.
vim.api.nvim_create_autocmd({ "VimEnter" }, {
callback = function()
vim.cmd "lua require('telescope').extensions.bookmarks.bookmarks(opts)"
end,
})
return {
"dhruvmanila/browser-bookmarks.nvim",
version = "*",
opts = {
selected_browser = "brave",
profile_name = "Work",
config_dir = "/mnt/c/Users/winuser/AppData/Local/BraveSoftware/Brave-Browser/User Data/Default",
url_open_command = "wslview $1 >> /dev/null 2>&1",
},
dependencies = {
"nvim-telescope/telescope.nvim",
},
}
The opts table defined in nvim lua plugin is not applied. The default table from browser_bookmarks/config.lua is taken instead.
-- Default configuration for the plugin.
---@type BrowserBookmarksConfig
local defaults = {
selected_browser = "brave",
profile_name = nil,
config_dir = nil,
full_path = true,
url_open_command = "open",
url_open_plugin = nil,
buku_include_tags = false,
debug = false,
}
browser-bookmarks.nvim/lua/browser_bookmarks/config.lua
Lines 51 to 53 in 309cbf2
Please advise.
The plugin provides options of firefox_profile_name
and waterfox_profile_name
, but no options for other browers, e.g. chrome/edge. I'm wondering is there any reason behind this? It is nice to also have options for other browser profile names.
Hey !
My Brave browser is installed with snap store on Ubuntu 22.04.
Bookmarks folder with snap is a bit different: /home/{user}/snap/brave/current/.config/BraveSofware/Brave-Browser/Default/Bookmarks
So I created a symlink to /home/{user}/.config/BraveSoftware/Brave-Browser/Default/Bookmarks
But I got this error: bad argument #1 to 'decode' (string expected, got nil)
Click on pictures for better quality xD
Did I miss something ?
Thanks !
Any chance for getting the brave-browser-beta integrated?
thx
Currently, bookmarks extension finding bookmarks databases with hardcoded .config/**
directory (example). Some users use different path for storing configuration files. In the plugin, I suggest change hardcoded .config
strings with os.getenv('XDG_CONFIG_HOME') or '.config'
.
As another method (or in addition to the above); users can describe bookmark path in the telescope's extension configurations. Example;
telescope.setup({
...
extensions = {
bookmarks = {
chrome = "custom path depends on user's environment",
},
},
})
More information about XDG Base Directory spec here.
As far as I can tell the search does not include tags one can set while adding a bookmark to buku, which would be pretty nice for larger amounts of bookmarks. Maybe in regards to that a config-key (e.g. buku_include_tags = true
) would be handy as well.
The tags for each entry seem to be stored in the database column tags
.
Edit: Created pull-request #19
Thanks for the plugin ❤️
Would be great to have support for Qutebrowser. It's store bookmarks in the $XDG_CONFIG_DIR/qutebrowser/bookmarks/urls
file with the structure of:
url title
I'll try to implement and send PR if its welcome.
Hello,
Are you all planning to add compatibility to the Arc Browser?
Thank you for your hard work with the browser-bookmark!
Failed to run `config` for browser-bookmarks.nvim
/Users/.config/LazyVim/lua/plugins/plugins.lua:154: module 'browser-bookmarks' not found:
^Ino field package.preload['browser-bookmarks']
cache_loader: module browser-bookmarks not found
cache_loader_lib: module browser-bookmarks not found
^Ino file './browser-bookmarks.lua'
^Ino file '/usr/local/share/luajit-2.1.0-beta3/browser-bookmarks.lua'
^Ino file '/usr/local/share/lua/5.1/browser-bookmarks.lua'
^Ino file '/usr/local/share/lua/5.1/browser-bookmarks/init.lua'
^Ino file './browser-bookmarks.so'
^Ino file '/usr/local/lib/lua/5.1/browser-bookmarks.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'
# stacktrace:
- lua/plugins/plugins.lua:154 _in_ **config**
- lua/config/lazy.lua:10
- init.lua:5
My config:
{
"dhruvmanila/browser-bookmarks.nvim",
lazy = false,
config = function()
require("browser-bookmarks").setup(
{
selected_browser = "chrome",
}
)
end,
},
Buku is a command line bookmark manager that also uses sqlite. It would be great to have it working as well.
Hi,
Thank you very much for the plugin! It looks very cool and I would like to make the best use of it.
However, my standard browser is Chromium, which is not listed in the supported browser, although I see support for Chrome.
I tried playing with some of the configurations settings but wasn't able to load my Chromium bookmarks.
The closest I managed to get was to load my Chrome bookmarks in Chromium.
Is there an easy config fix that can allow me to load my Chromium bookmarks in Chrome?
If it can help, these are stored in ~/snap/chromium/common/chromium/Default/Bookmarks
Thank you so much in advance!
Hello, thanks for the plugin, it works well !
I'm using it with safari, and I propose these features:
Telescope bookmarks Pentest
What do you think about these ? I really like the second one, as I could create a proper directory for neovim
The plugin is not working for me with Firefox. I installed lz4.
But I still get the error "Firefox requires the LZ4 compression library (https://github.com/lz4/lz4)"
I think it's coming from the FFI module ?
Is this working in standard Lua without luajit ?
I'm not familiar with Lua, do I have to install luajit ?
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.