-
Notifications
You must be signed in to change notification settings - Fork 0
CodyKank/WikiScrape
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
__ ___ _ _ ___ \ \ / (_) |_(_) __| __ _ _ __ _ _ __ ___ \ \/\/ /| | / / \__ \/ _| '_/ _` | '_ \/ -_) \_/\_/ |_|_\_\_|___/\__|_| \__,_| .__/\___| |_| ==================================================================================== WikiScrape is a tool which can be useful for easily creating or moving Mediawikis without access to the old / copied Mediawiki server. This tool can be used to successfully gather all of the titles to the pages within the old / copied wiki, and to also gather all of the images from the old /copied Mediawiki server. In this way, it is possible to use Mediawiki's own tools to import the pages and import the images as well. Access to the new Mediawiki server is required to import the images. Installation * To install, simply clone / download this repository and compile the golang code. * Either use go get [git url to here] or download this and go build on the directory. Requirements * A Golang compiler is required. How to use * To download images, use the -images flag. To download the titles, use the -titles flag. * Example: wikiScrape -images "[URL for file list]" -titles "[URL for Ancient Pages]" Uploading the images * Once the images are downloaded into their own directory, you must move the entire directory to the target server (the new mediawiki) if not already there. Then, utilize Mediawiki's image uploading maintenance script found within the maintenance direcory in the root level of the new mediawiki (Assuming you already have the new Mediawiki installed and running.) * Run the following command to upload the desired images. php maintenance/importImages.php /path/to/images/directory * More information on this command can be found at: https://www.mediawiki.org/wiki/Manual:ImportImages.php Importing the titles * The titles of the pages are required to allow us to use Mediawiki's Export and import tools. * Once all of the titles are written to the file, open it in your favorite editor and copy the entire document into your clipboard. * Then, paste the results into the Special:Export page on the old mediawiki. * Download the resulting XML file. * On the new Mediawiki, navigate to the Special:Import page. * Click on Browse, and upload the XML file downloaded from the old mediawiki. This may take some time. * All of the pages should be created now! * #NOTE#: To create the Main Page, you must copy the source from the old Mediawiki and paste it into the new Mediawiki's Main Page. Link Usage * For right now, it is really important to use the correct link for the Mediawiki depending which flag you are using. * For the -image flag: - The URL should be obtained from the wiki's Special Page's File List. - Once on the File List page, click the box which determines how many files are displayed on one page and change to 500. - Click on "Go" or "Search". - This should bring up a page which has up to 500 of the images. Copy this link and use with the -images flag. - #NOTE#: For now, wikiScrape only works on wikis with 500 or less images. To find more than 500 images, you'll have to first download the first set and then move pages and use that link. * For the -titles flag: - The URL should be obtained from the wiki's Special Page's Oldest Pages. - Once on the Oldest Pages (also known as 'Ancient Pages'), click the box which determines how many pages are displayed. - Change the value to 500 and press 'Go'. - This is the link which should be used with the -titles flag. - #NOTE#: For now, wikiScrape only works on wikis with 500 or less pages. To find more than 500 pages, you'll have to first download the first set and then move pages and use that link. Bugs: * Please report Bugs found on Github. Author: * CodyKank : kodiak@vivaldi.net Created: * Jan 27, 2017
About
Tool to assist the copy or move of a Mediawiki.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published