Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chenjiandongx/clock
☁️ 须知少时凌云志 曾许人间第一流
https://github.com/chenjiandongx/clock
Last synced: 2 days ago
JSON representation
☁️ 须知少时凌云志 曾许人间第一流
- Host: GitHub
- URL: https://github.com/chenjiandongx/clock
- Owner: chenjiandongx
- License: mit
- Created: 2021-11-24T16:52:00.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2021-11-29T17:18:34.000Z (almost 3 years ago)
- Last Synced: 2024-08-02T16:43:20.525Z (3 months ago)
- Language: Go
- Homepage:
- Size: 60.5 KB
- Stars: 71
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Clock
[![GoDoc](https://godoc.org/github.com/chenjiandongx/clock?status.svg)](https://godoc.org/github.com/chenjiandongx/clock)
[![Go Report Card](https://goreportcard.com/badge/github.com/chenjiandongx/clock)](https://goreportcard.com/report/github.com/chenjiandongx/clock)
[![License](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)***须知少时凌云志 曾许人间第一流***
项目灵感来自 [utools](https://u.tools/) 插件 [人生进度条](https://yuanliao.info/d/617-0018)
![image](https://user-images.githubusercontent.com/19553554/143896547-c3bed94e-bccd-4624-9c98-580fb8517a5e.png)
### 🔰 安装
使用 `go get` 或者直接下载预编译二进制文件 [clock/releases](https://github.com/chenjiandongx/clock/releases)
```shell
go get -u github.com/chenjiandongx/clock
```### 🔑 配置读取
clock 默认会优先读取下列的环境变量,日期的时间格式为 `yyyy-mm-dd`
| Key | Desc | Default |
| --- | ---- | ------- |
| CLOCK_WHO | 称呼 | Coder |
| CLOCK_BIRTHDAY | 你来的日子 | 1996-04-12 |
| CLOCK_PASS_AWAY | 你走的日子 | 2086-04-12 |
| CLOCK_START_COLOR | 渐变起始颜色 | #F3C8ED |
| CLOCK_END_COLOR | 渐变终止颜色 | #B2F6EF |或者新增 .life_clock 文件,以 yaml 格式配置,读取的优先级如下:
* 0x00: 读取环境变量
* 0x01: 读取 clock 程序运行路径下的 .life_clock 文件
* 0x02: 读取 $HOME/.life_clock 文件
* 0x03: 读取 /etc/.life_clock 文件文件默认配置如下:
```yaml
# .life_clock fileCLOCK_WHO: "Coder"
CLOCK_BIRTHDAY: "1996-04-12"
CLOCK_PASS_AWAY: "2086-04-12"
CLOCK_START_COLOR: "#F3C8ED"
CLOCK_END_COLOR: "#B2F6EF"
```### 🤔 人生阿!
> 真正的勇士敢于直面赤裸裸的人生和血淋淋的事实 -- dongdong
***短短这一生***
https://user-images.githubusercontent.com/19553554/143770322-01bbb073-4fc7-414d-bae6-01131cebb387.mov
### 👏 Contributors
- [NickChenyx](https://github.com/nickChenyx)
### 🔖 License
MIT [©chenjiandongx](https://github.com/chenjiandongx)