Manuel:RefreshImageMetadata.php

From mediawiki.org
This page is a translated version of the page Manual:RefreshImageMetadata.php and the translation is 11% complete.
Outdated translations are marked like this.
Version de MediaWiki :
1.18

Détails

Le fichier refreshImageMetadata.php est un script de maintenance pour actualiser les champs de métadonnées de l'images. It processes 200 items in a batch.

Options/Arguments

Option/Paramètre Description Required?
--force Reload metadata from file even if the metadata looks ok. optionnel
--broken-only Only fix really broken records, leave old but still compatible records alone. optionnel
--convert-to-json Fix records with an out of date serialization format. optionnel
--split Enable splitting out large metadata items to the text table. Implies --convert-to-json. optionnel
--verbose Output extra information about each upgraded/non-upgraded file. optionnel
--start Name of file to start with. Spaces must be replaced by underscores, since the parameter will be used to match the file name as stored in the database. optionnel
--end Name of file to end with. optionnel
--mediatype Only refresh files with this media type, e.g. BITMAP, UNKNOWN etc. optionnel
--mime Only refresh files with this MIME type. Can accept wild-card 'image/*'. Potentially inefficient unless mediatype is also specified optionnel
--metadata-contains (Inefficient!) Only refresh files where the img_metadata field contains this string. Can be used if its known a specific property was being extracted incorrectly optionnel
--sleep Time to sleep between each batch (in seconds). Default: 0 optionnel
--oldimage Run and refresh on oldimage table. optionnel

Usage

php maintenance/refreshImageMetadata.php [ --force| --broken-only| --convert-to-json| --split| --verbose| --start| --end| --mediatype| --mime| --metadata-contains| --sleep| --oldimage ]


Terminal
$ php maintenance/refreshImageMetadata.php

Processing next 3 row(s) starting with 1631330937964.jpeg.

Finished refreshing file metadata for 3 files. 3 were refreshed, 0 were already up to date, and 0 refreshes were suspicious.

See also