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

chordify

v0.0.1

Published

You want to write a songbook in some markup language (HTML, LaTeX, etc...) and you've got monospaced text with chords somewhere in the internet... OK, then you need `chordify`.

Downloads

5

Readme

Chordify

You want to write a songbook in some markup language (HTML, LaTeX, etc...) and you've got monospaced text with chords somewhere in the internet... OK, then you need chordify.

CLI Installation & Usage

First, install node. On OSX you do $ brew install node. Then $ npm install -g chordify.

Then type $ chordify to see options list.

Usage:

$ chordify --[option] [param]

Latex and ultimateguitar.com example:

$ chordify --url https://tabs.ultimate-guitar.com/p/pulp/joyriders_crd.htm --selector .js-tab-content --pre \\chord{{chord}}{ --after } --gutter \\space{20}

Output:


Trying to find some chords at:
https://tabs.ultimate-guitar.com/p/pulp/joyriders_crd.htm

FETCHED 200 OK


RESULT 1



#----------------------------------PLEASE NOTE---------------------------------#
#This file is the author's own work and represents their interpretation of the #
#song. You may only use this file for private study, scholarship, or research. #
#------------------------------------------------------------------------------##
Date: Fri, 8 Dec 1995 20:15:31 +0100
From: [email protected] (Wavey Davey!)
Subject: correct chords for "Joyriders" by Pulp

Joyriders, by Pulp

I couldn't get the original one I did, that e-mail account got wiped.
So here they are once again
Transcribed by Dave Twisleton [email protected]
Lyrics from Anthony Bailey's Pulp Pages:
http://www.cs.man.ac.uk/~baileya/Pulp/L-joyriders.html

\chord{C}{} We like driving on a\chord{G}{}Saturday\chord{Am}{}night

\chord{C}{} past the Leisure Centre, \chord{G}{l}eft at the li\chord{B}{g}hts

Oh we don't look for tr\chord{C}{o}uble, but if it co\chord{F}{m}es we don't r\chord{Em}{u}n

Looking out for tr\chord{C}{o}uble is what w\chord{F}{e} call f\chord{Em}{u}n

\chord{B}{\space{20}}\space{20}
Hey y\chord{B}{o}u, you in the Jesus sandals

\chord{C}{w}ouldn't you l\chord{G}{i}ke to c\chord{B}{o}me

over and watch some vandals

\chord{C}{s}mashing up som\chord{G}{e}one's ho\chord{B}{m}e?

[VERSE 2] (same  chords as 1)

We can't help it we're so thick we can't think
can't think of anything but shit, sleep and drink
Oh and we like women; "Up the women!" we say
and if we get lucky yeah we might even meet some one day


\chord{C}{M}ister, we just want your c\chord{Em}{a}r

`cos we're t\chord{C}{a}king a girl to the re\chord{Em}{s}ervoir

\chord{F}{O}h all the pap\chord{F#}{e}rs say it's a tr\chord{B}{a}gedy
but don't you want to come and see?

\chord{C}{\space{20}}\space{20}\chord{G}{\space{20}}\space{20}\chord{Am}{\space{20}}\space{20}
\chord{C}{\space{20}}\space{20}\chord{G}{\space{20}}\space{20}\chord{B}{\space{20}}\space{20}
\chord{C}{\space{20}}\space{20}\chord{F}{\space{20}}\space{20}\chord{Em}{\space{20}}\space{20}
\chord{C}{\space{20}}\space{20}\chord{F}{\space{20}}\space{20}\chord{Em}{\space{20}}\space{20}
\chord{B}{\space{20}}\space{20}\chord{C}{\space{20}}\space{20}\chord{G}{\space{20}}\space{20}
\chord{B}{\space{20}}\space{20}\chord{C}{\space{20}}\space{20}\chord{G}{\space{20}}\space{20}
\chord{B}{\space{20}}\space{20}

Mister we just want your car
`cos we're taking a girl to the reservoir
Oh all the papers say it's a tragedy
Mister...

[end]
it's a tr\chord{B}{a}gedy.

Have fun!

Javascript API

import chordify from 'chordify';

chordify(string, pre, before, after, gutter, debug) ⇒ string

Main chrodifying function

Kind: inner method of chordify
Returns: string - output

| Param | Type | Description | | --- | --- | --- | | string | string | String to inspect for chords | | pre | string | String to be placed before chord's target character | | before | string | String to be placed before chord's target character. {chord} will be replaced with actual chord signature. | | after | string | String to be placed after chord's target character. {chord} will be replaced with actual chord signature. | | gutter | string | String to be appended to the end of after in chords-only lines | | debug | boolean | If set, outputs object with parsing info |