# lunar_ical **Repository Path**: t3190687/lunar_ical ## Basic Information - **Project Name**: lunar_ical - **Description**: to generate ics file (in ical format) from lunar calendar's dates. 农历日期转换成西历后,存成 ics 档案 - **Primary Language**: Python - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-10-09 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # lunar_ical #### Description to generate ics file (in ical format) from lunar calendar's dates. 农历日期转换成西历后,存成 ics 档案 #### dependency Requires these python module. Please use `pip3 install -U icalendar` as example to install. 1. icalendar 2. typer 3. zhdate #### Usage type `lunar_ics.20w43d710_58163ab8.py --help` to show help. One example of usage is like ``` lunar_ics.20w43d710_58163ab8.py --occ 10 --sum "农历七月底" --lmon 7 --ldy 30 ``` #### Temporarily setting different timezone Environment variable `TZ` determines the timezone for the current unix session. We can temporarily set such variable for the job only, by using command `env`. For example, below is to acquire 7 o'clock in the morning in Shanghai, for 12-th month, 15-th day of lunar calendar; 腊月15. ``` env TZ=Asia/Shanghai /home/tsai/bin/lunar_ics.20w43d710_58163ab8.py --sum "臘月十五" --lmon 12 --ldy 15 --occ 4 --hour 7 ``` #### multiple days or multiple months We enhanced the feature to include multiple months and/or multiple days into the `ics` file. The usage is like `--ldy 1,15` and `--lmon 3,6,9`; that is, to connect numbers with commas. Below examples is to inject lunar days of *01 and 15*, for lunar months *9, 10, 11, and 12*, onto `Shanghai timezone`'s `8:13am` in the morning. ``` env TZ=Asia/Shanghai ~/bin/lunar_ics.20w43d710_58163ab8.py --ldy 1,15 --lmon 9,10,11,12 --sum "初一十五" --hour 8 --min 13 ```