{ "info": { "author": "Stefan Pfeuffer", "author_email": "mail@stefanpfeuffer.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# py2gc\nA small command line utility to add events to a Google Calendar.\n\nIt will:\n\n* Take arguments from the command line.\n* Parse these arguments to usable strings.\n* Create a JSON object for an API call.\n* Call the Google Calendar API to add the event to the calendar.\n\nExample:\n\n $ ./py2gc -d 0712 -s 1900 -n \"Dinner with friends\"\n Parsing date...\n Parsing note...\n Parsing time...\n Building JSON event object...\n Calling Google Calendar API...\n Success! Event created on 07-12-2018: Dinner with friends\n\n## Installation\n\n1. Install the script via PIP or manually\n\nInstall this script via PIP with either\n\n pip install py2gc\n\nor\n\n pip install https://github.com/stefanpf/py2gc/archive/master.zip\n\nOr manually download this repo and install Python modules with:\n\n pip install requirements.txt\n\nVersion note: this script doesn't work on Python 2.X. If you have different Pythons installed on your system, you will want to install this using `pip3` to make sure that it will be installed under your Python 3.X.\n\n2. Go to the Google Developer API console, add the Calendar API to your dashboard and create OAuth credentials for a local application. Download the JSON file that contains the client id and client secret and place it in \"`$home/.py2gc/`\" (or choose a different location and edit `call_api()` in `api_call.py` accordingly). Alternatively you can pass the path to the credentials with the `-p` argument (see below.)\n\n3. On the first run, the authenticator will open a browser window and ask the user to log in with their Google account to authenticate the API use. That Google account's primary calendar will be used unless a specific Calendar ID is passed via the `-i --calendarid` argument.\n\n## Usage\n\nThe arguments are:\n\n py2gc\n -d --date # Date of the event either as DDMM or DDMMYYYY. REQUIRED.\n -n --note # Description of the event. REQUIRED.\n -s --starttime # Start time of the event, as HHMM in 24hr format.\n -e --endtime # End time of the event, as HHMM in 24hr format.\n -l --location # Location of the event.\n -i --calendarid # Google Calendar ID. Default is primary.\n -p --path # Path to your Google Calendar API credentials.\n -h --help # Help.\n\n### -d --date (REQUIRED)\n\nExpects the event date in the format DDMM or DDMMYYYY. \n\nIf no year is given, it will assume the current calendar year if the given date is in the future and the next calendar year if the date is in the past. Put differently: if no year is given, the event will be placed on the first future occurence of the date.\n\nExample:\n\n (If today is the 04 April 2018)\n -d 1004 will produce 10 April 2018\n -d 0302 will produce 3 February 2019\n -d 03022018 will produce 3 February 2018\n\n### -n --note (REQUIRED)\n\nExpects an event description/summary.\n\nExample:\n\n -n \"dinner at sam's\"\n\n### -s --starttime (OPTIONAL)\n\nExpects the event start time in the format HHMM.\n\nExample:\n\n -s 1315\n\nNote: If no start time is supplied, the event will be treated as \"all-day\".\n\n### -e --endtime (OPTIONAL)\n\nExpects the event end time in the format HHMM.\n\nExample:\n\n -e 0745\n\nNote: If a start time is supplied but no end time, the event will be treated as 30 minute duration. If an end time is supplied but no start time, the event will be treated as beginning at 00:00 hours on the date supplied and ending at the supplied end time.\n\n### -l --location (OPTIONAL)\n\nExpects an event location.\n\nExample:\n\n -l 'library'\n\n### -i --calendarid (OPTIONAL)\n\nExpects a Google Calendar ID.\n\nExample:\n\n -i S0MeTypeofString@group.calendar.google.com\n\nUse this argument to write the event to a specific calendar. If no Calendar ID is given, the script will default to `'primary'`.\n\n### -p --path (OPTIONAL)\n\nExpects a file path.\n\nExample:\n\n -p /usr/test/path/to/credentials\n\nNote: by default, the script will expect to find the Google API credentials (client_id.json and, after the first run, storage.json) in a folder called `$home/.py2gc/`. If you want to store your credentials elsewhere, you can either pass the correct path via this argument or change the variable `path = '$home/.py2gc/'` in the `call_api()` function.\n\n### Usage Examples\n\n py2gc -d 0308 -n \"pycon europe\"\n\nThis will create an all-day event on the next 3 August with a description of \"pycon europe\".\n\n py2gc -d 24122018 -n 'christmas dinner at home' -s 1700\n\nThis will create an event on 24 December 2018, starting at 17:00 hrs with a default duration of 30 minutes and a description of \"christmas dinner at home\".\n\n py2gc -d 24122018 -n \"christmas dinner at home\" -s 1700 -e 2200\n\nThis will create an event on 24 December 2018, starting at 17:00 hrs and ending at 22:00 hrs and with a description of \"christmas dinner at home\"\n\n py2gc -d 2412 -n \"christmas dinner\" -s 1700 -e 2200 -l \"home\"\n\nThis will create an event on the next 24 December, starting at 17:00 hrs and ending at 22:00 hrs, with a description of \"christmas dinner\" and a location of \"home\".\n\n### Output Example\n\n $ ./py2gc.py -d 0712 -s 1900 -n \"Dinner with friends\"\n Parsing date...\n Parsing note...\n Parsing time...\n Building JSON event object...\n Calling Google Calendar API...\n Success! Event created on 07-12-2018: Dinner with friends\n\n## Planned Features\n\n* Support multi-day events.\n* Fix treatment of 29 February when calendar year is not supplied.\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/stefanpf/py2gc", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "py2gc", "package_url": "https://pypi.org/project/py2gc/", "platform": "", "project_url": "https://pypi.org/project/py2gc/", "project_urls": { "Homepage": "https://github.com/stefanpf/py2gc" }, "release_url": "https://pypi.org/project/py2gc/1.0.6/", "requires_dist": [ "httplib2", "argparse", "oauth2client", "google-api-python-client", "pathlib" ], "requires_python": "", "summary": "Add events to a Google Calendar from the command line.", "version": "1.0.6" }, "last_serial": 4607111, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "0ec3b394e0d0bbc2d133de7cc3496807", "sha256": "da7dbe9afc7d4139bb462ebfdf23f3e47b548e1fc7ede52a5c7f1a53be1f8944" }, "downloads": -1, "filename": "py2gc-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "0ec3b394e0d0bbc2d133de7cc3496807", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7128, "upload_time": "2018-12-06T10:29:21", "url": "https://files.pythonhosted.org/packages/41/7d/04fa609575ea9be1cdb193e7a74aa498cbc05f1d305189c3e53751255872/py2gc-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c1273c195dc1ef22f99cf51007fb9dfa", "sha256": "0cb286f82e618729d105b7e0f753ee69be77d819e8f9d683b50a6fc425fc4503" }, "downloads": -1, "filename": "py2gc-1.0.1.tar.gz", "has_sig": false, "md5_digest": "c1273c195dc1ef22f99cf51007fb9dfa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5758, "upload_time": "2018-12-06T10:29:22", "url": "https://files.pythonhosted.org/packages/68/31/29204ba67606c433bdf229affc0df2f3d9fda17f9d3ac0c64517fa411485/py2gc-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "df52a5bad99418dfd8170405444c086c", "sha256": "6a549e31c79d31235c543b7ab12db29ac1dd04dfb7a5941672b47eb211e7d5cd" }, "downloads": -1, "filename": "py2gc-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "df52a5bad99418dfd8170405444c086c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7360, "upload_time": "2018-12-06T14:31:55", "url": "https://files.pythonhosted.org/packages/46/6b/18ca35e8c2464f6bd27c262ae7daf0f5c100589b2c222f11fe6bb9773d07/py2gc-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cbc0fd42f5166e0b8cae2cbcbb4de6b6", "sha256": "c6b249e6b4b8ac2da9768e977d5f38c5fe6cd8952f604151124a995fb12ddf36" }, "downloads": -1, "filename": "py2gc-1.0.2.tar.gz", "has_sig": false, "md5_digest": "cbc0fd42f5166e0b8cae2cbcbb4de6b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5818, "upload_time": "2018-12-06T14:31:56", "url": "https://files.pythonhosted.org/packages/b0/02/09ebd763c0c00ea28e259c0ef1231d6f74d4b59f81ae2ed877a328878117/py2gc-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "0408b9086ed01dcfdf77716d8e4d278c", "sha256": "358336292ec19a3750f0b99947a65ac9791f81bce4a02d42809c700a50982059" }, "downloads": -1, "filename": "py2gc-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "0408b9086ed01dcfdf77716d8e4d278c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8474, "upload_time": "2018-12-06T16:13:36", "url": "https://files.pythonhosted.org/packages/61/87/b271effe1c1ac57c50951681e5569078ee5982fc62f0efeeec6c334e751c/py2gc-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "857dffebc6f46bce0cf129a7c86d59b1", "sha256": "39922455ac52f43fe5dbf4031410b4088a3da501d92233d3d51b336b6d91dbae" }, "downloads": -1, "filename": "py2gc-1.0.3.tar.gz", "has_sig": false, "md5_digest": "857dffebc6f46bce0cf129a7c86d59b1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6111, "upload_time": "2018-12-06T16:13:38", "url": "https://files.pythonhosted.org/packages/ad/d0/58799ce2e4fc907fa3807229fad1fbb7a2c7657ed2c3a339b84b94acbf3b/py2gc-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "802dab7c779d1a45b1a8b5c04d643de9", "sha256": "0a1eb200b5356b6a17511e0d333e3eca5e7d5b6b47258daf37e44141b8b7718d" }, "downloads": -1, "filename": "py2gc-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "802dab7c779d1a45b1a8b5c04d643de9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8467, "upload_time": "2018-12-07T15:30:25", "url": "https://files.pythonhosted.org/packages/af/5c/7d037fdf2177981f68ebc221c43c92d17f9320bd9e460532c1ed7c884eca/py2gc-1.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a6bd6baaf946524913b6abf462a0cd34", "sha256": "aa1907c44c3c13df05ac6d3786f517e19033339d191e26953783ba70d0827a80" }, "downloads": -1, "filename": "py2gc-1.0.4.tar.gz", "has_sig": false, "md5_digest": "a6bd6baaf946524913b6abf462a0cd34", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6115, "upload_time": "2018-12-07T15:30:28", "url": "https://files.pythonhosted.org/packages/57/d9/be47ad03690a62e5f6afa627864ea6bda6ee9a02ca21b42577c646b9a776/py2gc-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "96f4822dc302508f6b33b1048fef9b45", "sha256": "69ec28c517bd14d3229356fc5c5d260219044f55a3214ded61363f2d963dbfb2" }, "downloads": -1, "filename": "py2gc-1.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "96f4822dc302508f6b33b1048fef9b45", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8489, "upload_time": "2018-12-10T12:58:50", "url": "https://files.pythonhosted.org/packages/82/07/81052f4459b196ca3e28e3012ea55947c30bae28aa8a82cfdcd77d5379bc/py2gc-1.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e27a2a14450aba1ace2df88e4905922c", "sha256": "802768f718281c64f0b65e86031e3602ef3442531da9781153af4693f1c86684" }, "downloads": -1, "filename": "py2gc-1.0.5.tar.gz", "has_sig": false, "md5_digest": "e27a2a14450aba1ace2df88e4905922c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6129, "upload_time": "2018-12-10T12:58:54", "url": "https://files.pythonhosted.org/packages/f4/a1/399e24ea507f8376ee1b744b24a4ecbe1eedf5ee9bc94340d8faa82c1cff/py2gc-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "2717fc0810f0d44b11c270b70d10eb38", "sha256": "6732cf615c9b8e595cd3d6b0388cf050cde84b955adb799ca50d0857020b7fae" }, "downloads": -1, "filename": "py2gc-1.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "2717fc0810f0d44b11c270b70d10eb38", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7754, "upload_time": "2018-12-17T09:10:50", "url": "https://files.pythonhosted.org/packages/0c/12/cb68815091db7900eff6e7b0bb751cfd1cc3b3e7bf1b4a908065811f8f3c/py2gc-1.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "df2f7f4925eddaf58c4295b4e9fa5a82", "sha256": "c2c7681f7b31ca4f5c2e43cca5dbd1b7e882802415d19cafc44f5a5454f6a363" }, "downloads": -1, "filename": "py2gc-1.0.6.tar.gz", "has_sig": false, "md5_digest": "df2f7f4925eddaf58c4295b4e9fa5a82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6064, "upload_time": "2018-12-17T09:10:55", "url": "https://files.pythonhosted.org/packages/fd/da/60a950ecbb0d14f5abfb47c2a7f976245adb5b953fc127c63c995c691fcf/py2gc-1.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2717fc0810f0d44b11c270b70d10eb38", "sha256": "6732cf615c9b8e595cd3d6b0388cf050cde84b955adb799ca50d0857020b7fae" }, "downloads": -1, "filename": "py2gc-1.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "2717fc0810f0d44b11c270b70d10eb38", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7754, "upload_time": "2018-12-17T09:10:50", "url": "https://files.pythonhosted.org/packages/0c/12/cb68815091db7900eff6e7b0bb751cfd1cc3b3e7bf1b4a908065811f8f3c/py2gc-1.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "df2f7f4925eddaf58c4295b4e9fa5a82", "sha256": "c2c7681f7b31ca4f5c2e43cca5dbd1b7e882802415d19cafc44f5a5454f6a363" }, "downloads": -1, "filename": "py2gc-1.0.6.tar.gz", "has_sig": false, "md5_digest": "df2f7f4925eddaf58c4295b4e9fa5a82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6064, "upload_time": "2018-12-17T09:10:55", "url": "https://files.pythonhosted.org/packages/fd/da/60a950ecbb0d14f5abfb47c2a7f976245adb5b953fc127c63c995c691fcf/py2gc-1.0.6.tar.gz" } ] }