<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.12-alpha" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Jeffrey Friedl's Blog</title>
	<link>http://regex.info/blog</link>
	<description>Not a photo blog, but sometimes I play one on TV</description>
	<pubDate>Fri, 08 Aug 2008 20:45:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.12-alpha</generator>
	<language>en</language>
			<item>
		<title>Jeffrey&#8217;s Photoshop Calendar-Template-Building Script</title>
		<link>http://regex.info/blog/photo-tech/calendar/</link>
		<comments>http://regex.info/blog/photo-tech/calendar/#comments</comments>
		<pubDate>Thu, 30 Nov 2006 12:12:24 +0000</pubDate>
		<dc:creator>Jeffrey Friedl</dc:creator>
		
		<category>General</category>

		<guid isPermaLink="false">http://regex.info/blog/photo-tech/calendar/</guid>
		<description><![CDATA[

 

<br style='display:block;margin:5px'/> Calendar Built With My Photoshop
ScriptLandscape Mode


<br style='display:block;margin:5px'/>(This page last updated December 24, 2007, for Version 5 of the script)

<br style='display:block;margin:5px'/>I've made a Photoshop JavaScript script that builds calendars. The
result of running it in Photoshop (CS2 or CS3) is a Photoshop document with
half a dozen or so layers that you can then tweak and modify, add your own
image to, etc.

<br style='display:block;margin:5px'/>It has a number of nice features:


  It leaves the components of the calendar in separate layers, so that you can modify them at will
  It can build calendars in English or 56 other languages
  [...]]]></description>
			<content:encoded><![CDATA[

<style type="text/css">
  #post294 .bold-smallcaps { font-weight:bold; font-size:85% }
  #post294 .h {
      display: block;
      padding: 0;
      font-size: 140%;
      font-weight: bold;
      margin-top: 40px;
      margin-bottom: 2px;
  }

  #post294 .h2 {
      font-weight: bold;
      margin-top:20px;
      margin-bottom:10px;
  }
  #post294 .h2 + p{ margin-top: 5px}
  #post294 .ii1 { margin-left:2em; margin-top: 25px }
  #post294 .ii2 { margin-left:4em; margin-top: 5px }
  #post294 pre { margin-left:3em; width:45em; background-color: #442; border: solid 1px #CEC; padding: 3px }
  #post294 .lix { padding-left: 1em }
</style>

