From 20efc48e21687450e9a7c24e8c14ef8d1b918aaa Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 13 Nov 2018 09:50:10 +0100 Subject: [PATCH] Fix making of "sources.html" Uses same template as synopsis, maybe this shoudl be generalised a bit --- doc/.gitignore | 8 ++ doc/Makefile | 5 +- doc/gfdoc/Makefile | 17 ++++ doc/gfdoc/sources.html | 183 ------------------------------------- doc/gfdoc/sources.txt | 47 +++++----- doc/synopsis/.gitignore | 6 -- doc/synopsis/intro.txt | 2 +- doc/synopsis/quicklinks.js | 8 +- doc/synopsis/template.html | 1 - 9 files changed, 58 insertions(+), 219 deletions(-) create mode 100644 doc/.gitignore create mode 100644 doc/gfdoc/Makefile delete mode 100644 doc/gfdoc/sources.html delete mode 100644 doc/synopsis/.gitignore diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 000000000..38db89725 --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1,8 @@ +synopsis/index.txt +synopsis/index.html +synopsis/api-examples-*.txt +synopsis/api-examples.gfs +synopsis/categories-imagemap.html +synopsis/categories.png + +gfdoc/sources.html diff --git a/doc/Makefile b/doc/Makefile index bb2880692..684fe24fc 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,4 +1,4 @@ -.PHONY: all status synopsis abstract +.PHONY: all status synopsis abstract sources GFDOC=gfdoc S=../src @@ -10,6 +10,9 @@ status: status.html synopsis: make -C synopsis +sources: + make -C gfdoc sources.html + status.html: txt2tags -thtml status.txt diff --git a/doc/gfdoc/Makefile b/doc/gfdoc/Makefile new file mode 100644 index 000000000..14f0024ff --- /dev/null +++ b/doc/gfdoc/Makefile @@ -0,0 +1,17 @@ +TMP=tmp.html +TEMPLATE=../synopsis/template.html +ROOT=../.. + +sources.html: sources.txt $(TEMPLATE) + txt2tags --target=html --no-headers --quiet --toc --outfile=$@ --infile=$< + pandoc \ + --from=html \ + --to=html5 \ + --standalone \ + --template=$(TEMPLATE) \ + --metadata='title:"More modules in the GF Resource Grammar Library"' \ + --variable='rel-root:$(ROOT)/..' \ + --output=$(TMP) \ + $@ + mv $(TMP) $@ + sed -i.bak "s//
/" $@ && rm "$@.bak" diff --git a/doc/gfdoc/sources.html b/doc/gfdoc/sources.html deleted file mode 100644 index 8cf40a006..000000000 --- a/doc/gfdoc/sources.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - -More modules in the GF Resource Grammar Library - -
-

More modules in the GF Resource Grammar Library

-
- -

-back to synopsis -

- -

Extra syntax modules

- -

-These modules give language-specific extra constructs not available via the common API. -

-

-common repository -Romance (Cat, Fre, Ita, Spa) -Scandinavian (Dan, Nor, Swe) -

-

-Afrikaans -Bulgarian -Catalan -Danish -Dutch -English -Finnish -French -German -Italian -Norwegian -Persian -Polish -Punjabi -Romanian -Russian -Spanish -Swedish -

- -

Irregular verbs and other words

- -

-These modules give lists of irregular words, mostly verbs. Their completeness varies. -

-

-Catalan -Danish -Dutch -English -French -German -Norwegian -Spanish -Swedish -Turkish -

- -

Large-scale dictionaries

- -

-These morphological dictionaries are extracted from open source lexica by using the resource grammar paradigms. The figures give the approximate number of lemmas. -

-

-Bulgarian 53k -English 43k -Finnish 42k -French 92k -Swedish 43k -Turkish 24k -

- -

Abstract Syntax Modules

- -

-These modules are for internal use of resource grammarians, but the comments give some more linguistic explanation of the different constructs. -

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
modulecontents
Adjectiveconstructors for A, AP
Adverbconstructors for Adv, AdV
Catlincats of all categories
Commondefault lincats for string categories
Conjunctioncoordination rules
Extraconstructs available in some languages only
Grammareverything except content lexicon
Idiomidiomatic constructions
Langeverything (Grammar and Lexicon)
Lexiconcontent word lexicon
Nounconstructors for NP, CN, Det
Numeralconstructors for Numeral and Digits
Phraseconstructors for Phr, Utt
Questionconstructors for QS, QCl, IP
Relativeconstructors for RS, RCl, RP
Sentenceconstructors for S, Cl, SC
Structuralstructural word lexicon
Symbolmixtures of verbal and symbolic expressions
Tensecommon API tense system
Textconstructors for Tex
Verbconstructors for VP, VPSlash, Comp
- -

The Module Dependency Tree

- -

- -

