X-Git-Url: https://adrianiainlam.tk/git/?p=indicator-lunar-calendar.git;a=blobdiff_plain;f=README.md;h=c1462cacf563536234a1ab3013c7d05ba519baad;hp=0d568a87908a526fff5d673c75c238f328642aeb;hb=95f1a19535e4a5336ff325a48199ada1998efd2f;hpb=c2c14655e4da36c46f245fe9ad421d3b290ae600 diff --git a/README.md b/README.md index 0d568a8..c1462ca 100644 --- a/README.md +++ b/README.md @@ -3,54 +3,68 @@ An application indicator for Unity that displays the current date and time in lunar calendar. -Copyright (c) 2016 Adrian I Lam +Copyright (c) 2016-2019 Adrian I Lam s/spam/me/ *Not to be confused with [indicator-lunar][1], which shows attributes and ephemerides for astronomical objects.* [1]: https://launchpad.net/~thebernmeister/+archive/ubuntu/ppa +## Screenshots + +![indicator normal][sc1] +Normal appearance of the indicator + +![indicator menu][sc2] +Menu of the indicator, shown on click + +![indicator with solar term][sc3] +Indicator showing solar term information + +Note: The conversion is calculated using timezone UTC+8 (HKT), while the clock +shown above is using timezone UTC+1. + +[sc1]: screenshots/sc1.png +[sc2]: screenshots/sc2.png +[sc3]: screenshots/sc3.png + ## Dependencies - - [Node.js][2] - - Note: node-gtk, one of this program's dependencies, requires nodejs version - 5 or above. - - [2]: https://nodejs.org/en/ - - - [node-gtk][3] (by @WebReflection) - - npm package: https://www.npmjs.com/package/node-gtk - - Dependencies: build-essential, git, nodejs (>= 5), gobject-introspection, - libgirepository1.0-dev - - Note: This package failed to build for me. I had to remove `-Werror` from - `cflags` in file "bindings.gyp" to get it to build. - - [3]: https://github.com/WebReflection/node-gtk - - - [lunar-calendar-zh][4] (by @roadmanfong) - - npm package: https://www.npmjs.com/package/lunar-calendar-zh - - Note: This package contains a bug which renders it useless if your computer - is set to a time zone which observes Daylight Saving. I have forked it and - fixed it in . - - [4]: https://github.com/roadmanfong/LunarCalendar - - - [node-cron][5] (by @ncb000gt) - - npm package: https://www.npmjs.com/package/cron - - [5]: https://github.com/ncb000gt/node-cron + - Python 3 + + - [LunarCalendarPy][lcp] (included as submodule here) + + Translated from the JavaScript [LunarCalendar][lc] library by GitHub user + @zzyss86. + + [lc]: https://github.com/zzyss86/LunarCalendar + [lcp]: https://adrianiainlam.tk/git/?p=LunarCalendarPy.git;a=summary + + - [schedule][schedule] + + Used for periodic update of the indicator. + + [schedule]: https://pypi.org/project/schedule/ + + - [dbus-python][dbus] + + Detects suspends/hibernates which would cause incorrect timings + used by schedule. + + [dbus]: https://pypi.org/project/dbus-python/ + +This indicator used to be written in JavaScript (node.js) using the +node-gtk package, but it was eventually abandoned, got replaced, +the replacement was abandoned, etc. The situation was a bit too messy +for me so I decided to just rewrite the whole thing in Python, which +would also make installation easier for most standard Ubuntus, and +would use less RAM. + ## Usage - 1. Install the dependencies listed above. - 2. Clone this repository. + 1. Install schedule and dbus-python (`pip install schedule dbus-python`). + 2. Clone this repository (`git clone --recurse-submodules git://adrianiainlam.tk/indicator-lunar-calendar.git`). 3. Add the script as a startup application. 4. Run the script manually for the first time. (Alternatively, log out and log in again.) @@ -62,4 +76,4 @@ ephemerides for astronomical objects.* ## License This program is released under the MIT License. For the full text of this -license, please refer to the file "indicator-lunar-calendar.js". +license, please refer to the file "indicator-lunar-calendar.py".