<div class='ic'><a
href='http://regex.info/i/cal/Natalie-and-Alan-Jan07.jpg'><img src="http://regex.info/i/cal/Natalie-and-Alan-Jan07_sm.jpg" width="670" height="467" alt="Photo-calendar created
with Jeffrey's Photoshop Calendar-Building Script
(http://regex.info/blog/photo-tech/calendar/)" style="border:solid 15px black" title="Photo-calendar created
with Jeffrey's Photoshop Calendar-Building Script
(http://regex.info/blog/photo-tech/calendar/)"/></a> <br/><span
style='font-size:175%'>Calendar Built With My Photoshop
Script</span><br/><b>Landscape Mode</b></div>


<p style='margin-top:30px; margin-bottom:30px'>(<b>This page last updated December 24, 2007, for Version 5 of the script</b>)</p>

<p>I've made a Photoshop JavaScript script that builds calendars. The
result of running it in Photoshop (CS2 or CS3) is a Photoshop document with
half a dozen or so layers that you can then tweak and modify, add your own
image to, etc.</p>

<p>It has a number of nice features:</p>

<ul style='margin-top:3px'>
  <li>It leaves the components of the calendar in separate layers, so that you can modify them at will</li>
  <li>It can build calendars in English or 56 other languages</li>
  <li>It supports personal annotations (holidays, birthdays, etc.)</li>
  <li>It has both Landscape and Portrait modes</li>
  <li>It can include week numbers (two different week-number standards are supported)</li>
  <li>You can have weeks begin on Sunday or Monday</li>
  <li>The calendar is built specifically for the paper size you select</li>
  <li>You can configure much more by editing the script itself</li>
</ul>

<p>Details follow below, but first, for your downloading pleasure...</p>

<div style='border: solid 1px gray; width:70%; padding:15px 30px; margin: 25px auto 25px auto'>
  <p><b>Download Photoshop Calendar-Building Script</b>
  <br/>
  Version 5: <a href="http://regex.info/Jeffrey's&#32;Calendar&#32;Builder.jsx">Jeffrey's Calendar Builder.jsx</a>
  &nbsp;  &nbsp;  &nbsp; <small>(<a href='#history'>version history</a>)</small>
  </p>

  <p style='margin-bottom:0'><b>Pre-built sample PSD files for 2008 (at 300 DPI):</b><br/><small>(In case you don't want to &mdash; or can't &mdash; run the script)</small></p>
<ul style='font-size:90%;margin-top:0'>

<li><a href='http://regex.info/i/cal/US-L-Sun-Calendar_2008-v3b1.zip'>US Letter Paper, Landscape, weeks start on Sunday</a></li>
<li><a href='http://regex.info/i/cal/US-P-Sun-Calendar_2008-v3b1.zip'>US Letter Paper, Portrait, weeks start on Sunday</a></li>

<li><a href='http://regex.info/i/cal/A4-L-Sun-Calendar_2008-v3b1.zip'>A4 Paper, Landscape, weeks start on Sunday</a></li>
<li><a href='http://regex.info/i/cal/A4-P-Sun-Calendar_2008-v3b1.zip'>A4 Paper, Portrait, weeks start on Sunday</a></li>

<li><a href='http://regex.info/i/cal/A4-L-Mon-Calendar_2008-v3b1.zip'>A4 Paper, Landscape, weeks start on Monday</a></li>
<li><a href='http://regex.info/i/cal/A4-P-Mon-Calendar_2008-v3b1.zip'>A4 Paper, Portrait, weeks start on Monday</a></li>

</ul>
</div>


<div class='img_right' style='padding-bottom:0; margin-bottom:0; text-align:center'><a href='http://regex.info/i/CalV2PortSample.jpg' ><img src="http://regex.info/i/CalV2PortSample_sm.jpg" width="405" height="530" alt="Photo-calendar created
with Jeffrey's Photoshop Calendar-Building Script
(http://regex.info/blog/photo-tech/calendar/)" style="border:solid 5px black" title="Photo-calendar created
with Jeffrey's Photoshop Calendar-Building Script
(http://regex.info/blog/photo-tech/calendar/)"/></a><br/><span class="robots-nocontent" style='color:#BBB; font-size:85%'> <a
class='quiet' style='color:#77B'
href='http://regex.info/exif.cgi?url=http%3A%2F%2Fregex.info%2Fi%2FCalV2PortSample.jpg'>full
exif &amp; map</a></span><br/><span style='font-size:120%'>Portrait Mode</span></div>

<p style='margin-top:0' class='h'>Overview</p>

<p>The script, which runs on Photoshop CS2/CS3, should work the same on
both Windows and Mac, although I'll show screenshots of it with
Windows.</p>

<p>Running the script brings up a dialog which allows for calendar
configuration (page size, etc.), but a copy of the script can be edited
itself for fine-tuned control over fonts, sizes, margins, etc. The result
of the script is a Photoshop document with a dozen or so layers, which can
then be modified/tweaked.</p>

<p>My goal in building this was to make landscape-mode loose-leaf calendars
that my wife and I can use for our daily/weekly schedules (e.g.
&#8220;preschool field trip is tomorrow&#8221;, &#8220;such-and-such a
friend visiting on Sunday&#8221;, etc.). As such, I want something that is
a calendar when viewed up close.... yet, when viewed from afar, it's art.
That's the goal, at least.</p>

<p style='margin-top:0; clear:both' class='h'>Installing and Invoking</p>

<p>You can install/invoke the script in two ways:</p>

<ol><li><p>Download the script file, <a
href="http://regex.info/Jeffrey's&#32;Calendar&#32;Builder.jsx">Jeffrey's
Calendar Builder.jsx</a>, to a convenient place, such as your desktop, then
click on it. It should launch Photoshop if it's not already running, and
switch to it. (If it doesn't, right-click on the script file and
&#8220;Open with&#8221; Photoshop.)</p>

<p><b>or,</b></p>
</li>

<li><p>Install the script file to your Photoshop <b>Scripts</b>
folder. On my Windows machine, my CS2 folder is:</p>

  <pre style='white-space:nobreak;margin-left:5em'>\Program Files\Adobe\Adobe Photoshop CS2\Presets\Scripts\</pre>

<p>on the root drive. (After installing or renaming any file here, be sure
to restart Photoshop if it had been open.)

</p><p style='margin-top:20px'>

Then, you can invoke the script from within Photoshop's <b>File &gt;
Scripts</b> menu item:</p>

<img src="http://regex.info/i/cal/photoshop-script-invoke.gif" width="470" height="446" alt="How to invoke a JavaScript script from within Photoshop" class="ic" title="How to invoke a JavaScript script from within Photoshop"/></li>
</ol>


<p class='h'>Simple Calendar-Building with the Dialog</p>

<p>When executed, you are prompted for details on the calendar to be
made:</p>

<img src="http://regex.info/i/cal/calendar-dialog-v3.gif" width="577" height="677" alt="Calendar-creation dialog from Jeffrey's Calendar-Building Photoshop script (http://regex.info/blog/photo-tech/calendar/)" class="ic" title="Calendar-creation dialog from Jeffrey's Calendar-Building Photoshop script (http://regex.info/blog/photo-tech/calendar/)"/>

<br/>

<img src="http://regex.info/i/cal/layers-raw.gif" width="232" height="431" alt="Photoshop Layers pallete showing the result of building a calendar with Jeffrey's Calendar-Building Photoshop script (http://regex.info/blog/photo-tech/calendar/)" class="img_right" noindex="noindex" style="margin-top:0; padding-top:0; margin-left: 3em" title="Photoshop Layers pallete showing the result of building a calendar with Jeffrey's Calendar-Building Photoshop script (http://regex.info/blog/photo-tech/calendar/)"/>

<p style='margin-top:0'>At its most simple, just select the target year and month (or select the
month &#8220;All&#8221; to build 12 separate calendars), adjust the calendar style
settings and the paper size to your liking, and press the &#8220;Okay&#8221; button.</p>

<p>The script will churn away a bit, building the calendar in a new
document, leaving you with a dozen or so layers like those shown at
right.</p>

<p>Layers making up the calendar include text layers for the month and year
text, rasterized layers with text for the names of the days of the week
(&#8220;<b>Sun-Sat</b>&#8221; in the example at right) and dates
(&#8220;<b>1-31</b>&#8221; in the example), and the calendar grid.</p>

<p>The look and feel of the calendar can be changed greatly just by
adjusting the style and opacity of the various layers. Small changes can
have large effects on the result. Play around. (If you come across a result
you really like, please tell me about it.)</p>

<p class='h2'>Inserting a Picture</p>

<p>There's an empty layer named &#8220;<b>Paste Your Photo Here</b>&#8221; which is
where, of course, you should place the photo you want to use. Actually, it
needn't be on <i>that</i> layer, but simply within the &#8220;<b>Picture
Mask</b>&#8221; layerset, as the mask provides a pleasing (to me, at least) drop
off toward white all around the edges.</p>

<p>As a shorthand, if you have an image open in Photoshop when you invoke
the script, it will be placed within the &#8220;Paste Your Photo
Here&#8221; calendar layer, resized so that it fully fills the canvas. This
works only when the already-open document has just a single layer. If you
don't care for the automatic resize, you can just delete the layer and
replace it with one you like.</p>

<p>In any case, once you drop in your picture and move/resize to suit your
taste, by all means, adjust the mask as well. Sometimes it works well when
the image extends all the way to the edge, and sometimes it's better to
reduce the image to the center only.</p>

<p class='h2'>Attribution and Description</p>

<p>There's an &#8220;<b>attrib</b>&#8221; layer with an attribution for the calendar.
The script puts the url for this page there, but you'll likely want to
change that to your home page, a copyright notice for the image, etc. Or
perhaps just get rid of it. It's up to you.</p>

<p>There's also an &#8220;<b>Image Description</b>&#8221; text layer whose
visibility defaults to off. It's just one idea for an image-description
note: replace its text with an image description or any text of your
choosing (I used &#8220;Natalie and Alan, July 14, 2006&#8221; in the first
example above) and make it visible. It'll show up in the lower-right of the
image.</p>

<p class='h2'>Copyright</p>

<p>You own the copyright for any calendar you make. I own the copyright on
the script, but not on its output. You can change the output &mdash; the
document the script creates &mdash; in any way you like.</p>

<p>Of course, if you add a photo to the calendar, as with the use of any
image, be sure you're allowed the use the image.</p>

<p class='h'>Options</p>

<p>Some of the items in the dialog are not necessarily self explanatory, so
I'll go over them here...</p>

<p class='h2'>Language</p>

<p>Choose English for the month and day names, or select from among:
Afrikaans, Albanian, Amharic, Arabic, Armenian, Basque, Belarusian, Bosnian,
Bulgarian, Catalan, Chinese, Cornish, Croatian, Czech, Danish, Dutch, Estonian,
Finnish, French, German, Greek, Gujarati, Haitian Creole, Hawaiian, Hebrew, Hindi,
Hungarian, Icelandic, Indonesian, Irish Gaelic, Italian, Japanese, Korean, Latin,
Latvian, Luxembourgish, Maori, Norwegian, Polish, Portuguese, Romanian, Romansh,
Russian, Scots, Serbian, Slovak, Slovenian, Spanish, Swedish, Tamil, Thai, Tok Pisin,
Turkish, Ukrainian, Vietnamese, or Welsh.</p>

<p>I pulled most of the language data from <a
href='http://www.domesticat.net/misc/monthsdays.php'>this page</a>, and had
to take a guess at what font to apply for many of them. I don't even know
whether some of those are real languages. Please let me know if you run
into troubles.</p>

<p class='h2'>Week Numbers</p>

<p>I guess it's popular in some parts of the world to annotate a calendar
with <a href='http://en.wikipedia.org/wiki/Week#Week_number'>week
numbers</a>, but I'd never heard of the idea until <a
href='http://regex.info/blog/photo-tech/calendar/#comment-8871'>someone
requested it</a>. It turns out that there are two common but conflicting
ways to count weeks:</p>

<ol style='margin-top:3px'>
<li>the common-sense approach (&#8220;Week 1&#8221; is the week with
January 1<sup>st</sup> in it)</li>

<li>the <a href='http://en.wikipedia.org/wiki/ISO8601'>ISO 8601</a> standard (&#8220;Week 1&#8221;
is the week with the first Thursday of the year in it)</li>
</ol>

<p>In the dialog, the selection for <b>Show Week Numbers</b> can be changed
from &#8220;No&#8221; to &#8220;at Left&#8221; or &#8220;at Right,&#8221;
to indicate that you want week numbers and where the extra column should be
placed. You can also select between the two methods for counting weeks.</p>

<p class='h2'>Image Orientation</p>

<p>Image orientation does not refer to how you load the paper in the
printer, but to what style of calendar to make. The example at the top from
my brother's wedding is in Landscape style. The example with my little boy
is in Portrait mode.</p>

<p class='h2'>Annotations</p>

<p>Annotations (adding holidays, birthdays, etc.) are covered in a <a href='#Annotations'>later section</a>.</p>

<p class='h2'>Rasterize &amp; Merge Most Text Layers</p>

<p>This option is turned on by default, and compresses the many individual
date-number layers (&#8220;1&#8221;, &#8220;2&#8221;, ... &#8220;31&#8221;) into one layer by rasterizing and merging.
The same grouping is done for the day names (&#8220;Monday&#8221;, &#8220;Tuesday&#8221;...) and the week numbers,
if you've requested them.</p>

<p>The advantage to this is that you can then adjust the look and feel of
all the dates (or days or week numbers) at once by adjusting the style of
the merged layer.</p>

<p>The disadvantage is that you can't adjust the font or size of the text,
or other text-specific things, because the individual text layers no longer
exist.</p>

<p>Thus, by unchecking this option, you can choose to leave the individual
text layers intact. When this is done, they're put into their own group to
reduce visual clutter in the Layer pallet.</p>

<p class='h2'>Auto Save</p>

<p>When auto-save is turned on, the newly-created document or documents are
automatically saved to files. The <b>Directory</b> element indicates where
they should be saved to, while the <b>PSD Filename Pattern</b> indicates
how the files should be named.</p>

<p>Within the filename pattern, the sequences &#8220;<b>MM</b>&#8221; and
&#8220;<b>YYYY</b>&#8221; are replaced by the month and year numbers of the
calendar (two and four digits each, respectively). For example, with a
pattern of &#8220;Calendar_YYYY_MM&#8221;, the calendar for April 2008 will
be named &#8220;Calendar_2008_04.PSD&#8221;.</p>

<p class='h2'>Saving your Config</p>

<p>If you tend to always want options that differ from the defaults
(different language, paper size, etc.), then set them as you like and press
the &#8220;Save&#8221; button in the &#8220;Default Configuration&#8221; section of the dialog. It
writes your selections to a file that's read automatically when the script
starts.</p>

<p>Pressing the &#8220;Delete&#8221; button deletes that file, so you end up with the
as-downloaded set of defaults. For safety, you have to first check a box to
enable the delete button.</p>

<p class='h'>Printing</p>

<p>Because some layers are rasterized, it's best if you can print at
exactly 100%, with no resizing. This should be automatic if you select the
proper paper size, DPI, and reasonable page margins.</p>

<p style='margin-bottom:20px'>I have a <a
href='http://www.usa.canon.com/consumer/controller?act=ModelDetailAct&#038;fcategoryid=116&#038;modelid=13799'>Canon
XP810</a>, and find that Canon's &#8220;High-Resolution Photo Matte Paper&#8221; <b><a
href='http://www.amazon.com/gp/product/B0000721Z3'>MP-101</a></b> to be
perfect. It looks and feels like normal printer paper, albeit of a bit
heavier stock. It's 100% Matte &mdash; not a bit of glossy, so you can
write on it with a pencil or pen.</p>


<p class='h'><a name='Annotations'>Annotations</a></p>

<p>You can have the script add annotations to certain dates, based upon
lists found in external files. The support for annotations is rudimentary
at best, but it's useful for marking holidays, birthdays, and other dates
that might be important to you.</p>

<p>When annotations are turned on, the script reads an annotation file (the
default for a 2008 calendar is &#8220;CalendarData2008.txt&#8221; in your
home directory). Here's an example:</p>


<pre>
  [FontColor=0%,0%,100%] # use blue for the annotation text

  # Holidays that are on the same date every year
  01-01  New Year's Day
  02-14  St. Valentine's Day
  12-31  New Year's Eve

  # 2008 version for items with floating dates
  2008-03-09  Daylight Saving Time Starts&lt;BR&gt;(clocks ahead 1 hour)
  2008-05-11  Mother's Day
  2008-06-15  Father's Day
  2008-11-02  Daylight Saving Time Ends&lt;BR&gt;(clocks back 1 hour)
  2008-11-04  Election Day
</pre>

<p>The basic format is fairly simple:</p>

<ul>
  <li style='margin-bottom:10px'>Blank lines and lines beginning with  &#8220;<b>#</b>&#8221; are ignored.</li>
  <li style='margin-bottom:10px'>Annotation lines have a date followed by the annotation, where the date can be Year-Month-Day or just Month-Day.
       (You can use &#8220;<b>/</b>&#8221; or &#8220;<b>-</b>&#8221; as the separator in the date.)</li>
  <li style='margin-bottom:10px'>The annotation itself may have &#8220;<span class='bold-smallcaps'>&lt;BR&gt;</span>&#8221; to force a line break so that the annotation appears on multiple lines in its date box.</li>
  <li style='margin-bottom:10px'>Annotation lines may pre prefixed with special &#8220;<b>[</b>...<b>]</b>&#8221; settings, as described below.</li>
</ul>

<p>Dates without a year apply to a calendar of any year, while those with a
year apply only to calendars made for that year. This allows you to add
year-specific items to the annotation file without worrying that they might
show up on a different year's calendar.</p>

<p class='h2'>Special &#8220;[...]&#8221; Annotation Settings</p>

<p>The following special &#8220;[...]&#8221; settings may be prepended to
an annotation line, or, as we'll seen in a bit, stand on their own to apply
to all subsequent lines....</p>

<div class='ii1'><b>[FontSize=</b><i>num</i><b>%]</b></div>
<div class='ii2'>
Changes the font size of the annotation, relative to the default. For example,
<pre style='width:41em'>
   [FontSize=200%]  2/30  My Birthday!
   [FontSize=50%]   7/27  Mother-in-law's Birthday
</pre>
</div>

<div class='ii1'><b>[FontName=</b><i>name</i><b>]</b></div>
<div class='ii2'>

<p>Changes the font for the annotation to the one whose name is given. You
must use Photoshop's internal name for the font, which is often not
apparent from the name presented in the font dialog. See my post on
<a href='http://regex.info/blog/2007-09-26/583'>discovering Photoshop internal font names</a> for the name to use here for any given font.</p>

<p>Here's an example showing a Japanese holiday:</p>

<pre style='width:41em'>
   [FontName=MS-Mincho]  05/05 こどもの日
</pre>

<p>By the way, be sure to use the ASCII or UTF-8 character encodings for the file.</p>

</div>

<div class='ii1'><b>[FontColor=</b><i>red</i><b>,  </b><i>green</i><b>,  </b><i>blue</i><b>]</b><br/>
         <b>[FontColor=</b><i>red</i><b>%, </b><i>green</i><b>%, </b><i>blue</i><b>%]</b></div>

<div class='ii2'>Sets the color of the annotation font, as an RGB setting.
The default is black (0,0,0 or 0%,0%,0%). You can use percents (with each
number ranging from 0% to 100%) or the more traditional raw values, where
the numbers range from 0 to 255. For example:

<pre style='width:41em'>
   [FontColor=100%,0%,0%] 6-18  Red Letter Day!
   [FontColor=255,0,0]   11-22  Also a red-letter day
   [FontColor=0,100%,0]  03/17  St. Patrick's Day
</pre>
</div>

<div class='ii1'><b>[FontOpacity=</b><i>num</i><b>%]</b></div>
<div class='ii2'>
       Sets the font opacity (100% is normal, 0% is invisible).
</div>

<p>If these special settings appear on a line without annotation data, as
the first <b>FontColor</b> line in the example at the top of this section,
the setting applies to all subsequent lines.</p>

<p>This example shows three holidays to be printed in red:</p>

<pre>
   [FontColor=100%,0%,0%] 2008-03-23  Easter
   [FontColor=100%,0%,0%]      10/01  All Saint's Day
   [FontColor=100%,0%,0%]      12/25  Christmas
</pre>

<p>The following is just about the same:</p>

<pre>
   [FontColor=100%,0%,0%]
   2008-03-23  Easter
        10/01  All Saint's Day
        12/25  Christmas
</pre>

<p>except that the any lines that might be subsequently added to the end
will also get the red font. This last point brings up the idea of
contexts....</p>

<p class='h2'>Annotation Contexts</p>

<p>You can surround a group of settings and annotations with <span
class='bold-smallcaps'>&lt;CONTEXT&gt;</span> ... <span
class='bold-smallcaps'>&lt;<span style='margin-left: 3px; margin-right: 2px'>/</span>CONTEXT&gt;</span> to isolate any settings made
within the group from applying after the group.</p>

<pre>
   [FontColor=100%,0%,0%] 2008-03-23  Easter
   [FontColor=100%,0%,0%]      10/01  All Saint's Day
   [FontColor=100%,0%,0%]      12/25  Christmas
   2008-02-06  Ash Wednesday
</pre>

<p>has &#8220;Ash Wednesday&#8221; printed in the default black, exactly the same as:</p>

<pre>
   &lt;CONTEXT&gt;
       [FontColor=100%,0%,0%]
       2008-03-23  Easter
            10/01  All Saint's Day
            12/25  Christmas
   &lt;/CONTEXT&gt;
   2008-02-06  Ash Wednesday
</pre>

<p>This might be convenient for clarity when you have various sections of
grouped entries...</p>

<pre class='anno'>
   # US Federal holidays are in red, with a small font
   &lt;CONTEXT&gt;
       [FontColor=100%,0%,0%]
       [FontSize=80%]
       2008-05-26  Memorial Day
            07-04  Independence Day
       2008-09-01  Labor Day
       2008-10-13  Columbus Day
       2008-11-11  Veterans Day
   &lt;/CONTEXT&gt;

   # Japanese holidays need their special font
   &lt;/CONTEXT&gt;
      [FontName=MS-Mincho]
      01/01 元日
      05/05 こどもの日
      12/23 天皇誕生日
   &lt;/CONTEXT&gt;

   # Birthdays are noted quietly
   &lt;/CONTEXT&gt;
      [FontOpacity=30%]
      [FontSize=80%]
       4/12 David Letterman's birthday
       4/15 Dave Filo's birthday
      12/06 Steven Wright's birthday
   &lt;/CONTEXT&gt;
</pre>



<p class='h2'>Importing and Including Annotation Data</p>

<p>Within your annotation-data file you can have <b>import</b> and <b>include</b> lines like:</p>
<pre>
   INCLUDE "<i>filename</i>"
   IMPORT  "<i>filename</i>"
</pre>

<p>Both allow you to reference annotations in other files, with the
difference being that <span class='bold-smallcaps'>INCLUDE</span> does not
remember any settings changed in the file, while <span
class='bold-smallcaps'>IMPORT</span> does. Consider this example:</p>

<pre>
  INCLUDE "US-Holidays-2008.txt"
  INCLUDE "US-Family-Birthdays.txt"

  IMPORT "My-Favorite-Japanese-Settings.txt"

  INCLUDE "Japanese-Holidays-2008.txt"
  INCLUDE "Japan-Family-Birthdays.txt"
</pre>

<p><span class='bold-smallcaps'>IMPORT</span> is used for the Japanese
Settings file (font changes, etc.) so that those changes remain and apply
to subsequent lines (those found in the two <span
class='bold-smallcaps'>INCLUDE</span> files that follow).</p>

<p>This allows you to create sets of annotations that you can then easily
mix and match when creating specific calendars. I use different sets of
files depending on whether I'm making a calendar for myself, my folks (who
don't read Japanese), or my Japanese-speaking in-laws.</p>

<p class='h2'>More on File Management</p>

<p>To make it easier to reuse annotation files year after year, you can put
the year in an individual entry's date so that it is safely ignored when
creating a calendar for a different year.</p>

<p>You can also segregate items into different files, putting year-specific
annotations into files with the year in the name.</p>

<p>In filenames provided on include/import lines and in the script's
configuration dialog where you provide the annotation-data filename, any
set of four upper-case 'Y' in a row are replaced by the target year for the
calendar. The default filename is &#8220;CalendarData<b>YYYY</b>.txt&#8221; which means
that &#8220;CalendarData<b>2008</b>.txt&#8221; is actually read for a 2008 calendar.</p>

<p>The previous import/include example would be better written with that in
mind, so that year-specific annotation files are read only when creating a
calendar for the appropriate year:</p>


<pre>
  INCLUDE "US-Holidays-<b>YYYY</b>.txt"
  INCLUDE "US-Family-Birthdays.txt"

  IMPORT "My-Favorite-Japanese-Settings.txt"

  INCLUDE "Japanese-Holidays-<b>YYYY</b>.txt"
  INCLUDE "Japan-Family-Birthdays.txt"
</pre>

<p class='h2'>Sample Annotation Data</p>

<p>Here are two sample annotation-data files to get you started, one with
some US holidays, and another with Japanese:</p>

<p style='margin-left:3em'><a href='http://regex.info/i/cal/CalendarData2008.txt'>CalendarData2008.txt</a>
<br/>
<a href='http://regex.info/i/cal/CalendarDataJapan2008.txt'>CalendarDataJapan2008.txt</a>
</p>

<p style='margin-bottom:20px'>You can find lots of info on holidays for
countries, religions, and cultures around the world at <a
href='http://www.timeanddate.com/calendar/'>TimeAndDate.com</a>, and, of course,
<a href='http://en.wikipedia.org/wiki/2008'>at Wikipedia</a>.</p>



<p style='margin-top:0' class='h'>Future</p>

<p>It's a bit more full-featured than earlier versions, but it still has a
ways to go. Some enhancements I can think of:</p>

<ul>
  <li>Better font control.</li>
  <li>Putting the small previous-month / next month calendars in there somewhere.</li>
  <li>Add a variety of layout options.</li>
</ul>

<p>Let me know what you think.</p>

<p>I can't help wondering whether there's a feature of Photoshop whereby I
could leave all the text unrasterized, yet allow one-stop tweaking of fonts
and margins. With my understanding as it is now, if all the date numbers
are left as individual text layers, each must be visited individually to,
say, change the font. If there's a simple solution to this, please let me
know.</p>

<p>At least with this script, you can make the change in the script, just
once, and then run it.</p>

<p><b>Enjoy</b>.</p>

<hr width='60%' align='left'/>

<p class='h'><a name='history'>Version History</a></p>

<style type="text/css">
td.td1 { margin-top: 5px; white-space: nowrap }
td.td2 { margin-top: 5px; border: solid 1px #BBB; padding: 5px 1em }
</style>

<table cellspacing='5' cellpadding='0' border='0'>

<tr valign='baseline'><td class='td1'><b>Version 5</b><br/><small>Dec 24, 2007</small></td>
<td class='td2'>
<ul class='lix' style='margin-top:5px'>
<li>Changes <a href='http://regex.info/blog/photo-tech/calendar/#comment-12768'>suggested by Ingus</a>: fixes to Latvian translations; handle multiple line breaks on an annotation line.</ul></td></tr>



<tr valign='baseline'><td class='td1'><b>Version 4</b><br/><small>Dec 23, 2007</small></td>
<td class='td2'>
<ul class='lix' style='margin-top:5px'>
<li>Although I added A3 and A5 paper sizes in the previous release, I hadn't really tested them, and it turns out that I forgot to scale the various font sizes
     and item spacing that I used for A4 and Letter paper. This release fixes that.</li>
</ul></td></tr>


<tr valign='baseline'><td class='td1'><b>Version 3</b><br/><small>Oct 31, 2007</small></td>
<td class='td2'>
<ul class='lix' style='margin-top:5px'>
<li>Per <a href='http://regex.info/blog/photo-tech/calendar/#comment-9853'>request</a>, I added A3 and A5 sized paper selections.</li>
<li>Per <a href='http://regex.info/blog/photo-tech/calendar/#comment-9919'>request</a>, you can set weeks to start on any day, not just Sunday or Monday.</li>
<li>Fixed the "February becomes March" bug.</li>
</ul></td></tr>



<tr valign='baseline'><td class='td1'><b>Version 3<small>b1</small></b><br/><small>Sep 26, 2007</small></td>
<td class='td2'>
<ul class='lix' style='margin-top:5px'>
<li>Can now create calendars in 58 languages.</li>
<li>Added ability to display week numbers.</li>
<li>Added ability to change annotation font name/size/color/opacity.</li>
<li>Added ability to force linebreaks in annotation text.</li>
<li>Added import/include/&lt;context&gt; support to annotation file.</li>
<li>Annotation filename specifications with &#8220;YYYY&#8221; auto-convert to the calendar's target year.</li>
<li>Can now include the year in an annotation's date, and have that entry be safely ignored for other years.</li>
<li>Added annotation data filename to the config dialog.</li>
<li>Added tool-tips to the configuration dialog.</li>
<li>Added ability to save the current configuration as the local default.</li>
<li>Added ability to turn off annotations in the config dialog.</li>
<li>Can now leave text layers un-rasterized and un-merged.</li>
</ul>
</td></tr>






<tr valign='baseline'><td class='td1'><b>Version 2</b><br/><small>Dec 15, 2006</small></td>
<td class='td2'>
New features:
<ul style='margin-top:5px'>
  <li>Added the ability to populate the calendar with holiday/birthdays/etc data read from a file.</li>
  <li>Added an &#8220;auto save&#8221; feature, particularly useful when generating whole-year templates for distribution.</li>
</ul>


<p style='margin-bottom:5px'>Bug fixes:</p>

<ul style='margin-top:5px'>
  <li>Fixed the &#8220;weeks start on Monday&#8221; option, which had been broken when building all months in one shot.</li>

  <li>Fixed the pre-set margins and such for Portrait mode actually work properly (see an example above).</li>

  <li>It now references only fonts that come standard with Photoshop (CS2).
      I thought that's what I'd done, but it turns out that
      I had some other fonts (perhaps from CS1, or from other Creative-Suite programs).</li>
</ul>
</td></tr>

<tr valign='baseline'><td class='td1'><b>Version 1</b><br/><small>Dec 4, 2006</small></td>
<td class='td2'>
Initial Release
<br/>&nbsp;<br/>&nbsp;
</td></tr>
</table>



]]></content:encoded>
			<wfw:commentRss>http://regex.info/blog/photo-tech/calendar/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
