makediary - output PostScript code for a paper diary.


NAME

makediary - output PostScript code for a paper diary.


SYNOPSIS

makediary --help

makediary --version

makediary [options]


DESCRIPTION

Prints PostScript code for a paper diary. makediary can generate PostScript for several different paper sizes. makediary can include events printed on dates specified in a .calendar file. The .calendar file is in the same format as used by pcal(1), with some extensions.


OPTIONS

--address-pages=n

Print n address pages. Defaults to 6.

--appointments

Print a column of appointment times on the right side of each day.

--appointment-width=N[%]

Specify the width of the appointment times column as a percentage of the width of the day. Defaults to 35%. The '%' sign is optional. Implies --appointments.

--colour

When printing images, output colour PostScript.

--cover-image=imagefile

Print imagefile on the cover of the diary, centred and below the year. The image will be scaled to fit inside a box across the page, and will replace the smiley.

--day-to-page

Print one day to each page. A year's worth of month calendars will be printed across the bottom of each opening in the day pages.

--debug-boxes

Print dashed boxes around parts of the output for debugging the spacing. These parts include images, month calendars, and the drawing border of the whole page.

--debug-version

On the inside cover, print a page that describes the options that were used to generate this diary, the usage message of the makediary, and the CVS version number.

--debug-whole-page-boxes

Around each diary page (not each sheet of paper), draw a faint box.

--eps-page=epsfilename

Include a page whose content is epsfilename, without a title or any other decoration. This could be useful for including maps, for instance.

--event-images

Print images next to events, where they are specified. If this is not specified, the events will be printed without images.

--help

Display a usage message and exit.

--image-page=IMAGEFILENAME[,title]

Display an image maximised onto a page. This can be specified multiple times. The images specified will be printed on consecutive pages immediately after the personal information page. The optional title will be used as the page title.

--image-2page=IMAGEFILENAME[,title]

Display an image maximised across two pages. The optional title will be printed on both pages. A notes page will be inserted immediately before the first page, if necessary, to ensure the image is printed on facing left and right pages.

--line-spacing=d

Make the line spacing on diary pages d millimetres. d can be a floating point number.

--moon

Print pictures of phases of the moon in the title of the day at each phase.

--northern-hemisphere-moon

Print pictures of phases of the moon as seen from the Northern Hemisphere, instead of from the Southern Hemisphere. Implies --mooon.

--no-smiley

Don't print the smiley on the front cover. The smiley also won't be printed if a cover image is specified.

--notes-pages=n

Print n notes pages at the beginning and end of the diary. Defaults to 6.

--output-file=filename

Output PostScript code to filename. Defaults to diary.ps if generating PostScript, or diary.pdf if generating PDF. A lone '-' means standard output.

--page-size=size

Specify the size of the pages. This is not the same as the paper size, so you can print smaller pages than the paper size. See also the --page-registration-marks option.

--page-registration-marks

Print marks for cutting pages out of a sheet of paper. This is useful when printing pages that are smaller than the paper size.

--page-x-offset=x
--page-y-offset=y

Move each diary page this far on the paper. The offsets are in millimetres. The rationale for these options is that printers tend not to print exactly where told, so when printing double sided the pages on opposite sides of the paper may not line up. You can specify an offset to make them line up. x and y can be floating point numbers.

--paper-size=size

Specify the size of the paper that you are printing on. This is not the same as the size of the diary pages. Do makediary --help for a list of paper sizes.

--pdf

Generate PDF instead of PostScript. Requires that ps2pdf be installed and in your $PATH. Untested on Windows.

--planner-years=n

Print n two-page planner years, starting with the diary year. Defaults to 2, ie the diary year and the following year.

--sh-ref

Print the Unix shell reference page.

--start-date=yyyy-mm-dd

Start the diary on the specified date. The date must be in yyyy-mm-dd format. If both --start-date and --year are both specified, the last one specified will take precedence.

--unix-ref

Print the Unix commands reference page.

--version

Output version information and exit.

--vim-ref

Print the vi and vim reference pages.

--week-to-opening

