Skip to content

Commit 28f8d5a

Browse files
committed
bugfix 生成的书签文件错误
1 parent 9648798 commit 28f8d5a

File tree

14 files changed

+690
-662
lines changed

14 files changed

+690
-662
lines changed

android-dev-bookmarks.html

+556-554
Large diffs are not rendered by default.

generate_browser_bookmarks_html_file.sh

+15-42
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Rocko(rocko.xyz)
88
# -----------------------------------------------------
99

10-
DEBUG=false
10+
DEBUG=true
1111
OUTPUT_FILE_NAME='android-dev-bookmarks.html' # 最终生成的文件
1212
FILE_LIST=`ls -d */|sed 's|[/]||g'` # 所有分类文件夹
1313
let BASE_TITLE_FLAG_CHAR_NUM=2
@@ -28,7 +28,7 @@ generate() {
2828
#
2929
appendToFile '<!-- 通过浏览器书签管理器将此HTML文件导入书签 -->'
3030
appendToFile '<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">'
31-
appendToFile '<DT><H3>android-dev-bookmarks</H3><DT>'
31+
appendToFile '<H1>android-dev-bookmarks</H1>'
3232
appendToFile '<DL>'
3333

3434
generateContent
@@ -43,7 +43,7 @@ generateContent() {
4343
log '开始遍历生成内容...'
4444

4545
# :-)
46-
appendToFile '<DT><A HREF="http://adb.rocko.xyz/">ADB</A></DT>'
46+
appendToFile '<DT><A HREF="http://adb.rocko.xyz/">ADB</A>'
4747

4848
for file in ${FILE_LIST}
4949
do
@@ -52,7 +52,7 @@ generateContent() {
5252
log '##################################################################################################'
5353

5454
# 每个文件夹分类都新建一级<DT>
55-
appendToFile '<DT><H3>'${file}'</H3></DT>'
55+
appendToFile '<DT><H3>'${file}'</H3>'
5656
appendToFile '<DL>'
5757

5858
isReadingSiteLine=false
@@ -61,38 +61,14 @@ generateContent() {
6161
shouldAppendTitleTail=false
6262
while read line # 读出每一行处理
6363
do ## TODO 多级标题时的处理
64+
line=`echo ${line} | tr -d '\r' | tr -d '\n'` # 某些会带有这特殊符号导致换行,去掉。。。 WTF
6465
if [[ ${line} == \#* ]]; then # 每一Markdown标题即为一分类
65-
line=`echo ${line} | tr -d '\r' | tr -d '\n'` # 某些会带有这特殊符号导致换行,去掉。。。
66-
titleFlagChar=${line%%' '*}
67-
let titleFlagNum=${#titleFlagChar}
68-
69-
if [ ${titleFlagNum} == ${BASE_TITLE_FLAG_CHAR_NUM} ] && [ ${shouldAppendTitleTail} == true ]; then
70-
appendToFile '</DL>'
71-
fi
72-
73-
if [[ ${titleFlagNum} > ${BASE_TITLE_FLAG_CHAR_NUM} ]]; then
74-
shouldAppendTitleTail=true
75-
else
76-
shouldAppendTitleTail=false
77-
fi
78-
79-
80-
log $titleFlagChar'-'$titleFlagNum
81-
82-
83-
isReadingSiteLine=false
84-
let titleNum=titleNum+1
85-
log ${line}
86-
log $titleNum
66+
titleFlagChar=${line%%' '*} # 标题空格截取
8767
# echo ${line#*' '} # ‘#’后的标题文字
88-
appendToFile '<DT><H3>'${line#*' '}'</H3></DT>'
89-
68+
appendToFile '<DT><H3>'${line#*' '}'</H3>'
9069
appendToFile '<DL>'
9170

92-
elif [[ ${line} == \[* ]]; then
93-
94-
isReadingSiteLine=true
95-
71+
elif [[ ${line} == \[* ]]; then
9672
# log '网址:'${line}
9773
site_name=${line#*[}
9874
site_name=${site_name%%]*}
@@ -101,24 +77,21 @@ generateContent() {
10177
site_href=${site_href%)*}
10278

10379
# log $site_name $site_href
104-
appendToFile '<DT><A HREF="'${site_href}'">'${site_name}'</A></DT>'
105-
else
106-
107-
if [[ ${isReadingSiteLine} == true ]]; then
108-
appendToFile '</DL>'
109-
let titleNum=0
110-
isReadingSiteLine=false
111-
fi
80+
appendToFile '<DT><A HREF="'${site_href}'">'${site_name}'</A>'
81+
elif [[ ${line} == '.' ]]; then
82+
appendToFile '</DL>'
83+
elif [[ ${line} == '..' ]]; then
84+
appendToFile '</DL>'
85+
appendToFile '</DL>'
86+
#else
11287
fi
11388

11489
done < ${file}"/README.md" # 每一文件夹分类里的README具体书签内容
115-
11690
appendToFile '</DL>'
11791
done
11892
}
11993

12094

121-
12295
rm -f ${OUTPUT_FILE_NAME}
12396
touch ${OUTPUT_FILE_NAME}
12497
generate

代码-库/README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ title: 代码-库
88
[codota](http://www.codota.com/) - Find Great Code Examples
99
[searchcode](https://searchcode.com/) - Search over 20 billion lines of code.
1010
[codota](https://www.codota.com/) - Find Great Code Examples
11-
11+
.
1212

1313
----------------------------------------
1414

@@ -26,13 +26,14 @@ title: 代码-库
2626
[codeKK开源项目集合](http://p.codekk.com/)
2727
[libtastic](http://www.libtastic.com/) - 通过流行的应用来发现 Top Android libraries,支持应用搜索。
2828
[AppBrain - libraries](http://www.appbrain.com/stats/libraries/dev) - AppBrain 上分析的库使用排行。
29-
29+
.
3030

3131
----------------------------------------
3232

33-
## 开源 App
33+
## 开源App
3434

3535
[F-Droid](https://f-droid.org/) - Free and Open Source Android App Repository
3636
[Android Open Source Project](http://www.androidopensourceproject.com/) - A collection of android open source project
3737
[Open-Source Android Apps](https://github.com/pcqpcq/open-source-android-apps) - GitHub 上的项目,收集优秀的开源 App,分类详细内容多。
3838

39+
.

博客/README.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ title: 博客
4949
[廖祜秋liaohuqiu_秋百万](http://liaohuqiu.net/cn/)
5050
[技术小黑屋](http://droidyue.com/)
5151
[Gityuan](http://gityuan.com/) - 曾就职于IBM、Lenovo,目前就职于小米MIUI部门
52-
52+
53+
.
5354

5455
### 国外
5556

@@ -102,8 +103,9 @@ title: 博客
102103
[Ian Lake](https://medium.com/@ianhlake) - Android Developer Advocate at Google and Runner
103104
[Wojtek Kaliciński](https://medium.com/@wkalicinski) - Android Developer Advocate @ Google
104105
[Reto Meier](https://medium.com/@retomeier) - Android Developer Advocate @ Google, software engineer, and author of Professional Android 4 Application Development.
105-
[Riggaroo](https://riggaroo.co.za/) - Google Developer Expert for Android. Senior Android Developer based in South Africa.
106+
[Riggaroo](https://riggaroo.co.za/) - Google Developer Expert for Android. Senior Android Developer based in South Africa
106107

108+
..
107109

108110
----------------------------------------
109111

@@ -112,12 +114,14 @@ title: 博客
112114
[deepinmind的技术博客](http://it.deepinmind.com/)
113115
[花样的年华](http://calvin1978.blogcn.com/)
114116

117+
.
115118

116119
----------------------------------------
117120

118121
## 算法
119122
[结构之法 算法之道](http://blog.csdn.net/v_july_v)
120123

124+
.
121125

122126
----------------------------------------
123127

@@ -143,5 +147,6 @@ title: 博客
143147
[LinkedIn Engineering](https://engineering.linkedin.com/)
144148
[Bugly博客](http://bugly.qq.com/blog/)
145149
[500px Engineering Blog](http://developers.500px.com/)
146-
[Yalantis](yalantis.com/blog/) - Blog about app development.
150+
[Yalantis](http://yalantis.com/blog/)
147151

152+
.

在线学习/README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ title: 在线学习
1414
[菜鸟教程](http://www.runoob.com/)
1515
[极客标签](http://www.gbtags.com/)
1616
[极客学院](http://www.jikexueyuan.com/)
17-
[慕课网](http://www.imooc.com/)
17+
[慕课网](http://www.imooc.com/)
18+
19+
.
1820

1921
## 直播撸代码
2022

21-
[Livecoding](https://www.livecoding.tv/) - 直播撸代码...
23+
[Livecoding](https://www.livecoding.tv/) - 直播撸代码
24+
25+
.

官方资料/README.md

+12-7
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ title: 官方资料
1313
[github.com/android](http://android.github.io/)
1414
[android-developer-preview](https://code.google.com/p/android-developer-preview/) - A public project for reporting issues with Android Developer Preview releases
1515
[Android Dashboards](http://developer.android.com/intl/zh-cn/about/dashboards/index.html) - Android 平台数据,7天一更新
16-
[Git repositories on android](https://android.googlesource.com/) - Android源码必备
16+
[Git repositories on android](https://android.googlesource.com/) - Android源码必备
1717

18+
.
1819

1920
----------------------------------------
2021

@@ -26,8 +27,9 @@ title: 官方资料
2627
[Google Devlopers Blog](http://googledevelopers.blogspot.com/)
2728
[Google Open Source Blog](http://google-opensource.blogspot.com/)
2829
[Google testing blog](http://googletesting.blogspot.com/)
29-
[Google Developers @ Dedium](medium.com/google-developers) - For Engineers, by Engineers
30+
[Google Developers @ Dedium](medium.com/google-developers) - For Engineers, by Engineers
3031

32+
.
3133

3234
----------------------------------------
3335

@@ -43,16 +45,18 @@ title: 官方资料
4345
[Google Plus 社群 - Android Developer Tools](https://plus.google.com/communities/114791428968349268860)
4446
[Google Plus 社群 - Android Development](https://plus.google.com/communities/105153134372062985968)
4547
[Google Plus 社群 - Android Performance Patterns](https://plus.google.com/communities/116342551728637785407)
46-
[Twitter - Android Developers](https://twitter.com/androiddev/)
48+
[Twitter - Android Developers](https://twitter.com/androiddev/)
4749

50+
.
4851

4952
----------------------------------------
5053

5154
## 活动会议
5255

5356
[Google I/O](https://events.google.com/) - [I/O 2015](https://events.google.com/io2015/)
54-
[Android Dev Summit](https://androiddevsummit.withgoogle.com/)
57+
[Android Dev Summit](https://androiddevsummit.withgoogle.com/)
5558

59+
.
5660

5761
----------------------------------------
5862

@@ -61,8 +65,9 @@ title: 官方资料
6165
[Android Plugin DSL Reference](http://google.github.io/android-gradle-dsl/current/) - DSL reference for Android Gradle Plugin.
6266
[Android Testing Support Library](https://google.github.io/android-testing-support-library/)
6367
[Google Java Style](http://google.github.io/styleguide/javaguide.html) - Google Java 编码规范文档
64-
[High-Performance Audio on Android ](https://googlesamples.github.io/android-audio-high-performance/) - 创建高性能的音频应用,一些开发向导、相关资料链接、代码示例。
68+
[High-Performance Audio on Android ](https://googlesamples.github.io/android-audio-high-performance/) - 创建高性能的音频应用,一些开发向导、相关资料链接、代码示例。
6569

70+
.
6671

6772
----------------------------------------
6873

@@ -72,6 +77,6 @@ title: 官方资料
7277
[Nexus Files for Developers](https://developers.google.com/android/nexus/images/)
7378
[Codelabs](http://www.code-labs.io/)
7479
[Cloud Test Lab]([](https://developers.google.com/cloud-test-lab/)
75-
[Material icons](https://design.google.com/icons/) - Material icons 官方主页,提供搜索下载
80+
[Material icons](https://design.google.com/icons/) - Material icons 官方主页,提供搜索下载
7681

77-
82+
.

工具-资源/README.md

+28-17
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ title: 工具-资源
77
[Jennift](http://jennift.com/)
88
[Inloop Open Source](http://inloop.github.io/)
99
[AppBrain Stats](http://www.appbrain.com/stats/) - Android Operating System Statistics,包括 Play 上的 App 的各种状态、Android 设备的各种状态、Android library 使用的各种状态和排行等。
10-
[友盟全域指数](http://www.umindex.com/devices/android_resolutions)
10+
[友盟全域指数](http://www.umindex.com/devices/android_resolutions)
1111

12+
.
1213

1314
----------------------------------------
1415

15-
## UI 界面设计
16+
## UI界面设计
1617

1718
### 原型
1819

@@ -21,20 +22,21 @@ title: 工具-资源
2122
[Pixate](http://www.pixate.com/) - Make your ideas a reality
2223
[墨刀](https://modao.cc/)
2324
[invision](http://www.invisionapp.com/)
24-
[马克鳗](http://www.getmarkman.com/) - 高效的设计稿标注、测量工具
25+
[马克鳗](http://www.getmarkman.com/) - 高效的设计稿标注、测量工具
2526

27+
.
2628

27-
28-
### 资源工具
29+
### 资源工具
2930

3031
[AndroidAssetStudio](http://romannurik.github.io/AndroidAssetStudio/)
3132
[Medialoot](http://medialoot.com/) - Design is easy with Medialoot.
3233
[material palette](http://www.materialpalette.com/) - Material Design 配色工具
3334
[Android Holo Colors Generator](http://android-holo-colors.com/)
3435
[Facebook Design Resources](http://facebook.github.io/design/) - Facebook 设计师设计的免费设计资源。
3536
[UpLabs](http://www.uplabs.com/) - 为开发者和设计师而生,每日发现新鲜的设计和开发资源、寻找一个特定的用户界面解决方案或库。
36-
[Android™ Drawables](http://androiddrawables.com/) - 发现和比较不同版本 Android 平台上的资源文件。
37+
[Android™ Drawables](http://androiddrawables.com/) - 发现和比较不同版本 Android 平台上的资源文件。
3738

39+
.
3840

3941
### 灵感
4042

@@ -45,8 +47,9 @@ title: 工具-资源
4547
[coolors](http://coolors.co/) - The super fast colour schemes generator for cool designers
4648
[dribbble](https://dribbble.com/)
4749
[Color Hunt](http://colorhunt.co/) - Beautiful Colors, Every Day.
48-
[Color Hex Color Codes](http://www.color-hex.com/) - Color Palettes. 搜索输出详细信息
50+
[Color Hex Color Codes](http://www.color-hex.com/) - Color Palettes. 搜索输出详细信息
4951

52+
.
5053

5154
### 图标-字体
5255

@@ -62,8 +65,10 @@ title: 工具-资源
6265
[Material Design Iconic Font](http://zavoloklom.github.io/material-design-iconic-font/index.html)
6366
[icons4android](http://www.icons4android.com/)
6467
[Android Icons](http://www.androidicons.com/)
65-
[Material Design Icons](https://materialdesignicons.com/)
66-
[ionicons](http://ionicons.com/)
68+
[Material Design Icons](https://materialdesignicons.com/)
69+
[ionicons](http://ionicons.com/)
70+
71+
..
6772

6873
----------------------------------------
6974

@@ -76,14 +81,16 @@ title: 工具-资源
7681
[Github Awards](http://github-awards.com/) - Discover your ranking on GitHub
7782
[github rank](http://githubrank.com/) - Github 中国用户排行榜
7883
[GitHuber.info](http://githuber.info/) - 打造最好用的 GitHub 人才搜索工具
79-
[JitPack.io](https://jitpack.io/) - Easy to use package repository for GitHub
84+
[JitPack.io](https://jitpack.io/) - Easy to use package repository for GitHub
8085

86+
.
8187

8288
### 知识管理
8389

8490
[feedly](https://feedly.com/) - 可跨平台阅读的 RSS 阅读器
85-
[Pocket](https://getpocket.com/) - 发现想在以后查看的内容时,先将其放入 Pocket
91+
[Pocket](https://getpocket.com/) - 发现想在以后查看的内容时,先将其放入 Pocket
8692

93+
..
8794

8895
----------------------------------------
8996

@@ -94,15 +101,19 @@ title: 工具-资源
94101
[Madoko](https://www.madoko.net/) - Write Beautiful Documents(Markdown)
95102
[slides](https://slides.com/) - Make better presentations,在线演示文稿
96103
[Cacoo](https://cacoo.com/) - 网上制作图表实时协作
97-
[ASCIIFlow Infinity](http://asciiflow.com/) - 在线画 ASCII 码字符图表,支持导入导出和保存到 Google Drive。
104+
[ASCIIFlow Infinity](http://asciiflow.com/) - 在线画 ASCII 码字符图表,支持导入导出和保存到 Google Drive
105+
106+
.
98107

99108
----------------------------------------
100109

101110
## 工具
102111

103112
[DB Browser for SQLite](http://sqlitebrowser.org/) - 好用的SQLite桌面客户端
104-
[tldr](http://www.ostera.io/tldr.jsx/) - tldr 在线版,命令行好帮手
105-
[Methods Count](http://www.methodscount.com/) - Methods Count
113+
[tldr](http://www.ostera.io/tldr.jsx/) - tldr在线版,命令行好帮手
114+
[Methods Count](http://www.methodscount.com/) - Methods Count
115+
116+
.
106117

107118
----------------------------------------
108119

@@ -111,9 +122,9 @@ title: 工具-资源
111122
[Appetize.io](https://appetize.io/demo) - Web 在线跑起你的 App
112123
[jsonschema2pojo](http://www.jsonschema2pojo.org/) - 一个强大的 Json 文本转换为 Java 类的工具
113124
[Regulex](https://jex.im/regulex/) - 正则表达式工具
114-
[.gitignore.io](https://www.gitignore.io/) - 在线生成 .gitignore 文件
125+
[gitignore.io](https://www.gitignore.io/) - 在线生成 .gitignore 文件
115126
[mydevice.io](http://mydevice.io/) - 检测、查看设备屏幕屏幕信息
116127
[AppBrain | Stats](http://www.appbrain.com/stats/libraries/dev) - Android 工具、库使用排行
117-
[Snapdrop](https://snapdrop.net/) - 通过 Snapdrop 网站方便地在设备间传送文件,两台设备同时打开此网站即可操作。
118-
128+
[Snapdrop](https://snapdrop.net/) - 通过 Snapdrop 网站方便地在设备间传送文件,两台设备同时打开此网站即可操作。
119129

130+
.

开发者-组织-团队/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ title: 开发者-组织-团队
1818
[Flipboard](https://github.com/Flipboard)
1919
[codekk](https://github.com/aosp-exchange-group)
2020
[Qihoo360](github.com/Qihoo360)
21-
[Facebook Samples](https://github.com/fbsamples)
21+
[Facebook Samples](https://github.com/fbsamples)
22+

0 commit comments

Comments
 (0)