Help:Bulk Uploads

From QED

Jump to: navigation, search
Help
Related topics

Various scripts are available for remote batch uploading. These scripts use the standard Upload interface programmatically. In addition, QED administrators have access to scripts for uploading from sources such as spreadsheets.

This page provides details about a Perl script for remote batch uploading. It requires that Perl be installed on the machine running the script. If this script does not meet your batch uploading requirements, please send mail to qed@princeton.edu.

Contents

Perl Remote Batch Upload

A version of the publicly available Perl script tailored to QED may be found at Help:Bulk Uploads/Script.

The files to be uploaded (or symbolic links to them) must exist in or under a single directory in which a corresponding description file called files.txt should also exist.

files.txt

A file named files.txt guides the upload script. If the first character of a line is "@", "°" or ">", the remainder of the line is taken to be a directive as follows:

  • "@" : The remaining text on the line is appended to every description. QED markup can be used.
  • "°" : The remaining text on the line is used as a default description for files with no specific description.
  • ">" : The remaining text on the line is the name of the file to be uploaded. The first character of the filename must follow the ">" immediately.

All other lines are included as part of the file-description page of the immediately preceding file specification.

Here is an example:

What you write Explanation
@{{GFDL}} [[Category:Image]] This text is appended to every description. QED markup can be used.
°[[Category:Uncataloged]] This text is used when no file-specific description is provided.
>Millais_Masterpiece.jpg Name of a file in the specified directory. The filename must immediately follow ">".
The description can span
more than one line but no line
in the description can begin with any
of the three special characters: @°>
>Chagall_Masterpiece.png File without a description. The default description provided above will be used.

Note

  • The "@" and "°" directives are optional. They can occur as many times as required and apply to subsequent files until the next occurrence of the same directive.

Acknowledgement

This script is based on the one at Permalink11px.gif this permalink.

See also

Personal tools