diff --git a/ChangeLog b/ChangeLog index 3aabb461..bdbd2816 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2017-08-20 yianwillis@gmail.com update reference +ChangeLog +VERSION devel/pdf_maker/reference.inp devel/pdf_maker/user_manual.inp devel/release/vcd-setup-unicode.nsi diff --git a/devel/doc/main.aap b/devel/doc/main.aap index c0e9bfc1..11d7cb68 100644 --- a/devel/doc/main.aap +++ b/devel/doc/main.aap @@ -4,10 +4,10 @@ TOPLEVELDIR = ../.. @Files = expand2string(glob(DOC_FILES)) :attr {publish = $SF_SCP_WEB_URL/doc/%file%} vim-stylesheet.css -#:attr {publish = $SF_SCP_WEB_URL/doc/%file%} *.html +:attr {publish = $SF_SCP_WEB_URL/doc/%file%} *.html allhtml {virtual}: - :sys $TOOLS_DIR/vim2html.pl $DOC_DIR/tags-cn $DOC_FILES + :sys $TOOLS_DIR/vim2html.pl --banner $DOC_DIR/tags-cn $DOC_FILES :copy $TOOLS_DIR/vim-stylesheet.css . all {virtual}: diff --git a/devel/pdf_maker/main.aap b/devel/pdf_maker/main.aap index 5495f4f6..3dfd45cf 100644 --- a/devel/pdf_maker/main.aap +++ b/devel/pdf_maker/main.aap @@ -8,7 +8,8 @@ all: :print Use 'aap release' to generate pdf mauals to release. help.html: - :execute ../doc/main.aap allhtml + :sys $TOOLS_DIR/vim2html.pl $DOC_DIR/tags-cn $DOC_FILES + :copy $TOOLS_DIR/vim-stylesheet.css . :sys ./uncss.sh :rule %.tex: help.html ../tools/html2lex %.inp @@ -22,6 +23,5 @@ release: reference.pdf user_manual.pdf :copy user_manual.pdf $(RELEASE_DIR)/user_manual-$(VERSION).pdf clean: - :del {r}{force} *.html *.pdf *.tex *.aux *.log *.out *.fdb_latexmk *.fls - :execute ../doc/main.aap clean + :del {r}{force} *.html *.pdf *.tex *.aux *.log *.out *.fdb_latexmk *.fls *.css :execute $TOOLS_DIR/main.aap clean diff --git a/devel/pdf_maker/uncss.sh b/devel/pdf_maker/uncss.sh index 67d8a388..98a0b847 100755 --- a/devel/pdf_maker/uncss.sh +++ b/devel/pdf_maker/uncss.sh @@ -1,5 +1,5 @@ #!/bin/bash -for i in ../doc/*.html; do +for i in *.html; do cat $i | perl -np -e 's/((?:.(?!<\/?code))*.)<\/code>/\1<\/dfn>/g' | perl -np -e 's/((?:.(?!<\/?code))*.)<\/code>/\1<\/kbd>/g' | diff --git a/devel/tools/vim2html.pl b/devel/tools/vim2html.pl index 36f49d3a..bfef2930 100755 --- a/devel/tools/vim2html.pl +++ b/devel/tools/vim2html.pl @@ -13,11 +13,14 @@ use Text::Tabs; # Willis: expand replaced by myexpand. So no longer necessary. use Encode; use vars qw/%url $date/; +use Getopt::Long qw(GetOptions); %url = (); $date = Encode::decode_utf8(`date -u`); chop $date; +my $show_banner; + sub maplink { my $tag = shift; @@ -127,6 +130,15 @@ sub vim2html my $head = uc( $outfile ); my $filler = ' ' x 80; + my $banner = $show_banner ? <<"EOF" : ""; + +EOF + print OUT< @@ -136,13 +148,7 @@ sub vim2html -

- +$banner
$filler
 EOF
@@ -288,7 +294,9 @@ sub usage
 vim2html.pl: converts vim documentation to HTML.
 usage:
 
-	vim2html.pl  
+	vim2html.pl [--banner]  
+	Parameters:
+	--banner: optional. Print banner line.
 EOF
 }
 
@@ -298,6 +306,10 @@ sub usage
 #usage() if $#ARGV < 2;
 usage() if !defined $ARGV[1];
 
+GetOptions(
+    'banner' => \$show_banner,
+) or usage();
+
 print "Processing tags...\n";
 readTagFile( $ARGV[ 0 ] );