Songbook scraper for zpevniky.com
You have a songbook to manage and you keep it in a RTE document? If so, and you did any changes through the course of times, you are either dying, or an advanced wizard.
If its the former visit zpevniky.com, create a songbook and come back here. With the little bit of JS you will be able to do marvels. Moreover, automate the whole process! If you change a song, just rerun zcraper, theme your songbook in any way your heart desires.
If its the latter, then get out of here, you magical thing, you are destined to do great things! ✨
- Run example
npm install
npm build
npm start- Program output html files in the root dir. Open them in browser and print or save as PDF via a print dialog.
- Modify the example in
src/index.tsand roll!
import { compose, loadCss, renameSongs, saveSongbook, sortSongs } from './lib/helpers';
import { songbookService } from './lib/songbookService';
(async () => {
// get songbook via id
const songbook = await songbookService.getSongbook(171);
// implicit settings
saveSongbook(songbook);
})();saveSongbook(songbook, {
// my transformations
fns: [songbook => { /* Do your magic if you want */ return songbook; }],
// output filename
filename: 'custom-output.html',
// custom serialization function
serialize: JSON.stringify,
});This project is licensed under MIT.
