Johan Vromans > HTML-Calendar-Monthly-0.03 > hcgen


Annotate this POD

View/Report Bugs


hcgen - generate simple HTML month calendar


hcgen [options] [dir]

   --output=XXX         output file (see below)
   --reverse            output months in reverse order
   --[no]title          do [not] provide a title (see below)
   --format=XXX         title format
   --prefix=XXX         link prefix (see below)
   --ident              show identification
   --help               brief help message
   --man                full documentation
   --verbose            verbose information



Write the generated calendars to this file. If the file exists, and contains the same calendar, it will not be modified so it is useful as a make target.


Generate the calendars in reverse order, e.g., newest month first.

--title --notitle

Request titles above the generated calendars. With --title, titles are always provided. With --notitle, titles are never provided. Default is to only provide titles when more than one calendar is generated.


The format for the titles. It may contain the following substitutions:

  %m       the name of the month, e.g., april
  %M       same, titlecased, e.g., April
  %y  %Y   the year, e.g., 2009

If the format does not start with a < character, it will be output as a HTML <p> element:

  <p class='hc_title'>...</p>

Default format is "%M %Y".


A prefix to add to the generated day links.


Force the generation of a calendar for this year/month, even if there are no files.


Process only files for the given year/month.

This option may occur multiple times.


Print a brief help message and exits.


Prints the manual page and exits.


Prints program identification.


More verbose information.


The directory to process. This directory must contain files (HTML documents) with names formatted as YYYYMMDD.html.

Default is to process the current directory.


hcgen will read the given directory and build a list of all files that obey the name format YYYYMMDD.html. This list will determine the years and months for which calendars must be generated.

Each calendar consists of a table of 7 colums. The first row contains short day names. The other cells contain the date numbers, possibly with a link to a corresponding HTML document.


The table can be completely formatted with CSS style sheets. The CSS classes are shown in the following output excerpt.

  <div class='hc'>
  <p class='hc_title'>February 2009</p>
  <table class='hc_month'>
      <td class='hc_empty'></td>
      <td class='hc_empty'></td>
      <td class='hc_date'>1</td>
      <td class='hc_date_linked'><a href='20090202.html'>2</a></td>
      <td class='hc_date_linked'><a href='20090228.html'>28</a></td>
      <td class='hc_empty'></td>

If more tables are generated, each one gets its own <div>.


  hcgen --output=htdocs/cal.html htdocs

  hcgen --force 200902

Example style sheet:

  p.hc_title {
    font-weight: bold;
  table.hc_month {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 14pt;
    border-collapse: collapse;
    border: 1px solid black;
  .hc_month th {
    font-size: 14pt;
    text-align: center;
    border: 1px solid black;
    padding-top: 5px;
    padding-bottom: 5px;
  .hc_month td {
    font-size: 14pt;
    border: 1px solid black;
    text-align: center;
    width: 3em;
    padding-top: 5px;
    padding-bottom: 5px;
  .hc_month a {
    text-decoration: none;
    font-weight: bold;
  .hc_empty {
    background: #e0e0e0;


The program and its associated module, HTML::Calendar::Monthly are currently hard-wired to generate dutch calendars.




Johan Vromans <>

syntax highlighting: