Помощь:Расширение:FileImporter

This page is a translated version of the page Help:Extension:FileImporter and the translation is 68% complete.
PD Примечание: Редактируя эту страницу, вы соглашаетесь на передачу своего вклада по лицензии CC0.
Подробнее — в проекте Помощь с общественным достоянием.
PD

Расширения Расширение:FileImporter и FileExporter предназначены для упрощения переноса файлов из локального вики-проекта на Викисклад. Новая функциональность позволяет переносить файлы со всеми исходными данными, при этом факт переноса будет упомянут в истории версий.

FileExporter предоставляет ссылку на Викисклад в локальной вики и передает URL-адрес расширению FileImporter. Расширение:FileImporter  — это расширение Викисклада, которое импортирует файл, включающий все данные, при выполнении всех предварительных условий. Технически файлы будут не «перемещены», а «скопированы».

Расширение FileImporter было развёрнуто на Викискладе в июне 2018 года. Расширение FileExporter развёрнуто и включено по умолчанию во всех вики-проектах Викимедиа с августа 2020 года.

Общая информация

FileImporter и FileExporter были созданы в качестве выполнения запроса из списка технических пожеланий немецкоязычного сообщества и разработаны технической командой WMDE (WikiMedia Deutschland). Более подробные сведения можно найти на заглавной странице проекта в Мета-вики.

Использование

Начало работы

1) Чтобы использовать FileExporter в локальной вики (например, русской Википедии), вы должны авторизоваться на сайте и обладать правом загружать файлы.

2) В вашей вики должен быть файл конфигурации (например, в русской Википедии он есть). Часто такие файлы уже существуют, будучи основанными на файлах инструмента CommonsHelper2. Мы просим участников ознакомиться с ними и обновить или создать их при необходимости, чтобы убедиться, что импорт выполнен правильно.

Для получения дополнительной информации прочитайте документацию о том, как работают файлы конфигурации и для чего они нужны.


Шаг за шагом

Чтобы воспользоваться этой функцией, вам потребуется авторизоваться на сайте, введя свой логин и пароль.

Как найти импортированные файлы

  • В истории правок файла импорт отображается в виде нулевой правки (т. е. визуально не вносящей изменения). Если при импорте были внесены изменения, создаётся дополнительная текстовая версия.
  • 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.

Как добавить категории

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 - Полный URL-адрес исходного файла.
  • $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

План развёртывания

  • 2018-06-25: Export to Wikimedia Commons
    • FileExporter as a beta feature on de.WP, fa.WP, ar.WP   OK
    • exporting from mediawiki.org now to Wikimedia Commons   OK
    • FileImporter on Wikimedia Commons   OK
  • 2018-07-11:
  • 2019-01-16:
    • Deployment of the FileExporter beta feature to all other wikis   OK
  • 2019-09-24:
    • Deployment as a default feature on de.WP, fa.WP, ko.WP, mr.WP and sourceswiki (wikisource.org)   OK
  • 2020-08-05:
    • Deployment as a default feature on all remaining Wikis

  OK

Ссылки