From 3343f6d66b6f470f531a96dceb1389f2fc7bd3a0 Mon Sep 17 00:00:00 2001 From: Liu Haiyang Date: Fri, 6 Mar 2015 18:29:41 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E6=A0=87=E7=AD=BE=20zhma?= =?UTF-8?q?keindex-1.1=20=E5=88=B0=E4=BF=AE=E8=AE=A2=E9=9B=86=2014a464d28d?= =?UTF-8?q?b8=20(=E4=BB=8E=E4=BF=AE=E8=AE=A2=E9=9B=86=200051dc688351)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From 6fe626da805099a420b9886f1f07f9e0165f96db Mon Sep 17 00:00:00 2001 From: Liu Haiyang Date: Sat, 14 Mar 2015 17:34:51 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E5=88=B0=20github.com/leo-liu/zhmakeindex?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 12 ++++++++++++ .hgignore | 23 ----------------------- README | 2 +- build-dist.cmd | 2 +- doc/make.cmd | 2 +- doc/zhmakeindex.tex | 32 ++++++++++++++++++++------------ install.cmd | 4 ++-- kpathsea/kpathsea.go | 2 +- main.go | 2 +- radical_collator.go | 2 +- reading_collator.go | 2 +- stroke_collator.go | 2 +- style.go | 2 +- 13 files changed, 43 insertions(+), 46 deletions(-) create mode 100644 .gitignore delete mode 100644 .hgignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e72047d --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +*.swp +*~ +*.ind +doc/zhmakeindex.idx +*.bbl +*.blg +*.ilg +*.aux +*.out +doc/zhmakeindex.pdf +doc/zhm-version.tex +bin/ diff --git a/.hgignore b/.hgignore deleted file mode 100644 index b75d469..0000000 --- a/.hgignore +++ /dev/null @@ -1,23 +0,0 @@ -syntax: glob -**.ilg -**.ind -**.swp -**.aux -**.glo -**.hd -**.out -**.sty -**.tmp -**.zip -**.synctex.gz -**~ -bin/darwin_x64/zhmakeindex -bin/darwin_x86/zhmakeindex -bin/linux_x64/zhmakeindex -bin/linux_x86/zhmakeindex -doc/zhmakeindex.pdf -**.bbl -doc/zhmakeindex.idx -**.blg -**.log -doc/zhm-version.tex diff --git a/README b/README index c4a31c4..2f71c4b 100644 --- a/README +++ b/README @@ -33,7 +33,7 @@ The PDF documentation is also available for details. More information, bugfix releases and bug tracker are available at: - https://code.google.com/p/zhmakeindex/ + https://github.com/leo-liu/zhmakeindex COPYRIGHT AND LICENCE ===================== diff --git a/build-dist.cmd b/build-dist.cmd index 018e633..21e408d 100644 --- a/build-dist.cmd +++ b/build-dist.cmd @@ -7,7 +7,7 @@ if exist VERSION ( ) else ( set zhmVersion=devel ) -for /f "delims=" %%i in ('hg parent --template "{rev}({node|short})"') do set zhmRevision=%%i +for /f "delims=" %%i in ('git rev-parse --short HEAD') do set zhmRevision=%%i set FLAGS=-ldflags "-X main.Version %zhmVersion% -X main.Revision %zhmRevision%" set GOOS=windows diff --git a/doc/make.cmd b/doc/make.cmd index 2142dda..0a14ffd 100644 --- a/doc/make.cmd +++ b/doc/make.cmd @@ -12,7 +12,7 @@ if exist ..\VERSION ( ) echo }>> zhm-version.tex echo \def\zhmRevision{%%>> zhm-version.tex -hg parent --template "{rev}({node|short})" >> zhm-version.tex +git rev-parse --short HEAD >> zhm-version.tex echo }>> zhm-version.tex echo ==========^> Compiling document... diff --git a/doc/zhmakeindex.tex b/doc/zhmakeindex.tex index 3fd8bd9..d2c325d 100644 --- a/doc/zhmakeindex.tex +++ b/doc/zhmakeindex.tex @@ -813,38 +813,46 @@ \section{版权与许可} \begin{verbatim} build-dist.cmd input.go +install.cmd main.go +MENIFEST numberedreader.go output.go -radicalstrokes.go +pagenumber.go radical_collator.go -readings.go reading_collator.go +README sorter.go -strokes.go stroke_collator.go style.go style_test.go +VERSION +doc/make.cmd doc/zhmakeindex.bib doc/zhmakeindex.mst doc/zhmakeindex.tex +examples/compositepage.idx +examples/gb2312.idx +examples/mixedpage.idx +examples/numbers.idx +examples/rangeencap.idx +examples/suffix.ist +examples/symorder.idx +examples/zh.ist kpathsea/dynamic_other.go kpathsea/dynamic_windows_386.go kpathsea/kpathsea.go -maketables/make-table.cmd -maketables/maketables.go +CJK/make-table.cmd +CJK/maketables.go +CJK/radicalstrokes.go +CJK/strokes.go +CJK/readings.go \end{verbatim} 以及编译源文件得到的二进制文件 \path{zhmakeindex.exe} 或 \path{zhmakeindex}、 PDF 文档 \path{zhmakeindex.pdf} 组成。 \index{Unicode} -大部分汉字数据来自 Unicode 项目(\url{http://www.unicode.org/}): -\begin{verbatim} -maketables/CJKRadicals.txt -maketables/Unihan_DictionaryLikeData.txt -maketables/Unihan_RadicalStrokeCounts.txt -maketables/Unihan_Readings.txt -\end{verbatim} +大部分汉字数据来自 Unicode 项目(\url{http://www.unicode.org/})。 \index{海峰五笔} 部分字形数据来自海峰五笔项目(\url{http://okuc.net/sunwb/}): diff --git a/install.cmd b/install.cmd index dcfafc0..ec5224b 100644 --- a/install.cmd +++ b/install.cmd @@ -7,9 +7,9 @@ if exist VERSION ( ) else ( set zhmVersion=devel ) -for /f "delims=" %%i in ('hg parent --template "{rev}({node|short})"') do set zhmRevision=%%i +for /f "delims=" %%i in ('git rev-parse --short HEAD') do set zhmRevision=%%i set FLAGS=-ldflags "-X main.Version %zhmVersion% -X main.Revision %zhmRevision%" go install %FLAGS% -endlocal \ No newline at end of file +endlocal diff --git a/kpathsea/kpathsea.go b/kpathsea/kpathsea.go index 29f066f..d2bdce6 100644 --- a/kpathsea/kpathsea.go +++ b/kpathsea/kpathsea.go @@ -1,5 +1,5 @@ // 提供 kpathsea 库的基本文件查找功能 -package kpathsea +package kpathsea // import "github.com/leo-liu/zhmakeindex/kpathsea" import ( "os" diff --git a/main.go b/main.go index c5e39fe..a708889 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ // $Id$ // zhmakeindex: 带中文支持的 makeindex 实现 -package main +package main // import "github.com/leo-liu/zhmakeindex" import ( "flag" diff --git a/radical_collator.go b/radical_collator.go index 0f1f608..2b2ce6c 100644 --- a/radical_collator.go +++ b/radical_collator.go @@ -7,7 +7,7 @@ import ( "unicode" "unicode/utf8" - "code.google.com/p/zhmakeindex/CJK" + "github.com/leo-liu/zhmakeindex/CJK" ) // 汉字按部首-除部首笔画数排序,汉字按部首分组排在英文字母组后面 diff --git a/reading_collator.go b/reading_collator.go index 94eb872..dd46f6b 100644 --- a/reading_collator.go +++ b/reading_collator.go @@ -6,7 +6,7 @@ import ( "unicode" "unicode/utf8" - "code.google.com/p/zhmakeindex/CJK" + "github.com/leo-liu/zhmakeindex/CJK" ) // 汉字按拼音排序,按拼音首字母与英文一起分组 diff --git a/stroke_collator.go b/stroke_collator.go index 9057a14..413a750 100644 --- a/stroke_collator.go +++ b/stroke_collator.go @@ -7,7 +7,7 @@ import ( "unicode" "unicode/utf8" - "code.google.com/p/zhmakeindex/CJK" + "github.com/leo-liu/zhmakeindex/CJK" ) // 汉字按笔画排序,汉字按笔画分组排在英文字母组后面 diff --git a/style.go b/style.go index 91783ee..97f94bd 100644 --- a/style.go +++ b/style.go @@ -13,7 +13,7 @@ import ( "golang.org/x/text/transform" - "code.google.com/p/zhmakeindex/kpathsea" + "github.com/leo-liu/zhmakeindex/kpathsea" ) // 输入格式 From 8eb9ddbf973739c8c43e2543e51d261d0169651a Mon Sep 17 00:00:00 2001 From: Liu Haiyang Date: Sat, 14 Mar 2015 17:59:48 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=88=A0=E9=99=A4=20$Id$=20=E6=A0=87?= =?UTF-8?q?=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CJK/maketables.go | 2 -- doc/zhmakeindex.tex | 7 +++---- input.go | 2 -- main.go | 2 -- numberedreader.go | 2 -- output.go | 2 -- pagenumber.go | 2 -- radical_collator.go | 2 -- reading_collator.go | 2 -- sorter.go | 2 -- stroke_collator.go | 2 -- style.go | 2 -- 12 files changed, 3 insertions(+), 26 deletions(-) diff --git a/CJK/maketables.go b/CJK/maketables.go index 836ac4d..6d677e3 100644 --- a/CJK/maketables.go +++ b/CJK/maketables.go @@ -1,5 +1,3 @@ -// $Id$ - // +build ignore // 本程序生成 zhmakeindex/CJK 使用的汉字数据表。 diff --git a/doc/zhmakeindex.tex b/doc/zhmakeindex.tex index d2c325d..75f27e8 100644 --- a/doc/zhmakeindex.tex +++ b/doc/zhmakeindex.tex @@ -1,4 +1,3 @@ -% $Id$ \documentclass[UTF8,hyperref]{ctexart} \usepackage{etoolbox} @@ -238,7 +237,7 @@ \section{索引项输入语法} \begin{idxexample} "\indexentry{简介}{15}" \\ \sindex -简介, 15 +简介, 15 \end{idxexample} 其语法为: \begin{syntax} @@ -302,7 +301,7 @@ \section{索引项输入语法} \sitem 代数方程 \\ \ssitem 二次方程, 3 \\ \ssitem 线性方程, 2 \\ -\sitem 解, 1 +\sitem 解, 1 \end{idxexample} 每一级别内部都可以分别指定排序的键与输出值,例如: \begin{idxexample} @@ -323,7 +322,7 @@ \section{索引项输入语法} 括号被忽略,输出时会自动加上(用\autoref{tab:oldoutputstyle} 中的 \kw{encap_prefix}, \kw{encap_infix}, \kw{encap_suffix} 项配置)。例如: \begin{idxexample} -"\indexentry{字体|emph}{2}" +"\indexentry{字体|emph}{2}" \sindex 字体, \emph{2} \end{idxexample} diff --git a/input.go b/input.go index 228b016..b2d9d4c 100644 --- a/input.go +++ b/input.go @@ -1,5 +1,3 @@ -// $Id$ - package main import ( diff --git a/main.go b/main.go index a708889..81e3c4a 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,3 @@ -// $Id$ - // zhmakeindex: 带中文支持的 makeindex 实现 package main // import "github.com/leo-liu/zhmakeindex" diff --git a/numberedreader.go b/numberedreader.go index 646d038..9fafea8 100644 --- a/numberedreader.go +++ b/numberedreader.go @@ -1,5 +1,3 @@ -// $Id: numberedreader.go,v 46e1b534c25a 2014/02/25 18:14:30 leoliu $ - package main import ( diff --git a/output.go b/output.go index 4ed26e4..0031c9f 100644 --- a/output.go +++ b/output.go @@ -1,5 +1,3 @@ -// $Id$ - package main import ( diff --git a/pagenumber.go b/pagenumber.go index 1917d20..02d2724 100644 --- a/pagenumber.go +++ b/pagenumber.go @@ -1,5 +1,3 @@ -// $Id$ - package main import ( diff --git a/radical_collator.go b/radical_collator.go index 2b2ce6c..3524137 100644 --- a/radical_collator.go +++ b/radical_collator.go @@ -1,5 +1,3 @@ -// $Id$ - package main import ( diff --git a/reading_collator.go b/reading_collator.go index dd46f6b..7348d55 100644 --- a/reading_collator.go +++ b/reading_collator.go @@ -1,5 +1,3 @@ -// $Id$ - package main import ( diff --git a/sorter.go b/sorter.go index 19d188a..3109186 100644 --- a/sorter.go +++ b/sorter.go @@ -1,5 +1,3 @@ -// $Id$ - package main import ( diff --git a/stroke_collator.go b/stroke_collator.go index 413a750..43f87e4 100644 --- a/stroke_collator.go +++ b/stroke_collator.go @@ -1,5 +1,3 @@ -// $Id$ - package main import ( diff --git a/style.go b/style.go index 97f94bd..1e516a7 100644 --- a/style.go +++ b/style.go @@ -1,5 +1,3 @@ -// $Id$ - package main import ( From d9fc48086ab08ce328103f5530547bcc417bc56e Mon Sep 17 00:00:00 2001 From: Liu Haiyang Date: Sat, 14 Mar 2015 18:03:18 +0800 Subject: [PATCH 4/4] =?UTF-8?q?Git=20=E6=B2=A1=E6=9C=89=E6=95=B0=E5=AD=97?= =?UTF-8?q?=E7=BC=96=E5=8F=B7=EF=BC=8C=E4=BF=AE=E6=94=B9=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E5=BD=A2=E5=BC=8F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/zhmakeindex.tex | 2 +- main.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/zhmakeindex.tex b/doc/zhmakeindex.tex index 75f27e8..1dc051c 100644 --- a/doc/zhmakeindex.tex +++ b/doc/zhmakeindex.tex @@ -112,7 +112,7 @@ \def\zhmVersion{???}% \def\zhmRevision{???}} -\title{\zhm\thanks{版本 \zhmVersion-rev\zhmRevision} 中文索引处理程序} +\title{\zhm\thanks{版本 \zhmVersion-\zhmRevision} 中文索引处理程序} \author{刘海洋} \date{2015 年 3 月 6 日} diff --git a/main.go b/main.go index 81e3c4a..5275e99 100644 --- a/main.go +++ b/main.go @@ -38,7 +38,7 @@ func main() { setupLog(option) - log.Printf("zhmakeindex 版本:%s-rev%s\t作者:%s\n", Version, Revision, ProgramAuthor) + log.Printf("zhmakeindex 版本:%s-%s\t作者:%s\n", Version, Revision, ProgramAuthor) if option.style != "" { log.Printf("正在读取格式文件 %s……", option.style) @@ -216,5 +216,5 @@ zhmakeindex [-c] [-i] [-o ] [-q] [-r] [-s ] [-t ] fmt.Fprintf(os.Stderr, " -%-6s %-8s %s\n", f.Name, f.DefValue, f.Usage) } }) - fmt.Fprintf(os.Stderr, "\n版本:%s-rev%s\t作者:%s\n", Version, Revision, ProgramAuthor) + fmt.Fprintf(os.Stderr, "\n版本:%s-%s\t作者:%s\n", Version, Revision, ProgramAuthor) }