{ "info": { "author": "Simone Orsi [simahawk]", "author_email": "simahawk@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Plone", "Framework :: Plone :: 4.2", "Programming Language :: Python" ], "description": "Introduction\r\n============\r\n\r\nProvides a viewlet (and under-the-hood machinery) for managers that allows to publish contents to social networks (only twitter ATM). Social publication can be automated by enabling it per-content.\r\n\r\nTo enable the viewlet just mark the content-type you want with `collective.socialpublisher.interfaces.IPublishable`. You can do it from ZMI or trough ZMCL::\r\n\r\n \r\n \r\n \r\n\r\n NOTE: this is already done by the package in this alpha stage.\r\n\r\nTwitter accounts management is done by `collective.twitter.accounts`.\r\n\r\nYou can provide a publisher by registeriing an utility providing `collective.socialpublisher.interfaces.ISocialPublisherUtility`. See `collective.socialpublisher.utility` for details.\r\n\r\nTo enable auto-publishing you have to enable it per-content (waiting for global configuration) and you have to create a cron the calls `@@social-auto-publish`. You can do it using `Products.cron4plone` or trough buildout like this::\r\n\r\n [instance]\r\n ...\r\n zope-conf-additional =\r\n \r\n method /plonesite/@@social-auto-publish\r\n period 1000\r\n user admin\r\n password admin\r\n \r\n\r\nSee also http://collective-docs.readthedocs.org/en/latest/misc/asyncronoustasks.html.\r\n\r\n\r\nTested on\r\n=========\r\n\r\nPlone 4.1 + 4.2rc1\r\n\r\nPublish manager\r\n===============\r\n\r\nLet's create an Event\r\n\r\n>>> from plone.app.testing import setRoles\r\n>>> from plone.app.testing import TEST_USER_ID\r\n>>> portal = layer['portal']\r\n>>> setRoles(portal, TEST_USER_ID, ['Manager'])\r\n>>> evid = portal.invokeFactory('Event', 'event')\r\n>>> event = portal[evid]\r\n\r\nand check that is enabled for publishing\r\n\r\n>>> from collective.socialpublisher.interfaces import IPublishable\r\n>>> IPublishable.providedBy(event)\r\nTrue\r\n\r\nget the manager\r\n\r\n>>> from collective.socialpublisher.interfaces import IPublishStorageManager\r\n>>> manager = IPublishStorageManager(event, None)\r\n>>> manager is None\r\nFalse\r\n\r\nstorage must be a PersistentDict\r\n\r\n>>> from persistent.dict import PersistentDict\r\n>>> isinstance(manager.storage,PersistentDict)\r\nTrue\r\n\r\nand accounts must be an empty dict and text an empty string.\r\n\r\n>>> manager.get_accounts()\r\n{}\r\n>>> manager.get_text()\r\n''\r\n\r\nWe can save an account for a given publisher\r\n\r\n>>> publisher = 'twitter'\r\n>>> account_id = 'simahawk'\r\n>>> manager.set_account(publisher,account_id)\r\n>>> manager.get_account(publisher)\r\n'simahawk'\r\n>>> manager.get_accounts()\r\n{'twitter': 'simahawk'}\r\n\r\nlet's add another publisher/account.\r\n\r\n>>> publisher = 'facebook'\r\n>>> account_id = 'simahawkfb'\r\n>>> manager.set_account(publisher,account_id)\r\n>>> manager.get_account(publisher)\r\n'simahawkfb'\r\n>>> manager.get_accounts()\r\n{'twitter': 'simahawk', 'facebook': 'simahawkfb'}\r\n\r\nWe can also save the text to be published\r\n\r\n>>> manager.set_text('foo bar')\r\n>>> manager.get_text()\r\n'foo bar'\r\n\r\nThen we can hard reset the settings like this:\r\n\r\n>>> manager._reset_storage()\r\n>>> manager.get_accounts()\r\n{}\r\n>>> manager.get_text()\r\n''\r\n\r\nTODO\r\n====\r\n\r\n- tests + docs\r\n- add support for linkedin and facebook\r\n- make query for auto-publish content dynamic/configurable\r\n- ...\r\n\r\nChangelog\r\n=========\r\n\r\n1.0a3\r\n---------------------\r\n\r\n- [add] test buildout.cfg\r\n- [imp] improved tests\r\n- [imp] improved docs\r\n- [add] global config using p.a.registry + controlpanel\r\n- [imp] you can now turn off auto-publish globally\r\n\r\n\r\n1.0a2\r\n---------------------\r\n\r\n- [fix] old twitter import\r\n- [imp] 'update' button for saving settings without publishing\r\n- [imp] 'one-shot-text' a flag for changing the text only for the current publishing without overwriting the stored one\r\n- [imp] if cron4plone is present display any available cron schedule\r\n- [imp] improved styles a bit\r\n\r\n\r\n1.0a1\r\n---------------------\r\n\r\n- Initial release\r\n\r\nCredits\r\n=======\r\n\r\nThis product was developed by Domsense.\r\n\r\n.. image:: http://domsense.com/logo-txt.png\r\n :alt: Domsense Website\r\n :target: http://www.domsense.com/", "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/simahawk/collective.socialpublisher", "keywords": "", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "collective.socialpublisher", "package_url": "https://pypi.org/project/collective.socialpublisher/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/collective.socialpublisher/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/simahawk/collective.socialpublisher" }, "release_url": "https://pypi.org/project/collective.socialpublisher/1.0a3/", "requires_dist": null, "requires_python": null, "summary": "Manage and automate social publishing on Plone sites", "version": "1.0a3" }, "last_serial": 788212, "releases": { "1.0a1": [ { "comment_text": "", "digests": { "md5": "dca4ecc660a43184dfc9d2477157b1ec", "sha256": "f5ce50629b22115babaf58637be2298ee40efb07a2b7af20afc7e319bd89b829" }, "downloads": -1, "filename": "collective.socialpublisher-1.0a1.zip", "has_sig": false, "md5_digest": "dca4ecc660a43184dfc9d2477157b1ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30678, "upload_time": "2012-05-22T16:07:57", "url": "https://files.pythonhosted.org/packages/1b/ea/b492ec9323b083f8a3cc1554cd903cc71edb823d5954e01f73b90177b9bd/collective.socialpublisher-1.0a1.zip" } ], "1.0a2": [ { "comment_text": "", "digests": { "md5": "ff348a1e73921e4114eaa246a2944043", "sha256": "8226b28cdf469cb4123ddc72acffb8b755e52397dd33dd9104ac22ea2ea130d5" }, "downloads": -1, "filename": "collective.socialpublisher-1.0a2.zip", "has_sig": false, "md5_digest": "ff348a1e73921e4114eaa246a2944043", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32066, "upload_time": "2012-05-23T09:23:32", "url": "https://files.pythonhosted.org/packages/4b/33/50dde10eff7955c4daff1b28cc7ce750fb761be337a67c310553b2ff956f/collective.socialpublisher-1.0a2.zip" } ], "1.0a3": [ { "comment_text": "", "digests": { "md5": "127845855219f2bb56736de4d2ce5a5f", "sha256": "dbe82c119024aa9e4acca9d42690fd2560afa162e1f7cb79d14d998fb61fd39f" }, "downloads": -1, "filename": "collective.socialpublisher-1.0a3.zip", "has_sig": false, "md5_digest": "127845855219f2bb56736de4d2ce5a5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40502, "upload_time": "2012-06-01T16:58:32", "url": "https://files.pythonhosted.org/packages/f6/3c/398d6112ff30cdcadb1fdec171df9f0c17dfb0ab66bae93477883bf324d1/collective.socialpublisher-1.0a3.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "127845855219f2bb56736de4d2ce5a5f", "sha256": "dbe82c119024aa9e4acca9d42690fd2560afa162e1f7cb79d14d998fb61fd39f" }, "downloads": -1, "filename": "collective.socialpublisher-1.0a3.zip", "has_sig": false, "md5_digest": "127845855219f2bb56736de4d2ce5a5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40502, "upload_time": "2012-06-01T16:58:32", "url": "https://files.pythonhosted.org/packages/f6/3c/398d6112ff30cdcadb1fdec171df9f0c17dfb0ab66bae93477883bf324d1/collective.socialpublisher-1.0a3.zip" } ] }