Petr Onderka has uploaded a new change for review. https://gerrit.wikimedia.org/r/76900
Change subject: added README ...................................................................... added README Change-Id: Id221a521f2b4c352d51284c801da7657adcd05a7 --- M DumpObjects/DumpRevision.cpp A README M main.cpp 3 files changed, 41 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dumps/incremental refs/changes/00/76900/1 diff --git a/DumpObjects/DumpRevision.cpp b/DumpObjects/DumpRevision.cpp index 53dc06d..3f72cef 100644 --- a/DumpObjects/DumpRevision.cpp +++ b/DumpObjects/DumpRevision.cpp @@ -94,7 +94,7 @@ if (!HasFlag(revision.Flags, RevisionFlags::ContributorDeleted)) DumpUser::Create(revision.Contributor)->Write(stream); if (!HasFlag(revision.Flags, RevisionFlags::CommentDeleted)) - WriteValue(revision.Comment); + WriteValue(revision.Comment); // TODO: convert from base36 for saving WriteValue(revision.Sha1); diff --git a/README b/README new file mode 100644 index 0000000..81c89dd --- /dev/null +++ b/README @@ -0,0 +1,39 @@ +[Incremental dumps][1] are an improved format for dumps of content from WikiMedia wikis. + +== Compiling == + +=== Linux === + +You will need cmake 2.8 and gcc 4.8 (gcc 4.7 could work too, I haven't tested that). +To compile this project, run: + + cmake . + make + +=== Windows === + +Open the solution in Visual Studio 2012 (Visual Studio Express 2012 could work too, I haven't tested that) and build it. + +== Running the application == + +Compiling produces a command-line application `idumps`. + +It can be used to convert pages-history XML dump to one or more types of incremental dumps +and also to convert an incremental dump back to XML. +Running it wihtout parameters produces a short usage message, explaining the meaning of parameters. + +When creating a dump with a file name that already exists, the program tried to use the existing file. +This can cause problems, so if an error happens, delete the dump file and try running the command again + +=== Examples === + + idumps c tenwiki-20130622-pages-meta-history.xml sh sh.id pca pca.id + +Creates stub-history dump `sh.id` and pages-articles dump `pca.id` from the XML dump of tenwiki. + + idumps r sh.id sh.xml + +Creates `sh.xml`, XML version of the dump `sh.id`. + + +[1]: http://www.mediawiki.org/wiki/User:Svick/Incremental_dumps diff --git a/main.cpp b/main.cpp index 3d4e8c3..59a2e67 100644 --- a/main.cpp +++ b/main.cpp @@ -11,7 +11,7 @@ void printUsage() { std::cout << "Usage:\n"; - std::cout << "creating dump: idumps c[reate] source.xml spec dump.id\n"; + std::cout << "creating dump: idumps c[reate] source.xml spec dump.id ...\n"; std::cout << " spec is a 2 or 3-letter string that describes what kind of dump to create:\n"; std::cout << " 1. letter: p for pages dump or s for stub dump:\n"; std::cout << " 2. letter: h for history dump or c for current dump:\n"; -- To view, visit https://gerrit.wikimedia.org/r/76900 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id221a521f2b4c352d51284c801da7657adcd05a7 Gerrit-PatchSet: 1 Gerrit-Project: operations/dumps/incremental Gerrit-Branch: gsoc Gerrit-Owner: Petr Onderka <gsv...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits