Ajuda:Importar
| Nota: Quando modificais esta página, estais a aceitar que a vossa contribuição se publique no marco de CC0. Olhem Páginas de ajuda de domínio público para mais informação. |
Importar refere-se ao processo de trazer as páginas de uma wiki para outra.
Importar páginas pode ser uma ferramenta poderosa que pode facilmente fazer coisas inesperadas e perigosas para a sua wiki. Só importe o conteúdo deste modo se souber o que está a fazer.
Existem dois tipos de importar, ambos acessíveis através da página Special:Import, a Transwiki e o Envio de importação.
Tipos de importação
Importação Transwiki
A Importação Transwiki, também conhecida como importação entre wikis, deixa-o importar as páginas de uma wiki para outra.
As definições da wiki de destino decidem quais as wikis fonte permitidas.
MediaWiki:import-interwiki-text (Selecione uma wiki e um título de página a importar.
As datas das edições e os seus editores serão mantidos.
Todas as ações de importação a partir de outras wikis são registadas no registo de importações.) pode aparecer durante o processo.
Transwiki import is equivalent to going to Special:Export on the source wiki, downloading the resulting XML file, and then importing it using XML import, except that you might only have permissions to do one but not the other.
When transwiki importing, the Incluir todas as predefinições e páginas transcluídas option imports all the templates used an imported page.
This is not necessarily all templates the page depends on to run (if you import a template and its dependencies, it does not include any subtemplates unless they happen to be transcluded with the base template page itself). This option can easily import more pages than you intended, should generally only be checked if you really know what you are doing, as it can screw up the wiki in ways that take a lot of effort to undo.
To check if your wiki has Transwiki import sources configured and see which wikis they apply to, you can use the API:
- <wiki url>/w/api.php?action=paraminfo&modules=import
A configuração é especificada como: <param name="interwikisource" description="For interwiki imports: wiki to import from"> …
Enviar importação
Consulte também: Manual:Importing XML dumps
Upload Import, lets you import an XML file generated by exporting pages from another wiki. Isto exibe a mensagem MediaWiki:Importtext (Exporte o ficheiro da wiki de origem utilizando o utilitário de exportação de páginas. Grave o ficheiro no seu dispositivo e carregue-o aqui.)
Para exportar as páginas wiki para um ficheiro, consulte Ajuda:Exportar.
Generally, any user can export pages to a file, but importing them into a wiki requires the importupload user right.
This is granted to sysops in the default configuration, but on WMF wikis is its own "importer" group.
Unlike with transwiki import, which always preserves content from the source wiki unchanged, nothing stops you from editing the XML file before importing it, allowing backdating of edits, fake usernames, or other ways of rewriting history.
This editing process can be used for:
- Adding a note about the import in the edit summary or as a change tag.
- Changing user names and page names to avoid conflicts.
- Adjusting namespace names to be more generic or suitable
- Rebasing edits, as an alternative to revision deletion of large chunks of history if unacceptable content is added and later removed.
See Manual:XML Import file manipulation in CSharp for an example of handling these XML files using C# in Visual Studio .NET.
Aplicações úteis de importação
- Keeping the page history intact when moving and editing a page in a different wiki. This is particularly helpful if the source page becomes harder to locate due to page moves.
- Preserving the history when a page is moved to another wiki and then deleted from the original wiki.
- Utilizar modelos de outra wiki:
Nomes de utilizador
O comportamento predefinido
By default, imported edits appear with an interwiki prefix, like meta>Example.
See an example of an imported history here.
Atribuir edições aos utilizadores locais
If you tick the Atribuir as edições aos utilizadores locais se o utilizador nomeado existir localmente checkbox, then edits will be attributed to the user with no interwiki prefix if such a user exists.
This makes it not easily possible to distinguish between imported edits and edits originally made on the wiki.
IP edits
IP addresses stay the same and if you apply the ip tag next to a reserved username, it will work too.
Alterações recentes
As edições importadas nunca aparecem nas alterações recentes, mas o ato de realizar a própria importação sim.
Destinos de importação
Por predefinição, as edições importadas aparecem no mesmo espaço nominal e título na wiki de destino que na wiki de origem. O formulário de importação permite-lhe especificar o seguinte:
- O espaço nominal para o qual importar o conteúdo (1). A opção do espaço nominal ignora completamente o espaço nominal da wiki fonte, portanto, se importar m:Template:Void para o espaço Help, este fica Help:Void, não Help:Template:Void.
- Uma página base para tornar todas as páginas importadas subpáginas de (Importar como sub-páginas da seguinte página:).