人生苦短,要时刻提醒自己时间在流逝。
安装:
$ pip install datebar
使用:
$ datebar
passed days: 79
the progress of the year: 22%
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░22%
Github:
https://github.com/Neulana/datebar
喜欢自取,能赏个 star 就更好啦!比心
|  |      1Williamwang      2018-03-21 07:14:44 +08:00 via iPhone 手机下载即刻 app,关注对应主题,并开启推送就搞定了…… | 
|      2TimCheng      2018-03-21 07:29:59 +08:00 via iPhone 等着接我的 star 吧 | 
|      30xABCD OP @Williamwang 回头下一个试试 | 
|  |      5gimp      2018-03-21 08:37:36 +08:00  1 | 
|      6gihnius      2018-03-21 08:42:53 +08:00 写个 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% | 
|      7anson2416      2018-03-21 09:00:20 +08:00 via iPhone excel 能做吗 | 
|      8326029212      2018-03-21 09:03:01 +08:00 测试对 python2 稍有不兼容.随手提了个合并 | 
|  |      9ZeroW      2018-03-21 09:21:13 +08:00 via Android @Williamwang 什么意思,好像不太明白~ | 
|  |      10jasonyang9      2018-03-21 09:29:35 +08:00 坐等 PHP 版 | 
|      11gihnius      2018-03-21 09:31:20 +08:00 再写个 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) } 感觉够折腾的。。。。。 | 
|  |      12clino      2018-03-21 09:32:38 +08:00 | 
|  |      150vels      2018-03-21 10:09:00 +08:00 之前做过一个农历版的,代码太烂,不好意思贴地址了 | 
|      17lrxiao      2018-03-21 10:23:10 +08:00 | 
|  |      18Gja5kx2zjf92LLin      2018-03-21 10:27:51 +08:00 可以 fork 吗? | 
|      190xABCD OP @lixycoderfix 当然 | 
|  |      20Williamwang      2018-03-21 11:44:17 +08:00 via iPhone @zerowang317 #9 即刻 app 有对应的提醒主题 | 
|      22gihnius      2018-03-21 12:50:52 +08:00 整理了一下: https://github.com/gihnius/year_progress 哈哈 | 
|      23gihnius      2018-03-21 13:24:30 +08:00 @gihnius 继续玩: Go 版加了: ■■■■■■■■■■■■■■■■■■■■■ ■■■■■■■■■■■■■■■■■■■■■ ■■■■■■■■■■■■■■■■■■■■■ ■■■■■■■■■■■■■■■■■□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□□□□□□□□□□□□□□ □□□□□□□□ 22%(80/365) | 
|  |      24scriptB0y      2018-03-21 13:36:14 +08:00 今年还要工作多少天 Twitter 机器人:   |