{ "info": { "author": "Jean-Christophe Fillion-Robin", "author_email": "jchris.fillionr@kitware.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Documentation", "Topic :: Software Development :: Documentation" ], "description": "Mwdoc\n=====\n\nOverview\n--------\n\nThink of [mwdoc](https://pypi.python.org/pypi/mwdoc) as a tool that allows to easily version mediawiki pages.\n\nFor example, pages like:\n\n Documentation/0.2/mypage\n Template:Documentation/0.2/mytemplate\n\n... can be automatically created from:\n\n Documentation/0.1/mypage\n Template:Documentation/0.1/mytemplate\n\n\nInstallation\n------------\n\nInstalling `mwdoc` will automatically install the required dependencies.\n\n```\npip install mwdoc\n```\n\nUsage\n-----\n\n* Create pages:\n\n``` python\nimport mwdoc\ndoc = mwdoc.Documentation('somewhere.org', '/w/')\ndoc.login('john', 'password')\ndoc.createPage('0.1', 'mypage', 'This is content of my page', 'Documentation')\ndoc.createPage('0.1', 'mytemplate', 'This is content of my template', 'Template:Documentation')\n```\n\n\n* Version pages from 0.1 to 0.2:\n\n``` python\nimport mwdoc\ndoc = mwdoc.Documentation('somewhere.org', '/w/')\ndoc.login('john', 'password')\ndoc.versionPages('0.1', '0.2', ['Documentation', 'Template:Documentation'])\n```\n\n\n* List pages:\n\n``` python\nimport mwdoc\ndoc = mwdoc.Documentation('somewhere.org', '/w/')\ndoc.login('john', 'password')\npages = doc.listPages('Documentation')\nfor page in pages:\n print(page)\ntemplatepages = doc.listPages('Template:Documentation')\nfor page in templatepages:\n print(page)\n```\n\n* Delete pages:\n\n``` python\nimport mwdoc\ndoc = mwdoc.Documentation('somewhere.org', '/w/')\ndoc.login('john', 'password')\npages = doc.listPages('Documentation')\nfor page in pages: \n page.delete()\n```\n\nDependencies\n------------\n\n* [mwclient][mwclient], the client to [MediaWiki API][mwapi]\n\n\nTest\n----\n\nDo **NOT** run this test against a production installation. We mean it.\n\nThe test will create pages, version them and delete them afterward.\n\nTo run the test:\n\n```\ngit clone git://github.com/jcfr/mwdoc && cd $_\npip install -r requirements.txt\npython -m unittest test_mwdoc\n```\n\nIt will then ask for:\n\n* Hostname (e.g `localhost`)\n* Path (e.g `/w/`)\n* Username\n* Password\n\n\nContributing\n------------\n\nOnce you've made your great commits:\n\n1. [Fork][fk] mwdoc\n2. Create a topic branch - `git checkout -b my_branch`\n3. Push to your branch - `git push origin my_branch`\n4. Create an [Issue][is] with a link to your branch\n5. That's it!\n\n\nMake a new release\n------------------\n\nA core developer should use the following steps to create a release of **mwdoc**.\n\n0. Configure `~/.pypirc` as described [here](https://packaging.python.org/distributing/#uploading-your-project-to-pypi).\n\n1. Make sure that all tests are passing.\n\n2. Tag the release. Requires a GPG key with signatures. For version *X.Y.Z*:\n\n```bash\ngit tag -s -m \"mwdoc X.Y.Z\" X.Y.Z upstream/master\n```\n\n3. Create the source tarball and binary wheels:\n\n```bash\ngit checkout master\ngit fetch upstream\ngit reset --hard upstream/master\nrm -rf dist/\npython setup.py sdist bdist_wheel\n```\n\n4. Upload the packages to the testing PyPI instance::\n\n```bash\ntwine upload --sign -r pypitest dist/*\n```\n\n5. Check the [PyPI testing package page](https://testpypi.python.org/pypi/mwdoc/).\n\n6. Upload the packages to the PyPI instance::\n\n```bash\ntwine upload --sign dist/*\n```\n\n7. Check the [PyPI package page](https://pypi.python.org/pypi/mwdoc/).\n\n8. Make sure the package can be installed::\n\n```bash\nmkvirtualenv test-pip-install\npip install mwdoc\nrmvirtualenv test-pip-install\n```\n\nCredits\n-------\n\nPlease see the GitHub project page at https://github.com/jcfr/mwdoc/graphs/contributors\n\nMeta\n----\n\n* PyPI: \n* Code: `git clone git://github.com/jcfr/mwdoc.git`\n* Home: \n* Bugs: \n\nLicense\n-------\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n[fk]: http://help.github.com/forking/\n[is]: http://github.com/jcfr/mwdoc/issues\n[mwclient]: http://sourceforge.net/apps/mediawiki/mwclient\n[mwapi]: https://www.mediawiki.org/wiki/API\n\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jcfr/mwdoc#readme", "keywords": "mediawiki wikipedia", "license": "Apache", "maintainer": "", "maintainer_email": "", "name": "mwdoc", "package_url": "https://pypi.org/project/mwdoc/", "platform": "", "project_url": "https://pypi.org/project/mwdoc/", "project_urls": { "Homepage": "https://github.com/jcfr/mwdoc#readme" }, "release_url": "https://pypi.org/project/mwdoc/0.1.0/", "requires_dist": [ "mwclient (>=0.7.0)" ], "requires_python": "", "summary": "Allow to easily version mediawiki pages.", "version": "0.1.0" }, "last_serial": 2477454, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "de733599a03556ddadbe87a7f4e29382", "sha256": "20da06f7596c8453518b9940e4548e8ef4adde5f5fe7b343ad9ee0e125ecb66c" }, "downloads": -1, "filename": "mwdoc-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "de733599a03556ddadbe87a7f4e29382", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7718, "upload_time": "2016-11-22T22:06:16", "url": "https://files.pythonhosted.org/packages/a3/5f/fb8254f963f671da3dccf9952f317cc39219137cc508d3ba526fadea998d/mwdoc-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "749ee328e79dd930acf4c877e1b78ea2", "sha256": "741495743b3468064634762363f23f1769fcb483c60131f4d1adf3e007692a10" }, "downloads": -1, "filename": "mwdoc-0.1.0.tar.gz", "has_sig": false, "md5_digest": "749ee328e79dd930acf4c877e1b78ea2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21579, "upload_time": "2016-11-22T22:06:18", "url": "https://files.pythonhosted.org/packages/33/f3/9b14fc3b67c6c71fceef2236dcd3733cadc683cf83e91cd7f961a79a31d7/mwdoc-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "de733599a03556ddadbe87a7f4e29382", "sha256": "20da06f7596c8453518b9940e4548e8ef4adde5f5fe7b343ad9ee0e125ecb66c" }, "downloads": -1, "filename": "mwdoc-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "de733599a03556ddadbe87a7f4e29382", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7718, "upload_time": "2016-11-22T22:06:16", "url": "https://files.pythonhosted.org/packages/a3/5f/fb8254f963f671da3dccf9952f317cc39219137cc508d3ba526fadea998d/mwdoc-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "749ee328e79dd930acf4c877e1b78ea2", "sha256": "741495743b3468064634762363f23f1769fcb483c60131f4d1adf3e007692a10" }, "downloads": -1, "filename": "mwdoc-0.1.0.tar.gz", "has_sig": false, "md5_digest": "749ee328e79dd930acf4c877e1b78ea2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21579, "upload_time": "2016-11-22T22:06:18", "url": "https://files.pythonhosted.org/packages/33/f3/9b14fc3b67c6c71fceef2236dcd3733cadc683cf83e91cd7f961a79a31d7/mwdoc-0.1.0.tar.gz" } ] }