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

check-pnr-status

v1.1.2

Published

Keep track of your PNRs, without having to visit irctc.co.in

Downloads

80

Readme

check-pnr-status

Keep track of your PNRs, without having to visit irctc.co.in

Build Status

js-semistandard-style

screenshot

Compatible with Node <0.12.7 only

I am working to make this work in latest versions (Node 4.x). Meanwhile, you can use a Node.js version manager such as nvm or n.

Why?

Visiting irctc.co.in and logging in and then checking the status of your PNR requires close to 10-15 clicks per PNR and involves entering your username and password. That was simply too much effort for a trivial operation. Using this module, will let you keep track of your PNRs from the terminal without any overhead.

CLI

$ npm install --global pnr
$ pnr --help

  Keep track of your PNRs, without having to visit irctc.co.in

  Usage
    $ pnr [input]

  Examples
    $ pnr
    All PNR statuses retrieved!
    Parsing the recieved data.

   ┌───────────────┬───────────────┬───────────────┬───────────────┐
   │ from          │ to            │ date          │ status        │
   ├───────────────┼───────────────┼───────────────┼───────────────┤
   │ KGP           │ MAS           │ 29-11-2015    │ CNF           │
   ├───────────────┼───────────────┼───────────────┼───────────────┤
   │ SRC           │ MAS           │ 16-10-2015    │ Confirmed     │
   ├───────────────┼───────────────┼───────────────┼───────────────┤
   │ MAS           │ KGP           │ 2-1-2016      │ W/L1          │
   ├───────────────┼───────────────┼───────────────┼───────────────┤
   │ KGP           │ SC            │ 17-10-2015    │ W/L71         │
   └───────────────┴───────────────┴───────────────┴───────────────┘

    $ pnr --add 1234567890

    PNR added! Run pnr -a to check status of all PNRs!

  Options
    --add          Add a PNR
    --delete, -d   Delete a PNR
    --all, -a      Show statuses of all the PNRs stored on machine

Known Limitations

  • IRCTC has a daily maintenance shutdown between 2330 and 0030 India Standard Time. This module and any browser page that checks PNR statuses won't work during this time.
  • PNRs that have expired (date is past the travel date will automatically be flushed by IRCTC), and hence won't show up on your results table. But I strongly recommend that you delete the PNR once you have travelled with it. (Keeping it in memory will take up the time that is required to request details from IRCTC as it will also go through the HTML parser and then be omitted.)

CLI Options

pnr --options

pnr

No arguments
Type: string

Show the statuses of all the stored PNRs

options

add

Type: string of digits

Add a PNR (must be 10-digit string)

delete

Delete a PNR (using a selection element)

delete-screenshot

TODO

  • Required Fix the tests.js module and make it work!
  • Required Have logger integration with debug, verbose, info levels. Provide functionality to users to run the command with verbose option.
  • Medium Store the recieved data in a JSON and show it during the maintenance hours of IRCTC.
  • Long term Use the JSON to find the expiry date of each PNR and delete PNR from system after the travel date.
  • Always Write more tests!

License

MIT © Siddharth Kannan