May 18, 2022 — Brian Wright

Summary

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?

Lessons Learned

The Process

Oh, what a delight to be so naive! The setbacks started almost immediately

Google Sheets Workaround ⏱️ 1:30

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.

Searching/Opening Titles ⏱️ 0:15

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; }'

Finding Correct Tunes ⏱️ 2:00

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.

Adding Settings To Set List ⏱️ 2:00

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.

Creating Missing Tunes ⏱️ ?:??

TODO

Et Cetera ⏱️ 3:00+

This is the stuff that took a substantial amount of time without contributing to the end product, which is the songbook itself.