No commit activity in last 3 years
No release in over 3 years
Generates an HTML based weekly planner.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.1.0, ~> 0.1
 Project Readme

Introducing the weeklyplanner_template gem

require 'weeklyplanner_template'

xml = '/tmp/week.xml'
wpt = WeeklyplannerTemplate.new xml, template: 'default'
wpt.to_h.each {|filename, content| File.write filename, content}

The weeklyplanner_template gem accepts an XML file (Polyrex format) and generates an HTML page complete with CSS files.

Here's an example of the XML file used:

<week>
  <summary>
    <mon>May</mon>
    <no>18</no>
    <label/>
  </summary>
  <records>
    <day id='126'>
      <summary>
        <sdate>2017-May-01</sdate>
        <xday>1</xday>
        <event/>
        <bankholiday/>
        <title>Monday</title>
        <sunrise/>
        <sunset/>
        <schema>day[sdate, xday, event, bankholiday, title, sunrise, sunset]/entry[time_start, time_end, duration, title]</schema>
        <format_mask>[!sdate] [!xday] [!event] [!bankholiday] [!title] [!sunrise] [!sunset]</format_mask>
        <recordx_type>polyrex</recordx_type>
      </summary>
      <records>
        <entry>
          <summary>
          <time_start>9:00am</time_start>
          <title>fun time</title>
          </summary>
          <records/>
        </entry>
      </records>
    </day>
    <day id='127'>
      <summary>
        <sdate>2017-May-02</sdate>
        <xday>2</xday>
        <event/>
        <bankholiday/>
        <title>Tuesday</title>
        <sunrise/>
        <sunset/>
        <schema>day[sdate, xday, event, bankholiday, title, sunrise, sunset]/entry[time_start, time_end, duration, title]</schema>
        <format_mask>[!sdate] [!xday] [!event] [!bankholiday] [!title] [!sunrise] [!sunset]</format_mask>
        <recordx_type>polyrex</recordx_type>
      </summary>
      <records/>
    </day>
    <day id='128'>
      <summary>
        <sdate>2017-May-03</sdate>
        <xday>3</xday>
        <event/>
        <bankholiday/>
        <title>Wednesday</title>
        <sunrise/>
        <sunset/>
        <schema>day[sdate, xday, event, bankholiday, title, sunrise, sunset]/entry[time_start, time_end, duration, title]</schema>
        <format_mask>[!sdate] [!xday] [!event] [!bankholiday] [!title] [!sunrise] [!sunset]</format_mask>
        <recordx_type>polyrex</recordx_type>
      </summary>
      <records/>
    </day>
    <day id='129'>
      <summary>
        <sdate>2017-May-04</sdate>
        <xday>4</xday>
        <event/>
        <bankholiday/>  
        <title>Thursday</title>
        <sunrise/>
        <sunset/>
        <schema>day[sdate, xday, event, bankholiday, title, sunrise, sunset]/entry[time_start, time_end, duration, title]</schema>
        <format_mask>[!sdate] [!xday] [!event] [!bankholiday] [!title] [!sunrise] [!sunset]</format_mask>
        <recordx_type>polyrex</recordx_type>
      </summary>
      <records/>
    </day>
    <day id='130'>
      <summary>
        <sdate>2017-May-05</sdate>
        <xday>5</xday>
        <event/>
        <bankholiday/>
        <title>Friday</title>
        <sunrise/>
        <sunset/>
        <schema>day[sdate, xday, event, bankholiday, title, sunrise, sunset]/entry[time_start, time_end, duration, title]</schema>
        <format_mask>[!sdate] [!xday] [!event] [!bankholiday] [!title] [!sunrise] [!sunset]</format_mask>
        <recordx_type>polyrex</recordx_type>
      </summary>
      <records/>
    </day>
    <day id='131'>
      <summary>
        <sdate>2017-May-06</sdate>
        <xday>6</xday>
        <event/>
        <bankholiday/>
        <title>Saturday</title>
        <sunrise/>
        <sunset/>
        <schema>day[sdate, xday, event, bankholiday, title, sunrise, sunset]/entry[time_start, time_end, duration, title]</schema>
        <format_mask>[!sdate] [!xday] [!event] [!bankholiday] [!title] [!sunrise] [!sunset]</format_mask>
        <recordx_type>polyrex</recordx_type>
      </summary>
      <records/>
    </day>
    <day id='132'>
      <summary>
        <sdate>2017-May-07</sdate>
        <xday>7</xday>
        <event/>
        <bankholiday/>
        <title>Sunday</title>
        <sunrise/>
        <sunset/>
        <schema>day[sdate, xday, event, bankholiday, title, sunrise, sunset]/entry[time_start, time_end, duration, title]</schema>
        <format_mask>[!sdate] [!xday] [!event] [!bankholiday] [!title] [!sunrise] [!sunset]</format_mask>
        <recordx_type>polyrex</recordx_type>
      </summary>
      <records/>
    </day>
  </records>
</week>

Screenshot

Screenshot of the weekly planner on a web page

Resources

weeklyplanner template gem weeklyplannertemplate planner