eea.stringinterp


Nameeea.stringinterp JSON
Version 1.1 PyPI version JSON
download
home_pagehttps://github.com/eea/eea.stringinterp
SummaryExtended plone.stringinterp functionality
upload_time2023-08-31 13:52:37
maintainer
docs_urlNone
authorEuropean Environment Agency: IDM2 A-Team
requires_python
licenseGPL version 2
keywords eea add-ons plone zope
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            ==========================
eea.stringinterp
==========================
.. image:: https://ci.eionet.europa.eu/buildStatus/icon?job=eea/eea.stringinterp/develop
  :target: https://ci.eionet.europa.eu/job/eea/job/eea.stringinterp/job/develop/display/redirect
  :alt: Develop
.. image:: https://ci.eionet.europa.eu/buildStatus/icon?job=eea/eea.stringinterp/master
  :target: https://ci.eionet.europa.eu/job/eea/job/eea.stringinterp/job/master/display/redirect
  :alt: Master

Extends `plone.stringinterp <https://github.com/plone/plone.stringinterp>`_ functionallity with a 
generic fallback string substitution adapter that lookup **context** properties if no explicit named
**IStringSubstitution** is defined.

.. contents::

Main features
=============

1. **Generic string substitution** adapter to easily grab custom properties from context

Install
=======

* Add eea.stringinterp to your eggs section in your buildout and
  re-run buildout::

    [buildout]
    eggs +=
      eea.stringinterp

* You can download a sample buildout from:

  - https://github.com/eea/eea.stringinterp/tree/master/buildouts/plone4
  - https://github.com/eea/eea.stringinterp/tree/master/buildouts/plone5

* Or via docker::

    $ docker run --rm -p 8080:8080 -e ADDONS="eea.stringinterp" plone

* Install *eea.stringinterp* within Site Setup > Add-ons


Usage
=====

* Via **Site Setup > Dexterity Content Types > Page > Fields Tab** add new Field, `e.g.: custom_field`
* Via **Site Setup > Content Rules** add a rule to send email on Workflow change
* Within **Message** add some `Custom: ${custom_field}`
* Add new **Page** and fill the **custom_field**
* Publish your **Page**
* Check your email

Code usage
==========

    >>> from plone.stringinterp.interfaces import IStringSubstitution
    >>> substitute = IStringSubstitution(sandbox)
    >>> substitute
    <eea.stringinterp.adapters.GenericContextAttributeSubstitution object at...>

    >>> substitute('title')
    'Sandbox'

    >>> substitute('effective')
    'Oct 10, 2021 12:00 AM'

    >>> substitute('Subject')
    'air, pollution'


Buildout installation
=====================

- `Plone 4+ <https://github.com/eea/eea.stringinterp/tree/master/buildouts/plone4>`_
- `Plone 5+ <https://github.com/eea/eea.stringinterp/tree/master/buildouts/plone5>`_


Source code
===========

- `Plone 4+ on github <https://github.com/eea/eea.stringinterp>`_
- `Plone 5+ on github <https://github.com/eea/eea.stringinterp>`_


Eggs repository
===============

- https://pypi.python.org/pypi/eea.stringinterp
- http://eggrepo.eea.europa.eu/simple


Plone versions
==============
It has been developed and tested for Plone 4 and 5. See buildouts section above.


How to contribute
=================
See the `contribution guidelines (CONTRIBUTING.md) <https://github.com/eea/eea.stringinterp/blob/master/CONTRIBUTING.md>`_.

Copyright and license
=====================

eea.stringinterp (the Original Code) is free software; you can
redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA.

The Initial Owner of the Original Code is European Environment Agency (EEA).
Portions created by Eau de Web are Copyright (C) 2009 by
European Environment Agency. All Rights Reserved.


Funding
=======

EEA_ - European Environment Agency (EU)

.. _EEA: https://www.eea.europa.eu/
.. _`EEA Web Systems Training`: http://www.youtube.com/user/eeacms/videos?view=1

Changelog
=========