Print a week to one opening. This has, on the left side, three calendars and Monday to Wednesday, and on the right side, Thursday to Sunday. The default layout has on the left side, three calendars and Monday, on the right side Tuesday and Wednesday, then on the next two pages, Thursday and Friday, and Saturday and Sunday. In both layouts, the same day always appears in the same position on the same page.

--weeks-after=N

Ensure that the diary covers N complete weeks after the specified year.

--weeks-before=N

Ensure that the diary covers N complete weeks before the specified year.

--year=year

Print a diary for that year. Defaults to next year. If both --year and --start-date are both specified, the last one specified will take precedence.


PCAL(1) .calendar FILE

If makediary finds a .calendar file, it is parsed to find events to print on particular days. The file is in the same format as used by pcal(1), with some extensions.

The .calendar file is searched for in these places:

The first one of these found is used, and the rest are ignored.

The .calendar file allows a few extensions from that defined by pcal(1). These extensions are embedded in comments, so the file should still make sense to pcal(1).

The first type of extension allows for changing the behaviour of makediary. These are of the form:

#<<key:value> >>>>

(This needs documentation...)

The second type of extension is similar in form, but is added to the end of the text for a date entry. The currently defined extensions are:

#<<image:filename> >>>>

Specify an image to print next to the entry for this event. The image will be scaled to fit in two lines of the diary.

#<<year:year> >>>>

Specify the year in which the event occurred. This is used so that the text can contain a number of years since the event, in the %-substitution extension format specified below.

#<<warn:nday(s)|week(s)|month(s)> >>>>

Print a warning in lighter text, n days, weeks or months before the event. The text printed will be surrounded by parentheses and suffixed by the date of the event, ie (Erin's 12th birthday -- Mar 07).

%-Substitution

Within the extensions specified above, you can substitute some values with %-sequences. The following sequences are available:

%A

Week day name (same as strftime(3)).

%a

Abbreviated week day name (same as strftime(3)).

%B

Full month name (same as strftime(3)).

%b

Abbreviated month name (same as strftime(3)).

%d

Day of month, 1 to 31. If preceded by 0, ie %0d, the month is printed as 01 to 31, same as strftime(3).

%j

Day of year as decimal number (same as strftime(3)). Three digits if %0j.

%l

Days remaining in the year. Three digits if %0l.

%m

Month number, 01 to 12 (same as strftime(3)).

%N

The number of years since the event. If preceded by o, ie %oN, the number will be printed as an ordinal, ie 14th instead of 14.

%U

The week number of the current week (same as strftime(3)).

%Y

Four digit year (same as strftime(3)).

%y

Two digit year (same as strfimte(3)).

%%

Literal %.

Examples


.makediaryrc file

makediary will read a file called .makediaryrc if it exists. .makediaryrc must be in ini-file format, and it must contain a section called ``Personal Information''. The key-value pairs in that section are used to populate the Personal Information page. The defined keys are:

Name
Phone
Mobile (or Cell)
Email (or Email address)
Address
Work phone
Work fax
Work address
Emergency Contact 1
Emergency Contact 2
Emergency Contact 3
Emergency Contact 4

(It is intended that .makediaryrc will one day hold all of the information needed by makediary, including that now kept in the .calendar file.)


EXAMPLES

Two pages on letter paper
 makediary --page-size=half-letter | \
 psselect -p2- | \
 pstops -p letter '2:0L(8.5in,0)+1L(8.5in,5.5in)'  \
 > out.ps


BUGS

The extensions to the .calendar format are really ugly. There should really be a better way of specifying events etc. The backward compatibility with pcal(1) is not as useful as I imagined it would be. Two ideas are to use a simple database format (perhaps nosql(1)), or use the user's palm data, exported from evolution(1) or somewhere.


AUTHOR

Russell Steicke <russells@adelie.cx>


COPYRIGHT

Copyright (C) 2002-2004 Russell Steicke. Released under the terms of the GNU General Public License, but dedicated to the public domain at the beginning of the tenth calendar year after publishing (ie the start of 2018 for version 0.2.3).

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


VERSION

0.2.3


SEE ALSO

pcal(1), calendar(1), psselect(1), pstops(1).

 makediary - output PostScript code for a paper diary.