Export title of pages in mediawiki - mediawiki

Is there a way to export a list of all pages in MediaWiki.
I've had a look at https://www.mediawiki.org/wiki/Help:Export but it offers no solution.

I think the specal page "export" is used to export the content of a page to a file to import it in another MediaWiki.
If you just need a list of all the pages why don't you just use the special page AllPages and copy&paste it to an spreadsheet?

You can use the allpages API, or simply query the page table. generateSitemap.php also does it for you but probably not in the format you would want.

Related

How to build Angular HTML template on button click?

I'm trying to create an HTML template to export it as a PDF File, but I'm not sure on how to do this using Angular's engine;
What I need to do basically is to build this template when I click a "Download As PDF" button, and this should take all the information I have in one component and use to create an HTML document which will be exported, but not shown on the screen or anything like that.
Since my actual screen and the format I need to have on the PDF file I'm not able to just use the same component's HTML template, so I'm looking to build the template structure I need when I click on the button.
My current component uses mat-tabs to display information, but in the actual PDF I need each tab to be its own individual section in the page; so I would need to build this new HTML structure only when I want to generate the file
Any ideas how i could do something like this?
Based on your criteria this sounds like it needs to be a whole new component that is created specifically to the format needed for the PDF export. You'd add the correct headers such as content-disposition to have your PDF attachment.
Your next task is to determine how to get your data into that new component that is dedicated to PDF export. If you are already using a Redux/NGRX store in your app then that is probably easy enough to use.
A more common way to share data across components within the same module is to utilize an Angular service. This service is injected into both versions of the component and all important data is saved and retrieved from that service.

Sitecore - Export as HTML

I know about the Sitecore function to export Items to XML. But what I need is the complete HTML markup including permissions of the displayed pages in Sitecore.
Is there a way to export these out of Sitecore into XML?
I am not sure that I entirely understand the question. If you simply want to export the pages of a website the easiest solution is to use a web scraping tool (http://www.codeproject.com/Articles/1041115/Webscraping-with-Csharp).
However I am uncertain about what you mean by "including permissions". Do you mean the security permissions set on the context item (the item/page being displayed)? If so then please note that a page can be composed by a context item and a lot of embedded data source items used in the various renderings which makes it a bit more tricky.
Cheers, Bo

Export/Import images between mediawiki sites respecting history and metadata

I have to export new images and those images that have been edited from one wiki to another, the aim is that in the end the two wiki sites have the same images with the same history.
How can I do it?, I mean importing the images with the revisions and metada as for example, the user name or timestamp.
Using dumpUpload and importimages I only get the last version of the images and lost the metadata, it appears as maintenance import.
Thanks.
There is a way to export images like you export pages, you have to right click on them, and choose "Save image".
To get the history of the Image page, use the Special:Export page.
To import images use the Special:Upload page on your wiki. If you have lots of them, you can use the Import Images script.
Note: Your account generally have to be in the sysop group to upload images. You can only export & import everything manually but you can also create a MediaWiki bot!

Query all page titles in a wiki?

Im querying a wiki that has urls structured like:
wiki.xxxxxxx.com/index.php?title=titleofarticlehere
How could I get a list of all pages (the "titleofarticlehere" part above^)?
For what usages do you want it? There is a special page "Special:AllPages" to view all pages in this wiki, or you could use a machine readable list using the api.

Add custom input form in MediaWiki homepage

Where can I put custom input form code in media wiki homepage?
This is so I can modify it into fewer steps for a user to create a new page. The input form will be for entering the title of the new page.
Currently, when adding a page, the user has to search for a page, and if it doesn't exist, it redirects to another page with a link to add the new page. After that it will load the built-in Wiki editor(will also modify this to default to the Visual Editor extension I integrated instead of Wiki editor).
Any input would be greatly appreciated.
There are a number of extensions that can do what you want:
InputBox, is bundled with recent versions of MediaWiki. It is used with Wikimedia wikis, and thus probably very stable.
CreateBox, specifically for letting users create pages
Create Page, more general aproach
Semantic Forms The most fulfledged, but also the most complex, and requires the Semantic MediaWiki extension
You might also want to combine this with some biolerplate extension, e.g. Preloader
As you are posting on SO, I assume that developing your own extension would also be an option. In that case, have a look at the parser functions manual: https://www.mediawiki.org/wiki/Manual:Parser_functions
The file in which i can add/modify a custom input form in the media wiki homepage would be the /rootWikiDir/skins/Vector.php