{ "info": { "author": "Eitan Mosenkis", "author_email": "eitan@mosenkis.net", "bugtrack_url": null, "classifiers": [], "description": "angular2tmpl\n============\nConvert AngularJS templates to Jinja2 templates for SEO.\n\nThe basic idea is to create a version of an Angular-powered website that can be\nrendered on the server for consumption by search engines. This is accomplished\nin two parts:\n\n1. Use angulart2tmpl to convert Angular templates to Jinja2 templates. This may\n require implementing custom Angular directives in Python (using\n ``xml.dom.minidom``).\n2. Implement a Python WSGI app that gathers the necessary data using the same\n API that powers your Angular app and passes it to the generated Jinja2\n templates.\n\nThis project expressly does not intend to be a full implementation of AngularJS\nin Python. Instead, it intends to implement a minimal subset of Angular\nsufficient to provide server-side rendering for the purposes of SEO. The\nresulting server-rendered sites need not be interactive, but they should look\nroughly the same as their JavaScript-based counterparts.\n\n\nFeatures\n--------\n- Reuses existing Angular templates and backend API\n- Avoids the expense and complexity of running a headless browser\n- Compatible with PaaS platforms such as Google App Engine\n\n\nStatus\n------\nangular2tmpl is pre-alpha software. It currently implements a *very* minimal\nsubset of the ``ng`` and ``ngRoute`` modules and makes little attempt to address\nedge cases. No guarantees are made at this time about maintaining backwards\ncompatibility. Unit tests are still a twinkle in its eye.\n\nThat said, angular2tmpl does currently satisfy the needs of the site that it was\nbuilt for.\n\n\nInstallation & Dependencies\n---------------------------\nInstallation is easy::\n\n pip install angular2tmpl\n\nThe only dependencies are Jinja2 and html5lib, both of which will be\nautomatically installed. angular2tmpl was built on Python 2.7, but with the\nintention of making conversion with 2to3 fairly painless. If you try it, let me\nknow how it goes.\n\n\nUsage\n-----\nJust run ``angular2tmpl``. Try ``--help`` to see the available flags and default\nvalues, then run it on each of your Angular templates. angular2tmpl directives\nare intended to be similar to Angular directives while staying Pythonic and\ntaking advantage of the reduced complexity that comes from non-interactive\nrendering. See ``modules/ng.py`` for examples.\n\nDue to differences in the semantics of Angular vs. Jinja2 expressions, some\nmodifications to the default Jinja2 environment and your template data are\nnecessary:\n\n1. Angular is extremely generous about ignoring errors and missing values in\n templates. To emulate this behavior, set the ``undefined`` property of your\n Jinja2 environment object to ``angular2tmpl.jinja2.PermissiveUndefined``.\n2. JavaScript objects allow access to non-existent properties and treat\n ``foo.bar`` and ``foo['bar']`` the same way. To get the same behavior out of\n your template variables, convert them using ``angular2tmpl.jinja2.js_data``.\n\n\nBackground\n----------\nFor more information about how Google handles JavaScript-heavy sites and how to\nmake it request a special server-rendered version of your site, see\nhttps://developers.google.com/webmasters/ajax-crawling/docs/specification. For\nmore information about other approaches to making Angular work within the bounds\nof this specification, see\nhttp://www.ng-newsletter.com/posts/serious-angular-seo.html.\n\n\n\nDisclaimers\n-----------\nangular2tmpl is not affiliated in any way with Google or AngularJS.", "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/emosenkis/angular2tmpl", "keywords": "angularjs jinja2 seo", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "angular2tmpl", "package_url": "https://pypi.org/project/angular2tmpl/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/angular2tmpl/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/emosenkis/angular2tmpl" }, "release_url": "https://pypi.org/project/angular2tmpl/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Convert AngularJS templates to Jinja2 templates for SEO.", "version": "0.1.1" }, "last_serial": 1295925, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "1cd2c05212f768efd44ae456358a6bfc", "sha256": "53f836c48b9182c7584b3c4136d563940e0799e8aa89e3012250296a6f87449e" }, "downloads": -1, "filename": "angular2tmpl-0.1.0-py2.7.egg", "has_sig": false, "md5_digest": "1cd2c05212f768efd44ae456358a6bfc", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 19045, "upload_time": "2014-01-19T22:57:35", "url": "https://files.pythonhosted.org/packages/e1/60/e65a0be0227aadc36e60496ef354e40e92da29b45097ed2c36300ffa36eb/angular2tmpl-0.1.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "bcb11e63725617c2ff4d1921a6c5798c", "sha256": "dc9b7f7da7f3c86474ed8fdda048866fe9b8ebcd8ed74fd5b07b9505decea0c5" }, "downloads": -1, "filename": "angular2tmpl-0.1.0.tar.gz", "has_sig": false, "md5_digest": "bcb11e63725617c2ff4d1921a6c5798c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9480, "upload_time": "2014-01-19T22:57:33", "url": "https://files.pythonhosted.org/packages/f4/38/451709e04c8d9af6db67b19c05a2dfa2313f2f0c9ee659b404a39b98f12e/angular2tmpl-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "ad11b02c50bfdb0c745cc9e339af15a0", "sha256": "140162dd273f0300695427ee14332bb1776bb2a275766ac3666a0ccbf9518403" }, "downloads": -1, "filename": "angular2tmpl-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ad11b02c50bfdb0c745cc9e339af15a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9598, "upload_time": "2014-11-05T19:41:34", "url": "https://files.pythonhosted.org/packages/43/92/adfbe9f9a68eb1a1567bfecb83ba59d175d5136c345a9d28e6eef8ca14af/angular2tmpl-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ad11b02c50bfdb0c745cc9e339af15a0", "sha256": "140162dd273f0300695427ee14332bb1776bb2a275766ac3666a0ccbf9518403" }, "downloads": -1, "filename": "angular2tmpl-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ad11b02c50bfdb0c745cc9e339af15a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9598, "upload_time": "2014-11-05T19:41:34", "url": "https://files.pythonhosted.org/packages/43/92/adfbe9f9a68eb1a1567bfecb83ba59d175d5136c345a9d28e6eef8ca14af/angular2tmpl-0.1.1.tar.gz" } ] }