Next: , Previous: , Up: Relational schema   [Contents][Index]


4.5 extract.txt

The /etc/mediatex/mdtx-COLL/extractXXX.txt files handle the extraction rules for a collection.

Using the “$ mediatex upload[+] [file file [as target]]* [catalog file] [rules file] to coll coll” query, PUBLISHER (see Who) should provide extraction rules to the new archive to upload, using the same grammar language.

Relational schema:

mediatex-figures/extract.txt

Exemple:

(INC
=>
0a7ecd447ef2acb3b5c6e4c550e6636f:374784	1994-01-01,00:00:00
de5008799752552b7963a2670dc5eb18:391168	2010-01-01,01:00:00
)

(IMG
=>
3a04277dd1f43740a5fe17fd0ae9a5aa:24457  here/logo.gz
)

(ISO
de5008799752552b7963a2670dc5eb18:391168
=>
1a167d608e76a6a4a8b16d168580873c:20480 logoP1.cat
)

(ISO
0a7ecd447ef2acb3b5c6e4c550e6636f:374784
=>
c0c055a0829982bd646e2fafff01aaa6:4066  logoP2.cat
)

(CAT
1a167d608e76a6a4a8b16d168580873c:20480,
c0c055a0829982bd646e2fafff01aaa6:4066
=>
0387eee9820fa224525ff8b2e0dfa9be:24546  logo.tgz
)

(TGZ
0387eee9820fa224525ff8b2e0dfa9be:24546
=>
directory: here
022a34b2f9b893fba5774237e1aa80ea:24075  logo/logo.png,
b281449c229bcc4a3556cdcc0d3ebcec:815    logo/logo.xpm
)

(COPY
746d6ceeb76e05cfa2dea92a1c5753cd /location
=>
022a34b2f9b893fba5774237e1aa80ea:24075	logo.png
b34bb9bf9ae4ec5b4a5bc2ab3e2a18c5:25088	logo.cpio
)

Notice:

Grammar:

file: stanzas
    | //empty file

stanzas: stanzas stanza
       | stanza

stanza: ( container => options childs )
      | ( location =>  options childs )

container: orphaneContainer
         | stdContainer
         | stdContainer parents

orphaneContainer: type 

stdContainer: type archive

options: DIRECTORY: string
       | /* none */

location: type hash string string
        | type hash string

parents: parents parent
       | parent

childs: childs child
      | child

parent: archive 

child: archive string

archive: hash : size

hash: [[:xdigit:]]{32}
string: [^[:blank:]\)\n\r]{1,511}
type: INC | IMG | ISO | CAT | TGZ | TBZ | TAR | CPIO
    | GZIP | BZIP | ZIP | RAR | LOCATION
size: [[:digit:]]+

Code:

src/memory/extractTree.h
src/memory/extractTree.c
src/parser/extractFile.l
src/parser/extractFile.y

Next: , Previous: , Up: Relational schema   [Contents][Index]