{ "info": { "author": "Marc Kirchner", "author_email": "mail@marc-kirchner.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Build Tools" ], "description": "# Pockyll\n\nPockyll is a python tool to create [Jekyll][j] linkposts from your\n[pocket][pocket] collections because automated linkpost updates are like death\nsticks.\n\n> \"You wanna buy some death sticks?\"
\n> \"You don't want to sell me death sticks.\"
\n> \"I don't wanna sell you death sticks.\"
\n> \"You want to go home an rethink your life.\"
\n> \"I want to go home and rethink my life.\"
\n> -- Elan Sleazebaggano & Obi-Wan Kenobi\n\n## Features\n\n* Pocket item/bookmark syncing that converts your saved & tagged pocket items\n into linkposts that merge seamlessly with standard Jekyll posts\n* Linkpost management fully compatible with tools like e.g.\n [octopress][octopress]\n* Incremental update support\n* Tag-specific syncing\n* Pocket OAuth authentication\n\n## Installation \n\n### Concept\nUsing pockyll to manage [pocket][pocket] bookmarks requires two pieces: the\n`pockyll` executable (which pulls your pocket bookmarks into your Jekyll site)\nand changes to your site setup (in order to enable Jekyll to deal with\nlinkposts properly).\n\n### Installing pockyll\n\nEither get the package from PyPi\n\n```bash\n$ pip install pockyll\n```\n\nor clone the repo and install manually\n\n```bash\n$ git clone https://github.com/mkirchner/pockyll.git\n$ cd pockyll\n$ python setup.py install\n```\n\n### Pockyll setup\n\n1. Login into [pocket][pocket_login], [create a new\n application][pocket_newapp] that has *retrieve* permissions.\n2. Switch into your Jekyll site directory\n3. Generate a a dummy config file `_pockyll.yml`. This can be accomplished\nusing\n\n $ pockyll init\n\n4. In `_pockyll.yml` enter the `pocket_consumer_key` created in step 1. \n Edit other fields as required.\n5. Authenticate the pockyll app against the pocket API\n\n $ pockyll auth \n\n This will open a browser window and ask for pocket authentication.\n\n### Site setup\n\nBy default, pockyll will define a variable `type` with the value `reference`\nin every linkpost. It will also and include the target link in the `ref`\nvariable inside the YAML post header:\n\n\t---\n\ttitle: \"Clojure, The Good Parts\"\n\tdate: 2016-04-19T23:05:26\n\ttype: \"reference\"\n\tref: https://rasterize.io/blog/clojure-the-good-parts.html\n\t---\n\nWriting code that differentiates between normal and linkposts is\ntherefore straightforward. You can simply use the post type as an indicator.\nHere is an example for a root directory `index.html` file that inserts the\nlink to the post for every normal post and the link to the reference for every\nlinkpost:\n\n```html\n
\n \n
\n```\n\nFor normal posts, the link points to `post.url`. If the post\nis a linkpost, the link points to `post.ref`, thus enabling direct external\nlinking.\n\n## Syncing Jekyll linkposts with Pocket\n\nOnce you have your site configured, it is time to sync your pocket bookmarks.\n\n1. `pockyll sync` (one-way sync of all new posts tagged with any \n of `pocket_sync_tags`)\n2. `jekyll build`\n3. Optional: `jekyll serve` and marvel at the linkposts on your local server at\n .\n\n## Examples\n\n```\nmk@kowalski:~/src/mysite$ pockyll sync\nRequesting new items from Pocket API...\nSyncing 164 items.\nFIXME: ['FIXME', u'http://insighthealthdata.com/blog/HealthyBeats/index.html', u'1227075798']\nFIXME: ['FIXME', u'http://ahmetalpbalkan.com/blog/8-months-microsoft/', u'374320379']\nFIXME: ['FIXME', None, u'0']\nSkipping: ['FIXME', None, u'0']\nFIXME: ['FIXME', u'https://www.linkedin.com/pulse/agile-dead-matthew-kern', u'1264106151']\nFIXME: ['FIXME', u'http://pjreddie.com/darknet/', u'1152066420']\nFIXME: ['FIXME', u'https://www.chrisstucchio.com/blog/2013/bayesian_bandit.html', u'393364879']\nDone (skipped 1).\nmk@kowalski:~/src/mysite$\n```\n\nThis is an example of an initial sync of a jekyll site against pocket (hence\nthe number of items). Pockyll automatically 'fixes' missing titles but skips\nitems that lack a URI or an ID. I would now change into the `linkpost_dir`,\ngrep all files for the `title: \"FIXME\"` string and start editing, e.g.:\n\n vim `grep -l 'title: \"FIXME\"' *`\n\n\n## Customization\n\nPockyll is configured using a `_pockyll.yml` configuration file located in\nyour Jekyll base directory. After successful OAuth authentication, the file\ncontains your secret Pocket access token. Hence, please make sure to\n*include the pockyll configuration into your `.gitignore` file!*\n\n### Configuration file\n\nThe overall configuration file structure looks like this:\n\n```yaml\npocket_consumer_key: ***secret***\npocket_access_token: ***secret***\npocket_redirect_uri: 'https://getpocket.com/a/'\npocket_sync_tags: ['blog']\npocket_since: 12326342\nlinkpost_dir: '_posts/linkposts'\n```\n\n### Options\n\n- `pocket_consumer_key`: this is the consumer key you obtain from the\n pocket developer API.\n- `pocket_access_token`: the access token. Pockyll automatically stores \n the token in the configuration file after the first successful OAuth\n authentication event.\n- `pocket_redirect_uri`: the location to which your are redirected\n after successful authentication (this can be anything).\n- `pocket_sync_tags`: a list of pocket tags that should be synced to\n Jekyll.\n- `pocket_since`: pocket timestamp that marks the last sync.\n Automatically updated by pockyll.\n- `linkpost_dir`: the directory where linkposts should be synced\n to. Change this to e.g. `_drafts/linkposts` if you want to review changes\n before publication. In that case use \n\n## License\n\nVanilla [MIT](https://github.com/mkirchner/pockyll/blob/master/LICENSE).\n\n## Contact\nFeel free to open issues if you run into trouble or have suggestions. Pull\nRequests always welcome.\n\n[j]: http://jekyllrb.com/\n[octopress]: http://octopress.org/\n[pocket]: https://getpocket.com/\n[pocket_login]: https://getpocket.com/login\n[pocket_newapp]: https://getpocket.com/developer/apps/new", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mkirchner/pockyll/", "keywords": "jekyll pocket blog linkpost", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pockyll", "package_url": "https://pypi.org/project/pockyll/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pockyll/", "project_urls": { "Homepage": "https://github.com/mkirchner/pockyll/" }, "release_url": "https://pypi.org/project/pockyll/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "sync your pocket bookmarks to Jekyll linkposts", "version": "0.1.1" }, "last_serial": 2113954, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "0abfa1141705cf41b6554d9b8af1d981", "sha256": "8a24b89f28a5670e82024acea2cc631f95cba97ad2ee56676797614535815bcf" }, "downloads": -1, "filename": "pockyll-0.1.1.tar.gz", "has_sig": false, "md5_digest": "0abfa1141705cf41b6554d9b8af1d981", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6584, "upload_time": "2016-05-13T10:17:00", "url": "https://files.pythonhosted.org/packages/7b/3d/8458149c3a0235150824d68c8182fca2fe114a24bece069f5be70ae20748/pockyll-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0abfa1141705cf41b6554d9b8af1d981", "sha256": "8a24b89f28a5670e82024acea2cc631f95cba97ad2ee56676797614535815bcf" }, "downloads": -1, "filename": "pockyll-0.1.1.tar.gz", "has_sig": false, "md5_digest": "0abfa1141705cf41b6554d9b8af1d981", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6584, "upload_time": "2016-05-13T10:17:00", "url": "https://files.pythonhosted.org/packages/7b/3d/8458149c3a0235150824d68c8182fca2fe114a24bece069f5be70ae20748/pockyll-0.1.1.tar.gz" } ] }