PDF PublicationList

From EPrints Documentation
Jump to: navigation, search

Introduction

This is an export plugin developed for the University of St.Gallen

Requirements

The library PDF::API2 is required for the PDF generation (use something like apt-get install libpdf-api2-perl )

The pdf file is stored on the user profile as a result MePrints is required by default.

It is possible to modify the plugin so that it does not use MePrints. To do this you will need to create a directory structure similar to that of MePrints and then provide an implementation of the MePrints addition to the user dataobj "_userid_to_path"

The code to change is in the sub output_dataobj in the plugin /Export/UserPDF.pm

Adding a link to the PDF List

If MePrints is installed then an additional action will be added to the "homepage" action list that will display the pdf publication list.

This is provided by the EPrints::Plugin::Screen::User::ExportPdf plugin which can be customised to suit your needs

The list can also be added to the public MePrints profile page by editing the user profile citation (usually cfg/citations/user/profile.xml ) to add:

<epc:print expr="$item.get_publication_list_url()"/>

This works because the config file adds a get_publication_list_url ep script call for the User dataset (see run_get_publication_list_url in cfg/cfg.d/z_hsg_profile_pdf.pl).

configuration

The elements displayed in the pdf and all the parameters that control the look of the pdf are contained in the config file cfg/cfg.d/z_hsg_profile_pdf.pl

Here you can change the logo, the fonts and font sizes and colours and the categories used to group the publications.

The user information can be (should be) edited to suit your needs. The user information is defined in the configuration item array "detail_fields". The default values are: dept org address email

If you wish to change more details such as the user citation, then it will be necessary to edit the plugin that generates the pdf file (EPrints::Plugin::Export::UserPDF).

The phrases need to be modified to suit your needs. By default they are setup for the University of YYZ. The phrase file is lang/en/phrases/publist.xml


Testing

If it installs without any errors then it should be possible to get a pdf generated by visiting:

<your repo base url>/cgi/export/user/<user id>/UserPDF/publication_list_test.pdf

replacing <user id> with a suitable number.

With MePrints installed the "My Publication List" button should appear on the homepage and should result in a pdf being generated.