- - - - diff --git a/doc/gfdoc/sources.txt b/doc/gfdoc/sources.txt index e4926fa9f..81ae4d3f2 100644 --- a/doc/gfdoc/sources.txt +++ b/doc/gfdoc/sources.txt @@ -3,33 +3,33 @@ More modules in the GF Resource Grammar Library -[back to synopsis ../synopsis.html] +[Back to synopsis ../synopsis/index.html] ==Extra syntax modules== These modules give language-specific extra constructs not available via the common API. -[common repository ../../src/abstract/Extra.gf] -[Romance (Cat, Fre, Ita, Spa) ../../src/romance/ExtraRomanceAbs.gf] -[Scandinavian (Dan, Nor, Swe) ../../src/scandinavian/ExtraScandAbs.gf] +[common repository ../../src/abstract/Extra.gf] +[Romance (Cat, Fre, Ita, Spa) ../../src/romance/ExtraRomanceAbs.gf] +[Scandinavian (Dan, Nor, Swe) ../../src/scandinavian/ExtraScandAbs.gf] -[Afrikaans ../../src/afrikaans/ExtraAfrAbs.gf] -[Bulgarian ../../src/bulgarian/ExtraBulAbs.gf] -[Catalan ../../src/catalan/ExtraCatAbs.gf] -[Danish ../../src/danish/ExtraDanAbs.gf] -[Dutch ../../src/dutch/ExtraDutAbs.gf] -[English ../../src/english/ExtraEngAbs.gf] -[Finnish ../../src/finnish/ExtraFinAbs.gf] -[French ../../src/french/ExtraFreAbs.gf] -[German ../../src/german/ExtraGerAbs.gf] -[Italian ../../src/italian/ExtraItaAbs.gf] -[Norwegian ../../src/norwegian/ExtraNorAbs.gf] -[Persian ../../src/persian/ExtraPesAbs.gf] -[Polish ../../src/polish/ExtraPolAbs.gf] -[Punjabi ../../src/punjabi/ExtraPnbAbs.gf] -[Romanian ../../src/romanian/ExtraRonAbs.gf] -[Russian ../../src/russian/ExtraRusAbs.gf] -[Spanish ../../src/spanish/ExtraSpaAbs.gf] +[Afrikaans ../../src/afrikaans/ExtraAfrAbs.gf] +[Bulgarian ../../src/bulgarian/ExtraBulAbs.gf] +[Catalan ../../src/catalan/ExtraCatAbs.gf] +[Danish ../../src/danish/ExtraDanAbs.gf] +[Dutch ../../src/dutch/ExtraDutAbs.gf] +[English ../../src/english/ExtraEngAbs.gf] +[Finnish ../../src/finnish/ExtraFinAbs.gf] +[French ../../src/french/ExtraFreAbs.gf] +[German ../../src/german/ExtraGerAbs.gf] +[Italian ../../src/italian/ExtraItaAbs.gf] +[Norwegian ../../src/norwegian/ExtraNorAbs.gf] +[Persian ../../src/persian/ExtraPesAbs.gf] +[Polish ../../src/polish/ExtraPolAbs.gf] +[Punjabi ../../src/punjabi/ExtraPnbAbs.gf] +[Romanian ../../src/romanian/ExtraRonAbs.gf] +[Russian ../../src/russian/ExtraRusAbs.gf] +[Spanish ../../src/spanish/ExtraSpaAbs.gf] [Swedish ../../src/swedish/ExtraSweAbs.gf] @@ -93,8 +93,3 @@ These modules are for internal use of resource grammarians, but the comments giv ==The Module Dependency Tree== [Syntax.png] - - - - - diff --git a/doc/synopsis/.gitignore b/doc/synopsis/.gitignore deleted file mode 100644 index b0e9b0a7b..000000000 --- a/doc/synopsis/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -index.txt -index.html -api-examples-*.txt -api-examples.gfs -categories-imagemap.html -categories.png diff --git a/doc/synopsis/intro.txt b/doc/synopsis/intro.txt index fea2adbbc..96da1f27d 100644 --- a/doc/synopsis/intro.txt +++ b/doc/synopsis/intro.txt @@ -68,7 +68,7 @@ Other relevant documents: and the authors of each grammar - [The Resource Grammar Library coverage map http://www.postcrashgames.com/gf_world/] - [RGL Documentation and Publications ../rgl-publications.html]: links to publications and other documentation -- [More modules gfdoc/sources.html]: extra modules, dictionaries, and +- [More modules ../gfdoc/sources.html]: extra modules, dictionaries, and the internals of the resource grammar - [Internal abstract syntax ../absfuns.html]: synopsis of internal abstract functions and their Universal Dependency labels diff --git a/doc/synopsis/quicklinks.js b/doc/synopsis/quicklinks.js index fdc0e8e0f..5e01c24cf 100644 --- a/doc/synopsis/quicklinks.js +++ b/doc/synopsis/quicklinks.js @@ -115,4 +115,10 @@ function quicklinks () { ) } -document.getElementById('quicklinks').appendChild(quicklinks()) +appendChildren( + document.getElementById('quicklinks'), + [ + node('h5', '', 'Quick links'), + quicklinks() + ] +) diff --git a/doc/synopsis/template.html b/doc/synopsis/template.html index 4349d2adb..5e5c134b0 100644 --- a/doc/synopsis/template.html +++ b/doc/synopsis/template.html @@ -32,7 +32,6 @@ $endfor$