Ignore:
Timestamp:
2009-05-11T14:16:40+12:00 (15 years ago)
Author:
kjdon
Message:

opened and closed in GLI. minor formatting changes to file. GLI added in VLIst and DocumentButtons format statements. I removed those again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • collections/documented-examples/trunk/pagedimg-e/etc/collect.cfg

    r19359 r19375  
    33public      true
    44
     5buildtype   mg
     6
    57indexes     section:text
    68defaultindex    section:text
    79
    8 plugin      GreenstoneXMLPlugin
    9 # We want the two types of paged documents to be treated differently: paged 
    10 # and hierarchical. So include two PagedImagePlugin plugins and modify the 
     10plugin  GreenstoneXMLPlugin
     11# We want the two types of paged documents to be treated differently: paged
     12# and hierarchical. So include two PagedImagePlugin plugins and modify the
    1113# process_exp.
    12 plugin      PagedImagePlugin -create_screenview true -minimumsize 100 -documenttype hierarchy -process_exp xml.*\.item$ -OIDtype assigned -OIDmetadata ItemOID
    13 plugin      PagedImagePlugin -create_screenview true -minimumsize 100 -documenttype paged  -OIDtype assigned -OIDmetadata ItemOID
    14 plugin      MetadataXMLPlugin
    15 plugin      ArchivesInfPlugin
    16 plugin      DirectoryPlugin
     14plugin  PagedImagePlugin -process_exp xml.*\.item$ -create_screenview true -OIDtype assigned -minimumsize 100 -OIDmetadata ItemOID -documenttype hierarchy
     15plugin  PagedImagePlugin -create_screenview true -OIDtype assigned -minimumsize 100 -OIDmetadata ItemOID -documenttype paged
     16plugin  MetadataXMLPlugin
     17plugin  ArchivesInfPlugin
     18plugin  DirectoryPlugin
    1719
    18 classify    AZCompactList -metadata Series -sort Date 
    19 classify    DateList 
     20classify    AZCompactList -metadata Series -sort Date
     21classify    DateList
    2022
    2123# Format statements to display Series, Volume, Number and Date information
     
    3638
    3739# We customise the document display, so use the extended options
    38 format AllowExtendedOptions  true
     40format AllowExtendedOptions true
    3941
    4042# We want to add in fullsize/preview/text buttons to switch between the
     
    4547<tr valign=top><td><table><tr><td>
    4648[DocumentButtonDetach][DocumentButtonHighlight]
    47 {If}{_cgiargp_ eq 'fullsize',{If}{[screenicon],_document:viewpreview_}
     49{If}{_cgiargp_ eq \'fullsize\',{If}{[screenicon],_document:viewpreview_}
    4850{If}{[NoText] eq \'1\',,_document:viewtext_},
    49 {If}{_cgiargp_ eq 'preview',{If}{[srcicon],_document:viewfullsize_}
     51{If}{_cgiargp_ eq \'preview\',{If}{[srcicon],_document:viewfullsize_}
    5052{If}{[NoText] eq \'1\',,_document:viewtext_},
    5153{If}{[srcicon],_document:viewfullsize_}
     
    5456<td>[DocTOC]</td></tr></table></center>"
    5557
    56 # Document text display changes based on the p argument - this is not used 
    57 #normally for document display, so we can use it here to switch between 
     58# Document text display changes based on the p argument - this is not used
     59#normally for document display, so we can use it here to switch between
    5860#fullsize/preview/text versions.
    5961format DocumentText "<center><table width=_pagewidth_><tr><td>
     
    6567# -- English strings --------------------
    6668collectionmeta  collectionname [l=en] "Paged Image example"
    67 collectionmeta  .section:text [l=en] "newspaper pages"
     69collectionmeta  .section:text [l=en] "newspaper pages"
    6870
    6971# -- Spanish strings --------------------
    7072collectionmeta  collectionname [l=es] "Ejemplo de imágenes paginadas"
    71 collectionmeta  .section:text [l=es] "páginas de diario"
     73collectionmeta  .section:text [l=es] "páginas de diario"
    7274
    7375# -- English text -----------------------
    7476
    75 collectionmeta  collectionextra [l=en] "This collection contains a few newspapers from the 
    76 <a href='http://www.nzdl.org/cgi-bin/library?a=p&amp;p=about&amp;c=niupepa'>
    77 Niupepa</a> collection of Maori newspapers. 
     77collectionmeta  collectionextra [l=en] "This collection contains a few newspapers from the
     78<a href=\'http://www.nzdl.org/cgi-bin/library?a=p&amp;p=about&amp;c=niupepa\'>
     79Niupepa</a> collection of Maori newspapers.
    7880
    7981<h3>How the collection works</h3>
    80 <p>Each newspaper issue consists of a set of images, one per page, and a set 
    81 of text files for the OCR'd text. An item file links the set of pages into a
    82 single newspaper document. PagedImagePlugin is used to process the item files. 
    83 <p>There are two styles of item files, and this collection demonstrates both. 
    84 The first uses a text based format, and consists of a list of metadata for the 
    85 document, and a list of pages. Here are some examples: 
    86 <a href='_httpcollection_/import/09/09\_1\_1.item'>Te Waka o Te Iwi, Vol. 1, No. 1</a>,
    87 <a href='_httpcollection_/import/10/10\_1\_3.item'>Te Whetu o Te Tau, Vol. 1, No. 3</a>.
     82<p>Each newspaper issue consists of a set of images, one per page, and a set
     83of text files for the OCR\'d text. An item file links the set of pages into a
     84single newspaper document. PagedImagePlugin is used to process the item files.
     85<p>There are two styles of item files, and this collection demonstrates both.
     86The first uses a text based format, and consists of a list of metadata for the
     87document, and a list of pages. Here are some examples:
     88<a href=\'_httpcollection_/import/09/09\_1\_1.item\'>Te Waka o Te Iwi, Vol. 1, No. 1</a>,
     89<a href=\'_httpcollection_/import/10/10\_1\_3.item\'>Te Whetu o Te Tau, Vol. 1, No. 3</a>.
    8890This format allows specification of document level metadata, and a single list of pages.
    89 <p>The second style is an extended format, and uses XML. It allows a hierarchy 
    90 of pages, and metadata specification at the page level as well as at the 
    91 document level. An example is <a href='_httpcollection_/import/xml/23/23\_\_2.item'>Matariki 1881, No. 2</a>.
    92 This newspaper also has an abstract associated with it. The contents have been 
     91<p>The second style is an extended format, and uses XML. It allows a hierarchy
     92of pages, and metadata specification at the page level as well as at the
     93document level. An example is <a href=\'_httpcollection_/import/xml/23/23\_\_2.item\'>Matariki 1881, No. 2</a>.
     94This newspaper also has an abstract associated with it. The contents have been
    9395grouped into two sections: Supplementary Material, which contains the Abstract,
    94  and Newspaper Pages, which contains the page images.
    95 <p>Paged documents can be presented with a hierarchical table of contents 
    96 (e.g. <a href='?a=d&amp;c=_cgiargc_&amp;d=23\_\_1.2.1&p=text'>this one</a>),
    97 or with next and previous page arrows, and a goto page box 
    98 (e.g. <a href='?a=d&amp;c=_cgiargc_&amp;d=10\_1\_2&p=preview'>this one</a>).
    99 This is specified by the <tt>-documenttype (hierarchy|paged)</tt> option to PagedImagePlugin. 
    100 The next and previous arrows suit the linear sequence documents, while the table of contents 
     96and Newspaper Pages, which contains the page images.
     97<p>Paged documents can be presented with a hierarchical table of contents
     98(e.g. <a href=\'?a=d&amp;c=_cgiargc_&amp;d=23\_\_1.2.1&p=text\'>this one</a>),
     99or with next and previous page arrows, and a goto page box
     100(e.g. <a href=\'?a=d&amp;c=_cgiargc_&amp;d=10\_1\_2&p=preview\'>this one</a>).
     101This is specified by the <tt>-documenttype (hierarchy|paged)</tt> option to PagedImagePlugin.
     102The next and previous arrows suit the linear sequence documents, while the table of contents
    101103suits the hierarchically organised document. Ordinarily, a Greenstone collection
    102  would have one plugin per document type, and all documents of that type get
    103 the same processing. In this case, we want to treat the XML-based item files 
    104 differently from the text-based item files. We can achieve this by adding two 
    105 PagedImagePlugin plugins to the collection, and configuring them differently. 
     104would have one plugin per document type, and all documents of that type get
     105the same processing. In this case, we want to treat the XML-based item files
     106differently from the text-based item files. We can achieve this by adding two
     107PagedImagePlugin plugins to the collection, and configuring them differently.
    106108<p><tt>plugin PagedImagePlugin -documenttype hierarchy -process_exp xml.*\.item$ <br/>
    107 plugin  PagedImagePlugin -documenttype paged </tt>
     109plugin PagedImagePlugin -documenttype paged </tt>
    108110
    109 <p>XML based newpapers have been grouped into a folder called <tt>xml</tt>. 
    110 This enables us to process these files differently, by utilising the 
    111 <tt>process_exp</tt> option which all plugins support. The first PagedImagePlugin 
    112 in the list looks for item files underneath the xml folder. These documents 
    113 will be processed as hierarchical documents. Item files that don't match the
    114 process expression (i.e. aren't underneath the xml folder) will be passed onto
     111<p>XML based newpapers have been grouped into a folder called <tt>xml</tt>.
     112This enables us to process these files differently, by utilising the
     113<tt>process_exp</tt> option which all plugins support. The first PagedImagePlugin
     114in the list looks for item files underneath the xml folder. These documents
     115will be processed as hierarchical documents. Item files that don\'t match the
     116process expression (i.e. aren\'t underneath the xml folder) will be passed onto
    115117the second PagedImagePlugin, and these are treated as paged documents.
    116118
    117119<p><b>Formatting</b>
    118 <p>We have modified the document formatting to display fullsized images, 
    119 preview images or text, with buttons to switch between them. This involves 
    120 modifications to the DocumentHeading and DocumentText format statements in the 
    121 <a href='_httpcollection_/etc/collect.cfg' target=\'collect.cfg\'>collection configuration file</a>,
    122 and some macro definitions in the <a href='_httpcollection_/macros/extra.dm' target=\'extra.dm\'>extra.dm macro file</a>.
     120<p>We have modified the document formatting to display fullsized images,
     121preview images or text, with buttons to switch between them. This involves
     122modifications to the DocumentHeading and DocumentText format statements in the
     123<a href=\'_httpcollection_/etc/collect.cfg\' target=\'collect.cfg\'>collection configuration file</a>,
     124and some macro definitions in the <a href=\'_httpcollection_/macros/extra.dm\' target=\'extra.dm\'>extra.dm macro file</a>.
    123125The extra.dm macro file provides definitions for the buttons (\_viewfullsize\_,
    124  \_viewpreview\_, \_viewtext\_) which are used by the format statement in the
    125 collect.cfg file. The format statement switches the document display and sets 
    126 the buttons to be displayed based on the p argument, which is also set by the 
     126\_viewpreview\_, \_viewtext\_) which are used by the format statement in the
     127collect.cfg file. The format statement switches the document display and sets
     128the buttons to be displayed based on the p argument, which is also set by the
    127129format statement.
    128130"
    129131
    130132# -- Spanish text -----------------------
    131 collectionmeta  collectionextra [l=es] "Esta colección contiene algunos diarios de la colección 
    132 <a href='http://www.nzdl.org/cgi-bin/library?a=p&amp;p=about&amp;c=niupepa'>
    133 Niupepa</a> de periódicos Maories. 
     133collectionmeta  collectionextra [l=es] "Esta colección contiene algunos diarios de la colección
     134<a href=\'http://www.nzdl.org/cgi-bin/library?a=p&amp;p=about&amp;c=niupepa\'>
     135Niupepa</a> de periódicos Maories.
    134136
    135137<h3>Cómo funciona la colección</h3>
    136138<p>Cada diario consiste en un conjunto de imágenes, una por página, y un conjunto de archivos de texto provenientes del OCR. Un archivo .item relaciona al conjunto de páginas en un único documento de diario. PagedImagePlugin se utiliza para procesar esos archivos .item.
    137 <p>Hay dos estilos para escribir esos archivos item. y esta colección demuestra ambos. 
    138 El primero usa un formato básico de texto, y consiste en una lista de metadatos para el documento, y una lista de páginas. Aquí hay algunos ejemplos: 
    139 <a href='_httpcollection_/import/09/09\_1\_1.item'>Te Waka o Te Iwi, Vol. 1, No. 1</a>,
    140 <a href='_httpcollection_/import/10/10\_1\_3.item'>Te Whetu o Te Tau, Vol. 1, No. 3</a>.
    141 Este formato permite la especificación de metadatos a nivel de documento, y una lista simple de páginas. 
    142 <p>El segundo estilo es un formato extendido y usa XML. Permite una jerarquía de páginas, y una especificación de metadatos a nivel de documento como también de páginas. Un ejemplo es <a href='_httpcollection_/import/xml/23/23\_\_2.item'>Matariki 1881, No. 2</a>.
     139<p>Hay dos estilos para escribir esos archivos item. y esta colección demuestra ambos.
     140El primero usa un formato básico de texto, y consiste en una lista de metadatos para el documento, y una lista de páginas. Aquí hay algunos ejemplos:
     141<a href=\'_httpcollection_/import/09/09\_1\_1.item\'>Te Waka o Te Iwi, Vol. 1, No. 1</a>,
     142<a href=\'_httpcollection_/import/10/10\_1\_3.item\'>Te Whetu o Te Tau, Vol. 1, No. 3</a>.
     143Este formato permite la especificación de metadatos a nivel de documento, y una lista simple de páginas.
     144<p>El segundo estilo es un formato extendido y usa XML. Permite una jerarquía de páginas, y una especificación de metadatos a nivel de documento como también de páginas. Un ejemplo es <a href=\'_httpcollection_/import/xml/23/23\_\_2.item\'>Matariki 1881, No. 2</a>.
    143145Este diario también tiene un resumen asociado a él. Los contenidos han sido agrupados en 2 secciones: Material Suplementario, la cual contiene el resumen, y Páginas del Diario, que contiene las imágenes de las páginas.
    144146<p>Los documentos paginados pueden presentarse con una tabla de contenidos jerárquica
    145 (por ej. <a href='?a=d&amp;c=_cgiargc_&amp;d=23\_\_1.2.1&p=text'>esta</a>),
    146 o con flechas "Siguiente" y "Anterior" y un recuadro "Ir a la página..." 
    147 (por ej. <a href='?a=d&amp;c=_cgiargc_&amp;d=10\_1\_2&p=preview'>esta</a>). 
    148 Esto es definido por la opción <tt>-documenttype (hierarchy|paged)</tt> asignada al plugin PagedImagePlugin. 
    149 Las flechas Siguiente y Anterior permiten seguir el documento de manera lineal, mientras que la tabla de contenidos muestra al documento organizado jerárquicamente. Generalmente, una colección de Greenstone tendría un plugin por cada tipo de documento y todos los documentos de ese mismo tipo tendrían el mismo procesamiento. En este caso, queremos tratar los archivos .item con formato XML de manera diferente a aquellos con formato de texto plano. Esto puede lograrse agregando dos plugin PagedImagePlugin a la colección, y configurándolo de manera diferente. 
     147(por ej. <a href=\'?a=d&amp;c=_cgiargc_&amp;d=23\_\_1.2.1&p=text\'>esta</a>),
     148o con flechas \"Siguiente"
     149(por ej. <a href='?a=d&amp;c=_cgiargc_&amp;d=10\_1\_2&p=preview'>esta</a>).
     150Esto es definido por la opción <tt>-documenttype (hierarchy|paged)</tt> asignada al plugin PagedImagePlugin.
     151Las flechas Siguiente y Anterior permiten seguir el documento de manera lineal, mientras que la tabla de contenidos muestra al documento organizado jerárquicamente. Generalmente, una colección de Greenstone tendría un plugin por cada tipo de documento y todos los documentos de ese mismo tipo tendrían el mismo procesamiento. En este caso, queremos tratar los archivos .item con formato XML de manera diferente a aquellos con formato de texto plano. Esto puede lograrse agregando dos plugin PagedImagePlugin a la colección, y configurándolo de manera diferente.
    150152<p><tt>plugin PagedImagePlugin -documenttype hierarchy -process_exp xml.*\.item$ <br/>
    151 plugin PagedImagePlugin -documenttype paged </tt>
     153plugin  PagedImagePlugin -documenttype paged
    152154
    153 <p>Los diarios basados en XML han sido agrupados en una carpeta llamada <tt>xml</tt>. 
    154 Esto nos permite procesar esos archivos de una manera diferente, utilizando la opción <tt>process_exp</tt> que es soportada por todos los plugins. El primer plugin PagedImagePlugin 
     155<p>Los diarios basados en XML han sido agrupados en una carpeta llamada <tt>xml</tt>.
     156Esto nos permite procesar esos archivos de una manera diferente, utilizando la opción <tt>process_exp</tt> que es soportada por todos los plugins. El primer plugin PagedImagePlugin
    155157en la lista busca archivos .item que se encuentren en la carpeta xml. Estos documentos se procesarán como documentos jerárquicos. Los archivos .item que no coincidan con la expresión de procesamiento (por ejemplo, los que no estén dentro de la carpeta xml) serán pasados al segundo plugin PagedImagePlugin, y se tratarán como documentos paginados.
    156158
    157159<p><b>Formateo</b>
    158 <p>Hemos modificado el formateo del documento para mostrar imágenes a tamaño completo, previsualizar imágenes o texto y botones para cambiar entre estas opciones. Esto involucra modificaciones a las cadenas de formateo del DocumentHeading y el DocumentText en el 
    159 <a href='_httpcollection_/etc/collect.cfg' target=\'collect.cfg\'>archivo de configuración de la colección.</a>, 
     160<p>Hemos modificado el formateo del documento para mostrar imágenes a tamaño completo, previsualizar imágenes o texto y botones para cambiar entre estas opciones. Esto involucra modificaciones a las cadenas de formateo del DocumentHeading y el DocumentText en el
     161<a href='_httpcollection_/etc/collect.cfg' target=\'collect.cfg\'>archivo de configuración de la colección.</a>,
    160162y algunas definiciones de macros en el <a href='_httpcollection_/macros/extra.dm' target=\'extra.dm\'>archivo de macros extra.dm</a>.
    161163El archivo extra.dm provee definiciones para los botones (\_viewfullsize\_,
    162  \_viewpreview\_, \_viewtext\_) los cuales son usados por la sentencia de formateo en el archivo collect.cfg. La sentencia de formateo cambia la visualización del documento y setea los botones que deben mostrarse basándose en el argumento p, el cual es configurado también en la misma sentencia.
    163  "
     164\_viewpreview\_, \_viewtext\_) los cuales son usados por la sentencia de formateo en el archivo collect.cfg. La sentencia de formateo cambia la visualización del documento y setea los botones que deben mostrarse basándose en el argumento p, el cual es configurado también en la misma sentencia.
     165"
Note: See TracChangeset for help on using the changeset viewer.