{"id":294,"date":"2006-11-30T21:12:24","date_gmt":"2006-11-30T12:12:24","guid":{"rendered":"https:\/\/regex.info\/blog\/photo-tech\/calendar"},"modified":"2013-09-01T22:43:25","modified_gmt":"2013-09-01T13:43:25","slug":"calendar","status":"publish","type":"page","link":"https:\/\/regex.info\/blog\/photo-tech\/calendar","title":{"rendered":"Jeffrey&#8217;s Photoshop Calendar-Template-Building Script"},"content":{"rendered":"\n\n<style type=\"text\/css\">\n  #post294 .bold-smallcaps { font-weight:bold; font-size:85% }\n  #post294 .h {\n      display: block;\n      padding: 0;\n      font-size: 140%;\n      font-weight: bold;\n      margin-top: 40px;\n      margin-bottom: 2px;\n  }\n\n  #post294 .h2 {\n      font-weight: bold;\n      margin-top:20px;\n      margin-bottom:10px;\n  }\n  #post294 .h2 + p{ margin-top: 5px}\n  #post294 .ii1 { margin-left:2em; margin-top: 25px }\n  #post294 .ii2 { margin-left:4em; margin-top: 5px }\n  #post294 pre { margin-left:3em; width:45em; background-color: #442; border: solid 1px #CEC; padding: 3px }\n  #post294 .lix { padding-left: 1em }\n<\/style>\n\n<div class='ic'><a\nhref='\/i\/cal\/Natalie-and-Alan-Jan07.jpg'><img loading=\"lazy\" decoding=\"async\" src=\"\/i\/cal\/Natalie-and-Alan-Jan07_sm.jpg\" width=\"670\" height=\"467\"\nalt=\"Photo-calendar created with Jeffrey's Photoshop Calendar-Building Script\n(https:\/\/regex.info\/blog\/photo-tech\/calendar\/)\"\nid=\"iNatalie_and_Alan_Jan07\"\nstyle=\"border:solid 15px black\"\ntitle=\"Photo-calendar created\nwith Jeffrey's Photoshop Calendar-Building Script\n(https:\/\/regex.info\/blog\/photo-tech\/calendar\/)\"\/><\/a> <br\/><span\nstyle='font-size:175%'>Calendar Built With My Photoshop\nScript<\/span><br\/><b>Landscape Mode<\/b><\/div>\n\n\n<p style='margin-top:30px; margin-bottom:30px'>(<b>This page last updated Sep 19, 2015 with pre-built PSDs for 2016 \u301c 2020.<\/b>)<\/p>\n\n<p>I've made a Photoshop JavaScript script that builds calendars. <span\nclass='nobr'>The result<\/span> of running it in Photoshop (CS2 or later) is\na Photoshop document with half a dozen or so layers that you can then tweak\nand modify, add your own image to, etc.<\/p>\n\n<p>It has a number of nice features:<\/p>\n\n<ul style='margin-top:3px'>\n  <li>It leaves the components of the calendar in separate layers, so that you can modify them at will<\/li>\n  <li>It can build calendars in English or 56 other languages<\/li>\n  <li>It supports personal annotations (holidays, birthdays, etc.)<\/li>\n  <li>It has both Landscape and Portrait modes<\/li>\n  <li>It can include week numbers (two different week-number standards are supported)<\/li>\n  <li>You can have weeks begin on Sunday or Monday<\/li>\n  <li>The calendar is built specifically for the paper size you select<\/li>\n  <li>You can configure much more by editing the script itself<\/li>\n<\/ul>\n\n<p>Details follow below, but first, for your downloading pleasure...<\/p>\n\n<div style='border: solid 1px gray; width:70%; padding:15px 30px; margin: 25px auto 25px auto'>\n  <p style='margin-top:30px; margin-bottom:50px'><b>Download Photoshop Calendar-Building Script<\/b>\n  <br\/>\n  Version 10: <a class='quiet' href=\"\/Jeffrey%27s%20Calendar%20Builder.jsx\">Jeffrey's Calendar Builder.jsx<\/a>\n  &nbsp;  &nbsp;  &nbsp; <small>(<a href='#history' class='quiet'>version history<\/a>)<\/small>\n  <\/p>\n\n  <p>\n     <b>Pre-built zip archives of sample PSD files (at 300 DPI)<\/b>\n     <br\/>\n     <small>(In case you don't want to &mdash; or can't &mdash; run the script)<\/small>\n  <\/p>\n\n\n\n\n  <p style='margin-bottom:0'>2017<\/p>\n  <ul style='font-size:90%;margin-top:0'>\n  <li><a href='\/i\/cal\/US-L-Sun-Calendar_2017.zip'  class='quiet'>US Letter Paper, Landscape, week starts on Sunday<\/a><\/li>\n  <li><a href='\/i\/cal\/US-P-Sun-Calendar_2017.zip'  class='quiet'>US Letter Paper, Portrait, week starts on Sunday<\/a><\/li>\n  <li><a href='\/i\/cal\/A4-L-Sun-Calendar_2017.zip'  class='quiet'>A4 Paper, Landscape, week starts on Sunday<\/a><\/li>\n  <li><a href='\/i\/cal\/A4-P-Sun-Calendar_2017.zip'  class='quiet'>A4 Paper, Portrait, week starts on Sunday<\/a><\/li>\n  <li><a href='\/i\/cal\/A4-L-Mon-Calendar_2017.zip'  class='quiet'>A4 Paper, Landscape, week starts on Monday<\/a><\/li>\n  <li><a href='\/i\/cal\/A4-P-Mon-Calendar_2017.zip'  class='quiet'>A4 Paper, Portrait, week starts on Monday<\/a><\/li>\n  <\/ul>\n\n  <p style='margin-bottom:0'>2018<\/p>\n  <ul style='font-size:90%;margin-top:0'>\n  <li><a href='\/i\/cal\/US-L-Sun-Calendar_2018.zip'  class='quiet'>US Letter Paper, Landscape, week starts on Sunday<\/a><\/li>\n  <li><a href='\/i\/cal\/US-P-Sun-Calendar_2018.zip'  class='quiet'>US Letter Paper, Portrait, week starts on Sunday<\/a><\/li>\n  <li><a href='\/i\/cal\/A4-L-Sun-Calendar_2018.zip'  class='quiet'>A4 Paper, Landscape, week starts on Sunday<\/a><\/li>\n  <li><a href='\/i\/cal\/A4-P-Sun-Calendar_2018.zip'  class='quiet'>A4 Paper, Portrait, week starts on Sunday<\/a><\/li>\n  <li><a href='\/i\/cal\/A4-L-Mon-Calendar_2018.zip'  class='quiet'>A4 Paper, Landscape, week starts on Monday<\/a><\/li>\n  <li><a href='\/i\/cal\/A4-P-Mon-Calendar_2018.zip'  class='quiet'>A4 Paper, Portrait, week starts on Monday<\/a><\/li>\n  <\/ul>\n\n  <p style='margin-bottom:0'>2019<\/p>\n  <ul style='font-size:90%;margin-top:0'>\n  <li><a href='\/i\/cal\/US-L-Sun-Calendar_2019.zip'  class='quiet'>US Letter Paper, Landscape, week starts on Sunday<\/a><\/li>\n  <li><a href='\/i\/cal\/US-P-Sun-Calendar_2019.zip'  class='quiet'>US Letter Paper, Portrait, week starts on Sunday<\/a><\/li>\n  <li><a href='\/i\/cal\/A4-L-Sun-Calendar_2019.zip'  class='quiet'>A4 Paper, Landscape, week starts on Sunday<\/a><\/li>\n  <li><a href='\/i\/cal\/A4-P-Sun-Calendar_2019.zip'  class='quiet'>A4 Paper, Portrait, week starts on Sunday<\/a><\/li>\n  <li><a href='\/i\/cal\/A4-L-Mon-Calendar_2019.zip'  class='quiet'>A4 Paper, Landscape, week starts on Monday<\/a><\/li>\n  <li><a href='\/i\/cal\/A4-P-Mon-Calendar_2019.zip'  class='quiet'>A4 Paper, Portrait, week starts on Monday<\/a><\/li>\n  <\/ul>\n\n  <p style='margin-bottom:0'>2020<\/p>\n  <ul style='font-size:90%;margin-top:0'>\n  <li><a href='\/i\/cal\/US-L-Sun-Calendar_2020.zip'  class='quiet'>US Letter Paper, Landscape, week starts on Sunday<\/a><\/li>\n  <li><a href='\/i\/cal\/US-P-Sun-Calendar_2020.zip'  class='quiet'>US Letter Paper, Portrait, week starts on Sunday<\/a><\/li>\n  <li><a href='\/i\/cal\/A4-L-Sun-Calendar_2020.zip'  class='quiet'>A4 Paper, Landscape, week starts on Sunday<\/a><\/li>\n  <li><a href='\/i\/cal\/A4-P-Sun-Calendar_2020.zip'  class='quiet'>A4 Paper, Portrait, week starts on Sunday<\/a><\/li>\n  <li><a href='\/i\/cal\/A4-L-Mon-Calendar_2020.zip'  class='quiet'>A4 Paper, Landscape, week starts on Monday<\/a><\/li>\n  <li><a href='\/i\/cal\/A4-P-Mon-Calendar_2020.zip'  class='quiet'>A4 Paper, Portrait, week starts on Monday<\/a><\/li>\n  <\/ul>\n\n\n\n<\/div>\n\n\n<div class='img_right' style='padding-bottom:0; margin-bottom:0; text-align:center'><a href='\/i\/CalV2PortSample.jpg' ><img loading=\"lazy\" decoding=\"async\" src=\"\/i\/CalV2PortSample_sm.jpg\" width=\"405\" height=\"530\"\nalt=\"Photo-calendar created\nwith Jeffrey's Photoshop Calendar-Building Script\n(https:\/\/regex.info\/blog\/photo-tech\/calendar\/)\"\nid=\"ism\"\nstyle=\"border:solid 5px black\"\ntitle=\"Photo-calendar created\nwith Jeffrey's Photoshop Calendar-Building Script\n(https:\/\/regex.info\/blog\/photo-tech\/calendar\/)\"\/><\/a><br\/><span class=\"robots-nocontent\" style='color:#BBB; font-size:85%'> <a\nclass='quiet' style='color:#77B'\nhref='\/imageinfo.cgi?url=http%3A%2F%2Fregex.info%2Fi%2FCalV2PortSample.jpg'>full\nexif &amp; map<\/a><\/span><br\/><span style='font-size:120%'>Portrait Mode<\/span><\/div>\n\n<p style='margin-top:0' class='h'>Overview<\/p>\n\n<p>The script, which runs on Photoshop CS2 or later, should work the same on\nboth Windows and Mac, although I'll show screenshots of it with\nWindows.<\/p>\n\n<p>Running the script brings up a dialog which allows for calendar\nconfiguration (page size, etc.), but a copy of the script can be edited\nitself for fine-tuned control over fonts, sizes, margins, etc. <span class='nobr'>The result<\/span> of the script is a Photoshop document with a dozen or so layers, which can\nthen be modified\/tweaked.<\/p>\n\n<p>My goal in building this was to make landscape-mode loose-leaf calendars\nthat my wife and I can use for our daily\/weekly schedules (e.g.\n&#8220;preschool field trip is tomorrow&#8221;, &#8220;such-and-such a\nfriend visiting on Sunday&#8221;, etc.). As such, <span class='nobr'>I want something<\/span> that is\na calendar when viewed up close.... yet, when viewed from afar, it's art.\nThat's the goal, at least.<\/p>\n\n<p style='margin-top:0; clear:both' class='h'>Installing and Invoking<\/p>\n\n<p>You can install\/invoke the script in two ways:<\/p>\n\n<ol><li><p>Download the script file, <a\nhref=\"\/Jeffrey%27s%20Calendar%20Builder.jsx\">Jeffrey's\nCalendar Builder.jsx<\/a>, to a convenient place, such as your desktop, then\nclick on it. <span class='nobr'>It should<\/span> launch Photoshop if it's not already running, and\nswitch to it. (If it doesn't, right-click on the script file and\n&#8220;Open with&#8221; Photoshop.)<\/p>\n\n<p><b>or,<\/b><\/p>\n<\/li>\n\n<li><p>Install the script file to your Photoshop <b>Scripts<\/b>\nfolder. <span class='nobr'>On my Windows<\/span> machine, my CS4 folder is:<\/p>\n\n  <pre style='white-space:nobreak;margin-left:5em'>\\Program Files\\Adobe\\Adobe Photoshop CS4\\Presets\\Scripts\\<\/pre>\n\n<p>on the root drive. (After installing or renaming any file here, be sure\nto restart Photoshop if it had been open.)\n\n<\/p><p style='margin-top:20px'>\n\nThen, you can invoke the script from within Photoshop's <b>File &gt;\nScripts<\/b> menu item:<\/p>\n\n<div class='ic'><img loading=\"lazy\" decoding=\"async\" src=\"\/i\/cal\/photoshop-script-invoke.gif\" width=\"470\" height=\"446\"\nalt=\"How to invoke a JavaScript script from within Photoshop\"\nclass=\"raw\"\nid=\"iphotoshop_script_invoke\"\ntitle=\"How to invoke a JavaScript script from within\nPhotoshop\"\/><\/div>\n\n      <\/li> <\/ol>\n\n\n<p class='h' id='dialog'>Simple Calendar-Building with the Dialog<\/p>\n\n<p>When executed, you are prompted for details on the calendar to be\nmade:<\/p>\n\n<div class='ic'><img loading=\"lazy\" decoding=\"async\" src=\"\/i\/cal\/calendar-dialog-v8.png\" width=\"550\" height=\"631\"\nalt=\"Calendar-creation dialog from Jeffrey's\nCalendar-Building Photoshop script\n(https:\/\/regex.info\/blog\/photo-tech\/calendar\/)\"\nclass=\"raw\"\nid=\"icalendar_dialog_v3\"\ntitle=\"Calendar-creation dialog from Jeffrey's Calendar-Building Photoshop\nscript (https:\/\/regex.info\/blog\/photo-tech\/calendar\/)\"\/><\/div>\n\n<br\/>\n\n<div class=\"img_right\">\n<img loading=\"lazy\" decoding=\"async\" src=\"\/i\/cal\/layers-raw.gif\" width=\"232\" height=\"431\"\nalt=\"Photoshop Layers pallete showing the result of building a calendar\nwith Jeffrey's Calendar-Building Photoshop script\n(https:\/\/regex.info\/blog\/photo-tech\/calendar\/)\"\nclass=\"raw\"\nid=\"ilayers_raw\"\nnoindex=\"noindex\"\nstyle=\"margin-top:0; padding-top:0; margin-left: 3em\"\ntitle=\"Photoshop Layers pallete showing the result of building a calendar\nwith Jeffrey's Calendar-Building Photoshop script\n(https:\/\/regex.info\/blog\/photo-tech\/calendar\/)\"\/><\/div>\n\n<p style='margin-top:0'>At its most simple, just select the target year and month (or select the\nmonth &#8220;All&#8221; to build 12 separate calendars), adjust the calendar style\nsettings and the paper size to your liking, and press the &#8220;Okay&#8221; button.<\/p>\n\n<p>The script will churn away a bit, building the calendar in a new\ndocument, leaving you with a dozen or so layers like those shown at\nright.<\/p>\n\n<p>Layers making up the calendar include text layers for the month and year\ntext, rasterized layers with text for the names of the days of the week\n(&#8220;<b>Sun-Sat<\/b>&#8221; in the example at right) and dates\n(&#8220;<b>1-31<\/b>&#8221; in the example), and the calendar grid.<\/p>\n\n<p>The look and feel of the calendar can be changed greatly just by\nadjusting the style and opacity of the various layers. Small changes can\nhave large effects on the result. Play around. (If you come across a result\nyou really like, please tell me about it.)<\/p>\n\n<p class='h2'>Inserting a Picture<\/p>\n\n<p>There's an empty layer named &#8220;<b>Paste Your Photo Here<\/b>&#8221; which is\nwhere, of course, you should place the photo you want to use. Actually, it\nneedn't be on <i>that<\/i> layer, but simply within the &#8220;<b>Picture\nMask<\/b>&#8221; layerset, as the mask provides a pleasing (to me, at least) drop\noff toward white all around the edges.<\/p>\n\n<p>As a shorthand, if you have an image open in Photoshop when you invoke\nthe script, it will be placed within the &#8220;Paste Your Photo\nHere&#8221; calendar layer, resized so that it fully fills the canvas. This\nworks only when the already-open document has just a single layer. <span class='nobr'>If you don<\/span>'t care for the automatic resize, you can just delete the layer and\nreplace it with one you like.<\/p>\n\n<p>In any case, once you drop in your picture and move\/resize to suit your\ntaste, by all means, adjust the mask as well. Sometimes it works well when\nthe image extends all the way to the edge, and sometimes it's better to\nreduce the image to the center only.<\/p>\n\n<p class='h2'>Attribution and Description<\/p>\n\n<p>There's an &#8220;<b>attrib<\/b>&#8221; layer with an attribution for the calendar. <span class='nobr'>The script<\/span> puts the url for this page there, but you'll likely want to\nchange that to your home page, a copyright notice for the image, etc. <span class='nobr'>Or perhaps<\/span> just get rid of it. <span class='nobr'>It's up to<\/span> you.<\/p>\n\n<p>There's also an &#8220;<b>Image Description<\/b>&#8221; text layer whose\nvisibility defaults to off. <span class='nobr'>It's just one<\/span> idea for an image-description\nnote: replace its text with an image description or any text of your\nchoosing (I used &#8220;Natalie and Alan, July 14, 2006&#8221; in the first\nexample above) and make it visible. It'll show up in the lower-right of the\nimage.<\/p>\n\n<p class='h2'>Copyright<\/p>\n\n<p>You own the copyright for any calendar you make. <span class='nobr'>I own the<\/span> copyright on\nthe script, but not on its output. <span class='nobr'>You can change<\/span> the output &mdash; the\ndocument the script creates &mdash; in any way you like.<\/p>\n\n<p>Of course, if you add a photo to the calendar, as with the use of any\nimage, be sure you're allowed the use the image.<\/p>\n\n<p class='h'>Options<\/p>\n\n<p>Some of the items in the dialog are not necessarily self explanatory, so\nI'll go over them here...<\/p>\n\n<p class='h2'>Language<\/p>\n\n<p>Choose English for the month and day names, or select from among:\nAfrikaans, Albanian, Amharic, Arabic, Armenian, Basque, Belarusian, Bosnian,\nBulgarian, Catalan, Chinese, Cornish, Croatian, Czech, Danish, Dutch, Estonian,\nFinnish, French, German, Greek, Gujarati, Haitian Creole, Hawaiian, Hebrew, Hindi,\nHungarian, Icelandic, Indonesian, Irish Gaelic, Italian, Japanese, Korean, Latin,\nLatvian, Lithuanian, Luxembourgish, Maori, Norwegian, Polish, Portuguese, Romanian, Romansh,\nRussian, Scots, Serbian, Slovak, Slovenian, Spanish, Swedish, Tamil, Thai, Tok Pisin,\nTurkish, Ukrainian, Vietnamese, or Welsh.<\/p>\n\n<p>I pulled most of the language data from <a\nhref='http:\/\/www.domesticat.net\/misc\/monthsdays.php'>this page<\/a>, and had\nto take a guess at what font to apply for many of them. I don't even know\nwhether some of those are real languages. Please let me know if you run\ninto troubles.<\/p>\n\n<p class='h2'>Week Numbers<\/p>\n\n<p>I guess it's popular in some parts of the world to annotate a calendar\nwith <a href='http:\/\/en.wikipedia.org\/wiki\/Week#Week_number'>week\nnumbers<\/a>, but I'd never heard of the idea until <a\nhref='\/blog\/photo-tech\/calendar\/#comment-8871'>someone\nrequested it<\/a>. <span class='nobr'>It turns<\/span> out that there are two common but conflicting\nways to count weeks:<\/p>\n\n<ol style='margin-top:3px'>\n<li>the common-sense approach (&#8220;Week 1&#8221; is the week with\nJanuary 1<sup>st<\/sup> in it)<\/li>\n\n<li>the <a href='http:\/\/en.wikipedia.org\/wiki\/ISO8601'>ISO 8601<\/a> standard (&#8220;Week 1&#8221;\nis the week with the first Thursday of the year in it)<\/li>\n<\/ol>\n\n<p>In the dialog, the selection for <b>Show Week Numbers<\/b> can be changed\nfrom &#8220;No&#8221; to &#8220;at Left&#8221; or &#8220;at Right,&#8221;\nto indicate that you want week numbers and where the extra column should be\nplaced. <span class='nobr'>You can also<\/span> select between the two methods for counting weeks.<\/p>\n\n<p class='h2'>Image Orientation<\/p>\n\n<p>Image orientation does not refer to how you load the paper in the\nprinter, but to what style of calendar to make. <span class='nobr'>The example<\/span> at the top from\nmy brother's wedding is in Landscape style. <span class='nobr'>The example<\/span> with my little boy\nis in Portrait mode.<\/p>\n\n<p class='h2'>Annotations<\/p>\n\n<p>Annotations (adding holidays, birthdays, etc.) are covered in a <a href='#Annotations'>later section<\/a>.<\/p>\n\n<p class='h2'>Rasterize &amp; Merge Most Text Layers<\/p>\n\n<p>This option is turned on by default, and compresses the many individual\ndate-number layers (&#8220;1&#8221;, &#8220;2&#8221;, ... &#8220;31&#8221;) into one layer by rasterizing and merging. <span class='nobr'>The same grouping<\/span> is done for the day names (&#8220;Monday&#8221;, &#8220;Tuesday&#8221;...) and the week numbers,\nif you've requested them.<\/p>\n\n<p>The advantage to this is that you can then adjust the look and feel of\nall the dates (or days or week numbers) at once by adjusting the style of\nthe merged layer.<\/p>\n\n<p>The disadvantage is that you can't adjust the font or size of the text,\nor other text-specific things, because the individual text layers no longer\nexist.<\/p>\n\n<p>Thus, by unchecking this option, you can choose to leave the individual\ntext layers intact. When this is done, they're put into their own group to\nreduce visual clutter in the Layer pallet.<\/p>\n\n<p class='h2'>Auto Save<\/p>\n\n<p>When auto-save is turned on, the newly-created document or documents are\nautomatically saved to files. The <b>Directory<\/b> element indicates where\nthey should be saved to, while the <b>PSD Filename Pattern<\/b> indicates\nhow the files should be named.<\/p>\n\n<p>Within the filename pattern, the sequences &#8220;<b>MM<\/b>&#8221; and\n&#8220;<b>YYYY<\/b>&#8221; are replaced by the month and year numbers of the\ncalendar (two and four digits each, respectively). For example, with a\npattern of &#8220;Calendar_YYYY_MM&#8221;, the calendar for April 2013 will\nbe named &#8220;Calendar_2013_04.PSD&#8221;.<\/p>\n\n<p class='h2'>Saving your Config<\/p>\n\n<p>If you tend to always want options that differ from the defaults\n(different language, paper size, etc.), then set them as you like and press\nthe &#8220;Save&#8221; button in the &#8220;Default Configuration&#8221; section of the dialog. <span class='nobr'>It writes<\/span> your selections to a file that's read automatically when the script\nstarts.<\/p>\n\n<p>Pressing the &#8220;Delete&#8221; button deletes that file, so you end up with the\nas-downloaded set of defaults. For safety, you have to first check a box to\nenable the delete button.<\/p>\n\n<p class='h'>Printing<\/p>\n\n<p>Because some layers are rasterized, it's best if you can print at\nexactly 100%, with no resizing. This should be automatic if you select the\nproper paper size, DPI, and reasonable page margins.<\/p>\n\n<p style='margin-bottom:20px'>I have a <a\nhref='http:\/\/www.usa.canon.com\/consumer\/controller?act=ModelDetailAct&amp;fcategoryid=116&amp;modelid=13799'>Canon\nXP810<\/a>, and find that Canon's &#8220;High-Resolution Photo Matte Paper&#8221; <b><a\nhref='http:\/\/www.amazon.com\/gp\/product\/B0000721Z3'>MP-101<\/a><\/b> to be\nperfect. <span class='nobr'>It looks<\/span> and feels like normal printer paper, albeit of a bit\nheavier stock. It's 100% Matte &mdash; not a bit of glossy, so you can\nwrite on it with a pencil or pen.<\/p>\n\n\n<p class='h'><a name='Annotations'>Annotations<\/a><\/p>\n\n<p>You can have the script add annotations to certain dates, based upon\nlists found in external files. <span class='nobr'>The support<\/span> for annotations is rudimentary\nat best, but it's useful for marking holidays, birthdays, and other dates\nthat might be important to you.<\/p>\n\n<p>When annotations are turned on, the script reads an annotation file (the\ndefault for a 2010 calendar, for example, is &#8220;CalendarData2010.txt&#8221; in your\nhome directory). Here's an example:<\/p>\n\n\n<pre>\n  [FontColor=0%,0%,100%] # use blue for the annotation text\n\n  # Holidays that are on the same date every year\n  01-01  New Year's Day\n  02-14  St. Valentine's Day\n  12-31  New Year's Eve\n\n  # 2010 version for items with floating dates\n  2010-03-07  Daylight Saving Time Starts&gt;BR&lt;(clocks ahead 1 hour)\n  2010-05-09  Mother's Day\n  2010-06-20  Father's Day\n  2010-11-07  Daylight Saving Time Ends&gt;BR&lt;(clocks back 1 hour)\n<\/pre>\n\n<p>The basic format is fairly simple:<\/p>\n\n<ul>\n  <li style='margin-bottom:10px'>Blank lines and lines beginning with  &#8220;<b>#<\/b>&#8221; are ignored.<\/li>\n  <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.\n       (You can use &#8220;<b>\/<\/b>&#8221; or &#8220;<b>-<\/b>&#8221; as the separator in the date.)<\/li>\n  <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>\n  <li style='margin-bottom:10px'>Annotation lines may prefixed with special &#8220;<b>[<\/b>...<b>]<\/b>&#8221; settings, as described below.<\/li>\n<\/ul>\n\n<p>Dates without a year apply to a calendar of any year, while those with a\nyear apply only to calendars made for that year. This allows you to add\nyear-specific items to the annotation file without worrying that they might\nshow up on a different year's calendar.<\/p>\n\n<p class='h2'>Special &#8220;[...]&#8221; Annotation Settings<\/p>\n\n<p>The following special &#8220;[...]&#8221; settings may be prepended to\nan annotation line, or, as we'll seen in a bit, stand on their own to apply\nto all subsequent lines....<\/p>\n\n<div class='ii1'><b>[FontSize=<\/b><i>num<\/i><b>%]<\/b><\/div>\n<div class='ii2'>\nChanges the font size of the annotation, relative to the default. For example,\n<pre style='width:41em'>\n   [FontSize=200%]  2\/30  My Birthday!\n   [FontSize=50%]   7\/27  Mother-in-law's Birthday\n<\/pre>\n<\/div>\n\n<div class='ii1'><b>[FontName=<\/b><i>name<\/i><b>]<\/b><\/div>\n<div class='ii2'>\n\n<p>Changes the font for the annotation to the one whose name is given. <span class='nobr'>You must use<\/span> Photoshop's internal name for the font, which is often not\napparent from the name presented in the font dialog. <span class='nobr'>See my post<\/span> on\n<a href='\/blog\/2007-09-26\/583'>discovering Photoshop internal font names<\/a> for the name to use here for any given font.<\/p>\n\n<p>Here's an example showing a Japanese holiday:<\/p>\n\n<pre style='width:41em'>\n   [FontName=MS-Mincho]  05\/05 \u3053\u3069\u3082\u306e\u65e5\n<\/pre>\n\n<p>By the way, be sure to use the ASCII or UTF-8 character encodings for the file.<\/p>\n\n<\/div>\n\n<div class='ii1'><b>[FontColor=<\/b><i>red<\/i><b>,  <\/b><i>green<\/i><b>,  <\/b><i>blue<\/i><b>]<\/b><br\/>\n         <b>[FontColor=<\/b><i>red<\/i><b>%, <\/b><i>green<\/i><b>%, <\/b><i>blue<\/i><b>%]<\/b><\/div>\n\n<div class='ii2'>Sets the color of the annotation font, as an RGB setting. <span class='nobr'>The default<\/span> is black (0,0,0 or 0%,0%,0%). <span class='nobr'>You can use<\/span> percents (with each\nnumber ranging from 0% to 100%) or the more traditional raw values, where\nthe numbers range from 0 to 255. For example:\n\n<pre style='width:41em'>\n   [FontColor=100%,0%,0%] 6-18  Red Letter Day!\n   [FontColor=255,0,0]   11-22  Also a red-letter day\n   [FontColor=0,100%,0]  03\/17  St. Patrick's Day\n<\/pre>\n<\/div>\n\n<div class='ii1'><b>[FontOpacity=<\/b><i>num<\/i><b>%]<\/b><\/div>\n<div class='ii2'>\n       Sets the font opacity (100% is normal, 0% is invisible).\n<\/div>\n\n<p>If these special settings appear on a line without annotation data, as\nthe first <b>FontColor<\/b> line in the example at the top of this section,\nthe setting applies to all subsequent lines.<\/p>\n\n<p>This example shows three holidays to be printed in red:<\/p>\n\n<pre>\n   [FontColor=100%,0%,0%] 2010-04-04  Easter\n   [FontColor=100%,0%,0%]      10\/01  All Saint's Day\n   [FontColor=100%,0%,0%]      12\/25  Christmas\n<\/pre>\n\n<p>The following is just about the same:<\/p>\n\n<pre>\n   [FontColor=100%,0%,0%]\n   2010-04-04  Easter\n        10\/01  All Saint's Day\n        12\/25  Christmas\n<\/pre>\n\n<p>except that the any lines that might be subsequently added to the end\nwill also get the red font. This last point brings up the idea of\ncontexts....<\/p>\n\n<p class='h2'>Annotation Contexts<\/p>\n\n<p>You can surround a group of settings and annotations with <span\nclass='bold-smallcaps'>&lt;CONTEXT&gt;<\/span> ... <span\nclass='bold-smallcaps'>&lt;<span style='margin-left: 3px; margin-right: 2px'>\/<\/span>CONTEXT&gt;<\/span> to isolate any settings made\nwithin the group from applying after the group.<\/p>\n\n<pre>\n   [FontColor=100%,0%,0%] 2010-04-04  Easter\n   [FontColor=100%,0%,0%]      10\/01  All Saint's Day\n   [FontColor=100%,0%,0%]      12\/25  Christmas\n   2010-02-17  Ash Wednesday\n<\/pre>\n\n<p>has &#8220;Ash Wednesday&#8221; printed in the default black, exactly the same as:<\/p>\n\n<pre>\n   &lt;CONTEXT&gt;\n       [FontColor=100%,0%,0%]\n       2010-04-04  Easter\n            10\/01  All Saint's Day\n            12\/25  Christmas\n   &lt;\/CONTEXT&gt;\n   2010-02-17  Ash Wednesday\n<\/pre>\n\n<p>This might be convenient for clarity when you have various sections of\ngrouped entries...<\/p>\n\n<pre class='anno'>\n   # US Federal holidays are in red, with a small font\n   &lt;CONTEXT&gt;\n       [FontColor=100%,0%,0%]\n       [FontSize=80%]\n       2010-05-31  Memorial Day\n            07-04  Independence Day\n       2010-09-06  Labor Day\n       2010-10-11  Columbus Day\n       2010-11-11  Veterans Day\n       2010-11-25  Thanksgiving\n   &lt;\/CONTEXT&gt;\n\n   # Japanese holidays need their special font\n   &lt;\/CONTEXT&gt;\n      [FontName=MS-Mincho]\n      01\/01 \u5143\u65e5\n      05\/05 \u3053\u3069\u3082\u306e\u65e5\n      12\/23 \u5929\u7687\u8a95\u751f\u65e5\n   &lt;\/CONTEXT&gt;\n\n   # Birthdays are noted quietly\n   &lt;\/CONTEXT&gt;\n      [FontOpacity=30%]\n      [FontSize=80%]\n       4\/12 David Letterman's birthday\n       4\/15 Dave Filo's birthday\n      12\/06 Steven Wright's birthday\n   &lt;\/CONTEXT&gt;\n<\/pre>\n\n\n\n<p class='h2'>Importing and Including Annotation Data<\/p>\n\n<p>Within your annotation-data file you can have <b>import<\/b> and <b>include<\/b> lines like:<\/p>\n<pre>\n   INCLUDE \"<i>filename<\/i>\"\n   IMPORT  \"<i>filename<\/i>\"\n<\/pre>\n\n<p>Both allow you to reference annotations in other files, with the\ndifference being that <span class='bold-smallcaps'>INCLUDE<\/span> does not\nremember any settings changed in the file, while <span\nclass='bold-smallcaps'>IMPORT<\/span> does. Consider this example:<\/p>\n\n<pre>\n  INCLUDE \"US-Holidays-2010.txt\"\n  INCLUDE \"US-Family-Birthdays.txt\"\n\n  IMPORT \"My-Favorite-Japanese-Settings.txt\"\n\n  INCLUDE \"Japanese-Holidays-2010.txt\"\n  INCLUDE \"Japan-Family-Birthdays.txt\"\n<\/pre>\n\n<p><span class='bold-smallcaps'>IMPORT<\/span> is used for the Japanese\nSettings file (font changes, etc.) so that those changes remain and apply\nto subsequent lines (those found in the two <span\nclass='bold-smallcaps'>INCLUDE<\/span> files that follow).<\/p>\n\n<p>This allows you to create sets of annotations that you can then easily\nmix and match when creating specific calendars. <span class='nobr'>I use different<\/span> sets of\nfiles depending on whether I'm making a calendar for myself, my folks (who\ndon't read Japanese), or my Japanese-speaking in-laws.<\/p>\n\n<p class='h2'>More on File Management<\/p>\n\n<p>To make it easier to reuse annotation files year after year, you can put\nthe year in an individual entry's date so that it is safely ignored when\ncreating a calendar for a different year.<\/p>\n\n<p>You can also segregate items into different files, putting year-specific\nannotations into files with the year in the name.<\/p>\n\n<p>In filenames provided on include\/import lines and in the script's\nconfiguration dialog where you provide the annotation-data filename, any\nset of four upper-case 'Y' in a row are replaced by the target year for the\ncalendar. <span class='nobr'>The default<\/span> filename is &#8220;CalendarData<b>YYYY<\/b>.txt&#8221; which means\nthat &#8220;CalendarData<b>2010<\/b>.txt&#8221; is actually read for a 2010calendar.<\/p>\n\n<p>The previous import\/include example would be better written with that in\nmind, so that year-specific annotation files are read only when creating a\ncalendar for the appropriate year:<\/p>\n\n\n<pre>\n  INCLUDE \"US-Holidays-<b>YYYY<\/b>.txt\"\n  INCLUDE \"US-Family-Birthdays.txt\"\n\n  IMPORT \"My-Favorite-Japanese-Settings.txt\"\n\n  INCLUDE \"Japanese-Holidays-<b>YYYY<\/b>.txt\"\n  INCLUDE \"Japan-Family-Birthdays.txt\"\n<\/pre>\n\n<p class='h2'>Sample Annotation Data<\/p>\n\n<p>Here are sample annotation-data files with some US holidays to get you\nstarted:<\/p>\n\n<p style='margin-left:3em'>\n\n     <a class='quiet' href='\/i\/cal\/CalendarDataUS2015.txt'>CalendarDataUS2015.txt<\/a><br\/>\n     <a class='quiet' href='\/i\/cal\/CalendarDataUS2016.txt'>CalendarDataUS2016.txt<\/a><br\/>\n     <a class='quiet' href='\/i\/cal\/CalendarDataUS2017.txt'>CalendarDataUS2017.txt<\/a><br\/>\n     <a class='quiet' href='\/i\/cal\/CalendarDataUS2018.txt'>CalendarDataUS2018.txt<\/a><br\/>\n     <a class='quiet' href='\/i\/cal\/CalendarDataUS2019.txt'>CalendarDataUS2019.txt<\/a><br\/>\n     <a class='quiet' href='\/i\/cal\/CalendarDataUS2020.txt'>CalendarDataUS2020.txt<\/a><br\/>\n<\/p>\n\n<p style='margin-bottom:20px'>You can find lots of info on holidays for\ncountries, religions, and cultures around the world at <a\nhref='http:\/\/www.timeanddate.com\/calendar\/'>TimeAndDate.com<\/a>, and, of course,\n<a href='http:\/\/en.wikipedia.org\/wiki\/2010'>at Wikipedia<\/a>.<\/p>\n\n\n<!--TECH-->\n<div class=\"robots-nocontent\" style=\"border: 2px solid #FF8080;\n            float: right;\n            padding: 0 1em 1em 1em;\n            margin: 10px 0 1em 1em;\n            display: inline;\">\n<p style='white-space: nowrap'><b>My Tech-Related Photography Posts<\/b><\/p>\n<ul style='margin:0; font-size:80%'>\n  <li><a href='\/blog\/lightroom-goodies\/ipad-howto2'>My Lightroom-to-iPad Workflow<\/a><\/li>\n  <li><a href='\/blog\/lightroom-goodies\/'>Lightroom Goodies<\/a> (lots of plugins)<\/li>\n  <li><a href='\/blog\/photo-tech\/color-spaces-page1\/'>Digital Image Color Spaces<\/a><\/li>\n  <li><a href='\/blog\/other-writings\/online-exif-image-data-viewer\/'>Online Exif (Image Data) Viewer<\/a><\/li>\n  <li><a href='\/blog\/photo-tech\/focus-chart\/'>Jeffrey's Autofocus Test Chart<\/a><\/li>\n  <li><a href='\/blog\/photo-tech\/calendar\/'>Photoshop Calendar-Template-Building Script<\/a><\/li>\n  <li><a href='\/blog\/lightroom-goodies\/ipad-howto'>How to Prepare Photos for an iPad<\/a><\/li>\n  <li><a href='\/blog\/photo-tech\/nef-compression\/'>A Qualitative Analysis of NEF Compression<\/a><\/li>\n  <li><a href='\/blog\/2007-08-24\/554'>Tripod Stability Tests<\/a><\/li>\n<\/ul>\n<p style='font-size:85%; margin:10px 0 0 0'><a href=\"\/blog\/photo-tech\/\">more<\/a>...<\/p>\n<\/div>\n<!--\/TECH-->\n\n<p style='margin-top:0' class='h'>Future<\/p>\n\n<p>It's a bit more full-featured than earlier versions, but it still has a\nways to go. Some enhancements I can think of:<\/p>\n\n<ul>\n  <li>Better font control.<\/li>\n  <li>Putting the small previous-month \/ next month calendars in there somewhere.<\/li>\n  <li>Add a variety of layout options.<\/li>\n<\/ul>\n\n<p>Let me know what you think.<\/p>\n\n<p>I can't help wondering whether there's a feature of Photoshop whereby I\ncould leave all the text unrasterized, yet allow one-stop tweaking of fonts\nand margins. With my understanding as it is now, if all the date numbers\nare left as individual text layers, each must be visited individually to,\nsay, change the font. If there's a simple solution to this, please let me\nknow.<\/p>\n\n<p>At least with this script, you can make the change in the script, just\nonce, and then run it.<\/p>\n\n<p><b>Enjoy<\/b>.<\/p>\n\n<hr width='60%' align='left'\/>\n\n<p class='h'><a name='history'>Version History<\/a><\/p>\n\n<style type=\"text\/css\">\ntd.td1 { margin-top: 5px; white-space: nowrap }\ntd.td2 { margin-top: 5px; border: solid 1px #BBB; padding: 5px 1em }\n<\/style>\n\n<table cellspacing='5' cellpadding='0' border='0'>\n\n<tr valign='baseline'><td class='td1'><b>Version 10<\/b><br\/><small>Sep 1, 2013<\/small><\/td>\n<td class='td2'>\n<p>Fixed a misspelling in the dialog.<\/p>\n<\/td><\/tr>\n\n\n<tr valign='baseline'><td class='td1'><b>Version 9<\/b><br\/><small>Nov 2, 2012<\/small><\/td>\n<td class='td2'>\n<p>Updated the Hebrew translations. Fixed a bug in the processing of the calendar-data filename.<\/p>\n<\/td><\/tr>\n\n\n<tr valign='baseline'><td class='td1'><b>Version 8<\/b><br\/><small>Nov 22, 2010<\/small><\/td>\n<td class='td2'>\n<p>Turns out that a month could end up being a day short if daylight savings time ends on the last day of the month (as it does in Norway in 10\/2011).\nThanks to Arve Hansen for the fix.<\/p>\n<\/td><\/tr>\n\n\n<tr valign='baseline'><td class='td1'><b>Version 7<\/b><br\/><small>Jan 22, 2010<\/small><\/td>\n<td class='td2'>\n<p>Added support for Lithuanian. Tidied up the opening dialog a bit.<\/p>\n<\/td><\/tr>\n\n\n<tr valign='baseline'><td class='td1'><b>Version 6<\/b><br\/><small>Jan 26, 2009<\/small><\/td>\n<td class='td2'>\n<p>I made these changes over a year ago, but forgot to release it as a new version. Doh!<\/p>\n<ul class='lix' style='margin-top:5px'>\n<li><p>The big change is that I added ability to put a year in a holiday line, in the form &#8220;{2009}&#8221;, and have it be replaced by the difference from that year to the calendar year. Thus, an entry like<\/p>\n<pre>\n     5\/16  Our Anniversary ({1998})\n<\/pre>\n<p>shows up on the 2009 calendar as<\/p>\n<p style='margin-left:3em'>Our Anniversary (11)<\/p><\/li>\n<li>I also fixed the default year computation: in the 2nd half of the year, it now defaults to next year.<\/li>\n<li>Added 4R paper size.<\/li>\n<li>Broke out single-number &#8220;margins&#8221; to individual top\/bottom\/right\/left margins\nThis is sort of fake in that there's no benefit to having both left and right instead\nof a generic &#8220;width&#8221;<\/li>\n<\/ul><\/td><\/tr>\n\n\n<tr valign='baseline'><td class='td1'><b>Version 5<\/b><br\/><small>Dec 24, 2007<\/small><\/td>\n<td class='td2'>\n<ul class='lix' style='margin-top:5px'>\n<li>Changes <a href='\/blog\/photo-tech\/calendar\/#comment-12768'>suggested by Ingus<\/a>: fixes to Latvian translations; handle multiple line breaks on an annotation line.<\/li><\/ul><\/td><\/tr>\n\n\n\n<tr valign='baseline'><td class='td1'><b>Version 4<\/b><br\/><small>Dec 23, 2007<\/small><\/td>\n<td class='td2'>\n<ul class='lix' style='margin-top:5px'>\n<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\n     and item spacing that I used for A4 and Letter paper. This release fixes that.<\/li>\n<\/ul><\/td><\/tr>\n\n\n<tr valign='baseline'><td class='td1'><b>Version 3<\/b><br\/><small>Oct 31, 2007<\/small><\/td>\n<td class='td2'>\n<ul class='lix' style='margin-top:5px'>\n<li>Per <a href='\/blog\/photo-tech\/calendar\/#comment-9853'>request<\/a>, <span class='nobr'>I added<\/span> A3 and A5 sized paper selections.<\/li>\n<li>Per <a href='\/blog\/photo-tech\/calendar\/#comment-9919'>request<\/a>, you can set weeks to start on any day, not just Sunday or Monday.<\/li>\n<li>Fixed the &#8220;February becomes March&#8221; bug.<\/li>\n<\/ul><\/td><\/tr>\n\n\n\n<tr valign='baseline'><td class='td1'><b>Version 3<small>b1<\/small><\/b><br\/><small>Sep 26, 2007<\/small><\/td>\n<td class='td2'>\n<ul class='lix' style='margin-top:5px'>\n<li>Can now create calendars in 58 languages.<\/li>\n<li>Added ability to display week numbers.<\/li>\n<li>Added ability to change annotation font name\/size\/color\/opacity.<\/li>\n<li>Added ability to force linebreaks in annotation text.<\/li>\n<li>Added import\/include\/&lt;context&gt; support to annotation file.<\/li>\n<li>Annotation filename specifications with &#8220;YYYY&#8221; auto-convert to the calendar's target year.<\/li>\n<li>Can now include the year in an annotation's date, and have that entry be safely ignored for other years.<\/li>\n<li>Added annotation data filename to the config dialog.<\/li>\n<li>Added tool-tips to the configuration dialog.<\/li>\n<li>Added ability to save the current configuration as the local default.<\/li>\n<li>Added ability to turn off annotations in the config dialog.<\/li>\n<li>Can now leave text layers un-rasterized and un-merged.<\/li>\n<\/ul>\n<\/td><\/tr>\n\n\n\n\n\n\n<tr valign='baseline'><td class='td1'><b>Version 2<\/b><br\/><small>Dec 15, 2006<\/small><\/td>\n<td class='td2'>\nNew features:\n<ul style='margin-top:5px'>\n  <li>Added the ability to populate the calendar with holiday\/birthdays\/etc data read from a file.<\/li>\n  <li>Added an &#8220;auto save&#8221; feature, particularly useful when generating whole-year templates for distribution.<\/li>\n<\/ul>\n\n\n<p style='margin-bottom:5px'>Bug fixes:<\/p>\n\n<ul style='margin-top:5px'>\n  <li>Fixed the &#8220;weeks start on Monday&#8221; option, which had been broken when building all months in one shot.<\/li>\n\n  <li>Fixed the pre-set margins and such for Portrait mode actually work properly (see an example above).<\/li>\n\n  <li>It now references only fonts that come standard with Photoshop (as of CS2). <span class='nobr'>I thought<\/span> that's what I'd done, but it turns out that\n      I had some other fonts (perhaps from CS1, or from other Creative-Suite programs).<\/li>\n<\/ul>\n<\/td><\/tr>\n\n<tr valign='baseline'><td class='td1'><b>Version 1<\/b><br\/><small>Dec 4, 2006<\/small><\/td>\n<td class='td2'>\nInitial Release\n<br\/>&nbsp;<br\/>&nbsp;\n<\/td><\/tr>\n<\/table>\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>I've made a Photoshop JavaScript script that builds calendars. The result of running it in Photoshop (CS2 or later) 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> 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 It supports personal annotations (holidays, birthdays, etc.) It has both Landscape and Portrait modes It can include week numbers (two different week-number [...]","protected":false},"author":1,"featured_media":0,"parent":251,"menu_order":10,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/pages\/294"}],"collection":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/comments?post=294"}],"version-history":[{"count":0,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/pages\/294\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/pages\/251"}],"wp:attachment":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/media?parent=294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}