Creation of a Roman Calendar Database: Part 1

Time to get down to some dirty work, and make a complete calendar database table for the site. [This will be a very important blog post when the calendar expires]

So first.. I need a calendar, after some research I think Rev. Kevin M. Laughery’s calendar is generated with romcal, a unix extension for figuring out the calendar. My guess is he outputed the calendar with romcal in HTML and added it to his pages with some moderate updates that he added himself. Not to short change the amazing feat he has provided. Luckily I just happen to program on a linux box (ha they said it would never come to my advantage!) So romcal will install and build on my system quite easily.

The processes was pretty simple, I downloaded the file from the website, and followed the instructions, which was pretty much untar’ing the source and running make in the directory. The make functions creates a lot of errors.

Here are the untar’d files:

screen1-romcal

 

 

 

 

Here is what you see when the errors roll when you compile the program with ‘make’:

screen2-romcal

 

 

 

 

 

 

After some really simple research I would say that the errors are expected, in some programs errors like this are actually expected because the program calls the functions that are regular functions for standard libraries.

The cool thing is now when I run ./romcal in that directory I get the current year’s data! The infromation is not what I really want so after some playing with the switches:

Usage: romcal [options] [year] 
   where [year] is the 4-digit year (>1582) 
   and   [options] are as follows: 
-a: Ascension on Sunday 
-e: Epiphany on Jan. 6 
-c: Corpus Christi on Thursday 
-o: Do not print Optional Memorials or Commemorations 
-v: Print Version Number and Help 
-t: Print today's celebration 
-l: List directed I/O 
-L: List directed I/O (same as -l) 
-I: iCalendar output 
-P: PostScript output 
-C: Color PostScript output 
-H: HTML Output 
-R: RTF Output 
-W {directory}: Web Page Output 
-d {yyyymmdd}: Print the celebration of a given date 
Note: Current year is assumed if not provided. 
Note: The -t and -d options can be used with the -l option.

I figure that -L -a and -e will give me pretty much what I am looking for, in a current working situation. Later down the line I will need to probably use the -o and do multiple outputs because different dioceses will have different rules, but for now it should cover me for most of the English speaking Catholics in the world.

So  I create a simple script:

  #!/bin/bash 
        for i in `seq 2014 2999`;
           do
              ./romcal $i -L -a -e >> output.txt
           done

Run the script… & now I have a file ‘output.txt’ that is created in ~5 seconds, and has 22mb & 800 years worth of liturgical calendar data. If Jesus doesn’t come back between now and then someone might have a Y3K issue.

Just in case the romcal.net website goes away here is a copy of version 6. And just in case the compiler fails to work in 2999’s version of C, here is the compiled file zipped. Read the disclaimer before using this software, I am not taking responsible for it if you break your computer.