npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

quotey

v1.0.1

Published

A simple command line tool that displays a random quote from your custom collection or WikiQuote on shell startup

Downloads

12

Readme

quotey

quotey is a simple command line tool that displays a random quote from your custom collection or WikiQuote on shell startup.

Install

$ npm install -g quotey

Usage

Custom collection

Set directory

First, create a new directory (or choose an existing directory) where you will put all of your collections in. This is going to be the folder that quotey will look for. For example, I want to put all my quotes in a directory called "quotes" (you can name it anything you want!).

In the terminal, navigate (cd) to the "quotes" directory. Take note of the absolute path by running pwd because we're going to need this later:

pwd

/Users/galuhsahid/Documents/quotes

Create your own collection(s)

Each collection is represented by a .json file. For example, if you want to make a collection of stoicism quotes, you can do so by creating a .json file in the quotes directory. Name it anything you want, say, "favorite-stoicism-quotes.json".

The structure of the file looks like this:

{
    "name": "My Favorite Stoicism Quotes",
    "quotes": [
        {
            "content": "If you are distressed by anything external, the pain is not due to the thing itself, but to your estimate of it; and this you have the power to revoke at any moment.", 
            "title": "Marcus Aurelius" 
        },
        {
            "content": "It is the power of the mind to be unconquerable.", 
            "title": "Seneca" 
        }
    ]
}

Feel free to add more quotes to the list!

{
    "name": "My Favorite Stoicism Quotes",
    "quotes": [
        {
            "content": "If you are distressed by anything external, the pain is not due to the thing itself, but to your estimate of it; and this you have the power to revoke at any moment.", 
            "title": "Marcus Aurelius" 
        },
        {
            "content": "It is the power of the mind to be unconquerable.", 
            "title": "Seneca" 
        },
        {
            "content": "What really frightens and dismays us is not external events themselves, but the way in which we think about them. It is not things that disturb us, but our interpretation of their significance.", 
            "title": "Epictetus" 
        }
    ]
}

By building your own collection, you can also use quotey not to only display quotes, but also display your favorite poems, passages, & many more on shell startup.

Execute on startup

It's the fun part! We have to configure our shell so that it will run quotey on every shell startup.

Depending on the shell you're using, the configuration file that needs to be edited might be different for everyone.

  • If you're using zsh, you're going to edit your .zshrc file.
$ echo 'export QUOTEY_CUSTOM_FOLDER="[absolute path of your collections directory]"' >> ~/.zshrc
$ echo 'quotey -c "favorite-stoicism-quotes.json"' >> ~/.zshrc
  • If you're using bash, you're going to edit your .bash_profile file.
$ echo 'export QUOTEY_CUSTOM_FOLDER="[absolute path of your collections directory]"' >> ~/.bash_profile
$ echo 'quotey -c "favorite-stoicism-quotes.json"' >> ~/.bash_profile

Anytime you want to use a different collection, simply create a new collection in the directory & change the collection name in your shell configuration file.

From WikiQuote

quotey is also able to automagically grab a person's quote from WikiQuote, simply given the person's name.

  • If you're using zsh, you're going to edit your .zshrc file.
$ echo 'quotey -w "Steve Jobs"' >> ~/.zshrc
  • If you're using bash, you're going to edit your .bash_profile file.
$ echo 'quotey -w "Steve Jobs"' >> ~/.bash_profile

If you've had enough of Steve Jobs & wants to display quotes from Picasso, simply change it in your shell configuration file.