-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use this to avoid duplicating the package version and release date in doc/guava.xml, removing one potential source for mistakes when doing releases. The main advantage is that it removes the hard coded path to a GAP executable, and also works correctly with ReleaseTools.
- Loading branch information
Showing
4 changed files
with
41 additions
and
71 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,17 @@ | ||
########################################################################### | ||
## | ||
#W buildman.g GUAVA Package Alexander Konovalov | ||
## | ||
########################################################################### | ||
|
||
|
||
ExtractMyManualExamples:=function( pkgname, main, files ) | ||
local path, tst, i, s, name, output, ch, a; | ||
path:="doc"; | ||
Print("Extracting manual examples for ", pkgname, " package ...\n" ); | ||
tst:=ExtractExamples( path, main, files, "Chapter" ); | ||
Print(Length(tst), " chapters detected\n"); | ||
for i in [ 1 .. Length(tst) ] do | ||
Print( "Chapter ", i, " : \c" ); | ||
if Length( tst[i] ) > 0 then | ||
s := String(i); | ||
if Length(s)=1 then | ||
# works for <100 chapters | ||
s:=Concatenation("0",s); | ||
fi; | ||
name := Filename( Directory( "tst" ), | ||
Concatenation( LowercaseString(pkgname), s, ".tst" ) ); | ||
output := OutputTextFile( name, false ); # to empty the file first | ||
SetPrintFormattingStatus( output, false ); # to avoid line breaks | ||
ch := tst[i]; | ||
AppendTo(output, "# ", pkgname, ", chapter ",i,"\n"); | ||
for a in ch do | ||
AppendTo(output, "\n# ",a[2], a[1]); | ||
od; | ||
Print("extracted ", Length(ch), " examples \n"); | ||
else | ||
Print("no examples \n" ); | ||
fi; | ||
od; | ||
end; | ||
|
||
########################################################################### | ||
|
||
GUAVAMANUALFILES:=[ | ||
"../PackageInfo.g", | ||
]; | ||
|
||
########################################################################### | ||
## | ||
## GUAVABuildManual() | ||
## | ||
GUAVABuildManual:=function() | ||
local mypath, path, main, files, f, bookname; | ||
path:="doc"; | ||
main:="guava.xml"; | ||
bookname:="guava"; | ||
MakeGAPDocDoc( path, main, GUAVAMANUALFILES, bookname, "/usr/lib/gap-4.12.2", "MathJax" ); | ||
CopyHTMLStyleFiles( path ); | ||
GAPDocManualLab( "guava" );; | ||
ExtractMyManualExamples( "guava", main, GUAVAMANUALFILES); | ||
end; | ||
|
||
|
||
########################################################################### | ||
|
||
GUAVABuildManual(); | ||
|
||
########################################################################### | ||
## | ||
#E | ||
## this creates the documentation, needs: GAPDoc and AutoDoc packages, pdflatex | ||
## | ||
## Call this with GAP from within the package directory. | ||
|
||
if fail = LoadPackage("AutoDoc", ">= 2019.04.10") then | ||
Error("AutoDoc 2019.04.10 or newer is required"); | ||
fi; | ||
|
||
AutoDoc(rec( | ||
scaffold := rec( | ||
bib := "guava_bib.xml", | ||
MainPage := false, | ||
TitlePage := false, | ||
), | ||
extract_examples := true, | ||
gapdoc := rec( main := "guava.xml" ), | ||
)); |