{
"info": {
"author": "Alexandre Fonseca",
"author_email": "alexandrejorgefonseca@gmail.com",
"bugtrack_url": null,
"classifiers": [],
"description": "##################\npelican-autostatic\n##################\n\nA plugin for `Pelican\n`_ that\nadds automatic resolution of static files.\n\nWhile the original static generator included in Pelican requires the hardcoding\nof static paths in the configuration file, pelican-autostatic provides \nfacilities to dinamically add static content independent of its location, just\nby referencing it.\n\nInstall\n=======\n\nTo install the library, you can use\n`pip\n`_\n\n.. code-block:: bash\n\n $ pip install pelican-autostatic\n\n\nUsage\n=====\n\n1. Update ``pelicanconf.py``:\n\n 1. Add ``autostatic`` to ``PLUGINS``.\n \n You should add it before any metadata-affecting plugins.\n\n .. code-block:: python\n \n PLUGINS = ['autostatic', ...]\n\n2. Reference static content in your Markdown/rST metadata/text by using the\n ``{static}`` substitution: ::\n\n {static url/to/content key1=val1 key2=\"val 2\" ...}\n\n or::\n\n {static \"url/to/content/with spaces\" key1=val1 key2=\"val 2\" ...}\n\n Example (in markdown): ::\n\n [Markdown example file]({static file/example.zip key1=val1 key2=\"val 2\" ...})\n\n You can also use ``|`` instead of spaces if you wish (for use with Markdown \n inline image syntax which doesn't accept spaces for the url for instance): ::\n\n \n\n3. An index of these references will be automatically built and those files\n will be copied to the output folder preserving the path structure:\n\n - If using a relative path, the file will be copied to the same path\n relative to the directory where the .html file is output.\n - If using an absolute path, the file is copied to that same path\n relative to the base output folder (e.g: ``output``).\n\nOptions\n=======\nAutostatic references can have a number of options after the url for the\ncontent. This allows modifications to the content being referenced.\n\nCore options\n------------\n\n- ``output``: Allows changing the output path (and the url) of the file in\n the generated .html.\n\n Example: ::\n\n {static /images/example.png output=/images/example_2.png}\n\n Will copy ``content/images/example.png`` to ``output/images/example_2.png``\n and the reference will be replaced by ``$SITEURL/images/example_2.png``.\n\n- ``url``: Allows changing the url of the file in the generated .html\n without changing the output path.\n\n Example: ::\n\n {static /images/example.png url=/images/example_2.png}\n\n Will copy ``content/images/example.png`` to ``output/images/example.png``\n and the reference will be replaced by ``$SITEURL/images/example_2.png``.\n\n\nThird-party options\n-------------------\n\n- `pelican-advthumbnailer\n `_ adds a ``thumb``\n option that changes the url of the static image reference so that a thumbnail\n of that image is generated and linked and not the image itself.\n\n\nConfiguration\n=============\nYou can set the following options in your ``pelicanconf.py``:\n\n- ``AUTOSTATIC_REFERENCE_PATTERN`` (String) - Change the regex of the static reference \n pattern. It needs to have the following groups:\n\n - ``path`` - This should have the path used in the reference.\n - ``extra`` - This should have the ``key1=val1 key2=\"val 2\" ...`` string.\n\n For reference, the default pattern is: ::\n\n r\"\"\"{static(?:\\s+|\\|)((?:\"|')?)(?P[^\\1=]+?)\\1(?:(?:\\s+|\\|)(?P.*))?\\s*}\"\"\"\n\n- ``AUTOSTATIC_USE_PELICANLIKE_REF`` (Boolean) - Activate the usage of a different format of\n the static reference that is similar to `Pelican's {filename} syntax\n `_: ::\n\n \n\n *NOTE:* I haven't actually benchmarked this but this mechanism (the same used\n by Pelican with ``{filename}``) should be slightly slower than the default one\n used in this plugin. This is because the ``{filename}`` mechanism does\n matching over all html tags which will surely result in a lot of backtracks\n on a HTML document.\n\n\nExtending\n=========\n\nAvailable signals\n-----------------\n\n- ``autostatic_path_found``: Signalled when a new autostatic reference is found.\n \n Parameters:\n\n - ``sender``: Always ``None``\n - ``autostatic_path``: Object containing:\n\n - ``source``: Read-only property containing source path of reference.\n - ``destination``: Read/write property containing destination of \n referenced file.\n - ``original_destination``: Read-only property containing default\n destination of referenced file.\n - ``url``: Read/write property containing url to be substituted for\n the reference.\n - ``original_url``: Read-only property containing default url to\n be substituted for the reference.\n - ``extra``: Dictionary containing the options specified in addition\n to the path. Can be possibly empty.\n\n`pelican-advthumbnailer\n`_ contains an example\nusage of this signal.\n\n\nExample\n=======\n\nFor a working example check `my site\n`_ and `my site's source code\n`_.",
"description_content_type": null,
"docs_url": null,
"download_url": "https://github.com/AlexJF/pelican-autostatic/archive/v0.2.2.zip",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/AlexJF/pelican-autostatic",
"keywords": "pelican blog static generic automatic",
"license": "Apache",
"maintainer": null,
"maintainer_email": null,
"name": "pelican-autostatic",
"package_url": "https://pypi.org/project/pelican-autostatic/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/pelican-autostatic/",
"project_urls": {
"Download": "https://github.com/AlexJF/pelican-autostatic/archive/v0.2.2.zip",
"Homepage": "https://github.com/AlexJF/pelican-autostatic"
},
"release_url": "https://pypi.org/project/pelican-autostatic/0.2.2/",
"requires_dist": null,
"requires_python": null,
"summary": "A generator for Pelican allowing flexible referencing of static content",
"version": "0.2.2"
},
"last_serial": 1336958,
"releases": {
"0.1.0": [
{
"comment_text": "",
"digests": {
"md5": "d3dec510f95e75e34d22ea55bc18026c",
"sha256": "66cfd58e3f42c0353cf049c20d371a72e73bbe2761909af6a3e4fe76a4ba4b4d"
},
"downloads": -1,
"filename": "pelican-autostatic-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "d3dec510f95e75e34d22ea55bc18026c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8997,
"upload_time": "2014-08-26T23:10:02",
"url": "https://files.pythonhosted.org/packages/28/59/b6e9edc0d9b13c9ca958c572933bdb91595e4d9bdbf3f2dd272a4c2dc8f3/pelican-autostatic-0.1.0.tar.gz"
}
],
"0.2.0": [
{
"comment_text": "",
"digests": {
"md5": "209110a41ba26f709acf977c9a773d35",
"sha256": "f9160be8a1d4b94874732c56bc79d281614208f767392cb41aea8495f71cef73"
},
"downloads": -1,
"filename": "pelican-autostatic-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "209110a41ba26f709acf977c9a773d35",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9201,
"upload_time": "2014-09-21T12:13:20",
"url": "https://files.pythonhosted.org/packages/6e/f2/dda203a1c1e410a7a2cac9650dc7dd2933d030e67628ea6ddbfc166cdecd/pelican-autostatic-0.2.0.tar.gz"
}
],
"0.2.1": [
{
"comment_text": "",
"digests": {
"md5": "a4e1fc81470b7812747960565be6e362",
"sha256": "fa3a64afb094e5d0ec5f3a9026a41f52ce90424dd8b9a2ff8e3286642f8119ee"
},
"downloads": -1,
"filename": "pelican-autostatic-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "a4e1fc81470b7812747960565be6e362",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10177,
"upload_time": "2014-09-21T21:32:12",
"url": "https://files.pythonhosted.org/packages/ad/53/31c1e47553198e02ca48e0cb373939fda4da5d8e0350fe03f0efb04bff9e/pelican-autostatic-0.2.1.tar.gz"
}
],
"0.2.2": [
{
"comment_text": "",
"digests": {
"md5": "561677abbd9cdb8374c5e9aa4eff941c",
"sha256": "59768a59f54708938f0419771a2f66e3def6943bfe05fa12350b286adb3ae1e1"
},
"downloads": -1,
"filename": "pelican-autostatic-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "561677abbd9cdb8374c5e9aa4eff941c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10374,
"upload_time": "2014-12-09T11:24:01",
"url": "https://files.pythonhosted.org/packages/cd/09/7c7eff736c3d91ed524b6ac0181e5bbedf6c81d069a67bd269a47c5bae32/pelican-autostatic-0.2.2.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "561677abbd9cdb8374c5e9aa4eff941c",
"sha256": "59768a59f54708938f0419771a2f66e3def6943bfe05fa12350b286adb3ae1e1"
},
"downloads": -1,
"filename": "pelican-autostatic-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "561677abbd9cdb8374c5e9aa4eff941c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10374,
"upload_time": "2014-12-09T11:24:01",
"url": "https://files.pythonhosted.org/packages/cd/09/7c7eff736c3d91ed524b6ac0181e5bbedf6c81d069a67bd269a47c5bae32/pelican-autostatic-0.2.2.tar.gz"
}
]
}