Showing posts with label calendar. Show all posts
Showing posts with label calendar. Show all posts

Wednesday, December 11, 2024

HTML table year calendar

I wrote a simple new program in Perl, yeartable.pl, another one like this other old calendar program, but now I try to visualize all the days of a given year in one page, suitable to be copied to your favourite word processor and then printed, to get a calendar like this:

Calendar table view in spanish

To run it you need to provide the year, the names of the months and the names of the week days, for example:

$ perl yeartable.pl
Use: perl yeartable.pl YEAR "Jan,Feb,..." "Sun,*Mon,..."
(put * in the week-day to be the first row in the table)
$ perl yeartable.pl 2025 "Jan,Feb,Mar,Apr,May,Jun,Jul,Ago,Sep,Oct,Nov,Dic" "S,*M,T,W,T,F,S" > 2025.html

And then you can open the generated file with an internet browser, copy the table directly to a word processor and adjust the format. Enjoy!

Sunday, June 15, 2014

CSV calendar generator

csv-cal.c is a command-line calendar program written in C to generate files in format CSV (Comma-Separated Values). The output of the program can be redirected to a .csv file ready to be opened in a spreadsheet application like LibreOffice Calc in order to format and print the calendar as you like.
The program allows to choose the first month to show, how many months and how many columns to show. The first day of the week can be set to Sunday or Monday and the names of the months and the days of the week can be changed. For example, to generate a calendar for the year 2014 starting the weeks on Monday and using Spanish names, you can type:
csv-cal -m 2014 "do,lu,ma,mi,ju,vi,sá" "Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre" >2014.csv
To run it you need first a C compiler to generate the executable file, and then you need to know how to execute it from the command-line console. Executing the program without parameters will print a help for the different options that it supports. Enjoy!