GithubHelp home page GithubHelp logo

fagan2888 / cachette Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hzheng/cachette

0.0 0.0 0.0 16 KB

a tool that facilitates CRUD operations on frequently accessed data for daily use

Shell 24.47% Python 69.11% Makefile 6.42%

cachette's Introduction

cachette

INTRODUCTION

cachette is a handy tool that facilitates CRUD(create/retrieve/update/delete) operations on frequently accessed data for daily use. It features:

  • Simplicity

Storing data in key/value form makes information access simple.

  • Convenience

Data can not only be accessed by an exact key, but also by a fuzzy one.

For example, the value "324 Water St. New York, NY 10002" mapped by "home address" can alternatively be retrieved by "ha"(home address).

Besides, the matched data are automatically copied into system clipboard, so that they can easily be pasted into any desired area.

  • Safety

For safety, the clipboard containing the sensitive data will be cleared in 10 seconds.

Without doubt, all data are encrypted by AES.

As for password, Mac OS users can store one in Keychain(make sure its account name is the current user name and its service name is cachette). Unfortunately, Linux or Windows' users will have to type a password manually(which is inconvenient), or pass a password as an option(which is unsafe).

USAGE

Basically, the command is: cachette [OPTION]... [key [value]], where key is the key used to be retrieved(fuzzy by default) or updated(exact match), and value is the new value for the given key.

All supported options are listed as follows:

  • -a list all matched data

  • -c CMT attach comments

  • -d KEY delete the data mapped by the key(exact)

  • -D KEY delete the data mapped by the key(regex)

  • -e exact key match in data retrieval

  • -f FILE data file's path(default file is set by environment variable CACHETTE)

  • -n NOT copy into clipboard in data retrieval(imply "-s")

  • -p PWD password for data encryption

  • -s write the data to the stdout in addition to clipboard

  • -S stylize the output(for list only)

  • -t SEC seconds for data to be kept in the clipboard(default is 10, 0 means forever)

EXAMPLES

  • List all data(warning: unsafe):

    cachette

  • List all keys:

    cachette -k

  • Copy the first(ordered by key) value matched by key1(fuzzy) to the system clipboard:

    cachette key1

  • List all data matched by key1(fuzzy, of course):

    cachette -a key1

  • Copy the value matched by key1(exact) to the system clipboard:

    cachette -e key1

  • Copy the value matched by key1(fuzzy), keep it in the system clipboard for 1 minute:

    cachette -t60 key1

  • Copy the value matched by key1(fuzzy), don't clear the system clipboard:

    cachette -t0 key1

  • Copy the value matched by key1(fuzzy) to the system clipboard and print it on the screen:

    cachette -s key1

  • Only print(NOT copy) the value matched by key1(fuzzy):

    cachette -n key1

  • Map key1 to the value1:

    cachette key1 value1

  • Map key1 to the value1 with a given comment:

    cachette key1 value1 -c"this is a comment"

  • Delete the data mapped by key1:

    cachette -d key1

  • Delete all the data mapped by regex ^key[1-9]:

    cachette -D '^key[1-9]'

LICENSE

Copyright 2014-2015 Hui Zheng

Released under the MIT License.

cachette's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.