=============
agenda2pdf.py
=============

:Author: Iñigo Serna, inigoserna AT gmail DOT com

:Version: 1.0, September 21st. 2009

:Home page: https://inigo.katxi.org/devel/agenda2pdf

:License: \(C\) 2008-9, Iñigo Serna

          This software has been realised under the `GPL License`__ version 3
          or later, read the COPYING_ file that comes with this package for
          more information. 

          There is NO WARRANTY.

:Last update: Fri Sep 25 13:57:13 2009

.. contents:: Table of Contents


Introduction
============
This program generates a book agenda file in PDF format file, ready to be printed or
to be loaded on a ebook reader.

You can choose among different sections.
Each section have pdf links to other parts of the agenda.

I've created it for using with my `iLiad eBook reader`__.
Btw, I recommend using with `ipdf gmt's for editing version`__.

Two screenshots of sample pages:

* week page, landscape (option W)

  .. image:: agenda2pdf-ss1.png

* day page, vertical (option d)

  .. image:: agenda2pdf-ss2.png


Released under GNU Public License, read COPYING_ for more details.


Usage
=====
Usage:  python agenda2pdf.py <options>

Options:
    -h, --help            Show this text
    -v, --version         Show version and exit
    -y, --year            Year. If not specified current year is used
    -w, --first-week-day  First day of week: 0 = monday, 6 = sunday
                          (default: 0, monday)
    -f, --format          Sections to build. Consult documentation for the
                          definition of each type (default: ciypmwPb)
    -o, --output          PDF Output file (default: "agenda-yyyy.pdf")
    -s, --page-size       Specify page size.
                          Valid options: A4, A5, A6, LEGAL, LETTER, ILIAD,
                          ILIAD_FULLSCREEN, ORGANIZER (default: A4)
    -c, --no-compression  Disable PDF file compression (default: enabled)
    -q, --quiet           Don't output messages on screen


Sections
========
Besides the year, you also can specify which sections will be
into the final agenda file.

Here there are the description for each section type and the links to
other parts of the file:

- **c: Cover** ::
  
  - no links

  
- **i: Index, 1 year, with index** ::

  - month -> 2_months or 1_month
  - table of contents links -> sections
  - page_number -> index


- **y: 3 years view** ::

  - year header -> index
  - page_number -> index

 
- **p: Planner, 4 pages with 3-months view planning** ::

  - year header -> index
  - month header -> 2_months or 1_month
  - page_number -> index


- **P: Planner next year, 4 pages with 3-months view planning** ::

  - year header -> index
  - page_number -> index


- **m: 2 months, vertical** ::

  - month header -> index
  - week number -> agenda_half_week or agenda_week (only if w or W in format)
  - day -> agenda_day or agenda_day+blank (only if d or D in format)
  - page_number -> index


- **M: 1 month, landscape** ::

  - month header -> index
  - week number -> agenda_half_week or agenda_week (only if w or W in format)
  - day -> agenda_day or agenda_day+blank (only if d or D in format)
  - page_number -> index


- **w: Agenda half week per page, vertical** ::

  - month header or week_number header -> index
  - month -> 2_months or 1_month (only if m or M in format)
  - page_number -> index


- **W: Agenda whole week per page, landscape** ::

  - month header or week_number header -> index
  - month -> 2_months or 1_month (only if m or M in format)
  - page_number -> index


- **d: Agenda 1 day, vertical** ::

  - date header or week_number header -> index
  - month -> 2_months or 1_month (only if m or M in format)
  - page_number -> index


- **D: Agenda 1 day + blank page, vertical** ::

  - date header or week_number header -> index
  - month -> 2_months or 1_month (only if m or M in format)
  - page_number -> index


- **B: Blank page, useful for padding** ::

  - page_number -> index

  
- **b: Back** ::

  - no links


You can use a combination of any of these sections using `-f` or
`--format` argument.
The default format used is equivalent to `-f ciypmwPb`.

If you don't specify a year, current year is used.


Requirements
============

- `Python v2.5 or greater`__. v2.6 used
- `ReportLab`__. v2.1 used
- `Python Image Library`__. v1.1.6 used


Download
========
Get `agenda2pdf-1.0.tar.gz`_.

You can download some generated agenda files for year 2009:

- `default, don't include day by day pages`__.
   Generated with `python agenda2pdf.py -s ILIAD_FULLSCREEN`
- `default + days`__.
   Generated with `python agenda2pdf.py -s ILIAD_FULLSCREEN -f "ciypmwdPb"`
- `landscape, don't include day by day pages`__.
   Generated with `python agenda2pdf.py -s ILIAD_FULLSCREEN -f "ciypMWPb"`


TODO
====
- populate agenda with .ics file contents
- i18n, l10n



.. _agenda2pdf-1.0.tar.gz: agenda2pdf-1.0.tar.gz
.. _COPYING: COPYING
.. _GPL: http://www.gnu.org/licenses/licenses.html#GPL
.. _iLiad: http://www.irextechnologies.com/products/iliad
.. _ipdfedit: http://www.mobileread.com/forums/showthread.php?t=22152
.. _python: http://www.python.org
.. _reportlab: http://www.reportlab.org/
.. _pil: http://www.pythonware.com/products/pil/
.. _agenda1.pdf: agenda-2009.pdf
.. _agenda2.pdf: agenda-2009-day.pdf
.. _agenda3.pdf: agenda-2009-landscape.pdf


__ GPL_
__ iLiad_
__ ipdfedit_
__ python_
__ reportlab_
__ pil_
__ agenda1.pdf_
__ agenda2.pdf_
__ agenda3.pdf_
