Project

booker

0.0
Low commit activity in last 3 years
No release in over a year
Select your bookmarks from the command line, by their bookmark id number. ZSH users will be able to tab complete through their matches, similar to how the autocompletion for `kill` works. If no bookmark is provided, booker will check if the argument is a website and visit it, or go to google (or your preferred search engine) with the string argument.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

>= 0
>= 0

Runtime

>= 0
 Project Readme

🔖 booker

Build Status MIT

a CLI chrome bookmark parser, with tab completion.

Screencast

setup

[sudo] gem install booker
booker --install

Alternatively, the installation can be done incrementally:

booker -i comp # adding tab completion (ZSH only)
booker -i conf # generate default config (~/.booker.yml)
booker -i book # locating bookmarks file

🔖 booker usage

bookmark completion
booker [your_search_term]<TAB>
opening a website
booker github.com/jeremywrnr/booker
using a search engine
booker how to use the internet

about

This is a tool that allows you to tab complete (in zsh only) google chrome (gc) bookmarks, and then open them in the browser of your choice. gc stores the users bookmarks in a large json file locally, so this can be read/parsed by the tool, and combined with an autocompletion mechanism (i used a zsh script, in completion) to easily open your bookmarks from the command line.

I was inspired by the kill autocompletion that ships with oh-my-zsh, where you are shown a list of the current processes, and you can tab through to select which one you'd like to kill. The completion actually is somewhat complex - if I search for 'System', it will only show processes whose name or group match against that, but it tab through these matches numeric process IDs, which is the argument that kill actually takes. I learned that zsh autocompletion has a large learning curve, despite the good amount of documentation out there on it.

config

You can also edit the ~/.booker.yml config file manually. booker will also try to determine which command should be used to open your browser based on your operating system, but you can also explicitly choose which command you want use, by adding the following:

:browser: 'your-browser-command '

development / testing

There are some tests in /spec. If you clone this repo you can run them with rake. There is also a Makefile to install the gem, so you can run make and that will build the gem locally. To develop the zsh completion script, clone this repo, and run this command in /completion:

make && unfunction _booker && autoload -U _booker

todos

  • parse all args, then if number open bookmark
  • tab completion for other shells (bash, fish)
  • support opening multiple bookmarks: 1 1 1
  • fix failure on link w/ parens
  • implement more rspec testing
  • support other browsers? (firefox, safari)