Package: wikiteam3
wikiteam3Countless MediaWikis are still waiting to be archived.Image by@gledoswikiteam3is a fork ofmediawiki-scraper.Why we fork mediawiki-scraperOriginally, mediawiki-scraper was named wikiteam3, but wikiteam upstream (py2 version) suggested that the name should be changed to avoid confusion with the original wikiteam.Half a year later, we didn't see any py3 porting progress in the original wikiteam, and mediawiki-scraper lacks "code" reviewers.So, we decided to break that suggestion, fork and named it back to wikiteam3, put the code here, and release it to pypi wildly.Everything still under GPLv3 license.Installation/Upgradepipinstallwikiteam3--upgradeDumpgenerator usageDownloading a wiki with complete XML history and imageswikiteam3dumpgeneratorhttp://wiki.domain.org--xml--images[!WARNING]NTFS/Windowsusers please note: When using--images, because NTFS does not allow characters such as:*?"<>|in filenames, some files may not be downloaded, please pay attention to theXXXXX could not be created by OSerror in yourerrors.log.
We will not make special treatment for NTFS/EncFS "path too long/illegal filename", highly recommend you to use ext4/xfs/btrfs, etc.- Introducing the "illegal filename rename" mechanism will bring complexity. WikiTeam(python2) had this before, but it caused more problems, so it was removed in WikiTeam3.
- It will cause confusion to the final user of wikidump (usually the Wiki site administrator).
- NTFS is not suitable for large-scale image dump with millions of files in a single directory.(Windows background service will occasionally scan the whole disk, we think there should be no users using WIN/NTFS to do large-scale MediaWiki archive)
- Using other file systems can solve all problems.Manually specifyingapi.phpand/orindex.phpIf the script can't find itself theapi.phpand/orindex.phppaths, then you can provide them:wikiteam3dumpgenerator--apihttp://wiki.domain.org/w/api.php--xml--imageswikiteam3dumpgenerator--apihttp://wiki.domain.org/w/api.php--indexhttp://wiki.domain.org/w/index.php\--xml--imagesIf you only want the XML histories, just use--xml. For only the images, just--images. For only the current version of every page,--xml --curonly.Resuming an incomplete dumpwikiteam3dumpgenerator\--apihttp://wiki.domain.org/w/api.php--xml--images--resume--path/path/to/incomplete-dumpIn the above example,--pathis only necessary if the download path (wikidump dir) is not the default.[!NOTE]en: When resuming an incomplete dump, the configuration inconfig.jsonwill override the CLI parameters. (But not all CLI parameters will be ignored, checkconfig.jsonfor details)wikiteam3dumpgeneratorwill also ask you if you want to resume if it finds an incomplete dump in the path where it is downloading.Usingwikiteam3uploaderRequirements[!NOTE]Please make sure you have the following requirements before usingwikiteam3uploader, and you don't need to install them if you don't wanna upload the dump to IA.unbinded localhost port 62954 (for multiple processes compressing queue)3GB+ RAM (~2.56GB for commpressing)64-bit OS (required by 2Gwlogsize)7z(binary)Debian/Ubuntu: installp7zip-full[!NOTE]Windows: installhttps://7-zip.organd add7z.exeto PATHzstd(binary)1.5.5+ (recommended), v1.5.0-v1.5.4(DO NOT USE), 1.4.8 (minimum)install fromhttps://github.com/facebook/zstd[!NOTE]Windows: addzstd.exeto PATHUploader usage[!NOTE]Readwikiteam3uploader --helpand do not forget~/.wikiteam3_ia_keys.txtbefore usingwikiteam3uploader.wikiteam3uploader{YOUR_WIKI_DUMP_PATH}Checking dump integrityTODO: xml2titles.pyIf you want to check the XML dump integrity, type this into your command line to count title, page and revision XML tags:grep-E'<title(.*?)>'*.xml-c;grep-E'<page(.*?)>'*.xml-c;grep\"</page>"*.xml-c;grep-E'<revision(.*?)>'*.xml-c;grep"</revision>"*.xml-cYou should see something similar to this (not the actual numbers) - the first three numbers should be the same and the last two should be the same as each other:58058058056775677If your first three numbers or your last two numbers are different, then, your XML dump is corrupt (it contains one or more unfinished</page>or</revision>). This is not common in small wikis, but large or very large wikis may fail at this due to truncated XML pages while exporting and merging. The solution is to remove the XML dump and re-download, a bit boring, and it can fail again.import wikidump to MediaWiki / wikidump data tips[!IMPORTANT]In the article name, spaces and underscores are treated as equivalent and each is converted to the other in the appropriate context (underscore in URL and database keys, spaces in plain text).https://www.mediawiki.org/wiki/Manual:Title.php#Article_name[!NOTE]WikiTeam3useszstdto compress.xmland.txtfiles, and7zto pack images (media files).zstdis a very fast stream compression algorithm, you can usezstd -dto decompress.zstfile/steam.ContributorsWikiTeamis theArchive Team[GitHub] subcommittee on wikis.
It was founded and originally developed byEmilio J. Rodríguez-Posada, a Wikipedia veteran editor and amateur archivist. Thanks to people who have helped, especially to:Federico Leva,Alex Buie,Scott Boyd,Hydriz, Platonides, Ian McEwen,Mike Dupont,balr0gandPiRSquared17.Mediawiki-ScraperThe Python 3 initiative is currently being led byElsie Hupp, with contributions fromVictor Gambier,Thomas Karcher,Janet Cobb,yzqzss,NyaMistyandRob KamWikiTeam3Every archivist who has uploaded a wikidump to theInternet Archive.