Based on what I learned making the 2017 Edition of Scahill's daily fiddle tunes, I wanted to see if I could do a 2019 Edition, quicker and/or more polished. Again, ABC music notation into abcjs (the ABC rendering library) created the web version, while was used to generate a PDF with a relatively small disk size. PDF version
How is this different from the last edition?
Oh, what a delight to be so naive! The setbacks started almost immediately
First, I needed to gather the song names. This took far longer than expected. On Youtube, only half of the playlist exists. I only know about the full playlist because it is listed on the Fergal Scahill website in a Google Sheet… with sharing and even clipboard copying disabled. (About halfway through, while searching for one title, I realized that the full playlist is on Facebook.)
I tried typing a few of the values manually and realized this task will take a long time. My first reaction was to use jQuery to find cell data programmatically. I received an error that the Content Security Policy will block this script, and then I realize both manual and automated methods will probably take a long time.
I tried deleting what looked like the relevant <meta>
tag and
still received the error, but the script still was able to load. Globally requesting
some existing and some fake text yielded different results! This might actually
work…
However, once I started to narrow in on the relevant content in the browser console, some of my queries gave no results despite the text being visible on the screen! After some desperate googling, I found the key: change /edit to /preview in the document URL. This lays out the contents in a clean table, able to be copied and pasted into Vim where they are quickly converted to a simple list.
There are a few days where no tune was played. Since the data dumps from
The Session include tune popularity, I will search for the most popular tunes
and then include them if they are not extremely similar to the other 700+
performed titles.
After finding the Facebook playlist, the majority of days are accounted for.
As I am now sponsoring The Session, it seems using the search function is justified and easiest. (FYI: Github currently doesn't not take a donation cut, while Paypal and Patreon do.)
The first time running xargs, I ran into an error: xargs:
unmatched single quote; by default quotes are special to xargs unless
you use the -0 option. To work around this, I escaped the single
quotes in vim by leading each quote with three backslashes. I only
needed to change small command details from the first edition:
cat tunelist2019-tmp.txt | tr ' ' + | xargs -P 8 -I @ sh -c '{ firefox -new-tab https://thesession.org/tunes/search\?q\=@; sleep 305; }'
Here, I haven't found a substitute for doing the work. Most tunes take ten seconds to find. Probably ten percent (30–40 tunes) take a minute or two. Five percent take longer. Five percent do not exist. Looking at the early version of the tune list helped, since the style was often listed.
Since the script to open tabs takes nearly four hours, it works well that the time to narrow down a good setting and add it to a set list on The Session is about four hours.
TODO
This is the stuff that took a substantial amount of time without contributing to the end product, which is the songbook itself.