-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
66 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
build/ | ||
*.zip | ||
gbt7714/ | ||
*.curlopt | ||
*.zip | ||
|
||
## Core latex/pdflatex auxiliary files: | ||
*.aux | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# The format of this file is described in https://www.tug.org/texlive/pkgcontrib.html#deps. | ||
|
||
hard bibtex | ||
hard natbib | ||
hard url |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,9 @@ module = "gbt7714" | |
testfiledir = "./test/testfiles" | ||
testsuppdir = testfiledir .. "/support" | ||
|
||
sourcefiles = {"*.dtx", "*.sty", "*.bst"} | ||
installfiles = {"*.sty", "*.bst"} | ||
tagfiles = {"*.dtx", "*.ins", "CHANGELOG.md", "variants/*.ins"} | ||
textfiles = {"*.md", "LICENSE"} | ||
|
||
checkengines = {"xetex"} | ||
stdengine = "xetex" | ||
|
@@ -26,27 +26,28 @@ checkruns = 3 | |
checkopts = "-file-line-error -halt-on-error -interaction=nonstopmode" | ||
typesetopts = "-file-line-error -halt-on-error -interaction=nonstopmode" | ||
|
||
changeslisting = nil | ||
do | ||
local f = assert(io.open("CHANGELOG.md", "r")) | ||
changeslisting = f:read("*all") | ||
f:close() | ||
end | ||
pkgversion = string.match(changeslisting, "## %[(v%S+)%] - ") | ||
local f = assert(io.open("CHANGELOG.md", "r")) | ||
local change_log_content = f:read("*all") | ||
f:close() | ||
local pkg_version = string.match(change_log_content, "## %[v([%d%.]+)%] - ") | ||
print(string.format("Package version: %s", pkg_version)) | ||
|
||
uploadconfig = { | ||
author = "Zeping Lee", | ||
license = "lppl1.3c", | ||
version = pkgversion, | ||
summary = "BibTeX implementation of Chinese bibliography style standard GB/T 15", | ||
topic = {"bibtex-supp", "chinese"}, | ||
ctanPath = "/biblio/bibtex/contrib/gbt7714", | ||
repository = "https://github.com/zepinglee/gbt7714-bibtex-style", | ||
bugtracker = "https://github.com/zepinglee/gbt7714-bibtex-style/issues", | ||
update = true, | ||
description = [[ | ||
The package provides a BibTeX implementation for the Chinese national bibliography style standard GB/T 15. It consists of two bst files for numerical and author-year styles and a LaTeX package which provides the citation style defined in the standard. It also support automatic language recognization (Chinese and English) for each biblilography entry and is designed to be fully compatible with natbib. | ||
]], | ||
version = pkg_version, | ||
author = "Zeping Lee", | ||
license = "lppl1.3c", | ||
uploader = "Zeping Lee", | ||
email = "[email protected]", | ||
summary = "BibTeX implementation of China’s bibliography style standard GB/T 7714—2015", | ||
description = [[ | ||
The package pr ovides a BibTeX implementation for the Chinese national bibliography style standard GB/T 7714—2015. It consists of two bst files for numerical and author-year styles as well as a LaTeX package which provides the citation style defined in the standard. The package is compatible with natbib and supports language detection (Chinese and English) for each biblilography entry.]], | ||
note = "Uploaded automatically by l3build...", | ||
ctanPath = "/biblio/bibtex/contrib/gbt7714", | ||
repository = "https://github.com/zepinglee/gbt7714-bibtex-style", | ||
bugtracker = "https://github.com/zepinglee/gbt7714-bibtex-style/issues", | ||
topic = {"bibtex-sty", "chinese", "std-conform"}, | ||
announcement_file = "ctan.ann", | ||
update = true, | ||
} | ||
|
||
lvtext = ".tex" | ||
|
@@ -56,22 +57,26 @@ function runtest_tasks(name, run) | |
end | ||
|
||
function update_tag(file, content, tagname, tagdate) | ||
local iso = "%d%d%d%d%-%d%d%-%d%d" | ||
local url = "https://github.com/zepinglee/gbt7714-bibtex-style" | ||
local date = string.gsub(tagdate, "%-", "/") | ||
if string.match(file, "%.dtx$") or string.match(file, "%.ins$") then | ||
return string.gsub(content, "%d%d%d%d/%d%d/%d%d v[%d.]+", | ||
date .. " " .. tagname) | ||
elseif string.match(file, "CHANGELOG.md") then | ||
local previous = string.match(content, "/compare/(.*)%.%.%.HEAD") | ||
if tagname == previous then return content end | ||
tagname = string.gsub(tagname, "^v", "") | ||
|
||
if string.match(file,"CHANGELOG.md") then | ||
local pattern = "[%d%.]+" | ||
local url = "https://github.com/zepinglee/gbt7714-bibtex-style" | ||
local previous = string.match(content, "compare/v(" .. pattern .. ")%.%.%.HEAD") | ||
if tagname == previous then | ||
return content | ||
end | ||
content = string.gsub(content, | ||
"## %[Unreleased%]", | ||
"## [Unreleased]\n\n## [" .. tagname .."] - " .. tagdate) | ||
"## [Unreleased]\n\n## [v" .. tagname .."] - " .. tagdate) | ||
return string.gsub(content, | ||
previous .. "%.%.%.HEAD", | ||
tagname .. "...HEAD\n[" .. tagname .. "]: " .. url .. "/compare/" | ||
.. previous .. "..." .. tagname) | ||
"v" .. pattern .. "%.%.%.HEAD", | ||
"v" .. tagname .. "...HEAD\n[v" .. tagname .. "]: " .. url .. "/compare/v" .. previous | ||
.. "...v" .. tagname) | ||
else | ||
local date = string.gsub(tagdate, "%-", "/") | ||
return string.gsub(content, "%d%d%d%d/%d%d/%d%d v[%d.]+", | ||
date .. " v" .. tagname) | ||
end | ||
return content | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters