Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chord-charter

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chord-charter

Application to convert chordpro files to HTML or PDF

  • 1.6.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Charter

Turns .chordpro files into formatted HTML chord charts and renders them to PDF.

Turn something like this...

chordpro sample

...into something like this!

Chart sample

Requirements

To use this application, you will need Node.js version 12 or higher.

Setup

  1. Clone or download and unzip the source code.
  2. Open your terminal or command prompt and change to the source code folder.
  3. Install dependencies
npm install

Installing the Command-Line Interface (CLI)

The charter application can be installed as a command-line interface (CLI) app that can be used anywhere in your terminal or command prompt.

npm install -g .

This will install the chord-charter CLI app.

Usage

You can use this application to view .chordpro files as HTML in the browser and convert them to PDF. A sample ChordPro file is included in the source code.

Command Line Interface (CLI)

Converting a single ChordPro file to PDF. By default, the .pdf file will be saved in the same folder as the ChordPro file.

chord-charter -f path/to/chartfile.chordpro

Specifying the output file.

chord-charter -f path/to/chartfile.chordpro -o path/to/chordchart.pdf

Converting a folder of chordpro files at once. The folder will be scanned for any files ending with a .chordpro or .cho extension.

chord-charter -f path/to/chartfiles -o path/to/savepdfs
OptionDescription
--helpShow help
--versionShow version number
-f, --sourcePath to file or folder of chordpro files to convert
-o, --outPath to destination file. If none specified, the file will be saved in the same path as the chordpro file.
--tempSpecify path to the temp folder for generating intermediate files.
--htmlSave as HTML instead of PDF
--columnsUse two-column format (doesn't work well with all charts)

Advanced Usage

Converting ChordPro files to PDF

Put your .chordpro files in the charts folder and run in your terminal:

npm run start

HTML files will be generated in the build folder, and PDF files can be found in the pdf folder.

Viewing ChordPro files as HTML

Put your .chordpro files in the charts folder and run the following in your terminal.

npm run serve

In your browser, navigate to http://localhost:3000.

While running, any changes made to .chordpro files will be detected and the HTML is rebuilt. Refresh the browser page to see any changes.

Note: To stop the local web server, go to the terminal window and press CTRL+C.

Converting to PDF with wkHtmltoPDF

There is an option to use wkhtmltopdf to perform the final conversion from HTML to PDF. To us it, it must first be installed on your system and in your search path. For macOS, you can install this with Homebrew using the following.

Note: As of this writing, wkhtmltopdf does not support CSS columns, so a two-column chord chart format will not work.

brew cask install wkhtmltopdf

With wkHtmltoPDF installed, use the following npm command to convert all chord files in the charts folder and save them to the pdf folder.

npm run wk

FAQs

Package last updated on 16 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc