{ "info": { "author": "Ian Forsey", "author_email": "forsey@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "License :: OSI Approved :: GNU Affero General Public License v3", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "==========\r\npelicangit\r\n==========\r\n\r\npelicangit is a python script that will automatically build your Pelican powered blog whenever you push a blog post into git.\r\n\r\nThe script will start a simple HTTP server. When the server recieves a POST (from a git service hook, indicating you have pushed a new blog post in markdown or restructuredtext), it will pull down these updates, run pelican to compile them to HTML and then commit and push the resulting HTML into another git repository (e.g. a github pages repo). This can be especially useful when writing blog posts on a client which cannot run pelican locally (e.g. a chromebook)\r\n\r\n*Note: Currently pelicangit only works on unix environments and has only been tested on Ubuntu.* \r\n\r\n.. image:: http://lh4.googleusercontent.com/-KPeKZ92FhaE/T4IeoedMY_I/AAAAAAAACXE/fSpxiJ_iCwE/s876/PelicanGit.png\r\n\r\nQuick Start\r\n===========\r\n\r\n1) If you have `pelican `_ and `pip `_ installed, simply run ``sudo pip install pelicangit`` to install\r\n2) Copy your pelican configuration to ``/etc/pelicangit/pelican.conf.py`` and add the variables specified in the `Extra Pelican Settings`_ section \r\n3) Run with ``sudo start pelicangit``\r\n\r\nInstalling\r\n==========\r\n\r\nPrerequisites:\r\n--------------\r\n\r\n* Install `setuptools `_\r\n* Install `pip `_ with ``curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | sudo python``\r\n* Install `pelican `_ with ``sudo pip install pelican``\r\n* Be sure to install markdown if required with ``sudo pip install Markdown`` and any themes you require with ``pelican-themes`` \r\n\r\nInstalling pelicangit:\r\n----------------------\r\n\r\nRun ``sudo pip install pelicangit`` \r\n\r\nExtra Pelican Settings\r\n^^^^^^^^^^^^^^^^^^^^^^\r\n\r\nAdd these variables to your pelican config file (the file you normally pass with the ``-s`` argument to pelican)\r\n\r\n::\r\n\r\n PELICANGIT_SOURCE_REPO=\"/path/to/source/markdown/repo\"\r\n PELICANGIT_SOURCE_REMOTE=\"origin\"\r\n PELICANGIT_SOURCE_BRANCH=\"master\"\r\n \r\n PELICANGIT_DEPLOY_REPO=\"/path/to/deploy/html/repo\"\r\n PELICANGIT_DEPLOY_REMOTE=\"origin\"\r\n PELICANGIT_DEPLOY_BRANCH=\"master\"\r\n \r\n PELICANGIT_USER = \"ubuntu\"\r\n PELICANGIT_WHITELISTED_FILES = [\r\n \"README.md\"\r\n ]\r\n \r\n PELICANGIT_PORT=8080\r\n\r\n* ``PELICANGIT_SOURCE_REPO`` is the git repo you push new blog articles to in markdown or restructuredtext.\r\n* ``PELICANGIT_DEPLOY_REPO`` is the git repo pelicangit will push your HTML converted blog articles to.\r\n* ``PELICANGIT_USER`` is the name of the unix user that will be used to run the git and pelican commands. Ensure this user has a valid SSH keypair to pull/push from/to the git repositories.\r\n* ``GIT_WHITELISTED_FILES`` is a list of files pelicangit will not delete. By default, pelicangit assumes everything in the ``PELICANGIT_DEPLOY_REPO`` git repo is the output from pelican, and everytime it runs, it does a `git rm` on all files before regenerating your entire blog. If you have any files in your ``PELICANGIT_DEPLOY_REPO`` that are not the output from pelican then add them to this whitelist variable. I currently use this for a google webmaster tools verification html file and a github readme file. \r\n* ``PELICANGIT_PORT`` is the port the pelicangit will listen on for the git service hook you will configure in the next step\r\n\r\nSetup your git hook\r\n^^^^^^^^^^^^^^^^^^^\r\n\r\nThe git service hook is the mechanism which informs pelicangit whenever you commit content (markdown/restructuredtext) to your `PELICANGIT_SOURCE_REPO` and gets it to kick off pelican. \r\nFor github:\r\n\r\n* Go to your github repo where you keep your source markdown (i.e. the ``PELICANGIT_SOURCE_REPO`` you set in step 2)\r\n* Click the 'Administration' button\r\n* Click 'Service Hooks' from the left hand nav\r\n* Click 'Post-Receive URLs' service hook\r\n* Add the URL/IP of the server you are running pelicangit. The port will be the value used in the ``PELICANGIT_PORT`` setting from step 2. \r\n* Once you have pelicangit running (see instructions below) you can use the 'Test Hook' button to check the hook is working \r\n\r\nRunning pelicangit\r\n==================\r\n\r\nRunning with Upstart\r\n--------------------\r\n\r\n``sudo start pelicangit``\r\n\r\nUpstart will keep pelicangit long running (will restart it if it crashes, or the machine reboots). By installing pelicangit, an upstart configuration file will be installed at ``/etc/init/pelicangit.conf``.\r\n\r\nWhen running with upstart, pelicangit will look for your pelican configuration file at ``/etc/pelicangit/pelican.conf.py``. This will be the only argument pelicangit passed to pelican, so you will need to use the ``PATH`` and ``OUTPUT_PATH`` variables to define where your content and output paths are as defined `here `_ \r\n\r\nRunning Directly\r\n----------------\r\n\r\nCall the ``pelicangit`` with the same arguments you would call pelican. For example: ``pelicangit -s /path/to/pelican.conf.py /path/to/markdown``\r\n\r\nLogging\r\n=======\r\n\r\nIf you need to do any debugging, logs currently live at ``/home/${PELICANGIT_USER}/pelicangit.log`` where ``PELICANGIT_USER`` is the variable specified in your pelican config file. \r\n\r\nSource Code\r\n===========\r\n\r\nIf you are reading this on http://pypi.python.org you can access the source code at http://github.com/theon/pelicangit\r\nAlso See\r\n========\r\n\r\n`Blog article `_", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/theon/pelicangit", "keywords": "", "license": "UNKNOWN", "maintainer": "", "maintainer_email": "", "name": "pelicangit", "package_url": "https://pypi.org/project/pelicangit/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pelicangit/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/theon/pelicangit" }, "release_url": "https://pypi.org/project/pelicangit/0.1/", "requires_dist": null, "requires_python": null, "summary": "Automatically build your Pelican powered blog whenever you push a blog post into git", "version": "0.1" }, "last_serial": 796151, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "0c261b09710d54db8307f73454e345ed", "sha256": "61fa2ab171ab04d6243c0c13ac71de6fa59bbe111e7e251a2a18b28e6f8a3332" }, "downloads": -1, "filename": "pelicangit-0.1.tar.gz", "has_sig": false, "md5_digest": "0c261b09710d54db8307f73454e345ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19454, "upload_time": "2012-04-17T00:02:22", "url": "https://files.pythonhosted.org/packages/e7/80/75aeaed27aefa6c89b7cf606e05cedf0771eb01464f8d3f65db0714c9048/pelicangit-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0c261b09710d54db8307f73454e345ed", "sha256": "61fa2ab171ab04d6243c0c13ac71de6fa59bbe111e7e251a2a18b28e6f8a3332" }, "downloads": -1, "filename": "pelicangit-0.1.tar.gz", "has_sig": false, "md5_digest": "0c261b09710d54db8307f73454e345ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19454, "upload_time": "2012-04-17T00:02:22", "url": "https://files.pythonhosted.org/packages/e7/80/75aeaed27aefa6c89b7cf606e05cedf0771eb01464f8d3f65db0714c9048/pelicangit-0.1.tar.gz" } ] }