Commits

David Anderson  committed b4d8bd6

Legalify and add a quick README.

  • Participants
  • Parent commits 789cf03

Comments (0)

Files changed (4)

+License for the source code and associated tools
+================================================
+
+Copyright (c) 2007, David Anderson <dave@natulte.net>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+    * Neither the name of the software nor the names of its
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY DAVID ANDERSON ``AS IS'' AND ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL DAVID ANDERSON BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+
+License for the monogram icon (monogram.svg and derivatives)
+============================================================
+
+Copyright (c) 2007, Romain Fernique
+
+This work is licensed under the Creative Commons Attribution
+NonCommercial ShareAlike 2.0 France License. To view a copy of this
+license, visit:
+
+  http://creativecommons.org/licenses/by-nc-sa/2.0/fr/deed.en
+
+Or, send a letter to Creative Commons, 171 2nd Street, Suite 300, San
+Francisco, California, 94105, USA.
+Shire Reckoning
+===============
+
+Shire reckoning is a simple application that displays an icon in the
+system tray. When you hover over it or right-click it, it displays the
+current date by Shire reckoning, in the calendar of our dear hobbit
+friends, as imagined by John Ronald Reuel Tolkien CBE, in his Middle
+Earth universe.
+
+Technically, Shire Reckoning is written in Python, uses the standard
+Python calendar module and a little math to convert from gregorian
+year-day to Shire year-day, with appropriate handling of the hobbit
+30-day months and the 6 holidays of the year (7 in leap years). The
+calendar conversion part is a completely self-contained Python module
+that can be reused as a standalone component.
+
+The GUI module builds on the shire calendar module and uses PyGTK. In
+particular, it uses the portable systray facility available in recent
+versions of PyGTK, which means that Shire Reckoning displays properly
+on all open source desktops following the Freedesktop references on
+system tray handling (at least Gnome, KDE and Xfce, probably more), as
+well as Microsoft Windows.
+
+The source code was written by David Anderson, and is published under
+a BSD-style license. The monogram used as the systray icon is the
+monogram of David's friend Romain Fernique. It can be distributed
+under the terms of the Creative Commons
+Attribution-NonCommercial-ShareAlike contract. See LICENSE for the
+full text of the distribution terms of the code and monogram.
+
+
+
+The Road goes ever on and on
+    Down from the door where it began.
+Now far ahead the Road has gone,
+    And I must follow, if I can,
+Pursuing it with eager feet,
+    Until it joins some larger way
+Where many paths and errands meet.
+    And whither then? I cannot say.
+
+    -- J R R Tolkien
 #!/usr/bin/env python
 #
+# Copyright (c) 2007, David Anderson <dave@natulte.net>
+#
+# See the LICENSE file for distribution terms.
+#
 # Display a small icon in the status bar, with a tooltip that gives
-# the current date by Shire reckoning.
+# the current date by Shire Reckoning. See README for more
+# information.
 
 import threading
 import os
-#!/usr/bin/env python
+# Shire Reckoning calendar
+#
+# Copyright (c) 2007, David Anderson <dave@natulte.net>
+#
+# See the LICENSE file for distribution terms.
+#
+# The main class of this module is the ShireDate class. Create an
+# instance with a given gregorian year, month and day, and it will be
+# created to match the corresponding date in the Shire calendar. You
+# can then display it by stringifying the instance, or poke at
+# individual attribues: .year, .month, .day and .special_day. If month
+# and day are None, then special_day is the name of the out-of-month
+# Shire holiday. Otherwise, the day is a number and the month is the
+# string name of the month by Shire reckoning.
+#
+# If you just want today's date, you can just use the
+# ShireDate.today() class method, which returns today's date as a
+# ShireDate instance.
 
 from calendar import isleap
 from datetime import date