days_until
所属分类:编程语言基础
开发工具:Python
文件大小:0KB
下载次数:0
上传日期:2020-06-03 09:50:03
上 传 者:
sh-1993
说明: 对即将发生的事件进行倒计时。
(Count down to upcoming events.)
文件列表:
days_until/ (0, 2020-06-03)
days_until/__init__.py (0, 2020-06-03)
days_until/__main__.py (10652, 2020-06-03)
days_until/__version__.py (22, 2020-06-03)
img/ (0, 2020-06-03)
img/demo.png (528132, 2020-06-03)
setup.py (3804, 2020-06-03)
# days-until
This CLI helps you count down to upcoming events. Inspired by [`year-progress`](https://github.com/alichtman/scripts/blob/master/year-progress.sh).
## Installation and Usage
```bash
$ pip3 install days-until
$ days-until --add # The config file will be created the first time you run the program
$ days-until
```
### Options
```bash
$ days-until [OPTIONS]
Count down days until events.
Written by Aaron Lichtman. https://github.com/alichtman/days_until
Options:
--add Prompt to add events.
--clean Remove events with end dates that have passed.
--compress Compress output when printing.
--config Print path to config file.
--remove Interactively remove events.
-v, --version Print version and author info.
-h, -help, --help Show this message and exit.
```
## Configuration and Events
`days-until` reads its configuration from `$XDG_CONFIG_HOME/.config/days-until.yaml` or `~/.config/days_until.yaml`.
The easiest way to add events is with the `--add` option. If you'd like to add the events manually, they should be in the following format:
```yaml
event1:
event: "Final Day in Switzerland"
dates:
start: "2019-12-7"
end: "2019-12-20"
```
The top level keys (`event1` in this example) don't matter as long as they're unique. I tend to use `event{N}`, but anything will work.
- `event` is a string name for the event.
- `start` is the date on from which you'd like progress to be tracked.
- `end` is the date of the event.
All dates should be in `YYYY-MM-DD` format.
To remove entries interactively, use the `--remove` option.
近期下载者:
相关文件:
收藏者: