Ayuda:Extensión:FileImporter

El objetivo de las extensiones FileImporter y FileExporter es facilitar la transferencia de archivos de una wiki local a Wikimedia Commons. La nueva funcionalidad permite a los usuarios mover archivos con todos sus datos originales intactos, a la vez que registran el movimiento en el historial de versiones.
FileExporter proporciona un enlace a Wikimedia Commons en el wiki local y proporciona una URL a la extensión FileImporter. FileImporter es una extensión de Wikimedia Commons que importa el archivo e incluye todos los datos cuando se cumplen todos los requisitos previos. Técnicamente, los archivos no serán «movidos», sino «copiados».
FileImporter se implementa en Wikimedia Commons desde junio de 2018. Para utilizarlo, debe activar FileExporter como función beta en su wiki local. FileExporter está implementado y habilitado por defecto en todos los wikis de Wikimedia desde agosto de 2020.
Antecedentes
FileImporter y FileExporter tienen como objetivo atender una solicitud de Lista de deseos técnicos de la comunidad de habla alemana y son desarrollados por el equipo técnico de WMDE. Se puede encontrar más información en la página principal del proyecto en Meta.
Uso
Primeros pasos
2) Debe haber un archivo de configuración para su wiki. Ya existen numerosos archivos basados en los archivos de la herramienta CommonsHelper2. We're asking users to have a look at them and update or create them if needed to make sure the imports are done right.
For more info, read the documentation how the configuration files work and what they are needed for.
Paso a paso
Debe iniciar sesión para poder utilizar la función.
-
1: En una página de archivo local, haga clic en la pestaña "Exportar a Wikimedia Commons" (arriba de la imagen).
-
2: El FileImporter comprueba si el archivo se puede importar y si es necesario reemplazar las plantillas durante la importación. Este paso se basa en el archivo de configuración de la wiki. Read more.
-
3: Una página de vista previa en Commons le mostrará lo que se importará. You can edit the file title and page information, and ask the FileImporter to clean up the source wiki in your name, by adding a template like NowCommons to the source file, or deleting the source file if you have admin rights. Clicking on “Import File” copies the file to Commons.
-
4: The file is imported, including the name of the original uploader and name of the importer, the previous history of the file and the file page, and any changes that were made during import.
Cómo se pueden encontrar los archivos importados
- In the revision history of a file, the import is shown as a null revision (i.e. an entry in the revision list that doesn’t actually change the page).
If changes were made during import, an additional text revision is created.
- New revisions that are created during import are tagged with
Modified with FileImporter
.
This way it can be filtered on the recent changes page.
- Both an upload log entry and an import log entry are created and associated with the null revision and with the importing user, and timestamped with the import date.
Having both log entries is the default for uploads, although it might lead to "doubled" entries in recent changes and watchlists, see this example file and its log entries.
- For (old) imported file revisions, upload log entries are created with the date and user of the original upload to make all file revisions appear in Commons' upload log.
These revisions are also tagged with Imported with FileImporter
.
- Imported files are marked with an invisible comment that says "This file was moved here using FileImporter from" and mentions the full URL of the source file.
CirrusSearch's insource:
feature can be used to find files with this comment, e.g.: insource:"This file was moved here using FileImporter from //en.wikipedia"
. Note this also finds later derivatives of imported files, but not files where the comment was removed.
How to add categories
The message fileimporter-post-import-revision-annotation
(empty by default) can be used to add any additional wikitext to every imported file.
The message accepts two parameters:
$1
- Full URL of the source file.$2
- Time of the import in ISO 8601, e.g.2004-02-12T15:19:21+00:00
.
For example, to categorize by source wiki, an interface administrator can set the message to {{#invoke:Imported with FileImporter|main|url=$1|time=$2}}
, where the invoked Lua module ("Module:Imported with FileImporter" in this example) looks like this:
local exports = {}
function exports.main( frame )
return "[[Category:Files moved to Commons from " .. mw.uri.new( frame.args.url ).host:gsub( ".org", "" ) .. "]]"
end
return exports
Plan de despliegue
- 2018-06-12: Export to test.wikipedia.org
- FileExporter as a beta feature on mediawiki.org and test2.wikipedia.org. OK (To test the export, you also need to be an auto-confirmed user on these wikis.)
- FileImporter on test.wikipedia.org OK
- 2018-06-25: Export to Wikimedia Commons
- 2018-07-11:
- FileExporter as a beta feature on wikisource OK
- 2019-01-16:
- 2019-09-24:
- 2020-08-05:
- Deployment as a default feature on all remaining Wikis
Enlaces
- Main project page on Meta
- FileImporter - manual de extensión
- Extension:FileImporter/List of configured wikis - Configuraciones de FileImporter
- FileExporter - manual de extensión
- phab:tag/move-files-to-commons/ - Phabricator project
- overview: How templates are matched with the FileImporter extension