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

@bothzoli/jrnl

v0.0.12

Published

Command line journal

Downloads

10

Readme

Node.js CI codecov

jrnl.js - Command line journal

jrnl.js is a command line journal application based on jrnl.sh.

Since reading this article from Ardalis and The Unicorn Project I kept going back to the thought that I should keep a work journal. I also like using the command line whenever possible and really liked the idea of a command line journal app like jrnl.sh. However since I was looking for hobby project ideas I thought I'd just write something similar using Node.js for myself, just for the heck of it. I'm also quite happy to share it with anyone who's interested or would like to try it out.

My main goals for this project were:

  • Have a very simple and easy to use application working from the command line
  • Try writing most of it using functional programming style
    • One of my reasons to embark on a hobby project was to practice some functional programming
    • It may not be perfect at the time, but I'm trying to chisel away any non-functional parts as I go along
  • Not to spend too much time on it
    • I mostly work on this on quiet weekday evenings, which I don't have too much, thus I can't work on it too much 😊

Installation

This project is now released as an npm package, so to use it simply run the following command:

npm install -g @bothzoli/jrnl

If you don't want to install it globally, you can simply clone the repository:

git clone https://github.com/bothzoli/jrnl.js.git
npm install

After this you can start using it from the download folder by prefixing all commands with node (e.g.: node jrnl --list).

Or, you can use npm link to create a symlink in your global folder (see the documentation on npm link). After this you should be able to use jrnl as if it were globally installed.

What it does and how to use it

You can use this tool to write journal entries from the command line. The entries will be saved in an entries.json file in a folder of choice based on the settings in the settings.js file.

Use the help to get info (jrnl --help or jrnl -h).

Help

Write a new entry

To write a new journal entry just start the app with npm start or if you have it installed globally just type jrnl. This will prompt you for a new journal entry.

The first sentence or line you write will be considered as the title of the journal entry. The rest will be considered as the content of the journal entry.

You can tag words which will be highlighted when you print your journal entries. To have a word tagged just prefix it with the tag character set in settings.js file (by default it is the ~ character).

The the format of timestamps and the highlight color of tags and timestamps can be changed in settings.js.

jrnl entry

For colors you can use the colors defined in the chalk npm package.

For timestamp format you can use the formats defined in the moment.js npm package.

List entries

To list your entries you should use the -l / --list option. This option also supports number, i.e. only the last n entries will be displayed if a number is provided. If no number is provided, all entries will be displayed.

The options -b / --before and -a / --after will take a date as input (the date format is YYYY-MM-DD) and restrict the entries to those that adhere to the search criteria.

Options -g / --grep and -t / --tag provide regular expression search on entries and tags respectfully.

Export to MarkDown

The -m / --markdown option will print the entries using MarkDown formatting. You can pipe the output of this to a markdown file and than display it with your favorite markdown editor or push to a private GitHub repository so you can read your journal entries wherever you'd like to.

MarkDown

Contributing

To be written...

But in the meantime, if you'd like to help or have issues, please feel free to open an issue or a pull request. You can also DM me on Twitter.