├── .github
├── ISSUE_TEMPLATE
│ └── ----------issue.md
└── workflows
│ └── main.yml
├── .gitignore
├── README.md
├── assets
├── ghiblog.png
└── wordcloud.png
├── lib
└── fonts
│ └── wqy-microhei.ttc
├── main.py
├── nasa_client
└── __init__.py
├── requirements.txt
└── word_cloud
├── README.md
├── __init__.py
├── assets
├── ghiblog.png
└── wordcloud.png
├── lib
└── fonts
│ └── wqy-microhei.ttc
├── main.py
├── nasa_client
└── __init__.py
└── requirements.txt
/.github/ISSUE_TEMPLATE/----------issue.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: 个人博客, 请不要提ISSUE
3 | about: 该仓库为个人博客, 请不要提issue, 谢谢!
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | 个人博客, 请**不要**提issue, 谢谢!
11 | ====================
12 | This repository is for personal blogging, please **DO NOT** submit issue, thanks!
13 |
--------------------------------------------------------------------------------
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 |
3 | on: [issues, issue_comment]
4 |
5 | jobs:
6 | build:
7 |
8 | runs-on: ubuntu-latest
9 |
10 | steps:
11 | - uses: actions/checkout@master
12 | - name: install dependencies
13 | run: |
14 | pip3 install setuptools --user
15 | pip3 install PyGithub --user
16 | pip3 install wordcloud --user
17 | pip3 install matplotlib --user
18 | - name: run python script
19 | env:
20 | GITHUB_LOGIN: jwenjian
21 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22 | run: python3 main.py
23 | - name: config git info
24 | run: |
25 | git config --global user.email "wenjian.jiang@foxmail.com"
26 | git config --global user.name "jwenjian"
27 | - name: commit change
28 | run: |
29 | git checkout master
30 | git add .
31 | git commit -m "Update from Github Action"
32 | - name: push change
33 | env:
34 | GITHUB_LOGIN: jwenjian
35 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 | run: |
37 | git push https://$GITHUB_LOGIN:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git
38 | - name: done
39 | run: echo 'done'
40 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | __pycache__/
3 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
26 |
27 |
28 |
29 |
30 |
31 | LuckyYou - 一个跨平台工具,用于抽奖/课堂点名
32 |
33 |
34 |
35 | ## 置顶 :thumbsup:
36 | - [【Trello】博客同步Trello看板](https://github.com/jwenjian/ghiblog/issues/147) 1 :speech_balloon:
37 | - [基于Github Action自动生成并更新GitHub Issue博客的ReadMe](https://github.com/jwenjian/ghiblog/issues/1) 27 :speech_balloon:
38 | ## 最新 :new:
39 |
40 | #### [time to redefine normal body temperature: 37 -> 36.4](https://github.com/jwenjian/ghiblog/issues/304) 0 :speech_balloon: 2022-12-29 07:04:25
41 |
42 | :label: :
43 |
44 | https://www.health.harvard.edu/blog/time-to-redefine-normal-body-temperature-2020031319173
45 |
46 |
47 | [更多>>>](https://github.com/jwenjian/ghiblog/issues/304)
48 |
49 | ---
50 |
51 |
52 | #### [CSS game for learning flexbox & grid](https://github.com/jwenjian/ghiblog/issues/303) 0 :speech_balloon: 2022-12-26 03:02:45
53 |
54 | :label: :
55 |
56 | https://flexboxfroggy.com/
57 | https://cssgridgarden.com/
58 |
59 | [更多>>>](https://github.com/jwenjian/ghiblog/issues/303)
60 |
61 | ---
62 |
63 |
64 | #### [UI prototype of windows next version](https://github.com/jwenjian/ghiblog/issues/302) 0 :speech_balloon: 2022-12-26 02:53:57
65 |
66 | :label: :
67 |
68 | 
69 |
70 | https://www.windowscentral.com/soft
71 |
72 | [更多>>>](https://github.com/jwenjian/ghiblog/issues/302)
73 |
74 | ---
75 |
76 |
77 | #### [另外一个 GitHub Issue Blog 的方案](https://github.com/jwenjian/ghiblog/issues/300) 0 :speech_balloon: 2022-02-24 02:31:12
78 |
79 | :label: :
80 |
81 |
82 | 
83 |
84 |
85 | 具体移步: https://github.com/djyde/
86 |
87 | [更多>>>](https://github.com/jwenjian/ghiblog/issues/300)
88 |
89 | ---
90 |
91 |
92 | #### [Code Radio 在线FM,敲代码必备背景音乐](https://github.com/jwenjian/ghiblog/issues/299) 0 :speech_balloon: 2022-01-04 05:21:51
93 |
94 | :label: : [:earth_africa:网站收藏](https://github.com/jwenjian/ghiblog/labels/%3Aearth_africa%3A%E7%BD%91%E7%AB%99%E6%94%B6%E8%97%8F)
95 |
96 | FreeCodeCamp 出品,7 * 24 小时不间断播放,可作为敲代码的背景音乐。
97 |
98 | 地址: https://coderadio.freecodecamp.org/
99 |
100 | [更多>>>](https://github.com/jwenjian/ghiblog/issues/299)
101 |
102 | ---
103 |
104 |
105 | ## 分类 :card_file_box:
106 |
107 |
108 |
109 |
110 | :cloud: 词云 :cloud: 点击词云展开详细分类:point_down:
111 |
112 |
113 |
114 |
115 | :+1:置顶 2:newspaper:
116 |
117 | - [【Trello】博客同步Trello看板](https://github.com/jwenjian/ghiblog/issues/147) 1 :speech_balloon:
118 | - [基于Github Action自动生成并更新GitHub Issue博客的ReadMe](https://github.com/jwenjian/ghiblog/issues/1) 27 :speech_balloon:
119 |
120 |
121 |
122 |
123 |
124 | :art:前端 17:newspaper:
125 |
126 | - [4 CSS Grid Properties (and One Value) for Most of Your Layout Needs | CSS-Tricks](https://github.com/jwenjian/ghiblog/issues/219) 0 :speech_balloon:
127 | - [CSS滤镜(filter)使用场景](https://github.com/jwenjian/ghiblog/issues/153) 0 :speech_balloon:
128 | - [15个必知的Vue指令](https://github.com/jwenjian/ghiblog/issues/120) 0 :speech_balloon:
129 | - [[From Instapaper] : Animated Icons - 200 Free Icons](https://github.com/jwenjian/ghiblog/issues/117) 0 :speech_balloon:
130 | - [日本邮政官网 - 印章生成器](https://github.com/jwenjian/ghiblog/issues/95) 0 :speech_balloon:
131 | - [HTTP Content-type 对照表](https://github.com/jwenjian/ghiblog/issues/93) 0 :speech_balloon:
132 | - [Permission denied when running npm install](https://github.com/jwenjian/ghiblog/issues/90) 0 :speech_balloon:
133 | - [使用渐变一个div画Chrome浏览器logo](https://github.com/jwenjian/ghiblog/issues/80) 0 :speech_balloon:
134 | - [Brandmark Logo Maker - 基于人工智能的LOGO生成工具](https://github.com/jwenjian/ghiblog/issues/79) 0 :speech_balloon:
135 | - [[From Instapaper] : 臆病な魔女](https://github.com/jwenjian/ghiblog/issues/58) 3 :speech_balloon:
136 | - [[From Instapaper] : 前端必会四步带你吃透浏览器渲染基本原理](https://github.com/jwenjian/ghiblog/issues/55) 0 :speech_balloon:
137 | - [关于浏览器自动填充](https://github.com/jwenjian/ghiblog/issues/42) 0 :speech_balloon:
138 | - [insshot: 自动截屏保存ins用户的最新post](https://github.com/jwenjian/ghiblog/issues/34) 0 :speech_balloon:
139 | - [使用淘宝镜像安装puppeteer](https://github.com/jwenjian/ghiblog/issues/32) 0 :speech_balloon:
140 | - [TKinter教程](https://github.com/jwenjian/ghiblog/issues/25) 0 :speech_balloon:
141 | - [中国色-收集中国传统颜色的网站](https://github.com/jwenjian/ghiblog/issues/20) 0 :speech_balloon:
142 | - [CSS隐藏元素滚动条](https://github.com/jwenjian/ghiblog/issues/15) 0 :speech_balloon:
143 |
144 |
145 |
146 |
147 |
148 | :beetle:Bug追踪 7:newspaper:
149 |
150 | - [解决:pip3 cannot import name main](https://github.com/jwenjian/ghiblog/issues/152) 0 :speech_balloon:
151 | - [解决Ubuntu执行sudo命令反应慢的问题](https://github.com/jwenjian/ghiblog/issues/149) 1 :speech_balloon:
152 | - [解决: ssh 远程登录虚拟机 Linux 速度很慢的问题](https://github.com/jwenjian/ghiblog/issues/136) 0 :speech_balloon:
153 | - [PlantUML Graphviz 安装](https://github.com/jwenjian/ghiblog/issues/126) 0 :speech_balloon:
154 | - [Permission denied when running npm install](https://github.com/jwenjian/ghiblog/issues/90) 0 :speech_balloon:
155 | - [Internet troubleshooting: website (www.microsoft.com) is online but isn't responding to connection attempts](https://github.com/jwenjian/ghiblog/issues/66) 0 :speech_balloon:
156 | - [C++: jni.h: no such file or directory ](https://github.com/jwenjian/ghiblog/issues/28) 1 :speech_balloon:
157 |
158 |
159 |
160 |
161 |
162 | :books:阅读 8:newspaper:
163 |
164 | - [为何国内师范大学的英文名是XX Normal University](https://github.com/jwenjian/ghiblog/issues/112) 0 :speech_balloon:
165 | - [An FBI Behaviour Expert Explains How to Quickly Build Trust With Anyone](https://github.com/jwenjian/ghiblog/issues/99) 0 :speech_balloon:
166 | - [微博-刘大可先生:关于“植物身上的黄金分割”的叫你恍然大悟的文章](https://github.com/jwenjian/ghiblog/issues/97) 0 :speech_balloon:
167 | - [如果风险投资者问你“如果大公司进入市场与你竞争,怎么办?”,你应该如何回答?](https://github.com/jwenjian/ghiblog/issues/70) 1 :speech_balloon:
168 | - [[From Instapaper] : 每家门上都挂个西瓜邻居拍照发上网你有素质的样子太美](https://github.com/jwenjian/ghiblog/issues/68) 0 :speech_balloon:
169 | - [[From Instapaper] : 关注英媒中国理所应当鄙视英国](https://github.com/jwenjian/ghiblog/issues/54) 0 :speech_balloon:
170 | - [[From Instapaper] : 中国为什么不搞多党竞争甚至一些党员干部都不知怎么回答](https://github.com/jwenjian/ghiblog/issues/47) 0 :speech_balloon:
171 | - [书单](https://github.com/jwenjian/ghiblog/issues/22) 0 :speech_balloon:
172 |
173 |
174 |
175 |
176 |
177 | :camera_flash:随拍 9:newspaper:
178 |
179 | - [2019年 北京的初雪 [16P]](https://github.com/jwenjian/ghiblog/issues/146) 0 :speech_balloon:
180 | - [生活随拍 [8P]](https://github.com/jwenjian/ghiblog/issues/133) 0 :speech_balloon:
181 | - [到此一游 - 天津](https://github.com/jwenjian/ghiblog/issues/115) 4 :speech_balloon:
182 | - [近期生活随拍](https://github.com/jwenjian/ghiblog/issues/89) 0 :speech_balloon:
183 | - [青岛之行随拍](https://github.com/jwenjian/ghiblog/issues/44) 2 :speech_balloon:
184 | - [端午节随拍](https://github.com/jwenjian/ghiblog/issues/31) 0 :speech_balloon:
185 | - [2019年的第一次旅行](https://github.com/jwenjian/ghiblog/issues/17) 0 :speech_balloon:
186 | - [本周生活随拍](https://github.com/jwenjian/ghiblog/issues/10) 0 :speech_balloon:
187 | - [借光计划-798艺术区](https://github.com/jwenjian/ghiblog/issues/8) 0 :speech_balloon:
188 |
189 |
190 |
191 |
192 |
193 | :coffee:JAVA 12:newspaper:
194 |
195 | - [JVM 参数解析: SurvivorRatio](https://github.com/jwenjian/ghiblog/issues/291) 1 :speech_balloon:
196 | - [配置 apache maven resource plugin 的编码方式为UTF-8](https://github.com/jwenjian/ghiblog/issues/144) 0 :speech_balloon:
197 | - [不要把大型JAR包放进Docker镜像-InfoQ](https://github.com/jwenjian/ghiblog/issues/138) 0 :speech_balloon:
198 | - [消灭 Java 代码的坏味道-InfoQ](https://github.com/jwenjian/ghiblog/issues/109) 0 :speech_balloon:
199 | - [springboot + mybatis 打印SQL日志到控制台](https://github.com/jwenjian/ghiblog/issues/105) 0 :speech_balloon:
200 | - [负载均衡](https://github.com/jwenjian/ghiblog/issues/104) 0 :speech_balloon:
201 | - [如何在优雅地Spring 中实现消息的发送和消费](https://github.com/jwenjian/ghiblog/issues/85) 0 :speech_balloon:
202 | - [如何优雅关闭 Spring Boot 应用](https://github.com/jwenjian/ghiblog/issues/72) 0 :speech_balloon:
203 | - [start.spring.io支持在线预览生成的文件内容](https://github.com/jwenjian/ghiblog/issues/63) 1 :speech_balloon:
204 | - [[From Instapaper] : Java.lang.Void 与 void 的比较及使用](https://github.com/jwenjian/ghiblog/issues/60) 0 :speech_balloon:
205 | - [How to prevent XXE injection when convert xml to object in java](https://github.com/jwenjian/ghiblog/issues/37) 0 :speech_balloon:
206 | - [配置SpringBoot定时任务线程池](https://github.com/jwenjian/ghiblog/issues/21) 0 :speech_balloon:
207 |
208 |
209 |
210 |
211 |
212 | :computer:Windows 15:newspaper:
213 |
214 | - [PlantUML Graphviz 安装](https://github.com/jwenjian/ghiblog/issues/126) 0 :speech_balloon:
215 | - [D盘无法格式化提示Windows无法格式该驱动器怎么办-太平洋IT百科](https://github.com/jwenjian/ghiblog/issues/113) 0 :speech_balloon:
216 | - [解决windows系统某些软件无法卸载或者安装](https://github.com/jwenjian/ghiblog/issues/111) 0 :speech_balloon:
217 | - [[From Instapaper] : CPUID](https://github.com/jwenjian/ghiblog/issues/74) 0 :speech_balloon:
218 | - [如何在 Chromium 版 Edge 浏览器上安装 Google Chrome 应用商店的扩展](https://github.com/jwenjian/ghiblog/issues/73) 0 :speech_balloon:
219 | - [Internet troubleshooting: website (www.microsoft.com) is online but isn't responding to connection attempts](https://github.com/jwenjian/ghiblog/issues/66) 0 :speech_balloon:
220 | - [[From Instapaper] : Task Scheduler - Windows applications | Windows上的定时任务管理器](https://github.com/jwenjian/ghiblog/issues/57) 1 :speech_balloon:
221 | - [pydice: Python的GUI应用 - 课堂点名工具](https://github.com/jwenjian/ghiblog/issues/36) 1 :speech_balloon:
222 | - [PAGE - Python Automatic GUI Generator](https://github.com/jwenjian/ghiblog/issues/35) 0 :speech_balloon:
223 | - [调整Typora显示宽度](https://github.com/jwenjian/ghiblog/issues/18) 5 :speech_balloon:
224 | - [Windows截图工具-Snipaste](https://github.com/jwenjian/ghiblog/issues/13) 0 :speech_balloon:
225 | - [Windows工具-制作启动U盘](https://github.com/jwenjian/ghiblog/issues/11) 0 :speech_balloon:
226 | - [智能屏幕护眼软件: f.lux](https://github.com/jwenjian/ghiblog/issues/5) 0 :speech_balloon:
227 | - [windows系统-gif 动画录制软件](https://github.com/jwenjian/ghiblog/issues/4) 0 :speech_balloon:
228 | - [谷歌浏览器原生支持触控板快速前进后退](https://github.com/jwenjian/ghiblog/issues/3) 0 :speech_balloon:
229 |
230 |
231 |
232 |
233 |
234 | :computer:计算机 9:newspaper:
235 |
236 | - [使用Alt-svc自举 HTTP/3 explained](https://github.com/jwenjian/ghiblog/issues/98) 0 :speech_balloon:
237 | - [[From Instapaper] : Distinguished Names](https://github.com/jwenjian/ghiblog/issues/51) 0 :speech_balloon:
238 | - [[From Instapaper] : Http response header - Age](https://github.com/jwenjian/ghiblog/issues/50) 0 :speech_balloon:
239 | - [关于浏览器自动填充](https://github.com/jwenjian/ghiblog/issues/42) 0 :speech_balloon:
240 | - [C++: Ignore warnings C4996](https://github.com/jwenjian/ghiblog/issues/30) 0 :speech_balloon:
241 | - [C++: 引用和指针](https://github.com/jwenjian/ghiblog/issues/29) 0 :speech_balloon:
242 | - [C++: jni.h: no such file or directory ](https://github.com/jwenjian/ghiblog/issues/28) 1 :speech_balloon:
243 | - [C语言-位运算符](https://github.com/jwenjian/ghiblog/issues/27) 0 :speech_balloon:
244 | - [HSTS](https://github.com/jwenjian/ghiblog/issues/14) 0 :speech_balloon:
245 |
246 |
247 |
248 |
249 |
250 | :earth_africa:网站收藏 18:newspaper:
251 |
252 | - [Code Radio 在线FM,敲代码必备背景音乐](https://github.com/jwenjian/ghiblog/issues/299) 0 :speech_balloon:
253 | - [Text to ASCII Art Generator (TAAG)](https://github.com/jwenjian/ghiblog/issues/131) 0 :speech_balloon:
254 | - [[From Instapaper] : Animated Icons - 200 Free Icons](https://github.com/jwenjian/ghiblog/issues/117) 0 :speech_balloon:
255 | - [AirPano.com: 360° 全景图片 + 视频展示世界各地美景](https://github.com/jwenjian/ghiblog/issues/106) 0 :speech_balloon:
256 | - [Mixkit 发布免费可商用的艺术画与插图平台 - 小众软件](https://github.com/jwenjian/ghiblog/issues/101) 2 :speech_balloon:
257 | - [ColouriseSG: 利用AI给黑白照片上色](https://github.com/jwenjian/ghiblog/issues/96) 0 :speech_balloon:
258 | - [日本邮政官网 - 印章生成器](https://github.com/jwenjian/ghiblog/issues/95) 0 :speech_balloon:
259 | - [PowerPoint Countdown Timer](https://github.com/jwenjian/ghiblog/issues/94) 0 :speech_balloon:
260 | - [HTTP Content-type 对照表](https://github.com/jwenjian/ghiblog/issues/93) 0 :speech_balloon:
261 | - [remove.bg - Remove Background from Image ](https://github.com/jwenjian/ghiblog/issues/92) 0 :speech_balloon:
262 | - [Brandmark Logo Maker - 基于人工智能的LOGO生成工具](https://github.com/jwenjian/ghiblog/issues/79) 0 :speech_balloon:
263 | - [Codeimg.io 代码 -> 图片 -> 分享](https://github.com/jwenjian/ghiblog/issues/78) 0 :speech_balloon:
264 | - [[From Instapaper] : 臆病な魔女](https://github.com/jwenjian/ghiblog/issues/58) 3 :speech_balloon:
265 | - [[From Instapaper] : 西尾維新オフィシャルサイト](https://github.com/jwenjian/ghiblog/issues/53) 1 :speech_balloon:
266 | - [HTTP CAT: 用猫的图片来形象的表示每一个http状态码](https://github.com/jwenjian/ghiblog/issues/45) 0 :speech_balloon:
267 | - [中国色-收集中国传统颜色的网站](https://github.com/jwenjian/ghiblog/issues/20) 0 :speech_balloon:
268 | - [Linux命令在线查询手册](https://github.com/jwenjian/ghiblog/issues/12) 0 :speech_balloon:
269 | - [Windows工具-制作启动U盘](https://github.com/jwenjian/ghiblog/issues/11) 0 :speech_balloon:
270 |
271 |
272 |
273 |
274 |
275 | :framed_picture:封面 1:newspaper:
276 |
277 | - [封面](https://github.com/jwenjian/ghiblog/issues/116) 12 :speech_balloon:
278 |
279 |
280 |
281 |
282 |
283 | :hammer:软件 12:newspaper:
284 |
285 | - [PlantUML Graphviz 安装](https://github.com/jwenjian/ghiblog/issues/126) 0 :speech_balloon:
286 | - [PowerPoint Countdown Timer](https://github.com/jwenjian/ghiblog/issues/94) 0 :speech_balloon:
287 | - [[From Instapaper] : CPUID](https://github.com/jwenjian/ghiblog/issues/74) 0 :speech_balloon:
288 | - [如何在 Chromium 版 Edge 浏览器上安装 Google Chrome 应用商店的扩展](https://github.com/jwenjian/ghiblog/issues/73) 0 :speech_balloon:
289 | - [C++: Ignore warnings C4996](https://github.com/jwenjian/ghiblog/issues/30) 0 :speech_balloon:
290 | - [Eclipse.ini使用-vm参数指定JVM](https://github.com/jwenjian/ghiblog/issues/26) 0 :speech_balloon:
291 | - [Eclipse网络代理配置](https://github.com/jwenjian/ghiblog/issues/19) 0 :speech_balloon:
292 | - [调整Typora显示宽度](https://github.com/jwenjian/ghiblog/issues/18) 5 :speech_balloon:
293 | - [Windows截图工具-Snipaste](https://github.com/jwenjian/ghiblog/issues/13) 0 :speech_balloon:
294 | - [Windows工具-制作启动U盘](https://github.com/jwenjian/ghiblog/issues/11) 0 :speech_balloon:
295 | - [智能屏幕护眼软件: f.lux](https://github.com/jwenjian/ghiblog/issues/5) 0 :speech_balloon:
296 | - [windows系统-gif 动画录制软件](https://github.com/jwenjian/ghiblog/issues/4) 0 :speech_balloon:
297 |
298 |
299 |
300 |
301 |
302 | :leaves:Spring 6:newspaper:
303 |
304 | - [springboot + mybatis 打印SQL日志到控制台](https://github.com/jwenjian/ghiblog/issues/105) 0 :speech_balloon:
305 | - [如何在优雅地Spring 中实现消息的发送和消费](https://github.com/jwenjian/ghiblog/issues/85) 0 :speech_balloon:
306 | - [如何优雅关闭 Spring Boot 应用](https://github.com/jwenjian/ghiblog/issues/72) 0 :speech_balloon:
307 | - [start.spring.io支持在线预览生成的文件内容](https://github.com/jwenjian/ghiblog/issues/63) 1 :speech_balloon:
308 | - [How to add custom properties to manifest file with spring boot](https://github.com/jwenjian/ghiblog/issues/24) 0 :speech_balloon:
309 | - [配置SpringBoot定时任务线程池](https://github.com/jwenjian/ghiblog/issues/21) 0 :speech_balloon:
310 |
311 |
312 |
313 |
314 |
315 | :man_technologist:Linux 18:newspaper:
316 |
317 | - [解决:pip3 cannot import name main](https://github.com/jwenjian/ghiblog/issues/152) 0 :speech_balloon:
318 | - [Ubuntu设置/修改系统时区](https://github.com/jwenjian/ghiblog/issues/150) 0 :speech_balloon:
319 | - [解决Ubuntu执行sudo命令反应慢的问题](https://github.com/jwenjian/ghiblog/issues/149) 1 :speech_balloon:
320 | - [解决: ssh 远程登录虚拟机 Linux 速度很慢的问题](https://github.com/jwenjian/ghiblog/issues/136) 0 :speech_balloon:
321 | - [Docker配置网易云仓库地址](https://github.com/jwenjian/ghiblog/issues/135) 0 :speech_balloon:
322 | - [解决:CentOS7 - Cannot find a valid baseurl for repo: base/7/x86_6](https://github.com/jwenjian/ghiblog/issues/134) 0 :speech_balloon:
323 | - [[From Instapaper] : 技术|30个实例详解TOP命令](https://github.com/jwenjian/ghiblog/issues/128) 0 :speech_balloon:
324 | - [Set yum proxy in CentOS](https://github.com/jwenjian/ghiblog/issues/121) 0 :speech_balloon:
325 | - [top命令 实时显示进程动态 Linux命令大全(手册)](https://github.com/jwenjian/ghiblog/issues/119) 0 :speech_balloon:
326 | - [[From Instapaper] : ubuntu系统插入优盘read-only file system - Jessica&jie - 博客园](https://github.com/jwenjian/ghiblog/issues/118) 0 :speech_balloon:
327 | - [Docker配置HTTP/HTTPS代理](https://github.com/jwenjian/ghiblog/issues/88) 0 :speech_balloon:
328 | - [vbox ubuntu虚拟机扩容方案 虚拟分配空间转换为实际分配空间](https://github.com/jwenjian/ghiblog/issues/87) 0 :speech_balloon:
329 | - [在Ubuntu上安装nodejs、npm](https://github.com/jwenjian/ghiblog/issues/65) 1 :speech_balloon:
330 | - [为Ubuntu系统包管理工具apt配置代理](https://github.com/jwenjian/ghiblog/issues/61) 0 :speech_balloon:
331 | - [调整Typora显示宽度](https://github.com/jwenjian/ghiblog/issues/18) 5 :speech_balloon:
332 | - [Linux命令在线查询手册](https://github.com/jwenjian/ghiblog/issues/12) 0 :speech_balloon:
333 | - [Linux-编译安装nginx源码](https://github.com/jwenjian/ghiblog/issues/9) 0 :speech_balloon:
334 | - [Nginx代理Oracle数据库连接](https://github.com/jwenjian/ghiblog/issues/6) 0 :speech_balloon:
335 |
336 |
337 |
338 |
339 |
340 | :movie_camera:视频 1:newspaper:
341 |
342 | - [我们的生活多愉快~](https://github.com/jwenjian/ghiblog/issues/7) 0 :speech_balloon:
343 |
344 |
345 |
346 |
347 |
348 | :musical_keyboard:音乐 1:newspaper:
349 |
350 | - [我喜欢的音乐](https://github.com/jwenjian/ghiblog/issues/67) 0 :speech_balloon:
351 |
352 |
353 |
354 |
355 |
356 | :robot: AI 2:newspaper:
357 |
358 | - [ColouriseSG: 利用AI给黑白照片上色](https://github.com/jwenjian/ghiblog/issues/96) 0 :speech_balloon:
359 | - [remove.bg - Remove Background from Image ](https://github.com/jwenjian/ghiblog/issues/92) 0 :speech_balloon:
360 |
361 |
362 |
363 |
364 |
365 | :shield:安全 1:newspaper:
366 |
367 | - [电子邮件怎样暴露你的信息-InfoQ](https://github.com/jwenjian/ghiblog/issues/108) 0 :speech_balloon:
368 |
369 |
370 |
371 |
372 |
373 | :snake:Python 17:newspaper:
374 |
375 | - [解决:pip3 cannot import name main](https://github.com/jwenjian/ghiblog/issues/152) 0 :speech_balloon:
376 | - [你应该学习的20个Python代码段-InfoQ](https://github.com/jwenjian/ghiblog/issues/139) 0 :speech_balloon:
377 | - [配置 pip 使用清华大学 PyPi 镜像站](https://github.com/jwenjian/ghiblog/issues/137) 0 :speech_balloon:
378 | - [Python统计文件行数 | LinuxHub](https://github.com/jwenjian/ghiblog/issues/130) 0 :speech_balloon:
379 | - [用python爬虫保存美国农业部网站上的水果【证件照】](https://github.com/jwenjian/ghiblog/issues/114) 13 :speech_balloon:
380 | - [Predictably Random](https://github.com/jwenjian/ghiblog/issues/103) 0 :speech_balloon:
381 | - [Python_uuid 学习总结](https://github.com/jwenjian/ghiblog/issues/91) 0 :speech_balloon:
382 | - [[From Instapaper] : How to use Python virtualenv](https://github.com/jwenjian/ghiblog/issues/64) 1 :speech_balloon:
383 | - [[From Instapaper] : The Flask Mega-Tutorial Part I: Hello World! - miguelgrinberg.com](https://github.com/jwenjian/ghiblog/issues/62) 2 :speech_balloon:
384 | - [我给GitHub的README做了个访客数量统计功能](https://github.com/jwenjian/ghiblog/issues/43) 1 :speech_balloon:
385 | - [Python: 对数组进行选择排序](https://github.com/jwenjian/ghiblog/issues/41) 0 :speech_balloon:
386 | - [Python: 对数组进行插入排序](https://github.com/jwenjian/ghiblog/issues/40) 0 :speech_balloon:
387 | - [Python操作剪贴板](https://github.com/jwenjian/ghiblog/issues/38) 0 :speech_balloon:
388 | - [pydice: Python的GUI应用 - 课堂点名工具](https://github.com/jwenjian/ghiblog/issues/36) 1 :speech_balloon:
389 | - [PAGE - Python Automatic GUI Generator](https://github.com/jwenjian/ghiblog/issues/35) 0 :speech_balloon:
390 | - [TKinter教程](https://github.com/jwenjian/ghiblog/issues/25) 0 :speech_balloon:
391 | - [转载-浅谈 Python 的 with 语句](https://github.com/jwenjian/ghiblog/issues/23) 0 :speech_balloon:
392 |
393 |
394 |
395 |
396 |
397 | :video_game:生活 10:newspaper:
398 |
399 | - [近期生活随拍](https://github.com/jwenjian/ghiblog/issues/89) 0 :speech_balloon:
400 | - [舒尔特训练法](https://github.com/jwenjian/ghiblog/issues/75) 0 :speech_balloon:
401 | - [影视节目单](https://github.com/jwenjian/ghiblog/issues/71) 6 :speech_balloon:
402 | - [高铁/动车上插座都在什么位置](https://github.com/jwenjian/ghiblog/issues/59) 2 :speech_balloon:
403 | - [书单](https://github.com/jwenjian/ghiblog/issues/22) 0 :speech_balloon:
404 | - [2019年的第一次旅行](https://github.com/jwenjian/ghiblog/issues/17) 0 :speech_balloon:
405 | - [bye 2018](https://github.com/jwenjian/ghiblog/issues/16) 3 :speech_balloon:
406 | - [本周生活随拍](https://github.com/jwenjian/ghiblog/issues/10) 0 :speech_balloon:
407 | - [借光计划-798艺术区](https://github.com/jwenjian/ghiblog/issues/8) 0 :speech_balloon:
408 | - [我们的生活多愉快~](https://github.com/jwenjian/ghiblog/issues/7) 0 :speech_balloon:
409 |
410 |
411 |
412 |
413 |
414 | css 1:newspaper:
415 |
416 | - [CSS滤镜(filter)使用场景](https://github.com/jwenjian/ghiblog/issues/153) 0 :speech_balloon:
417 |
418 |
419 |
420 |
421 |
422 | docker 1:newspaper:
423 |
424 | - [不要把大型JAR包放进Docker镜像-InfoQ](https://github.com/jwenjian/ghiblog/issues/138) 0 :speech_balloon:
425 |
426 |
427 |
428 |
429 |
430 | good first issue 2:newspaper:
431 |
432 | - [如果风险投资者问你“如果大公司进入市场与你竞争,怎么办?”,你应该如何回答?](https://github.com/jwenjian/ghiblog/issues/70) 1 :speech_balloon:
433 | - [基于Github Action自动生成并更新GitHub Issue博客的ReadMe](https://github.com/jwenjian/ghiblog/issues/1) 27 :speech_balloon:
434 |
435 |
436 |
437 |
438 |
439 | Instapaper 11:newspaper:
440 |
441 | - [LinkedIn如何在一台机器上支持几十万条长连接?](https://github.com/jwenjian/ghiblog/issues/77) 0 :speech_balloon:
442 | - [[From Instapaper] : C/C 静态链接库(.a) 与 动态链接库(.so) - 52php - 博客园](https://github.com/jwenjian/ghiblog/issues/76) 0 :speech_balloon:
443 | - [[From Instapaper] : Task Scheduler - Windows applications | Windows上的定时任务管理器](https://github.com/jwenjian/ghiblog/issues/57) 1 :speech_balloon:
444 | - [[From Instapaper] : Should Neil Armstrongs Bootprints Be on the Moon Forever](https://github.com/jwenjian/ghiblog/issues/56) 1 :speech_balloon:
445 | - [[From Instapaper] : 前端必会四步带你吃透浏览器渲染基本原理](https://github.com/jwenjian/ghiblog/issues/55) 0 :speech_balloon:
446 | - [[From Instapaper] : 关注英媒中国理所应当鄙视英国](https://github.com/jwenjian/ghiblog/issues/54) 0 :speech_balloon:
447 | - [[From Instapaper] : 西尾維新オフィシャルサイト](https://github.com/jwenjian/ghiblog/issues/53) 1 :speech_balloon:
448 | - [[From Instapaper] : Distinguished Names](https://github.com/jwenjian/ghiblog/issues/51) 0 :speech_balloon:
449 | - [[From Instapaper] : Http response header - Age](https://github.com/jwenjian/ghiblog/issues/50) 0 :speech_balloon:
450 | - [[From Instapaper] : maven getting "Not Authorized" when trying to access nexus private repository](https://github.com/jwenjian/ghiblog/issues/48) 0 :speech_balloon:
451 | - [[From Instapaper] : 中国为什么不搞多党竞争甚至一些党员干部都不知怎么回答](https://github.com/jwenjian/ghiblog/issues/47) 0 :speech_balloon:
452 |
453 |
454 |
455 |
456 |
457 | JS 2:newspaper:
458 |
459 | - [Permission denied when running npm install](https://github.com/jwenjian/ghiblog/issues/90) 0 :speech_balloon:
460 | - [[From Instapaper] : 西尾維新オフィシャルサイト](https://github.com/jwenjian/ghiblog/issues/53) 1 :speech_balloon:
461 |
462 |
463 |
464 |
465 |
466 | Maven 7:newspaper:
467 |
468 | - [配置 apache maven resource plugin 的编码方式为UTF-8](https://github.com/jwenjian/ghiblog/issues/144) 0 :speech_balloon:
469 | - [不要把大型JAR包放进Docker镜像-InfoQ](https://github.com/jwenjian/ghiblog/issues/138) 0 :speech_balloon:
470 | - [Install parent POM without building Child modules](https://github.com/jwenjian/ghiblog/issues/82) 0 :speech_balloon:
471 | - [[From Instapaper] : maven getting "Not Authorized" when trying to access nexus private repository](https://github.com/jwenjian/ghiblog/issues/48) 0 :speech_balloon:
472 | - [Maven: maven-dependency-plugin:get 通过命令行下载jar包到本地仓库 无需pom文件](https://github.com/jwenjian/ghiblog/issues/39) 0 :speech_balloon:
473 | - [Maven: mvn clean install --fail-at-end](https://github.com/jwenjian/ghiblog/issues/33) 0 :speech_balloon:
474 | - [How to add custom properties to manifest file with spring boot](https://github.com/jwenjian/ghiblog/issues/24) 0 :speech_balloon:
475 |
476 |
477 |
478 |
479 |
480 | MySQL 3:newspaper:
481 |
482 | - [MySQL学习笔记三](https://github.com/jwenjian/ghiblog/issues/154) 0 :speech_balloon:
483 | - [MySQL学习笔记二](https://github.com/jwenjian/ghiblog/issues/151) 0 :speech_balloon:
484 | - [MySQL学习笔记一](https://github.com/jwenjian/ghiblog/issues/148) 0 :speech_balloon:
485 |
486 |
487 |
488 |
489 |
490 | Nginx 1:newspaper:
491 |
492 | - [Linux-编译安装nginx源码](https://github.com/jwenjian/ghiblog/issues/9) 0 :speech_balloon:
493 |
494 |
495 |
496 |
497 |
498 | Vue 1:newspaper:
499 |
500 | - [15个必知的Vue指令](https://github.com/jwenjian/ghiblog/issues/120) 0 :speech_balloon:
501 |
502 |
503 |
504 |
505 |
506 | 开源 7:newspaper:
507 |
508 | - [gallery](https://github.com/jwenjian/ghiblog/issues/145) 0 :speech_balloon:
509 | - [topa](https://github.com/jwenjian/ghiblog/issues/132) 0 :speech_balloon:
510 | - [awesome-qrcode](https://github.com/jwenjian/ghiblog/issues/127) 0 :speech_balloon:
511 | - [schulte-grid](https://github.com/jwenjian/ghiblog/issues/125) 0 :speech_balloon:
512 | - [usda-fruit-img-spider](https://github.com/jwenjian/ghiblog/issues/124) 0 :speech_balloon:
513 | - [visitor-count-badge](https://github.com/jwenjian/ghiblog/issues/123) 0 :speech_balloon:
514 | - [gradex](https://github.com/jwenjian/ghiblog/issues/122) 0 :speech_balloon:
515 |
516 |
517 |
518 |
519 |
520 | 数据库 3:newspaper:
521 |
522 | - [MySQL学习笔记三](https://github.com/jwenjian/ghiblog/issues/154) 0 :speech_balloon:
523 | - [MySQL学习笔记二](https://github.com/jwenjian/ghiblog/issues/151) 0 :speech_balloon:
524 | - [MySQL学习笔记一](https://github.com/jwenjian/ghiblog/issues/148) 0 :speech_balloon:
525 |
526 |
527 |
528 |
529 |
530 | 架构 5:newspaper:
531 |
532 | - [负载均衡](https://github.com/jwenjian/ghiblog/issues/104) 0 :speech_balloon:
533 | - [比拼 Kafka 大数据分析新秀Pulsar到底好在哪-InfoQ](https://github.com/jwenjian/ghiblog/issues/100) 0 :speech_balloon:
534 | - [RocketMQ与kafka对比18项差异](https://github.com/jwenjian/ghiblog/issues/83) 0 :speech_balloon:
535 | - [白话中台战略 - InfoQ](https://github.com/jwenjian/ghiblog/issues/81) 0 :speech_balloon:
536 | - [LinkedIn如何在一台机器上支持几十万条长连接?](https://github.com/jwenjian/ghiblog/issues/77) 0 :speech_balloon:
537 |
538 |
539 |
540 |
541 |
542 |
543 |
544 | # 开源项目
545 |
546 |
547 | | [gallery](https://github.com/jwenjian/gallery) | 基于Github issue的相册,随时随地分享你的摄影作品。 |    |
548 | | --- | --- | --- |
549 | | [topa](https://github.com/jwenjian/topa) | Python 的命令行应用 用于分析 Linux 命令 `top` 的输出结果,分析 CPU, 内存占用情况 |    |
550 | | [awesome-qrcode](https://github.com/jwenjian/awesome-qrcode) | 在线生成纯文字,静态图片,动态图片二维码。[awesome-qrcode-ui](https://github.com/jwenjian/awesome-qrcode-ui) 是对应的UI项目。 |    |
551 | | [schulte-grid](https://github.com/jwenjian/schulte-grid) | Vue.js实现的 5 * 5 的舒尔特方格 |    |
552 | | [usda-fruit-img-spider](https://github.com/jwenjian/usda-fruit-img-spider) | Python爬虫保存美国农业部网站上7000+张高清水果油画【证件照】 |    |
553 | | [visitor-count-badge](https://github.com/jwenjian/visitor-count-badge) | 可以统计Github的README文件的访客数量的badge,支持统计总访客数量和当天的访客数量。 |    |
554 | | [gradex](https://github.com/jwenjian/gradex) | 在线读取图片的两个主色设置为网页渐变背景,同时支持下载渐变背景图。 |    |
555 |
556 |
--------------------------------------------------------------------------------
/assets/ghiblog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jwenjian/ghiblog/4a5ce06817e51d6581d6b22cddaeb0b0aa28537f/assets/ghiblog.png
--------------------------------------------------------------------------------
/assets/wordcloud.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jwenjian/ghiblog/4a5ce06817e51d6581d6b22cddaeb0b0aa28537f/assets/wordcloud.png
--------------------------------------------------------------------------------
/lib/fonts/wqy-microhei.ttc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jwenjian/ghiblog/4a5ce06817e51d6581d6b22cddaeb0b0aa28537f/lib/fonts/wqy-microhei.ttc
--------------------------------------------------------------------------------
/main.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # -*- coding: utf-8 -*-
3 |
4 | from github import Github
5 | from github.Issue import Issue
6 | from github.Repository import Repository
7 | import os
8 | import time
9 | import urllib.parse
10 | import codecs
11 | from nasa_client import NasaClient
12 | from word_cloud import WordCloudGenerator
13 |
14 | user: Github
15 | username: str
16 | ghiblog: Repository
17 | cur_time: str
18 |
19 |
20 | def format_issue(issue: Issue):
21 | return '- [%s](%s) %s \t \n' % (
22 | issue.title, issue.html_url, sup('%s :speech_balloon:' % issue.comments))
23 |
24 |
25 | def sup(text: str):
26 | return '%s' % text
27 |
28 |
29 | def sub(text: str):
30 | return '%s' % text
31 |
32 |
33 | def update_readme_md_file(contents):
34 | with codecs.open('README.md', 'w', encoding='utf-8') as f:
35 | f.writelines(contents)
36 | f.flush()
37 | f.close()
38 |
39 |
40 | def login():
41 | global user, username
42 | github_repo_env = os.environ.get('GITHUB_REPOSITORY')
43 | username = github_repo_env[0:github_repo_env.index('/')]
44 | password = os.environ.get('GITHUB_TOKEN')
45 | user = Github(username, password)
46 |
47 |
48 | def get_ghiblog():
49 | global ghiblog
50 | ghiblog = user.get_repo(os.environ.get('GITHUB_REPOSITORY'))
51 |
52 |
53 | def bundle_summary_section():
54 | global ghiblog
55 | global cur_time
56 | global user
57 | global username
58 |
59 | total_label_count = ghiblog.get_labels().totalCount
60 | total_issue_count = ghiblog.get_issues().totalCount
61 |
62 | pic_of_the_day = NasaClient().get_picture_of_the_day()
63 |
64 | summary_section = '''
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 | '''.format(username, total_label_count, cur_time)
83 |
84 | return summary_section
85 |
86 |
87 | def bundle_pinned_issues_section():
88 | global ghiblog
89 |
90 | pinned_label = ghiblog.get_label(':+1:置顶')
91 | pinned_issues = ghiblog.get_issues(labels=(pinned_label,))
92 |
93 | pinned_issues_section = '\n## 置顶 :thumbsup: \n'
94 |
95 | for issue in pinned_issues:
96 | pinned_issues_section += format_issue(issue)
97 |
98 | return pinned_issues_section
99 |
100 |
101 | def format_issue_with_labels(issue: Issue):
102 | global user, username
103 |
104 | labels = issue.get_labels()
105 | labels_str = ''
106 |
107 | for label in labels:
108 | labels_str += '[%s](https://github.com/%s/ghiblog/labels/%s), ' % (
109 | label.name, username, urllib.parse.quote(label.name))
110 |
111 | if '---' in issue.body:
112 | body_summary = issue.body[:issue.body.index('---')]
113 | else:
114 | body_summary = issue.body[:150]
115 | # 如果前150个字符中有代码块,则在 150 个字符中重新截取代码块之前的部分作为 summary
116 | if '```' in body_summary:
117 | body_summary = body_summary[:body_summary.index('```')]
118 |
119 | return '''
120 | #### [{0}]({1}) {2} \t {3}
121 |
122 | :label: : {4}
123 |
124 | {5}
125 |
126 | [更多>>>]({1})
127 |
128 | ---
129 |
130 | '''.format(issue.title, issue.html_url, sup('%s :speech_balloon:' % issue.comments), issue.created_at, labels_str[:-2],
131 | body_summary)
132 |
133 |
134 | def bundle_new_created_section():
135 | global ghiblog
136 |
137 | new_5_created_issues = ghiblog.get_issues()[:5]
138 |
139 | new_created_section = '## 最新 :new: \n'
140 |
141 | for issue in new_5_created_issues:
142 | new_created_section += format_issue_with_labels(issue)
143 |
144 | return new_created_section
145 |
146 |
147 | def bundle_list_by_labels_section():
148 | global ghiblog
149 | global user
150 |
151 | # word cloud
152 | wordcloud_image_url = WordCloudGenerator(ghiblog).generate()
153 |
154 | list_by_labels_section = """
155 | ## 分类 :card_file_box:
156 |
157 |
158 |
159 |
160 | :cloud: 词云 :cloud: 点击词云展开详细分类:point_down:
161 |
162 |
163 | """ % (wordcloud_image_url,)
164 |
165 | all_labels = ghiblog.get_labels()
166 |
167 | for label in all_labels:
168 | temp = ''
169 | # 这里的count是用来计算该label下有多少issue的, 按理说应该是取issues_in_label的totalCount, 但是不知道为什么取出来的一直都是
170 | # 所有的issue数量, 之后再优化.
171 | count = 0
172 | issues_in_label = ghiblog.get_issues(labels=(label,))
173 | for issue in issues_in_label:
174 | temp += format_issue(issue)
175 | count += 1
176 |
177 | list_by_labels_section += '''
178 |
179 | %s\t%s:newspaper:
180 |
181 | %s
182 |
183 |
184 | ''' % (label.name, count, temp)
185 |
186 | list_by_labels_section += """
187 |
188 |
189 | """
190 | return list_by_labels_section
191 |
192 |
193 | def bundle_cover_image_section() -> str:
194 | global ghiblog
195 | cover_label = ghiblog.get_label(':framed_picture:封面')
196 | if cover_label is None:
197 | return ''
198 | cover_issues = ghiblog.get_issues(labels=(cover_label,))
199 | if cover_issues is None or cover_issues.totalCount == 0:
200 | return ''
201 | comments = cover_issues[0].get_comments()
202 | if comments is None or comments.totalCount == 0:
203 | return ''
204 | c = comments[comments.totalCount - 1]
205 | img_md = None
206 | img_desc = ''
207 | if '---' in c.body:
208 | img_md = c.body.split('---')[0]
209 | img_desc = c.body.split('---')[1]
210 | else:
211 | img_md = c.body
212 | if img_md is None:
213 | return ''
214 | img_url = img_md[(img_md.index('(') + 1):img_md.index(')')]
215 | print(img_url)
216 | return '''
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 | {2}
225 |
226 |
227 | '''.format(c.html_url, img_url, img_desc)
228 |
229 |
230 | def bundle_projects_section() -> str:
231 | global ghiblog, username
232 | project_label = ghiblog.get_label('开源')
233 | if not project_label:
234 | return ''
235 | issues = ghiblog.get_issues(labels=(project_label,))
236 | if not issues or issues.totalCount == 0:
237 | return ''
238 | content = ''
239 | for (idx, i) in enumerate(issues):
240 | content += '''
241 | | [{1}](https://github.com/{0}/{1}) | {2} |    |'''.format(
242 | username, i.title, i.body)
243 | if idx == 0:
244 | content += '\n| --- | --- | --- |'
245 | return '''
246 | # 开源项目
247 |
248 | {}
249 |
250 | '''.format(content)
251 |
252 |
253 | def execute():
254 | global cur_time
255 | # common
256 | cur_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
257 |
258 | # 1. login
259 | login()
260 |
261 | # 2. get ghiblog
262 | get_ghiblog()
263 |
264 | # 3. summary section
265 | summary_section = bundle_summary_section()
266 | print(summary_section)
267 |
268 | # 4. pinned issues section
269 | pinned_issues_section = bundle_pinned_issues_section()
270 | print(pinned_issues_section)
271 |
272 | # 5. new created section
273 | new_created_section = bundle_new_created_section()
274 | print(new_created_section)
275 |
276 | # 6. list by labels section
277 | list_by_labels_section = bundle_list_by_labels_section()
278 | print(list_by_labels_section)
279 |
280 | # 7. cover image section
281 | cover_image_section = bundle_cover_image_section()
282 | print(cover_image_section)
283 |
284 | # 8. projects section
285 | projects_section = bundle_projects_section()
286 | print(projects_section)
287 |
288 | # 9. about me section
289 | # about_me_section = bundle_about_me_section()
290 | # print(about_me_section)
291 |
292 | contents = [summary_section, cover_image_section, pinned_issues_section, new_created_section,
293 | list_by_labels_section, projects_section]
294 | update_readme_md_file(contents)
295 |
296 | print('README.md updated successfully!!!')
297 |
298 |
299 | if __name__ == '__main__':
300 | execute()
301 |
--------------------------------------------------------------------------------
/nasa_client/__init__.py:
--------------------------------------------------------------------------------
1 | import json
2 | from urllib import request
3 |
4 |
5 | class NasaPictureOfTheDay(object):
6 | """
7 | Data object representing result of NASA apod API
8 | """
9 |
10 | def __init__(self, copy_right=None, explanation=None, hd_url=None, media_type=None, service_version=None, title=None,
11 | url=None):
12 | self.copy_right = copy_right
13 | self.explanation = explanation
14 | self.hd_url = hd_url
15 | self.media_type = media_type
16 | self.service_version = service_version
17 | self.title = title
18 | self.url = url
19 |
20 | def __str__(self):
21 | return 'copy_right = %s, explanation = %s, hd_url = %s, media_type = %s, service_version = %s, title = %s, url = %s' % (
22 | self.copy_right, self.explanation, self.hd_url, self.media_type, self.service_version, self.title, self.url)
23 |
24 |
25 | class NasaClient(object):
26 | def get_picture_of_the_day(self) -> NasaPictureOfTheDay:
27 | """
28 | Get picture of the day from NASA using the DEMO_KEY, api definition here: https://api.nasa.gov/api.html#apod
29 | :return: The src of the picture of the day
30 | """
31 | req = request.Request(url='https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY')
32 |
33 | try:
34 | with request.urlopen(req, timeout=10) as resp:
35 | result = resp.read()
36 | print(result)
37 | return json.loads(result, object_hook=lambda j: NasaPictureOfTheDay(copy_right=j['copyright'],
38 | explanation=j['explanation'],
39 | hd_url=j['hdurl'],
40 | media_type=j['media_type'],
41 | service_version=j[
42 | 'service_version'],
43 | title=j['title'],
44 | url=j['url']))
45 | except Exception as e:
46 | print('error when get pic from NASA api')
47 | print(e)
48 | """
49 | If cannot get picture of the day from NASA api, then use the 404.jpg from http.cat
50 | """
51 | pic_404 = NasaPictureOfTheDay()
52 | pic_404.title = 'You can\'t see me, Meow~~!'
53 | pic_404.url = 'https://http.cat/404.jpg'
54 | pic_404.explanation = 'Failed to get picture of the day from NASA api, so here is a little cute cat for you, see you tomorrow!'
55 | return pic_404
56 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | PyGithub
2 | wordcloud
3 | matplotlib
4 |
--------------------------------------------------------------------------------
/word_cloud/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ## :artificial_satellite:今日图片
27 |
28 | The Pelican Nebula in Gas, Dust, and Stars
29 |
30 |
31 |
32 |
33 |
34 |
35 | ## 置顶 :thumbsup:
36 | - [影视节目单](https://github.com/jwenjian/ghiblog/issues/71) 4 :speech_balloon:
37 | - [如果风险投资者问你“如果大公司进入市场与你竞争,怎么办?”,你应该如何回答?](https://github.com/jwenjian/ghiblog/issues/70) 1 :speech_balloon:
38 | - [我喜欢的音乐](https://github.com/jwenjian/ghiblog/issues/67) 0 :speech_balloon:
39 | - [我给GitHub的README做了个访客数量统计功能](https://github.com/jwenjian/ghiblog/issues/43) 1 :speech_balloon:
40 | - [书单](https://github.com/jwenjian/ghiblog/issues/22) 0 :speech_balloon:
41 | - [基于CircleCI自动生成并更新GitHub Issue博客的ReadMe](https://github.com/jwenjian/ghiblog/issues/1) 4 :speech_balloon:
42 | ## 最新 :new:
43 |
44 | #### [[From Instapaper] : 消灭 Java 代码的坏味道-InfoQ](https://github.com/jwenjian/ghiblog/issues/109) 0 :speech_balloon: 2019-09-20 03:53:58
45 |
46 | :label: :
47 |
48 | 消灭 Java 代码的“坏味道”-InfoQ
49 | 导读 明代王阳明先生在《传习录》谈为学之道时说: 私欲日生,如地上尘,一日不扫,便又有一层。着实用功,便见道无终穷,愈探愈深,必使精白无一毫不彻方可。 代码中的 " 坏味道 ",如 " 私欲 " 如 " 灰尘 ",每天都在增加,一日不去清除,便会越累越多。如果用功去清除这些 " 坏味道…
50 |
51 |
52 |
53 |
54 | [更多>>>](https://github.com/jwenjian/ghiblog/issues/109)
55 |
56 | ---
57 |
58 |
59 | #### [[From Instapaper] : 电子邮件怎样暴露你的信息-InfoQ](https://github.com/jwenjian/ghiblog/issues/108) 0 :speech_balloon: 2019-09-18 06:51:23
60 |
61 | :label: :
62 |
63 | 电子邮件怎样暴露你的信息?-InfoQ
64 | 他们在监视你,你可以从像素来判断。 你的收件箱正在注视着你。是的,我们大多数人都知道我们的线上活动可以被追踪,但是你可能对收到这样的邮件数量感到吃惊,这些邮件可以告诉他们何时何地打开过,以及打开的频率。…
65 |
66 |
67 |
68 |
69 | [更多>>>](https://github.com/jwenjian/ghiblog/issues/108)
70 |
71 | ---
72 |
73 |
74 | #### [AirPano.com: 360° 全景图片 + 视频展示世界各地美景](https://github.com/jwenjian/ghiblog/issues/106) 0 :speech_balloon: 2019-09-13 13:35:48
75 |
76 | :label: : [:earth_africa:网站收藏](https://github.com/jwenjian/ghiblog/labels/%3Aearth_africa%3A%E7%BD%91%E7%AB%99%E6%94%B6%E8%97%8F)
77 |
78 | [AirPano.com](https://www.airpano.com)
79 |
80 | 360°全景图片/视频, 在线欣赏世界各地美景.
81 |
82 | 截图:
83 |
84 | > [Lesser Antilles, Caribbean Sea](https://www.airpano.com/360photo/caribbean/)
85 |
86 | 
87 |
88 | > [北京](https://www.airpano.com/360photo/Beijing-China/)
89 |
90 |
91 |
92 | [更多>>>](https://github.com/jwenjian/ghiblog/issues/106)
93 |
94 | ---
95 |
96 |
97 | #### [springboot + mybatis 打印SQL日志到控制台](https://github.com/jwenjian/ghiblog/issues/105) 0 :speech_balloon: 2019-09-13 13:34:42
98 |
99 | :label: : [:coffee:JAVA](https://github.com/jwenjian/ghiblog/labels/%3Acoffee%3AJAVA), [:leaves:Spring](https://github.com/jwenjian/ghiblog/labels/%3Aleaves%3ASpring)
100 |
101 | 配置 mybatis-springboot-starter, 在控制台上打印出 mybatis 生成的 SQL 语句, 用于调试.
102 |
103 | > ⚠️ 不适用于生产环境.
104 |
105 |
106 |
107 | [更多>>>](https://github.com/jwenjian/ghiblog/issues/105)
108 |
109 | ---
110 |
111 |
112 | #### [负载均衡](https://github.com/jwenjian/ghiblog/issues/104) 0 :speech_balloon: 2019-09-05 16:20:13
113 |
114 | :label: : [:coffee:JAVA](https://github.com/jwenjian/ghiblog/labels/%3Acoffee%3AJAVA), [架构](https://github.com/jwenjian/ghiblog/labels/%E6%9E%B6%E6%9E%84)
115 |
116 | > 摘自 [apache dubbo](http://dubbo.apache.org/zh-cn/docs/source_code_guide/loadbalance.html)
117 |
118 | 当一个接口有多个服务提供者时, dubbo支持以下几种策略在服务提供者之间进行负载均衡的转发:
119 | 1. 加权随机
120 | 2. 最小活跃
121 | 3. 一致性hash
122 | 4. 加权轮询
123 |
124 | 对于每个策略都有对应的代码及讲解, 可以作为负载均衡相关知识的学习材料
125 |
126 |
127 |
128 | [更多>>>](https://github.com/jwenjian/ghiblog/issues/104)
129 |
130 | ---
131 |
132 |
133 | ## 分类 :card_file_box:
134 |
135 |
136 |
137 |
138 | :cloud: 词云 :cloud: 点击词云展开详细分类:point_down:
139 |
140 |
141 |
142 |
143 | :+1:置顶 6:newspaper:
144 |
145 | - [影视节目单](https://github.com/jwenjian/ghiblog/issues/71) 4 :speech_balloon:
146 | - [如果风险投资者问你“如果大公司进入市场与你竞争,怎么办?”,你应该如何回答?](https://github.com/jwenjian/ghiblog/issues/70) 1 :speech_balloon:
147 | - [我喜欢的音乐](https://github.com/jwenjian/ghiblog/issues/67) 0 :speech_balloon:
148 | - [我给GitHub的README做了个访客数量统计功能](https://github.com/jwenjian/ghiblog/issues/43) 1 :speech_balloon:
149 | - [书单](https://github.com/jwenjian/ghiblog/issues/22) 0 :speech_balloon:
150 | - [基于CircleCI自动生成并更新GitHub Issue博客的ReadMe](https://github.com/jwenjian/ghiblog/issues/1) 4 :speech_balloon:
151 |
152 |
153 |
154 |
155 |
156 | :art:前端 13:newspaper:
157 |
158 | - [日本邮政官网 - 印章生成器](https://github.com/jwenjian/ghiblog/issues/95) 0 :speech_balloon:
159 | - [HTTP Content-type 对照表](https://github.com/jwenjian/ghiblog/issues/93) 0 :speech_balloon:
160 | - [Permission denied when running npm install](https://github.com/jwenjian/ghiblog/issues/90) 0 :speech_balloon:
161 | - [使用渐变一个div画Chrome浏览器logo](https://github.com/jwenjian/ghiblog/issues/80) 0 :speech_balloon:
162 | - [Brandmark Logo Maker - 基于人工智能的LOGO生成工具](https://github.com/jwenjian/ghiblog/issues/79) 0 :speech_balloon:
163 | - [[From Instapaper] : 臆病な魔女](https://github.com/jwenjian/ghiblog/issues/58) 3 :speech_balloon:
164 | - [[From Instapaper] : 前端必会四步带你吃透浏览器渲染基本原理](https://github.com/jwenjian/ghiblog/issues/55) 0 :speech_balloon:
165 | - [关于浏览器自动填充](https://github.com/jwenjian/ghiblog/issues/42) 0 :speech_balloon:
166 | - [insshot: 自动截屏保存ins用户的最新post](https://github.com/jwenjian/ghiblog/issues/34) 0 :speech_balloon:
167 | - [使用淘宝镜像安装puppeteer](https://github.com/jwenjian/ghiblog/issues/32) 0 :speech_balloon:
168 | - [TKinter教程](https://github.com/jwenjian/ghiblog/issues/25) 0 :speech_balloon:
169 | - [中国色-收集中国传统颜色的网站](https://github.com/jwenjian/ghiblog/issues/20) 0 :speech_balloon:
170 | - [CSS隐藏元素滚动条](https://github.com/jwenjian/ghiblog/issues/15) 0 :speech_balloon:
171 |
172 |
173 |
174 |
175 |
176 | :beetle:Bug追踪 3:newspaper:
177 |
178 | - [Permission denied when running npm install](https://github.com/jwenjian/ghiblog/issues/90) 0 :speech_balloon:
179 | - [Internet troubleshooting: website (www.microsoft.com) is online but isn't responding to connection attempts](https://github.com/jwenjian/ghiblog/issues/66) 0 :speech_balloon:
180 | - [C++: jni.h: no such file or directory ](https://github.com/jwenjian/ghiblog/issues/28) 0 :speech_balloon:
181 |
182 |
183 |
184 |
185 |
186 | :books:阅读 7:newspaper:
187 |
188 | - [An FBI Behaviour Expert Explains How to Quickly Build Trust With Anyone](https://github.com/jwenjian/ghiblog/issues/99) 0 :speech_balloon:
189 | - [微博-刘大可先生:关于“植物身上的黄金分割”的叫你恍然大悟的文章](https://github.com/jwenjian/ghiblog/issues/97) 0 :speech_balloon:
190 | - [如果风险投资者问你“如果大公司进入市场与你竞争,怎么办?”,你应该如何回答?](https://github.com/jwenjian/ghiblog/issues/70) 1 :speech_balloon:
191 | - [[From Instapaper] : 每家门上都挂个西瓜邻居拍照发上网你有素质的样子太美](https://github.com/jwenjian/ghiblog/issues/68) 0 :speech_balloon:
192 | - [[From Instapaper] : 关注英媒中国理所应当鄙视英国](https://github.com/jwenjian/ghiblog/issues/54) 0 :speech_balloon:
193 | - [[From Instapaper] : 中国为什么不搞多党竞争甚至一些党员干部都不知怎么回答](https://github.com/jwenjian/ghiblog/issues/47) 0 :speech_balloon:
194 | - [书单](https://github.com/jwenjian/ghiblog/issues/22) 0 :speech_balloon:
195 |
196 |
197 |
198 |
199 |
200 | :camera_flash:随拍 6:newspaper:
201 |
202 | - [近期生活随拍](https://github.com/jwenjian/ghiblog/issues/89) 0 :speech_balloon:
203 | - [青岛之行随拍](https://github.com/jwenjian/ghiblog/issues/44) 2 :speech_balloon:
204 | - [端午节随拍](https://github.com/jwenjian/ghiblog/issues/31) 0 :speech_balloon:
205 | - [2019年的第一次旅行](https://github.com/jwenjian/ghiblog/issues/17) 0 :speech_balloon:
206 | - [本周生活随拍](https://github.com/jwenjian/ghiblog/issues/10) 0 :speech_balloon:
207 | - [借光计划-798艺术区](https://github.com/jwenjian/ghiblog/issues/8) 0 :speech_balloon:
208 |
209 |
210 |
211 |
212 |
213 | :coffee:JAVA 8:newspaper:
214 |
215 | - [springboot + mybatis 打印SQL日志到控制台](https://github.com/jwenjian/ghiblog/issues/105) 0 :speech_balloon:
216 | - [负载均衡](https://github.com/jwenjian/ghiblog/issues/104) 0 :speech_balloon:
217 | - [如何在优雅地Spring 中实现消息的发送和消费](https://github.com/jwenjian/ghiblog/issues/85) 0 :speech_balloon:
218 | - [如何优雅关闭 Spring Boot 应用](https://github.com/jwenjian/ghiblog/issues/72) 0 :speech_balloon:
219 | - [start.spring.io支持在线预览生成的文件内容](https://github.com/jwenjian/ghiblog/issues/63) 1 :speech_balloon:
220 | - [[From Instapaper] : Java.lang.Void 与 void 的比较及使用](https://github.com/jwenjian/ghiblog/issues/60) 0 :speech_balloon:
221 | - [How to prevent XXE injection when convert xml to object in java](https://github.com/jwenjian/ghiblog/issues/37) 0 :speech_balloon:
222 | - [配置SpringBoot定时任务线程池](https://github.com/jwenjian/ghiblog/issues/21) 0 :speech_balloon:
223 |
224 |
225 |
226 |
227 |
228 | :computer:Windows 12:newspaper:
229 |
230 | - [[From Instapaper] : CPUID](https://github.com/jwenjian/ghiblog/issues/74) 0 :speech_balloon:
231 | - [如何在 Chromium 版 Edge 浏览器上安装 Google Chrome 应用商店的扩展](https://github.com/jwenjian/ghiblog/issues/73) 0 :speech_balloon:
232 | - [Internet troubleshooting: website (www.microsoft.com) is online but isn't responding to connection attempts](https://github.com/jwenjian/ghiblog/issues/66) 0 :speech_balloon:
233 | - [[From Instapaper] : Task Scheduler - Windows applications | Windows上的定时任务管理器](https://github.com/jwenjian/ghiblog/issues/57) 1 :speech_balloon:
234 | - [pydice: Python的GUI应用 - 课堂点名工具](https://github.com/jwenjian/ghiblog/issues/36) 1 :speech_balloon:
235 | - [PAGE - Python Automatic GUI Generator](https://github.com/jwenjian/ghiblog/issues/35) 0 :speech_balloon:
236 | - [调整Typora显示宽度](https://github.com/jwenjian/ghiblog/issues/18) 0 :speech_balloon:
237 | - [Windows截图工具-Snipaste](https://github.com/jwenjian/ghiblog/issues/13) 0 :speech_balloon:
238 | - [Windows工具-制作启动U盘](https://github.com/jwenjian/ghiblog/issues/11) 0 :speech_balloon:
239 | - [智能屏幕护眼软件: f.lux](https://github.com/jwenjian/ghiblog/issues/5) 0 :speech_balloon:
240 | - [windows系统-gif 动画录制软件](https://github.com/jwenjian/ghiblog/issues/4) 0 :speech_balloon:
241 | - [谷歌浏览器原生支持触控板快速前进后退](https://github.com/jwenjian/ghiblog/issues/3) 0 :speech_balloon:
242 |
243 |
244 |
245 |
246 |
247 | :computer:计算机 9:newspaper:
248 |
249 | - [使用Alt-svc自举 HTTP/3 explained](https://github.com/jwenjian/ghiblog/issues/98) 0 :speech_balloon:
250 | - [[From Instapaper] : Distinguished Names](https://github.com/jwenjian/ghiblog/issues/51) 0 :speech_balloon:
251 | - [[From Instapaper] : Http response header - Age](https://github.com/jwenjian/ghiblog/issues/50) 0 :speech_balloon:
252 | - [关于浏览器自动填充](https://github.com/jwenjian/ghiblog/issues/42) 0 :speech_balloon:
253 | - [C++: Ignore warnings C4996](https://github.com/jwenjian/ghiblog/issues/30) 0 :speech_balloon:
254 | - [C++: 引用和指针](https://github.com/jwenjian/ghiblog/issues/29) 0 :speech_balloon:
255 | - [C++: jni.h: no such file or directory ](https://github.com/jwenjian/ghiblog/issues/28) 0 :speech_balloon:
256 | - [C语言-位运算符](https://github.com/jwenjian/ghiblog/issues/27) 0 :speech_balloon:
257 | - [HSTS](https://github.com/jwenjian/ghiblog/issues/14) 0 :speech_balloon:
258 |
259 |
260 |
261 |
262 |
263 | :earth_africa:网站收藏 15:newspaper:
264 |
265 | - [AirPano.com: 360° 全景图片 + 视频展示世界各地美景](https://github.com/jwenjian/ghiblog/issues/106) 0 :speech_balloon:
266 | - [Mixkit 发布免费可商用的艺术画与插图平台 - 小众软件](https://github.com/jwenjian/ghiblog/issues/101) 0 :speech_balloon:
267 | - [ColouriseSG: 利用AI给黑白照片上色](https://github.com/jwenjian/ghiblog/issues/96) 0 :speech_balloon:
268 | - [日本邮政官网 - 印章生成器](https://github.com/jwenjian/ghiblog/issues/95) 0 :speech_balloon:
269 | - [PowerPoint Countdown Timer](https://github.com/jwenjian/ghiblog/issues/94) 0 :speech_balloon:
270 | - [HTTP Content-type 对照表](https://github.com/jwenjian/ghiblog/issues/93) 0 :speech_balloon:
271 | - [remove.bg - Remove Background from Image ](https://github.com/jwenjian/ghiblog/issues/92) 0 :speech_balloon:
272 | - [Brandmark Logo Maker - 基于人工智能的LOGO生成工具](https://github.com/jwenjian/ghiblog/issues/79) 0 :speech_balloon:
273 | - [Codeimg.io 代码 -> 图片 -> 分享](https://github.com/jwenjian/ghiblog/issues/78) 0 :speech_balloon:
274 | - [[From Instapaper] : 臆病な魔女](https://github.com/jwenjian/ghiblog/issues/58) 3 :speech_balloon:
275 | - [[From Instapaper] : 西尾維新オフィシャルサイト](https://github.com/jwenjian/ghiblog/issues/53) 1 :speech_balloon:
276 | - [HTTP CAT: 用猫的图片来形象的表示每一个http状态码](https://github.com/jwenjian/ghiblog/issues/45) 0 :speech_balloon:
277 | - [中国色-收集中国传统颜色的网站](https://github.com/jwenjian/ghiblog/issues/20) 0 :speech_balloon:
278 | - [Linux命令在线查询手册](https://github.com/jwenjian/ghiblog/issues/12) 0 :speech_balloon:
279 | - [Windows工具-制作启动U盘](https://github.com/jwenjian/ghiblog/issues/11) 0 :speech_balloon:
280 |
281 |
282 |
283 |
284 |
285 | :hammer:软件 11:newspaper:
286 |
287 | - [PowerPoint Countdown Timer](https://github.com/jwenjian/ghiblog/issues/94) 0 :speech_balloon:
288 | - [[From Instapaper] : CPUID](https://github.com/jwenjian/ghiblog/issues/74) 0 :speech_balloon:
289 | - [如何在 Chromium 版 Edge 浏览器上安装 Google Chrome 应用商店的扩展](https://github.com/jwenjian/ghiblog/issues/73) 0 :speech_balloon:
290 | - [C++: Ignore warnings C4996](https://github.com/jwenjian/ghiblog/issues/30) 0 :speech_balloon:
291 | - [Eclipse.ini使用-vm参数指定JVM](https://github.com/jwenjian/ghiblog/issues/26) 0 :speech_balloon:
292 | - [Eclipse网络代理配置](https://github.com/jwenjian/ghiblog/issues/19) 0 :speech_balloon:
293 | - [调整Typora显示宽度](https://github.com/jwenjian/ghiblog/issues/18) 0 :speech_balloon:
294 | - [Windows截图工具-Snipaste](https://github.com/jwenjian/ghiblog/issues/13) 0 :speech_balloon:
295 | - [Windows工具-制作启动U盘](https://github.com/jwenjian/ghiblog/issues/11) 0 :speech_balloon:
296 | - [智能屏幕护眼软件: f.lux](https://github.com/jwenjian/ghiblog/issues/5) 0 :speech_balloon:
297 | - [windows系统-gif 动画录制软件](https://github.com/jwenjian/ghiblog/issues/4) 0 :speech_balloon:
298 |
299 |
300 |
301 |
302 |
303 | :leaves:Spring 6:newspaper:
304 |
305 | - [springboot + mybatis 打印SQL日志到控制台](https://github.com/jwenjian/ghiblog/issues/105) 0 :speech_balloon:
306 | - [如何在优雅地Spring 中实现消息的发送和消费](https://github.com/jwenjian/ghiblog/issues/85) 0 :speech_balloon:
307 | - [如何优雅关闭 Spring Boot 应用](https://github.com/jwenjian/ghiblog/issues/72) 0 :speech_balloon:
308 | - [start.spring.io支持在线预览生成的文件内容](https://github.com/jwenjian/ghiblog/issues/63) 1 :speech_balloon:
309 | - [How to add custom properties to manifest file with spring boot](https://github.com/jwenjian/ghiblog/issues/24) 0 :speech_balloon:
310 | - [配置SpringBoot定时任务线程池](https://github.com/jwenjian/ghiblog/issues/21) 0 :speech_balloon:
311 |
312 |
313 |
314 |
315 |
316 | :man_technologist:Linux 8:newspaper:
317 |
318 | - [Docker配置HTTP/HTTPS代理](https://github.com/jwenjian/ghiblog/issues/88) 0 :speech_balloon:
319 | - [vbox ubuntu虚拟机扩容方案 虚拟分配空间转换为实际分配空间](https://github.com/jwenjian/ghiblog/issues/87) 0 :speech_balloon:
320 | - [在Ubuntu上安装nodejs、npm](https://github.com/jwenjian/ghiblog/issues/65) 1 :speech_balloon:
321 | - [为Ubuntu系统包管理工具apt配置代理](https://github.com/jwenjian/ghiblog/issues/61) 0 :speech_balloon:
322 | - [调整Typora显示宽度](https://github.com/jwenjian/ghiblog/issues/18) 0 :speech_balloon:
323 | - [Linux命令在线查询手册](https://github.com/jwenjian/ghiblog/issues/12) 0 :speech_balloon:
324 | - [Linux-编译安装nginx源码](https://github.com/jwenjian/ghiblog/issues/9) 0 :speech_balloon:
325 | - [Nginx代理Oracle数据库连接](https://github.com/jwenjian/ghiblog/issues/6) 0 :speech_balloon:
326 |
327 |
328 |
329 |
330 |
331 | :movie_camera:视频 1:newspaper:
332 |
333 | - [我们的生活多愉快~](https://github.com/jwenjian/ghiblog/issues/7) 0 :speech_balloon:
334 |
335 |
336 |
337 |
338 |
339 | :musical_keyboard:音乐 1:newspaper:
340 |
341 | - [我喜欢的音乐](https://github.com/jwenjian/ghiblog/issues/67) 0 :speech_balloon:
342 |
343 |
344 |
345 |
346 |
347 | :robot: AI 2:newspaper:
348 |
349 | - [ColouriseSG: 利用AI给黑白照片上色](https://github.com/jwenjian/ghiblog/issues/96) 0 :speech_balloon:
350 | - [remove.bg - Remove Background from Image ](https://github.com/jwenjian/ghiblog/issues/92) 0 :speech_balloon:
351 |
352 |
353 |
354 |
355 |
356 | :snake:Python 12:newspaper:
357 |
358 | - [Predictably Random](https://github.com/jwenjian/ghiblog/issues/103) 0 :speech_balloon:
359 | - [Python_uuid 学习总结](https://github.com/jwenjian/ghiblog/issues/91) 0 :speech_balloon:
360 | - [[From Instapaper] : How to use Python virtualenv](https://github.com/jwenjian/ghiblog/issues/64) 1 :speech_balloon:
361 | - [[From Instapaper] : The Flask Mega-Tutorial Part I: Hello World! - miguelgrinberg.com](https://github.com/jwenjian/ghiblog/issues/62) 2 :speech_balloon:
362 | - [我给GitHub的README做了个访客数量统计功能](https://github.com/jwenjian/ghiblog/issues/43) 1 :speech_balloon:
363 | - [Python: 对数组进行选择排序](https://github.com/jwenjian/ghiblog/issues/41) 0 :speech_balloon:
364 | - [Python: 对数组进行插入排序](https://github.com/jwenjian/ghiblog/issues/40) 0 :speech_balloon:
365 | - [Python操作剪贴板](https://github.com/jwenjian/ghiblog/issues/38) 0 :speech_balloon:
366 | - [pydice: Python的GUI应用 - 课堂点名工具](https://github.com/jwenjian/ghiblog/issues/36) 1 :speech_balloon:
367 | - [PAGE - Python Automatic GUI Generator](https://github.com/jwenjian/ghiblog/issues/35) 0 :speech_balloon:
368 | - [TKinter教程](https://github.com/jwenjian/ghiblog/issues/25) 0 :speech_balloon:
369 | - [转载-浅谈 Python 的 with 语句](https://github.com/jwenjian/ghiblog/issues/23) 0 :speech_balloon:
370 |
371 |
372 |
373 |
374 |
375 | :video_game:生活 10:newspaper:
376 |
377 | - [近期生活随拍](https://github.com/jwenjian/ghiblog/issues/89) 0 :speech_balloon:
378 | - [舒尔特训练法](https://github.com/jwenjian/ghiblog/issues/75) 0 :speech_balloon:
379 | - [影视节目单](https://github.com/jwenjian/ghiblog/issues/71) 4 :speech_balloon:
380 | - [高铁/动车上插座都在什么位置](https://github.com/jwenjian/ghiblog/issues/59) 2 :speech_balloon:
381 | - [书单](https://github.com/jwenjian/ghiblog/issues/22) 0 :speech_balloon:
382 | - [2019年的第一次旅行](https://github.com/jwenjian/ghiblog/issues/17) 0 :speech_balloon:
383 | - [bye 2018](https://github.com/jwenjian/ghiblog/issues/16) 3 :speech_balloon:
384 | - [本周生活随拍](https://github.com/jwenjian/ghiblog/issues/10) 0 :speech_balloon:
385 | - [借光计划-798艺术区](https://github.com/jwenjian/ghiblog/issues/8) 0 :speech_balloon:
386 | - [我们的生活多愉快~](https://github.com/jwenjian/ghiblog/issues/7) 0 :speech_balloon:
387 |
388 |
389 |
390 |
391 |
392 | Instapaper 11:newspaper:
393 |
394 | - [LinkedIn如何在一台机器上支持几十万条长连接?](https://github.com/jwenjian/ghiblog/issues/77) 0 :speech_balloon:
395 | - [[From Instapaper] : C/C 静态链接库(.a) 与 动态链接库(.so) - 52php - 博客园](https://github.com/jwenjian/ghiblog/issues/76) 0 :speech_balloon:
396 | - [[From Instapaper] : Task Scheduler - Windows applications | Windows上的定时任务管理器](https://github.com/jwenjian/ghiblog/issues/57) 1 :speech_balloon:
397 | - [[From Instapaper] : Should Neil Armstrongs Bootprints Be on the Moon Forever](https://github.com/jwenjian/ghiblog/issues/56) 1 :speech_balloon:
398 | - [[From Instapaper] : 前端必会四步带你吃透浏览器渲染基本原理](https://github.com/jwenjian/ghiblog/issues/55) 0 :speech_balloon:
399 | - [[From Instapaper] : 关注英媒中国理所应当鄙视英国](https://github.com/jwenjian/ghiblog/issues/54) 0 :speech_balloon:
400 | - [[From Instapaper] : 西尾維新オフィシャルサイト](https://github.com/jwenjian/ghiblog/issues/53) 1 :speech_balloon:
401 | - [[From Instapaper] : Distinguished Names](https://github.com/jwenjian/ghiblog/issues/51) 0 :speech_balloon:
402 | - [[From Instapaper] : Http response header - Age](https://github.com/jwenjian/ghiblog/issues/50) 0 :speech_balloon:
403 | - [[From Instapaper] : maven getting "Not Authorized" when trying to access nexus private repository](https://github.com/jwenjian/ghiblog/issues/48) 0 :speech_balloon:
404 | - [[From Instapaper] : 中国为什么不搞多党竞争甚至一些党员干部都不知怎么回答](https://github.com/jwenjian/ghiblog/issues/47) 0 :speech_balloon:
405 |
406 |
407 |
408 |
409 |
410 | JS 2:newspaper:
411 |
412 | - [Permission denied when running npm install](https://github.com/jwenjian/ghiblog/issues/90) 0 :speech_balloon:
413 | - [[From Instapaper] : 西尾維新オフィシャルサイト](https://github.com/jwenjian/ghiblog/issues/53) 1 :speech_balloon:
414 |
415 |
416 |
417 |
418 |
419 | Maven 5:newspaper:
420 |
421 | - [Install parent POM without building Child modules](https://github.com/jwenjian/ghiblog/issues/82) 0 :speech_balloon:
422 | - [[From Instapaper] : maven getting "Not Authorized" when trying to access nexus private repository](https://github.com/jwenjian/ghiblog/issues/48) 0 :speech_balloon:
423 | - [Maven: maven-dependency-plugin:get 通过命令行下载jar包到本地仓库 无需pom文件](https://github.com/jwenjian/ghiblog/issues/39) 0 :speech_balloon:
424 | - [Maven: mvn clean install --fail-at-end](https://github.com/jwenjian/ghiblog/issues/33) 0 :speech_balloon:
425 | - [How to add custom properties to manifest file with spring boot](https://github.com/jwenjian/ghiblog/issues/24) 0 :speech_balloon:
426 |
427 |
428 |
429 |
430 |
431 | Nginx 1:newspaper:
432 |
433 | - [Linux-编译安装nginx源码](https://github.com/jwenjian/ghiblog/issues/9) 0 :speech_balloon:
434 |
435 |
436 |
437 |
438 |
439 | good first issue 2:newspaper:
440 |
441 | - [如果风险投资者问你“如果大公司进入市场与你竞争,怎么办?”,你应该如何回答?](https://github.com/jwenjian/ghiblog/issues/70) 1 :speech_balloon:
442 | - [基于CircleCI自动生成并更新GitHub Issue博客的ReadMe](https://github.com/jwenjian/ghiblog/issues/1) 4 :speech_balloon:
443 |
444 |
445 |
446 |
447 |
448 | 开源 2:newspaper:
449 |
450 | - [比拼 Kafka 大数据分析新秀Pulsar到底好在哪-InfoQ](https://github.com/jwenjian/ghiblog/issues/100) 0 :speech_balloon:
451 | - [一款与 Python 深度集成的 Excel IDE](https://github.com/jwenjian/ghiblog/issues/84) 0 :speech_balloon:
452 |
453 |
454 |
455 |
456 |
457 | 架构 5:newspaper:
458 |
459 | - [负载均衡](https://github.com/jwenjian/ghiblog/issues/104) 0 :speech_balloon:
460 | - [比拼 Kafka 大数据分析新秀Pulsar到底好在哪-InfoQ](https://github.com/jwenjian/ghiblog/issues/100) 0 :speech_balloon:
461 | - [RocketMQ与kafka对比18项差异](https://github.com/jwenjian/ghiblog/issues/83) 0 :speech_balloon:
462 | - [白话中台战略 - InfoQ](https://github.com/jwenjian/ghiblog/issues/81) 0 :speech_balloon:
463 | - [LinkedIn如何在一台机器上支持几十万条长连接?](https://github.com/jwenjian/ghiblog/issues/77) 0 :speech_balloon:
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 | ## 关于:boy:
472 |
473 | [
](https://github.com/jwenjian)
474 |
475 | **Jiang Wenjian**
476 |
477 | :round_pushpin: Beijing, China
478 |
479 | :black_flag: A good code is like a story, not a puzzle.
480 |
--------------------------------------------------------------------------------
/word_cloud/__init__.py:
--------------------------------------------------------------------------------
1 | from wordcloud import WordCloud
2 |
3 |
4 | class WordCloudGenerator(object):
5 | def __init__(self, github_repo):
6 | self._repo = github_repo
7 |
8 | def generate(self) -> str:
9 | if self._repo is None:
10 | print('self._repo is None')
11 | return 'https://http.cat/500'
12 |
13 | frequencies = {}
14 |
15 | # get labels
16 | labels = self._repo.get_labels()
17 |
18 | for label in labels:
19 | issues_in_label = self._repo.get_issues(labels=(label,))
20 | frequencies[label.name] = issues_in_label.totalCount
21 |
22 | print(frequencies)
23 | # generate wordcount image to local dir
24 |
25 | # specify the font to support Chinese word
26 | wc = WordCloud(font_path='lib/fonts/wqy-microhei.ttc', width=1920, height=400)
27 | wc.generate_from_frequencies(frequencies=frequencies)
28 | wc.to_file('assets/wordcloud.png')
29 |
30 | print('wordcloud picture generated successfully!')
31 |
32 | return 'assets/wordcloud.png'
33 |
--------------------------------------------------------------------------------
/word_cloud/assets/ghiblog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jwenjian/ghiblog/4a5ce06817e51d6581d6b22cddaeb0b0aa28537f/word_cloud/assets/ghiblog.png
--------------------------------------------------------------------------------
/word_cloud/assets/wordcloud.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jwenjian/ghiblog/4a5ce06817e51d6581d6b22cddaeb0b0aa28537f/word_cloud/assets/wordcloud.png
--------------------------------------------------------------------------------
/word_cloud/lib/fonts/wqy-microhei.ttc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jwenjian/ghiblog/4a5ce06817e51d6581d6b22cddaeb0b0aa28537f/word_cloud/lib/fonts/wqy-microhei.ttc
--------------------------------------------------------------------------------
/word_cloud/main.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # -*- coding: utf-8 -*-
3 |
4 | from github import Github
5 | from github.Issue import Issue
6 | from github.Repository import Repository
7 | import os
8 | import time
9 | import urllib.parse
10 | import codecs
11 | from nasa_client import NasaClient
12 | from word_cloud import WordCloudGenerator
13 |
14 | user: Github
15 | ghiblog: Repository
16 | cur_time: str
17 |
18 |
19 | def format_issue(issue: Issue):
20 | return '- [%s](%s) %s \t \n' % (
21 | issue.title, issue.html_url, sup('%s :speech_balloon:' % issue.comments))
22 |
23 |
24 | def sup(text: str):
25 | return '%s' % text
26 |
27 |
28 | def sub(text: str):
29 | return '%s' % text
30 |
31 |
32 | def update_readme_md_file(contents):
33 | with codecs.open('README.md', 'w', encoding='utf-8') as f:
34 | f.writelines(contents)
35 | f.flush()
36 | f.close()
37 |
38 |
39 | def login():
40 | global user
41 | username = os.environ.get('GITHUB_LOGIN')
42 | password = os.environ.get('GITHUB_TOKEN')
43 | user = Github(username, password)
44 |
45 |
46 | def get_ghiblog():
47 | global ghiblog
48 | ghiblog = user.get_repo('%s/ghiblog' % user.get_user().login)
49 |
50 |
51 | def bundle_summary_section():
52 | global ghiblog
53 | global cur_time
54 | global user
55 |
56 | total_label_count = ghiblog.get_labels().totalCount
57 | total_issue_count = ghiblog.get_issues().totalCount
58 |
59 | user_login = user.get_user().login
60 | pic_of_the_day = NasaClient().get_picture_of_the_day()
61 |
62 | summary_section = '''
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 | ## :artificial_satellite:今日图片
88 |
89 | {3}
90 |
91 |
92 |
93 |
94 |
95 | '''.format(user_login, total_label_count, cur_time, pic_of_the_day.title, pic_of_the_day.url,
96 | pic_of_the_day.explanation)
97 |
98 | return summary_section
99 |
100 |
101 | def bundle_pinned_issues_section():
102 | global ghiblog
103 |
104 | pinned_label = ghiblog.get_label(':+1:置顶')
105 | pinned_issues = ghiblog.get_issues(labels=(pinned_label,))
106 |
107 | pinned_issues_section = '\n## 置顶 :thumbsup: \n'
108 |
109 | for issue in pinned_issues:
110 | pinned_issues_section += format_issue(issue)
111 |
112 | return pinned_issues_section
113 |
114 |
115 | def format_issue_with_labels(issue: Issue):
116 | global user
117 |
118 | labels = issue.get_labels()
119 | labels_str = ''
120 |
121 | for label in labels:
122 | labels_str += '[%s](https://github.com/%s/ghiblog/labels/%s), ' % (
123 | label.name, user.get_user().login, urllib.parse.quote(label.name))
124 |
125 | if '---' in issue.body:
126 | body_summary = issue.body[:issue.body.index('---')]
127 | else:
128 | body_summary = issue.body[:150]
129 |
130 | return '''
131 | #### [{0}]({1}) {2} \t {3}
132 |
133 | :label: : {4}
134 |
135 | {5}
136 |
137 | [更多>>>]({1})
138 |
139 | ---
140 |
141 | '''.format(issue.title, issue.html_url, sup('%s :speech_balloon:' % issue.comments), issue.created_at, labels_str[:-2],
142 | body_summary)
143 |
144 |
145 | def bundle_new_created_section():
146 | global ghiblog
147 |
148 | new_5_created_issues = ghiblog.get_issues()[:5]
149 |
150 | new_created_section = '## 最新 :new: \n'
151 |
152 | for issue in new_5_created_issues:
153 | new_created_section += format_issue_with_labels(issue)
154 |
155 | return new_created_section
156 |
157 |
158 | def bundle_list_by_labels_section():
159 | global ghiblog
160 | global user
161 |
162 | # word cloud
163 | wordcloud_image_url = WordCloudGenerator(ghiblog).generate()
164 |
165 | list_by_labels_section = """
166 | ## 分类 :card_file_box:
167 |
168 |
169 |
170 |
171 | :cloud: 词云 :cloud: 点击词云展开详细分类:point_down:
172 |
173 |
174 | """ % (wordcloud_image_url,)
175 |
176 | all_labels = ghiblog.get_labels()
177 |
178 | for label in all_labels:
179 | temp = ''
180 | # 这里的count是用来计算该label下有多少issue的, 按理说应该是取issues_in_label的totalCount, 但是不知道为什么取出来的一直都是
181 | # 所有的issue数量, 之后再优化.
182 | count = 0
183 | issues_in_label = ghiblog.get_issues(labels=(label,))
184 | for issue in issues_in_label:
185 | temp += format_issue(issue)
186 | count += 1
187 |
188 | list_by_labels_section += '''
189 |
190 | %s\t%s:newspaper:
191 |
192 | %s
193 |
194 |
195 | ''' % (label.name, count, temp)
196 |
197 | list_by_labels_section += """
198 |
199 |
200 | """
201 | return list_by_labels_section
202 |
203 |
204 | def bundle_about_me_section():
205 | global user
206 |
207 | about_me_section = '''
208 | ## 关于:boy:
209 |
210 | [
](%s)
211 |
212 | **%s**
213 |
214 | :round_pushpin: %s
215 |
216 | :black_flag: %s
217 | ''' % (user.get_user().name, user.get_user().avatar_url, user.get_user().html_url, user.get_user().name,
218 | user.get_user().location,
219 | user.get_user().bio)
220 |
221 | return about_me_section
222 |
223 |
224 | def execute():
225 | global cur_time
226 | # common
227 | cur_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
228 |
229 | # 1. login
230 | login()
231 |
232 | # 2. get ghiblog
233 | get_ghiblog()
234 |
235 | # 3. summary section
236 | summary_section = bundle_summary_section()
237 | print(summary_section)
238 |
239 | # 4. pinned issues section
240 | pinned_issues_section = bundle_pinned_issues_section()
241 | print(pinned_issues_section)
242 |
243 | # 5. new created section
244 | new_created_section = bundle_new_created_section()
245 | print(new_created_section)
246 |
247 | # 6. list by labels section
248 | list_by_labels_section = bundle_list_by_labels_section()
249 | print(list_by_labels_section)
250 |
251 | # 7. about me section
252 | about_me_section = bundle_about_me_section()
253 | print(about_me_section)
254 |
255 | contents = [summary_section, pinned_issues_section, new_created_section, list_by_labels_section, about_me_section]
256 | update_readme_md_file(contents)
257 |
258 | print('README.md updated successfully!!!')
259 |
260 |
261 | if __name__ == '__main__':
262 | execute()
263 |
--------------------------------------------------------------------------------
/word_cloud/nasa_client/__init__.py:
--------------------------------------------------------------------------------
1 | import json
2 | from urllib import request
3 |
4 |
5 | class NasaPictureOfTheDay(object):
6 | """
7 | Data object representing result of NASA apod API
8 | """
9 |
10 | def __init__(self, copy_right=None, explanation=None, hd_url=None, media_type=None, service_version=None, title=None,
11 | url=None):
12 | self.copy_right = copy_right
13 | self.explanation = explanation
14 | self.hd_url = hd_url
15 | self.media_type = media_type
16 | self.service_version = service_version
17 | self.title = title
18 | self.url = url
19 |
20 | def __str__(self):
21 | return 'copy_right = %s, explanation = %s, hd_url = %s, media_type = %s, service_version = %s, title = %s, url = %s' % (
22 | self.copy_right, self.explanation, self.hd_url, self.media_type, self.service_version, self.title, self.url)
23 |
24 |
25 | class NasaClient(object):
26 | def get_picture_of_the_day(self) -> NasaPictureOfTheDay:
27 | """
28 | Get picture of the day from NASA using the DEMO_KEY, api definition here: https://api.nasa.gov/api.html#apod
29 | :return: The src of the picture of the day
30 | """
31 | req = request.Request(url='https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY')
32 |
33 | try:
34 | with request.urlopen(req, timeout=10) as resp:
35 | result = resp.read()
36 | print(result)
37 | return json.loads(result, object_hook=lambda j: NasaPictureOfTheDay(copy_right=j['copyright'],
38 | explanation=j['explanation'],
39 | hd_url=j['hdurl'],
40 | media_type=j['media_type'],
41 | service_version=j[
42 | 'service_version'],
43 | title=j['title'],
44 | url=j['url']))
45 | except Exception as e:
46 | print('error when get pic from NASA api')
47 | print(e)
48 | """
49 | If cannot get picture of the day from NASA api, then use the 404.jpg from http.cat
50 | """
51 | pic_404 = NasaPictureOfTheDay()
52 | pic_404.title = 'You can\'t see me, Meow~~!'
53 | pic_404.url = 'https://http.cat/404.jpg'
54 | pic_404.explanation = 'Failed to get picture of the day from NASA api, so here is a little cute cat for you, see you tomorrow!'
55 | return pic_404
56 |
--------------------------------------------------------------------------------
/word_cloud/requirements.txt:
--------------------------------------------------------------------------------
1 | PyGithub
2 | wordcloud
3 | matplotlib
4 |
--------------------------------------------------------------------------------