;
; Script Omnimark para gerar uma página HTML com os arqueositios agrupados
; por Concelho e links para cada uma das páginas individuais dos arqsits
; e cruzar esta informação com o glossário enriquecendo os dois.
; Versão 0.1 - jcr - 21.04.98
;
DOWN-TRANSLATE
global stream area-stream variable initial-size 0
global stream thesaurus variable initial-size 0
global stream cidenti
global stream concelho
global counter arqind INITIAL {1}
global stream farq
global stream glossario
global counter cliga
ELEMENT #IMPLIED
SUPPRESS
ELEMENT arqsits
OUTPUT "%c"
ELEMENT arqelem
set cliga to 1
OPEN farq AS FILE "ARQS/arq%d(arqind).html"
USING OUTPUT AS farq
OUTPUT "
%c
"
CLOSE farq
INCREMENT arqind
ELEMENT identi
SET cidenti TO "%c"
OUTPUT "%n
Identificação:
%g(cidenti)"
ELEMENT concel
SET concelho TO "%sc"
OUTPUT "%n
Concelho:
%g(concelho)"
DO WHEN !(area-stream has key concelho)
NEW area-stream key concelho
DONE
REOPEN area-stream key concelho as buffer
PUT area-stream key concelho "%g(cidenti)%n"
CLOSE area-stream key concelho
ELEMENT quadro
OUTPUT "%n
Quadro:
%n%c"
ELEMENT desarq
OUTPUT "%n
Descrição:
%n%c"
ELEMENT liga
local stream lstemp
set lstemp to "%c"
OUTPUT "%g(lstemp)"
DO WHEN !(thesaurus has key lstemp)
new thesaurus key lstemp
DONE
REOPEN thesaurus key lstemp as buffer
PUT thesaurus key lstemp "%g(cidenti)%n"
CLOSE thesaurus key lstemp
INCREMENT cliga
DOCUMENT-END
local stream alist
REPEAT OVER area-stream
OUTPUT "Entrys of '" ||
key of area-stream ||
"':
%n%n"
again
OPEN glossario as FILE "ARQS/gloss.html"
PUT glossario "
THESAURUS:
%n"
REPEAT OVER thesaurus
PUT glossario "%n%n"
AGAIN
CLOSE glossario