1.1 - (2023-08-31)
---------------------------
* remove python_requires from setup.py
  [valipod - refs #161113]

1.0 - (2021-05-28)
-----------------------

* Add 'Generic string substitution' adapter to easily grab properties from context
  [avoinea - refs #134513]

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/eea/eea.stringinterp",
    "name": "eea.stringinterp",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "EEA Add-ons Plone Zope",
    "author": "European Environment Agency: IDM2 A-Team",
    "author_email": "eea-edw-a-team-alerts@googlegroups.com",
    "download_url": "https://files.pythonhosted.org/packages/55/ac/fa258c899ea44d182a020b96155cf9ab2234b0279c59d80a57f37073870a/eea.stringinterp-1.1.zip",
    "platform": null,
    "description": "==========================\neea.stringinterp\n==========================\n.. image:: https://ci.eionet.europa.eu/buildStatus/icon?job=eea/eea.stringinterp/develop\n  :target: https://ci.eionet.europa.eu/job/eea/job/eea.stringinterp/job/develop/display/redirect\n  :alt: Develop\n.. image:: https://ci.eionet.europa.eu/buildStatus/icon?job=eea/eea.stringinterp/master\n  :target: https://ci.eionet.europa.eu/job/eea/job/eea.stringinterp/job/master/display/redirect\n  :alt: Master\n\nExtends `plone.stringinterp <https://github.com/plone/plone.stringinterp>`_ functionallity with a \ngeneric fallback string substitution adapter that lookup **context** properties if no explicit named\n**IStringSubstitution** is defined.\n\n.. contents::\n\nMain features\n=============\n\n1. **Generic string substitution** adapter to easily grab custom properties from context\n\nInstall\n=======\n\n* Add eea.stringinterp to your eggs section in your buildout and\n  re-run buildout::\n\n    [buildout]\n    eggs +=\n      eea.stringinterp\n\n* You can download a sample buildout from:\n\n  - https://github.com/eea/eea.stringinterp/tree/master/buildouts/plone4\n  - https://github.com/eea/eea.stringinterp/tree/master/buildouts/plone5\n\n* Or via docker::\n\n    $ docker run --rm -p 8080:8080 -e ADDONS=\"eea.stringinterp\" plone\n\n* Install *eea.stringinterp* within Site Setup > Add-ons\n\n\nUsage\n=====\n\n* Via **Site Setup > Dexterity Content Types > Page > Fields Tab** add new Field, `e.g.: custom_field`\n* Via **Site Setup > Content Rules** add a rule to send email on Workflow change\n* Within **Message** add some `Custom: ${custom_field}`\n* Add new **Page** and fill the **custom_field**\n* Publish your **Page**\n* Check your email\n\nCode usage\n==========\n\n    >>> from plone.stringinterp.interfaces import IStringSubstitution\n    >>> substitute = IStringSubstitution(sandbox)\n    >>> substitute\n    <eea.stringinterp.adapters.GenericContextAttributeSubstitution object at...>\n\n    >>> substitute('title')\n    'Sandbox'\n\n    >>> substitute('effective')\n    'Oct 10, 2021 12:00 AM'\n\n    >>> substitute('Subject')\n    'air, pollution'\n\n\nBuildout installation\n=====================\n\n- `Plone 4+ <https://github.com/eea/eea.stringinterp/tree/master/buildouts/plone4>`_\n- `Plone 5+ <https://github.com/eea/eea.stringinterp/tree/master/buildouts/plone5>`_\n\n\nSource code\n===========\n\n- `Plone 4+ on github <https://github.com/eea/eea.stringinterp>`_\n- `Plone 5+ on github <https://github.com/eea/eea.stringinterp>`_\n\n\nEggs repository\n===============\n\n- https://pypi.python.org/pypi/eea.stringinterp\n- http://eggrepo.eea.europa.eu/simple\n\n\nPlone versions\n==============\nIt has been developed and tested for Plone 4 and 5. See buildouts section above.\n\n\nHow to contribute\n=================\nSee the `contribution guidelines (CONTRIBUTING.md) <https://github.com/eea/eea.stringinterp/blob/master/CONTRIBUTING.md>`_.\n\nCopyright and license\n=====================\n\neea.stringinterp (the Original Code) is free software; you can\nredistribute it and/or modify it under the terms of the\nGNU General Public License as published by the Free Software Foundation;\neither version 2 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but\nWITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\nor FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\nfor more details.\n\nYou should have received a copy of the GNU General Public License along\nwith this program; if not, write to the Free Software Foundation, Inc., 59\nTemple Place, Suite 330, Boston, MA 02111-1307 USA.\n\nThe Initial Owner of the Original Code is European Environment Agency (EEA).\nPortions created by Eau de Web are Copyright (C) 2009 by\nEuropean Environment Agency. All Rights Reserved.\n\n\nFunding\n=======\n\nEEA_ - European Environment Agency (EU)\n\n.. _EEA: https://www.eea.europa.eu/\n.. _`EEA Web Systems Training`: http://www.youtube.com/user/eeacms/videos?view=1\n\nChangelog\n=========\n\n1.1 - (2023-08-31)\n---------------------------\n* remove python_requires from setup.py\n  [valipod - refs #161113]\n\n1.0 - (2021-05-28)\n-----------------------\n\n* Add 'Generic string substitution' adapter to easily grab properties from context\n  [avoinea - refs #134513]\n",
    "bugtrack_url": null,
    "license": "GPL version 2",
    "summary": "Extended plone.stringinterp functionality",
    "version": "1.1",
    "project_urls": {
        "Homepage": "https://github.com/eea/eea.stringinterp"
    },
    "split_keywords": [
        "eea",
        "add-ons",
        "plone",
        "zope"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "55acfa258c899ea44d182a020b96155cf9ab2234b0279c59d80a57f37073870a",
                "md5": "22cbf0047837c853023b4c1cdbce052f",
                "sha256": "406c1b869f0ad05c0f4f748b0145eca083b436601f33895d0b033b2cbe0bdcde"
            },
            "downloads": -1,
            "filename": "eea.stringinterp-1.1.zip",
            "has_sig": false,
            "md5_digest": "22cbf0047837c853023b4c1cdbce052f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 69556,
            "upload_time": "2023-08-31T13:52:37",
            "upload_time_iso_8601": "2023-08-31T13:52:37.886094Z",
            "url": "https://files.pythonhosted.org/packages/55/ac/fa258c899ea44d182a020b96155cf9ab2234b0279c59d80a57f37073870a/eea.stringinterp-1.1.zip",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-31 13:52:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "eea",
    "github_project": "eea.stringinterp",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "eea.stringinterp"
}
        
Elapsed time: 0.12101s