0.01
No release in over 3 years
Low commit activity in last 3 years
A command line client to store and manage development favorites
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0, >= 2.0.1
~> 2.0, >= 2.0.0
~> 5.14, >= 5.14.4
~> 0.14, >= 0.14.1
~> 13.0, >= 13.0.3
~> 0.21, >= 0.21.2
~> 0.9, >= 0.9.0
~> 3.13, >= 3.13.0

Runtime

~> 2.8, >= 2.8.1
~> 5.45, >= 5.45.0
~> 1.4, >= 1.4.2
~> 3.0, >= 3.0.1
 Project Readme

Ruby Pocket

Gem Version Code Climate Test Coverage Travis CI

A warm place to store your development references.

Although it has pocket in its name, Ruby Pocket is not a Pocket nor a Readability clone. It is a tool designed to store useful all-around development articles and reference URLs. You can store any kind of URL, but its main appeal is for developers, or for those who need to store technical articles or references of any kind.

Why would you want to use something like that? Having made this tool for myself, here are some reasons why you might want to use it too:

  • You feel like work and technical references should not be mixed with other content types.
  • You don't want to clutter your bookmarks with technical references.
  • You don't want to clutter your Pocket or Readability account; they're meant to be read later lists, not permanent article stores.
  • You want to be the real owner, and have full control over your own data. Ruby Pocket uses SQLite3; that means you're not limited to weird export formats, or to no export formats at all; you can do whatever you want with your data.
  • You are a heavy command line user and lover, and don't want to break the flow when looking for a reference.
  • You enjoy a clean, text-based, clutter-free list of favorites.
  • You want to have your URLs at your disposal, in all your computers, or even have a private URL server. With a private URL server hosted in some place like Heroku, you can also consume your content on mobile devices (not ready yet).
  • You want power searching (not ready yet).

If you're fine with your current method, whatever it is, just go with it :-)

Current Features

Currently the app has a very simple feature set:

  • Simple and delightful command line interface.
  • Tagging support. Each favorite can have one or more tags.
  • Add favorites.
  • List favorites.
  • Search favorites by tags.
  • Delete favorites
  • Open favorites in the default browser (currently for OS X)

How to install

Install the gem:

gem install ruby_pocket

If you want to do development on this gem, clone the repo and run bundle install.

Usage

Note: there are verbose versions for all commands presented here. See all available options with the following command:

$ pocket -h

Add a favorite, fetching its name over the internet:

$ pocket -a https://github.com/jlevy/the-art-of-command-line

Favorite 'jlevy/the-art-of-command-line · GitHub' created!

Add a favorite, but specify its name:

$ pocket -a https://github.com/jlevy/the-art-of-command-line -n 'The Art of Command Line'

Favorite 'The Art of Command Line' created!

Add a favorite with tags. If more than one tag, separate with commas:

$ pocket -a https://github.com/jlevy/the-art-of-command-line -t command-line

Favorite 'jlevy/the-art-of-command-line · GitHub' created!

List all favorites:

$ pocket -l

+----+------------------------------------------------------------------+--------------------+
| ID | Name                                                             | Tags               |
+----+------------------------------------------------------------------+--------------------+
| 1  | Stronger Shell                                                   | shell-script       |
| 2  | The Art of Command Line                                          | command-line       |
+----+------------------------------------------------------------------+--------------------+

Filter favorites by tag. Can filter by more than one tag:

$ pocket -l -t command-line

+----+------------------------------------------------------------------+--------------------+
| ID | Name                                                             | Tags               |
+----+------------------------------------------------------------------+--------------------+
| 2  | The Art of Command Line                                          | command-line       |
+----+------------------------------------------------------------------+--------------------+

Filter favorites by partial tag matching:

$ pocket -l -t /line/

+----+------------------------------------------------------------------+--------------------+
| ID | Name                                                             | Tags               |
+----+------------------------------------------------------------------+--------------------+
| 2  | The Art of Command Line                                          | command-line       |
+----+------------------------------------------------------------------+--------------------+

Open a favorite in your default browser. Use the ID of the favorite:

$ pocket -o 2

Delete favorites. Use the IDs of the favorites you want to delete, separated by commas:

$ pocket -d 2

Favorite 'The Art of Command Line' deleted

Planned Features

  • Scrape more web page information: probably the main content of the page.
  • Edit favorites.
  • List available tags.
  • Interactive command mode.
  • Search favorites by name or by content, with regex support.
  • Group favorites by tag, and other useful view modes.
  • Link database to another folder, such as Dropbox. That action shall be automated with a command line flag.
  • Remote backup support.
  • Linux support for opening favorites.
  • Sinatra web app to consume the content on mobile devices (as another project, which uses the gem).
  • Sinatra API to consume the content (as another project, which uses the gem).
  • Alfred workflow (as another project).

Developer information

This project is built with Ruby. The name Ruby, from Ruby Pocket, doesn't necessarily refer to the language itself :-)

Running the tests

Unit tests:

rake test

Feature tests:

rake test:feature

All tests:

rake test:all

# Works too
rake

Run an IRB console:

rake console

Contributing

  • Fork the project
  • Create a feature branch
  • Make your code changes with tests
  • Make a Pull-Request

This project uses MIT_LICENSE