| 1 | # indicator-lunar-calendar |
| 2 | |
| 3 | An application indicator for Unity that displays the current date and time |
| 4 | in lunar calendar. |
| 5 | |
| 6 | Copyright (c) 2016 Adrian I Lam <adrianiainlam@gmail.com> |
| 7 | |
| 8 | *Not to be confused with [indicator-lunar][1], which shows attributes and |
| 9 | ephemerides for astronomical objects.* |
| 10 | |
| 11 | [1]: https://launchpad.net/~thebernmeister/+archive/ubuntu/ppa |
| 12 | |
| 13 | ## Screenshots |
| 14 | |
| 15 | ![indicator normal][sc1] |
| 16 | Normal appearance of the indicator |
| 17 | |
| 18 | ![indicator menu][sc2] |
| 19 | Menu of the indicator, shown on click |
| 20 | |
| 21 | ![indicator with solar term][sc3] |
| 22 | Indicator showing solar term information |
| 23 | |
| 24 | Note: The conversion is calculated using timezone UTC+8 (HKT), while the clock |
| 25 | shown above is using timezone UTC+1. |
| 26 | |
| 27 | [sc1]: screenshots/sc1.png |
| 28 | [sc2]: screenshots/sc2.png |
| 29 | [sc3]: screenshots/sc3.png |
| 30 | |
| 31 | ## Dependencies |
| 32 | |
| 33 | - [Node.js][2] |
| 34 | |
| 35 | Note: node-gtk, one of this program's dependencies, requires nodejs version |
| 36 | 5 or above. |
| 37 | |
| 38 | [2]: https://nodejs.org/en/ |
| 39 | |
| 40 | - [node-gtk][3] (by @WebReflection) |
| 41 | |
| 42 | npm package: https://www.npmjs.com/package/node-gtk |
| 43 | |
| 44 | Dependencies: build-essential, git, nodejs (>= 5), gobject-introspection, |
| 45 | libgirepository1.0-dev |
| 46 | |
| 47 | Note: This package failed to build for me. I had to remove `-Werror` from |
| 48 | `cflags` in file "bindings.gyp" to get it to build. |
| 49 | |
| 50 | [3]: https://github.com/WebReflection/node-gtk |
| 51 | |
| 52 | - [lunar-calendar-zh][4] (by @roadmanfong) |
| 53 | |
| 54 | npm package: https://www.npmjs.com/package/lunar-calendar-zh |
| 55 | |
| 56 | Note: This package contains a bug which renders it useless if your computer |
| 57 | is set to a time zone which observes Daylight Saving. I have forked it and |
| 58 | fixed it in <https://github.com/adrianiainlam/LunarCalendar>. |
| 59 | |
| 60 | [4]: https://github.com/roadmanfong/LunarCalendar |
| 61 | |
| 62 | - [node-cron (cron)][5] (by @ncb000gt) |
| 63 | |
| 64 | npm package: https://www.npmjs.com/package/cron |
| 65 | |
| 66 | [5]: https://github.com/ncb000gt/node-cron |
| 67 | |
| 68 | - [node-dbus (dbus-native)][6] (by @sidorares) |
| 69 | |
| 70 | npm package: https://www.npmjs.com/package/dbus-native |
| 71 | |
| 72 | [6]: https://github.com/sidorares/node-dbus |
| 73 | |
| 74 | ## Usage |
| 75 | |
| 76 | 1. Install the dependencies listed above. |
| 77 | 2. Clone this repository. |
| 78 | 3. Add the script as a startup application. |
| 79 | 4. Run the script manually for the first time. (Alternatively, log out |
| 80 | and log in again.) |
| 81 | 5. The indicator should be shown at the top right corner, having an icon |
| 82 | that shows the year and a label that shows the month and date. |
| 83 | 6. Clicking on the indicator should result in a menu with more detailed |
| 84 | information including the time. |
| 85 | |
| 86 | ## License |
| 87 | |
| 88 | This program is released under the MIT License. For the full text of this |
| 89 | license, please refer to the file "indicator-lunar-calendar.js". |