人生苦短,要时刻提醒自己时间在流逝。
安装:
$ pip install datebar
使用:
$ datebar
passed days: 79
the progress of the year: 22%
22%
Github:
https://github.com/Neulana/datebar
喜欢自取,能赏个 star 就更好啦!比心

人生苦短,要时刻提醒自己时间在流逝。
安装:
$ pip install datebar
使用:
$ datebar
passed days: 79
the progress of the year: 22%
22%
Github:
https://github.com/Neulana/datebar
喜欢自取,能赏个 star 就更好啦!比心
1 Williamwang Mar 21, 2018 via iPhone 手机下载即刻 app,关注对应主题,并开启推送就搞定了…… |
2 TimCheng Mar 21, 2018 via iPhone 等着接我的 star 吧 |
3 0xABCD OP @Williamwang 回头下一个试试 |
5 gimp Mar 21, 2018 |
6 gihnius Mar 21, 2018 写个 Ruby 的玩玩: percent = ((Time.now.yday.to_f / Time.now.at_end_of_year.yday) * 100).round bar = '' * percent + '' * (100 - percent) puts "Progress of this year:" puts(bar + percent.to_s + '%') 输出: Progress of this year: 22% |
7 anson2416 Mar 21, 2018 via iPhone excel 能做吗 |
8 326029212 Mar 21, 2018 测试对 python2 稍有不兼容.随手提了个合并 |
9 ZeroW Mar 21, 2018 via Android @Williamwang 什么意思,好像不太明白~ |
10 jasonyang9 Mar 21, 2018 坐等 PHP 版 |
11 gihnius Mar 21, 2018 再写个 Go 的: package main import ( "fmt" "math" "strings" "time" ) func main() { now := time.Now() passed := now.YearDay() format := "2006-01-02 15:04:05" end, _ := time.Parse(format, fmt.Sprintf("%d-12-31 23:59:59", now.Year())) total := end.YearDay() progress := math.Round((float64(passed) / float64(total)) * 100) bar := strings.Repeat("", int(progress)) + strings.Repeat("", (100-int(progress))) fmt.Printf("Progress of this year %d of %d:\n", passed, total) fmt.Println(bar) } 感觉够折腾的。。。。。 |
12 clino Mar 21, 2018 |
15 0vels Mar 21, 2018 之前做过一个农历版的,代码太烂,不好意思贴地址了 |
17 lrxiao Mar 21, 2018 |
18 Gja5kx2zjf92LLin Mar 21, 2018 可以 fork 吗? |
19 0xABCD OP @lixycoderfix 当然 |
20 Williamwang Mar 21, 2018 via iPhone @zerowang317 #9 即刻 app 有对应的提醒主题 |
22 gihnius Mar 21, 2018 整理了一下: https://github.com/gihnius/year_progress 哈哈 |
23 gihnius Mar 21, 2018 @gihnius 继续玩: Go 版加了: ■■■■■■■■■■■■■■■■■■■■■ ■■■■■■■■■■■■■■■■■■■■■ ■■■■■■■■■■■■■■■■■■■■■ ■■■■■■■■■■■■■■■■■□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□ 22%(80/365) |
24 scriptB0y Mar 21, 2018 今年还要工作多少天 Twitter 机器人: |