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

songshowplus-parser

v2.0.4

Published

Parses and extracts data from SongShow Plus files

Downloads

19

Readme

GitHub - release

SongShowPlus-parser

SongShow Plus is a worship presentation software package use by many churches to present song lyrics (and many other things) on screens. When moving to a different software package it may be needed to get your song lyrics out into some other format.

This project will parses and extract data from SongShow Plus files. It is currently only tested with SongShow Plus 7 as far as I know. I need test files from newer versions to be sure. The song files I test against do not contain a version number in them, so perhaps these files are standard across all versions of SongShow Plus, I am not sure. If you have any song files you are able and willing to share with me, I would love to try them.

This project is used by my LyricConverter project which can convert your song lyric files between many common formats. If you need to convert some songs to another existing format I encourage you to check this project out first.

Installation

npm install songshowplus-parser --save

Usage

Simply import and create a new instance of SongShowPlus, then pass the contents of a SSP file as a Buffer or an ArrayBuffer to the .parse() method. Basically you can just pass in the raw output from reading the file without converting it to a string first. If you are using a FileReader be sure to use the readAsArrayBuffer(yourFile) method

For TypeScript projects

import { readFile } from 'fs';
import { SongShowPlus } from 'songshowplus-parser';
import { ISongShowPlusSong } from 'songshowplus-parser/dist/main/model'; //Add only if you need the type defs

const sspParser = new SongShowPlus();

readFile('Be Near.sbsong', (contents): void => {
  const song: ISongShowPlusSong = sspParser.parse(contents);
  console.log(song);
});

For JavaScript projects

const { readFile } = require('fs');
const { SongShowPlus } = require('songshowplus-parser');

const sspParser = new SongShowPlus();

readFile('Be Near.sbsong', (contents) => {
  const song = sspParser.parse(contents);
  console.log(song);
});

Output

Note that for any properties the parser is unable to find an empty string or empty array will be returned instead. This way all properties are always the types they are supposed to be, nothing is nullable or optional on the returned object.

{
  id: '0707',
  title: 'Be Near',
  author: 'Barnard, Shane',
  copyright: '2003 Waiting Room Music',
  ccli: '4090362',
  key: 'B',
  comments: '',
  verseOrder: '',
  songBook: '',
  songNumber: '',
  topics: ['Longing', 'Security'],
  lyricSections: [
    {
      title: 'Chorus 1',
      lyrics: 'Be near O God\nBe near O God of us\nYour nearness is to us our good\nBe near O God\nBe near O God of us\nYour nearness is to us our good\nOur good',
    },
    { title: 'Other', lyrics: '' },
    {
      title: 'Verse 1',
      lyrics: "You are all big and small\nBeautiful\nAnd wonderful\nTo trust in grace through faith\nBut I'm asking to taste",
    },
    {
      title: 'Verse 2',
      lyrics: 'For dark is light to You\nDepths are height to You\nFar is near\nBut Lord I need to hear from You',
    },
    {
      title: 'Verse 3',
      lyrics: 'Your fullness is mine\nRevelation divine\nBut oh to taste\nTo know much more than a page\nTo feel Your embrace',
    },
    {
      title: 'Verse 4',
      lyrics: 'For dark is light to You\nDepths are height to You\nFar is near\nBut Lord I need to hear from You',
    },
    {
      title: 'Ending',
      lyrics: 'My good',
    },
  ],
}

Notes

SongShow Plus files are in a binary format, and I never would have been able to figure out the meaning of if it wasn't for this SSP parser written in python by Matt Hamann (@mhamann) which described the format and structure of these files. I have no idea how he figured it out, but I'm glad he did!