At the end of the year the Vatican takes two weeks off from digitization, and I use that time to look back at the past year. For this week we'll be looking inwards at changes and improvements to the site and the code, which is freely available on GitHub.
First, a couple of top line numbers from the codebase, 173 commits1, which caused 4275 lines of code to be added and 627 to be deleted2. Unsurprisingly the top two files, contributing 1,500 lines between them, were the addition of 2 Foundation elements, later determined to be extraneous. The biggest changes to internal code were related to the object libraries, the RSS feeds and the fond pages3
Manuscript
/Manuscripts
, Entry
/Entries
and Fond
/Fonds
. These don't change anything about the user experience of the site, but make the backend code easier to maintain and augment. As an example, because of the already existing Manuscripts
class, it only takes three lines of code to collect the 100 most recent manuscripts, and all of their associated data, for the RSS feed. The Manuscript
and Fond
objects should be rather obvious, but the Entry
may not be. It represents a weekly web entry (basically these blogesque posts). It includes the image links for right side and bottom, links to previous and subsequent posts and the actual post data, raw Markdown and formatted as HTML. When combined with a Manuscripts
object built with the week and year, all of the data required for a post is in-hand.published
. The feed only picks up "published" entries, allowing me to incrementally edit the entry during the week without overwhelming the feed with extra copies of the same entry. fonds
table was created with the Fond code (eg. Vat.lat) and the text of the introduction, and a fond_code
column was created in the manuscripts
table linking to the Fond. As a
helpful side-effect, this allows us to do per-Fond statistics very easily, as every manuscript has an indexed code and no string manipulation is needed. The work to provide an introduction to all 88 Fonds is still ongoingAll of the stats were generated via AskGit, using the following queries
SELECT strftime('%Y', commits.author_when) as year_commit, count(*)
FROM commits, stats('', commits.hash)
WHERE
commits.parents < 2
SELECT sum(additions), sum(deletions)
FROM commits, stats('', commits.hash)
WHERE
strftime('%Y', commits.author_when) = '2021'
AND commits.parents < 2
group by strftime('%Y', commits.author_when)
SELECT file_path, sum(additions) as lines_added, sum(deletions) as lines_deleted
FROM commits, stats('', commits.hash)
WHERE
strftime('%Y', commits.author_when) = '2021'
AND commits.parents < 2
group by file_path
order by lines_added
To the right is f.19r from Vat.lat.5904, a 14th C copy of Boethius' De Institution Musica. It presents a table of harmonies with far more clarity than I've ever been able to wrangle out of an ERD.