{ "info": { "author": "Marcin Kasperski", "author_email": "Marcin.Kasperski@mekk.waw.pl", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": ".. -*- mode: rst; coding: utf-8; compile-command: \"rst2html README.txt /tmp/README.html\" -*-\n\n================\nmekk.rtm\n================\n\n``mekk.rtm`` provides both RememberTheMilk_ client library (which you\ncan use to write client programs/libraries using relatively simple\nAPI) and a few command-line utilities (which you can use to manage\nyour data, for example import, export, massively tag, move between\nlists etc).\n\n.. contents::\n :local:\n :backlinks: none\n :depth: 2\n\nUsing mekk.rtm as client library\n======================================\n\nContrary to two other python RememberTheMilk_ clients (RtmAPI_ and\npyrtm_), ``mekk.rtm`` tries to provide elaborate API with enumerated\nexplicit parameters and structured results. It is also tested with\nsome unittests.\n\nFor detailed documentation see inline docs of `mekk.rtm.RtmClient`_. Here is\nsimple example (see also longer `sample/sample_client.py`_ in package\nsources, to get api key and shared secret visit \n`this page `_)::\n\n from mekk.rtm import RtmClient, create_and_authorize_connector_prompting_for_api_key\n\n APP_NAME = \"mekk.rtm sample\"\n\n connector = create_and_authorize_connector_prompting_for_api_key(APP_NAME)\n #\n # Function above interactively prompts for api key and shared secret and\n # preserves acquired data in keyring. This is useful for testing, but in\n # normal case you are more likely to do:\n #\n # connector = create_and_authorize_connector(APP_NAME, API_KEY, SHARED_SECRET)\n\n client = RtmClient(connector)\n\n print \"Normal lists: \"\n for l in client.known_lists():\n if not l.archived:\n print u\"%s (%s)\" % (l.id, l.name)\n\n print \"Smart lists: \"\n for l in client.known_smart_lists():\n if not l.archived:\n print u\"%s (%s, %s)\" % (l.id, l.name, l.filter)\n\n test_list = client.find_or_create_list(u\"The testing list\")\n print \"Test list: \", test_list\n\n another_list = client.find_or_create_list(u\"The testing list\")\n print \"Another list: \", another_list\n\n task1 = client.create_task(\n u\"Write some unit tests\",\n list_id = test_list.id,\n tags = [\"testy\", \"@dom\"],\n priority = 3,\n due_date = \"2010-11-30\",\n estimate = \"1 day 10 hours\",\n repeat = \"after 3 days\",\n url = \"http://en.wikipedia.org/wiki/Unit_testing\",\n completed = False,\n notes = [ (u\"Runner\", u\"Use nose to run them all\\nIt is simplest\"),\n (u\"Helper\", u\"And mock can help to wrap backend apis\\nwithout calling them\") ])\n print \"Created task\", task1\n\n task2 = client.create_task(\n u\"Less serious one\",\n list_id = test_list.id)\n print \"Created task\", task2\n\n task3 = client.create_task(\n u\"Less serious one\",\n list_id = another_list.id,\n tags = [\"testy\"])\n print \"Created task\", task3\n\n print \"All incomplete tasks with notes on first list:\"\n for t in client.find_tasks(list_id = test_list.id, filter = \"status:incomplete and hasNotes:true\"):\n print t\n\n task2 = client.update_task(\n task2.key,\n completed = True)\n print \"Updated task\", task2\n\n print \"All incomplete tasks tagged 'testy':\"\n for t in client.find_tasks(filter = \"tag:testy and status:incomplete\"):\n print t\n\n.. _RtmAPI: http://pypi.python.org/pypi/RtmAPI/\n.. _pyrtm: http://bitbucket.org/srid/pyrtm/\n.. _sample/sample_client.py: http://bitbucket.org/Mekk/mekk.rtm/src/tip/sample/sample_client.py\n.. _mekk.rtm.RtmClient: http://bitbucket.org/Mekk/mekk.rtm/src/tip/src/mekk/rtm/rtm_client.py\n\nUsing mekk.rtm as command-line tool\n======================================\n\n``mekk.rtm`` offers a few command-line helpers (mostly related to the\nthings original web interface fails to provide).\n\n.. _RememberTheMilk: http://www.rememberthemilk.com\n\n--------------------------------------------\nUpdating tags on many tasks (`rtmtag`)\n--------------------------------------------\n\nThe command makes it possible to add and/or remove specific tag(s)\nto many tasks at once. Example usage::\n\n rtmtag --add=work --add=computer \\\n --remove=office \\\n --filter='list:\"Prepared Reports\" and status:\"incomplete\"'\n\n(every `-add` names tag to add, every `--remove` names tag to remove,\n`--filter` defines which tasks are to be updated using normal \n`RememberTheMilk query syntax `_).\n\nTo verify what the command is to do without actually performing it\none can add `--dry-run` and `--verbose`. For example::\n\n rtmtag --add=rodzina \\\n --filter='list:\"Rodzina\" and status:\"incomplete\"' \\\n --dry-run --verbose\n\n\n---------------------------------------------\nMoving many tasks to another list (`rtmmove`)\n---------------------------------------------\n\nMoves all tasks fitting given query to list of specified name\n(which will be created if is not present).\n\nExample::\n\n rtmmove --list='Language learning' \\\n --filter='list:\"English Course\" or tag:\"French\" or tag:German\"\n\nTo verify what the command is to do without actually performing it\none can add `--dry-run` and `--verbose`. For example::\n\n rtmmove --list=Family \\\n --filter='(tag:paul or tag:jane) and status:\"incomplete\"' \\\n --dry-run --verbose\n\n--------------------------------------------\nExporting RememberTheMilk data (`rtmexport`)\n--------------------------------------------\n\n*Not yet implemented (but planned soon)*\n\n--------------------------------------------\nImporting exported data back (`rtmimport`)\n--------------------------------------------\n\n*Not yet implemented (but planned soon)*\n\n----------------------------------------------------------\nImporting data from Nozbe to RememberTheMilk (`rtmimport`)\n----------------------------------------------------------\n\n*For obvious reasons (I already imported my data) I don't test\nthis module on every release. Make dry run before actually running\nthe import and report bugs if they happen.*\n\nExporting the data from Nozbe\n-----------------------------\n\nPrepare `.json` export of Nozbe_ data. For details see `mekk.nozbe`_\nbut usually you just want to::\n\n nozbetool export --user=MyNozbeName --json=mynozbedata.json\n\nImporting data to RememberTheMilk\n---------------------------------\n\nFirst make a test run::\n\n rtmimport --nozbe-json=mynozbedata.json --verbose --dry-run\n\n(it does not store anything, just prints what it is to do) and verify\nwhether everything seems correct. \n\nThen make actual import::\n\n rtmimport --nozbe-json=mynozbedata.json --verbose\n\n(or omit `--verbose` if you don't want to track progress, but I\nrecommend you keep it)\n\nNote: import can take some time. In case of my big list over\nnot-so-good network it has been running for almost an hour.\n\nHow the data is converted\n-------------------------\n\nNozbe projects are saved as RememberTheMilk lists.\n\nNozbe contexts are converted to RememberTheMilk tags. `@` is prepended\nto their names and non-alphanumeric characters are replaced with\ndashes (so for example `My home/kitchen` becomes\n`@My-home-kitchen`). \n\nNext actions are tagged as `Next`.\n\nActions are saved as tasks. Name, due date, recurrence, \nestimated cost and completion status are all saved.\n\nIn case of recurrence, RTM ``every`` mode is used (so the task marked\non Nozbe as recurring every week will be spawned 52 times a year by\nRTM, whether user completes it, or not). If you prefer alternative way\n(spawning new incarnation whenever previous is completed), edit tasks\nafter import, patch the code (and replace `every` with `after`), or\nask me for a commandline flag).\n\nAs notes are bound to projects on Nozbe, and to tasks on\nRememberTheMilk, I save notes by creating artificial tasks named \"Save\nthis note\" (one per every list for which appropriate project had notes)\nand binding notes to those tasks. This must be handled afterwards\nusing RTM interface, to make sure it happens I mark those tasks as due\nimmediately. Those task are also tagged as `Note`.\n\nLimitations\n-----------\n\nOnly main context is copied, additional contexts are lost. I don't know\nhow to grab them from Nozbe_ (in case somebody knows how to patch\n`mekk.nozbe`_ to grab all contexts, I can extend this importer easily\nto handle them all).\n\nUploads are not copied at all. I neither now how to export them from\nNozbe, nor how could I handle them afterwards (RTM has no uploads).\n\nAction name formatting is not available on RememberTheMilk, so if you\nused constructs like `Visit \"the website\":http://google.com`, they will\nshow up as is.\n\nSharing information (= information about delegations to other users)\nis lost. I haven't used this feature so I don't know how do the\nunderlying data look like.\n\nSome contexts could probably be converted to locations, not tags, but\nI don't have an idea how to decide which way to go.\n\nProblems and workarounds\n------------------------\n\nIf import process is interrupted, re-running it would make duplicate\ntasks (there is no duplicate checking, it would be costly). The best\nway to resolve it is to open .json file in text editor (after making a\nbackup copy of it) and simply cut all actions which are already saved\n(they are saved in order, so it is just a matter of locating the last\naction saved before the process was interrupted and cutting all actions\nup to this one).\n\nThanks\n======\n\nI borrowed many ideas (especially how to handle authorization and construct\nrequests) from RtmAPI_ by Michael Gr\u00fcnewald. Great thanks for sharing the\ncode.\n\nSource, bugs, patches\n=====================\n\nDevelopment `is tracked on BitBucket`_. Clone from there, report bugs\nthere, offer patches there.\n\n.. _is tracked on BitBucket: http://bitbucket.org/Mekk/mekk.rtm\n.. _mekk.nozbe: http://pypi.python.org/pypi/mekk.nozbe/\n.. _Nozbe: http://nozbe.com", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://bitbucket.org/Mekk/rtmimport", "keywords": "rtm,RememberTheMilk", "license": "LGPL", "maintainer": null, "maintainer_email": null, "name": "mekk.rtm", "package_url": "https://pypi.org/project/mekk.rtm/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/mekk.rtm/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://bitbucket.org/Mekk/rtmimport" }, "release_url": "https://pypi.org/project/mekk.rtm/1.2.3/", "requires_dist": null, "requires_python": null, "summary": "RememberTheMilk client API and command line client", "version": "1.2.3" }, "last_serial": 1822215, "releases": { "0.5.0": [ { "comment_text": "", "digests": { "md5": "0f2333522e1cad718678b978818538cf", "sha256": "8d7e1ffc8d39002f42c7b72ff64718ff141a7c1dcc4df0920284664ba7004a2e" }, "downloads": -1, "filename": "mekk.rtm-0.5.0.tar.gz", "has_sig": false, "md5_digest": "0f2333522e1cad718678b978818538cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17801, "upload_time": "2010-11-12T01:22:06", "url": "https://files.pythonhosted.org/packages/88/cb/2f655f27f914094692d6fbddf97413194cf156b706c41b4e1419fb410e0f/mekk.rtm-0.5.0.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "c1412cc4cf99937da5b1858cefb306ee", "sha256": "73e934d66d99e1bbbed50554827ca8700db49ad3502c6b69a37644e015fce141" }, "downloads": -1, "filename": "mekk.rtm-0.6.0.tar.gz", "has_sig": false, "md5_digest": "c1412cc4cf99937da5b1858cefb306ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18455, "upload_time": "2010-11-14T16:59:00", "url": "https://files.pythonhosted.org/packages/ae/c1/e5b6335c2b4cfc1810266b8138220ca839e81b197158fe23e337315d308f/mekk.rtm-0.6.0.tar.gz" } ], "1.2.3": [] }, "urls": [] }