API:bin/generate views

From EPrints Documentation
Revision as of 14:45, 25 February 2010 by Tdb01r (talk | contribs) (Created page with '<!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' com…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


API: Core API

Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki


NAME

generate_views - Generate static browse pages for an EPrint repository

User Comments


SYNOPSIS

generate_views repository_id [options]

User Comments


DESCRIPTION

This script creates some or all of the pages used in the /view/ section of the website. Since 3.1 these pages update themselves if they get only than a certain age, but this can cause delays for the viewer, so this script is still provided to pre-prepare them to provide a smoother experience.

Note: Since EPrints 3.1 it is not essential to run generate_views periodically, but it is still recommended.

What this does is generate browse pages for each field configured as browsable in ArchiveConfig.pm. It creates a static web page for each value of that field, and index pages to navigate to them.

For example, if we make "year" browseable then this script will generate one page for each unique value of the year field. So a user can then view the 1995 page and see links to all the 1995 eprints.

Advantages of this are that this puts less load on the database than user searches. Assuming you pick two or three sensible fields to make browsable.

This script should be run every hour or so, but that should once a day or even once a week on large repositories, as the more eprints the longer it will take to run. The rough length of time to run this is of the order of O( languages * eprints * browsable fields ). You can automate running this with the cron system.

If viewid is specified then only that view is updated. This can be useful if some views need updating more often then others. The top /view/ page which links to each view is always updated.

User Comments


ARGUMENTS

User Comments


repository_id

The ID of the eprint repository to use.

User Comments


OPTIONS

User Comments


--generate menus

Only generate the menu pages, not the pages with links to records.

User Comments


--generate lists

Only generate the pages with lists of records, not the menu pages.

User Comments


--view view_id

Generate only the view with this ID.

User Comments


--lang lang_id

Generate only pages for the language with this ID.

User Comments


--help

Print a brief help message and exit.

User Comments


--man

Print the full manual page and then exit.

User Comments


--quiet

Be vewwy vewwy quiet. This option will supress all output unless an error occurs.

User Comments


--verbose

Explain in detail what is going on. May be repeated for greater effect.

User Comments


--version

Output version information and exit.

User Comments