Code Monkey home page Code Monkey logo

lyricconverter's Introduction

GitHub - release GitHub - build

LyricConverter

Parses the song info & lyrics from various lyric presentation software file formats. You can convert between different formats and download the converted files.

Lyric Converter Screen Recording

Formats

Input Output
ChordPro
EasyWorship - Issue #3
JSON
MediaShout 7
OpenSong - Issue #5
OpenLyrics
Plain Text
ProPresenter v4
ProPresenter v5
ProPresenter v6
ProPresenter v7💾
SongPro
SongShow Plus v7
SongShow Plus v8
SongShow Plus v9
  • ✅ = Supported
  • ⭕ = Not supported (yet?)
  • ❓ = Unknown/Untested
  • 💾 = You can import the ProPresenter 6 files made by LyricConverter into ProPresenter 7!

LyricConverter uses these projects for extracting from and/or creating song files

LyricConverter relies heavily on these projects

TODO Items:

  • Deal with possibly duplicated info keys
  • Allow user-configurable options for output file (resolution, text size, etc)

Contributing

Want to help out and improve LyricConverter? Thanks! You'll need to be familiar with Angular and TypeScript, which are needed to run this project. Run npm install @angular/cli typescript -g to install the global tools you'll need.

Clone this project and run npm install. Afterwards run ng serve to start the development server, you can see it running at http://localhost:4200/. The application will automatically reload if you change any of the source files.

Tooling

I recommend you use VSCode and install the recommended extensions when you open this project in it.

Clean Code & Testing

  • In VSCode press Alt+Shift+F to run the Prettier code formatter.
  • Run ng lint to report on any potential code issues
  • Run ng test to run the unit tests. Please add tests for any new features or changes you make.
  • Run npm run test-coverage to generate a test coverage report. View the generated /coverage/lyric-converter/index.html file to see specifics about uncovered areas of code if needed.

Build

  • Run ng build to build the project in production mode which is stored in the dist/ directory.
  • Run npm run prerender to generate the prerendered HTML pages for each route - this is what is deployed to production

Overview on how LyricConverter works

Anything added to this project will most likely be a new format for LyricConverter to either be able to read or write. So all you need to worry about is dealing with the inputs and outputs which are generalized TypeScript classes and not specific to the Angular framework at all.

  • Arrays of all available input types and output types are kept in the ParserService at /app/convert/parser/parser.service.ts for the Angular app to manage.
  • Lyric converter will take any files passed to it and run them each through all of the input types available to it.
    • All input types are classes in the /app/convert/inputs/* folder that implement the IInputConverter interface.
    • Files are passed to the doesInputFileMatchThisType() method which returns a boolean. Typically this only needs to check the file extension for most file types.
    • Once each incoming file type is known, it will use the extractSongData() method to get the song information and lyrics converted to a generic ISong format.
  • Once all songs are in ISong format, all of these objects are passed to the output type that the user has selected
    • All output types are classes in the /app/convert/outputs/* folder that implement the IOutputConverter interface.
    • The ISong representation of the song is passed to convertToType() which manipulates it into a string representation of the file content for whatever the desired format is
    • That string is then put into an IOutputFile object and passed along to the UI for conversion to a real file to be downloaded

Creating A New Input Type

  • Open the /app/convert/inputs/ directory in your command line (in VSCode right click the folder > "Open in integrated terminal") and run ng generate class input-type-whatever and Angular will generate a new class file named input-type-whatever.ts and a test file input-type-whatever.spec.ts
  • Open the newly generated TS file and make the class export class InputTypeWhatever implements IInputConverter and add the required properties and methods
  • Open the ParserService at /app/convert/parser/parser.service.ts and add this new input type to the inputConverters array
  • Look at other existing input types to get an idea of how these work. Basically you will need to manipulate the incoming data to extract the song info and the lyrics into the ISong format.
  • Add tests to verify that this new input type can convert all kinds of variations of songs in whatever format this is into an ISong object

Creating A New Output Type

  • Open the /app/convert/outputs/ directory in your command line (in VSCode right click the folder > "Open in integrated terminal") and run ng generate class output-type-whatever and Angular will generate a new class file named output-type-whatever.ts and a test file output-type-whatever.spec.ts
  • Open the newly generated TS file and make the class export class OutputTypeWhatever implements IOutputConverter and add the required properties and methods
  • Open the ParserService at /app/convert/parser/parser.service.ts and add this new input type to the outputConverters array
  • Look at other existing output types to get an idea of how these work. Basically you will need to take the incoming ISong object and create a string representation of whatever the file content of this format looks like and pass that off as an IOutputFile object. Add tests to verify that this new output type can take all kinds of ISong objects and convert them to the expected output string

I am not in any way affiliated with any of the companies or organizations that make any of the lyric file formats or presentation software listed here

lyricconverter's People

Contributors

chrismbarr avatar dependabot[bot] avatar knightrider0xd avatar sonoftheking avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lyricconverter's Issues

Mediashout Lyrics

Hi,

Stumbled upon your program which looks great.

Was wondering if it works with Mediashout v7 which we used at our church. I believe they used json format for their lyrics.

I have a bunch of songs in text format which I would like to convert so they can be used in Mediashout if possible.

Thanks

Rohan

Better plain text file support

Many lyric programs support exporting songs as plain text files. For example: MediaShout and ProPresenter.

Make sure that LyricConverter can read these formats, especially for MediaShout and others like it that use a binary file format which will be difficult or impossible to extract data from otherwise.

UTF-8 encoding issues (OpenLyrics XML to ProPresenter)

Dear all,
I am migrating from OpenSong 3.1.0 to ProPresenter 7.16.1 and need to convert my song library.
I have experienced issues with UTF-8 encoding in the verses.

The songs are exported as OpenLyrics XML
test.xml.zip

File converted using LyricConverted to ProPresenter 6 looks OK. The CCLIAuthor and other metadata are correctly converted, no issues with UTF-8.
test.pro6.zip

Once opened in ProPresenter 7, the UTF-8 characters in verses are broken.
Snímek obrazovky 2024-03-04 v 13 24 20

Any ideas how to overcome the issue?
Is the problem related to the conversion or to ProPresenter 7 import of the document?

Better describe how LC works

Find a better workflow or UI on the current workflow to better guide people on what this website/app does so they know what to do when they get here.

Lyric Converter for Mediashout files does not distinguish types of verses

Hi,

Thanks alot for getting the converter for Mediashout files working. This is going to be super helpful.

I was able to get a few files converted from text to json without issue.

However, when I checked the converted json file I notice that all the verses are labelled as verse 1. This includes the chorus.

I know Mediashout uses Part Types I think to distinguish between different types of verses but how will the converter know that a verse is a verse and a chorus a chorus. Will we need to have a label above each verse to say what type of verse it is?

Please advise.

Thanks

Rohan

OpenSong support

Please consider adding support for the OpenSong's [mostly] XML format: http://www.opensong.org/pages/song-file-format-specification.html

The non-XML bit is the text contained in between the tabs, eg:
[V1]
Verse 1 line 1
Verse 1 line 2
Verse 1 line 3

[P]
Pre-Chorus line 1
Pre-Chorus line 2
Pre-Chorus line 3||
Pre-Chorus line 4 (on slide 2)
Pre-Chorus line 5 (on slide 2)
Pre-Chorus line 6 (on slide 2)

[C]
Chorus line 1
Chorus line 2
Chorus line 3

[V2]
Verse 2 line 1
Verse 2 line 2
Verse 2 line 3

[B]
Bridge line 1
Bridge line 2
Bridge line 3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.