1 # indicator-lunar-calendar
3 An application indicator for Unity that displays the current date and time
6 Copyright (c) 2016-2019 Adrian I Lam <spam@adrianiainlam.tk> s/spam/me/
8 *Not to be confused with [indicator-lunar][1], which shows attributes and
9 ephemerides for astronomical objects.*
11 [1]: https://launchpad.net/~thebernmeister/+archive/ubuntu/ppa
15 ![indicator normal][sc1]
16 Normal appearance of the indicator
18 ![indicator menu][sc2]
19 Menu of the indicator, shown on click
21 ![indicator with solar term][sc3]
22 Indicator showing solar term information
24 Note: The conversion is calculated using timezone UTC+8 (HKT), while the clock
25 shown above is using timezone UTC+1.
27 [sc1]: screenshots/sc1.png
28 [sc2]: screenshots/sc2.png
29 [sc3]: screenshots/sc3.png
35 - [LunarCalendarPy][lcp] (included as submodule here)
37 Translated from the JavaScript [LunarCalendar][lc] library by GitHub user
40 [lc]: https://github.com/zzyss86/LunarCalendar
41 [lcp]: https://adrianiainlam.tk/git/?p=LunarCalendarPy.git;a=summary
43 - [schedule][schedule]
45 Used for periodic update of the indicator.
47 [schedule]: https://pypi.org/project/schedule/
51 Detects suspends/hibernates which would cause incorrect timings
54 [dbus]: https://pypi.org/project/dbus-python/
56 This indicator used to be written in JavaScript (node.js) using the
57 node-gtk package, but it was eventually abandoned, got replaced,
58 the replacement was abandoned, etc. The situation was a bit too messy
59 for me so I decided to just rewrite the whole thing in Python, which
60 would also make installation easier for most standard Ubuntus, and
66 1. Install schedule and dbus-python (`pip install schedule dbus-python`).
67 2. Clone this repository (`git clone --recurse-submodules git://adrianiainlam.tk/indicator-lunar-calendar.git`).
68 3. Add the script as a startup application.
69 4. Run the script manually for the first time. (Alternatively, log out
71 5. The indicator should be shown at the top right corner, having an icon
72 that shows the year and a label that shows the month and date.
73 6. Clicking on the indicator should result in a menu with more detailed
74 information including the time.
78 This program is released under the MIT License. For the full text of this
79 license, please refer to the file "indicator-lunar-calendar.py".