{ "info": { "author": "Pablo Yanez Trujillo", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Programming Language :: Python :: 3 :: Only", "Topic :: Office/Business" ], "description": "# WECLAPP CLI\n\n`weclapp-cli` is a limited command line interface to [weclapp][1]'s time records. I wrote this\ntool because I want to upload several time records at once that have been stored in an Excel\nsheet. The web interface allows you to upload a time record once at a time and when you have\nseveral time records to upload, this can take a lot of time.\n\n## Features\n\n- Display the projects and the project tasks (with their respective IDs) for which you can\nbook time records\n- Display the time records that you have already booked\n- Upload time records from a CSV file\n- Allows to use a custom CSV exporter\n\n## Installation\n\n**Note** As of this moment, the project is still in development and has not been uploaded to\n[PyPI][2] yet, so the `pip` command will fail.\n\n```bash\npip install weclapp-cli\n```\n\n### Requirement\n\n- Python3.x\n\n## Usage\n\nIn order to have access to weclapp's public API, you need a **API Token**. You can get your\nAPI Token from the *My settings* page of your weclapp installation. If you don't have an API\nToken yet, then click on *Create new API token* to generate a new one. Please think of your\nAPI Token as a password, keep it secret!\n\n### Configuring the client\n\n`weclapp-cli` needs to be configured before you can start using it.\nThe default configuration path is `${HOME}/.config/weclapp-cli/config.yml`.\n\nYou'll need the following values:\n\n- the domain of you weclapp installation, usually *`yourcomapny.weclapp.com`*\n- the API path, usually *`/webapp/api/v1`*\n- your API Token\n\nAlso check whether you have to access the API via HTTPS. Once you have all these values,\nopen a terminal and type in:\n\n```bash\n$ weclapp-cli config\nGenerating a new configuration file /home/shaoran/.config/weclapp-cli/config.yml\nYour weclapp domain []: yourcomapny.weclapp.com\nThe API path [/webapp/api/v1]: \nYour API TOKEN []: YOUR-TOKEN\nUse SSL [yes]: \n```\n\n### List projects, tasks and the last 100 time records\n\n```bash\n$ weclapp-cli projects\n```\n\n### List projects, tasks only\n\n```bash\n$ weclapp-cli projects -t\n```\n\n### Uploading time records\n\nPrepare the CSV file, then execute\n\n```bash\n$ weclapp-cli upload my-records.csv\n```\n\nTo get the options (like the separator character) for the default parse, execute\n\n```bash\n$ weclapp-cli upload --list-parser-options\n```\n\nYou can pass these option with the `--po KEY=VAL` option.\n\n\n## The CSV file\n\nIn order to upload a time record, you'll need to store your time records in a CSV-like file.\n\nI store my time records in an Excel sheet that has the following format:\n\n![][time-sheet]\n\n**NOTE** Do not add empty lines and lines with comments (usually lines beginning with `#`).\n\n### The header\n\nThe first 2 rows are the header. It contains the project ID and the task ID for which you want\nto upload your time records.\n\nIn the example above the cells `A1` and `A2` are ignored, you can have any string you like.\n\nThe next two columns (`B` and `C`) define the task for which you want to upload time records. The next\ntwo columns (`D` and `E`) define another task, etc. You can have as many tasks as you want. For every\ntask you need two columns. In the example above `B1` and `B2` have the project ID and the task ID for the\nfirst task. `D1` and `D2` have the project ID and the task ID for the next task.\n\n### The time records\n\nFrom the third row onward you'll define the time records. On the `A` column set the date of the day. The next\ncell contains the number of hours you've worked on the project and the next column is the description of\nthe time record. The description may be empty. The next column is for the next number of hours and so on.\n\nThe date colum (`A`) is parsed using [`dateutil.parser.parse`][3], so you can have different date formats,\nfor example:\n\n- Thursday, 01/Feb\n- 2019.02.01\n- 02-01-2019\n\nare recognized as **1st of February 2019**. If you omit the year, the current year is assumed.\n\nBy default the time of day of the records is 09:00. You can set another time by passing the\n`--po timeStart 08:00` option to `weclapp-cli upload` command. You have to use the 24 hour format.\n\nIf you need that a single entry has a different time of day than the default: instead of just passing\nthe duration (number of hours) as single number, you can pass **`time/duration`**. For example: you want\na single entry in the `B` column to have a time of day of 08:30 with a duration of 3 hours. Then enter the\nvalue **`08:30/5.00`**. Here you have to use the 24 hour format as well.\n\nThe default CSV will ignore time record that have an empty duration, in the image above `D5` is empty, so\nthat time record is ignored. The description can always be empty.\n\n### Example\n\nThe resulting CSV file from the image above would be\n\n PROJECT ID;12345;;323234;\n TASK ID;6789;;11232;\n Tuesday, 01/ Jan;;;;\n Wednesday, 02/ Jan;4.00;some desc;4.00;something else\n Thursday, 03/ Jan;8.00;;;\n Friday, 04/ Jan;3.00;;5.00;wiki stuff\n Saturday, 05/ Jan;;;;\n Friday, 11/ Jan;;;;\n\n\n## Custom CSV files\n\nIf you want to use a different CSV parser, then you can write your own and let `weclapp-cli` use it\ninstead of the default one.\n\nCreate a file `csv_exporter.py` in the same directory where the configuration file is stored\n(by default in `${HOME}/.config/weclapp-cli`).\n\n\n```python\n# ${HOME}/.config/weclapp-cli/csv_exporter.py\nfrom weclapp import Parser\n\nclass MyCustomCSV(Parser):\n \"\"\"\n implement your parser here\n \"\"\"\n pass\n\nparsers = [\n { \"name\": \"custom\", \"parser\": MyCustomCSV },\n]\n```\n\nThe `csv_exporter.py` file **must** have a variable called `parsers`. This variable is used by\n`weclapp-cli` to import your custom parser. And since it is a list, you *can* export more than\none custom parser. If you want to mark a custom parser as the new default, then add\n`\"default\": True`\n\n```\nparsers = [\n { \"name\": \"matrix\", \"parser\": MyCustomCSV, \"default\": True },\n]\n```\n\nTo display the list of parsers, execute\n\n```bash\n$ weclapp-cli upload -l\ncsv\nmatrix\n```\n\nThe first entry is the default parser.\n\nTo use the \"*matrix*\" parser:\n\n```bash\n$ weclapp-cli upload -p matrix file.csv\n```\n\nSee [Custom Parsers][5] for information about custom parsers\n\n# Contributions\n\nI don't intend to keep adding features, because it already does everything **I** need. But hey,\nthis is a open source project, so you are welcome to fork it. If you have bug fixes, new features\nor new parsers, then please send me pull request.\n\n# Disclaimer\n\nI do not own, develop [weclapp][1] and don't claim any copyright. weclapp is a product owned and\ndeveloped by [weclapp GmbH][4]. Any questions you have about weclapp, please go their website\n[https://www.weclapp.com/][1], don't ask me.\n\n**Use this tool at your own risk, I am not responsible for any data losses or damages\nas a result of using this tool.**\n\n\n**LICENSE**: GPL-2\n\n[1]: https://www.weclapp.com/\n[2]: https://pypi.org/\n[3]: https://dateutil.readthedocs.io/en/stable/parser.html#dateutil.parser.parse\n[time-sheet]: wiki/images/time-sheet.png\n[4]: https://www.weclapp.com/de/impressum/\n[5]: https://github.com/shaoran/weclapp-cli/wiki/Custom-Parsers\n\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://shaoran.github.io/weclapp-cli/", "keywords": "weclapp time records uploader", "license": "", "maintainer": "", "maintainer_email": "", "name": "weclapp-cli", "package_url": "https://pypi.org/project/weclapp-cli/", "platform": "", "project_url": "https://pypi.org/project/weclapp-cli/", "project_urls": { "Bug Reports": "https://github.com/shaoran/weclapp-cli/issues", "Homepage": "https://shaoran.github.io/weclapp-cli/", "Source": "https://github.com/shaoran/weclapp-cli" }, "release_url": "https://pypi.org/project/weclapp-cli/1.0.1/", "requires_dist": [ "PyYAML", "colorama", "coloredlogs", "python-dateutil" ], "requires_python": ">=3", "summary": "A small cli for uploading time records via a CSV file", "version": "1.0.1" }, "last_serial": 5118184, "releases": { "1.0.0": [ { "comment_text": "first stable release", "digests": { "md5": "755f04e725adba486fce6b9f2711f468", "sha256": "510667b7943c9550836ef26c1a1ae2479a93fc2a3f46a8f780be50a115ceb704" }, "downloads": -1, "filename": "weclapp_cli-1.0.0-py3.7.egg", "has_sig": true, "md5_digest": "755f04e725adba486fce6b9f2711f468", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": ">=3", "size": 57845, "upload_time": "2019-04-08T22:53:15", "url": "https://files.pythonhosted.org/packages/95/83/336e3ce99fa2e3c30c9c2b2b9f1adfc89e05d63a0e6dd8f5926b76bf5390/weclapp_cli-1.0.0-py3.7.egg" }, { "comment_text": "first stable release", "digests": { "md5": "a718632fae29237b70c6b7428ce14682", "sha256": "0fe60633609e8de6aebf3506e3876652a47b9a40a355e3a729af89379bce462e" }, "downloads": -1, "filename": "weclapp_cli-1.0.0-py3-none-any.whl", "has_sig": true, "md5_digest": "a718632fae29237b70c6b7428ce14682", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 32905, "upload_time": "2019-04-08T22:53:12", "url": "https://files.pythonhosted.org/packages/3d/55/ad926ac336aff4178645af2253fa1e6938bb8be5aa944a5babd0f256b543/weclapp_cli-1.0.0-py3-none-any.whl" }, { "comment_text": "first stable release", "digests": { "md5": "c3582eb2911861bf07a04ccc6bf19d5e", "sha256": "017776aba6a33e9cdbe6dca55a73870b049dede8220bd9814ec0789bccb02961" }, "downloads": -1, "filename": "weclapp-cli-1.0.0.tar.gz", "has_sig": true, "md5_digest": "c3582eb2911861bf07a04ccc6bf19d5e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 21345, "upload_time": "2019-04-08T22:53:17", "url": "https://files.pythonhosted.org/packages/39/d1/7a11092de1e4e44eb5bd79234d2f652ab820ea7afb97377401076c08c8a2/weclapp-cli-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "006c69d93e8984407419c66cdff8c73d", "sha256": "f91e5a205209b7c4c92019c4997c1c4ffd5011e51907c1f4f5fbbeb9ea8d3f55" }, "downloads": -1, "filename": "weclapp_cli-1.0.1-py3.7.egg", "has_sig": true, "md5_digest": "006c69d93e8984407419c66cdff8c73d", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": ">=3", "size": 24915, "upload_time": "2019-04-09T10:58:31", "url": "https://files.pythonhosted.org/packages/55/92/84fe4ae23866a2fdaf494c126955d1418d6c054d86873424597fb2cf5057/weclapp_cli-1.0.1-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "154c63b536025935fb2beb4f2124171a", "sha256": "da2b817167e2a19aca11ab3f70745e7e380eedc555d9a7c8ef315ae951a217b6" }, "downloads": -1, "filename": "weclapp_cli-1.0.1-py3-none-any.whl", "has_sig": true, "md5_digest": "154c63b536025935fb2beb4f2124171a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 32970, "upload_time": "2019-04-09T10:58:27", "url": "https://files.pythonhosted.org/packages/33/89/1d593acb9a3fc9851a0d8a23d128caa231730c024f17d5052ff20d2ca8cf/weclapp_cli-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f6dc7ee98bbf4c10045095f78acbe959", "sha256": "c62bfc024c66a6c4e27dd024e7413216f30d05fa28b97db37bfde100e97ac52a" }, "downloads": -1, "filename": "weclapp-cli-1.0.1.tar.gz", "has_sig": true, "md5_digest": "f6dc7ee98bbf4c10045095f78acbe959", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 21250, "upload_time": "2019-04-09T10:58:29", "url": "https://files.pythonhosted.org/packages/b3/48/48c010f7f24e8c9cefd6657df97b34411499957fc57368b8a07f7d58718e/weclapp-cli-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "006c69d93e8984407419c66cdff8c73d", "sha256": "f91e5a205209b7c4c92019c4997c1c4ffd5011e51907c1f4f5fbbeb9ea8d3f55" }, "downloads": -1, "filename": "weclapp_cli-1.0.1-py3.7.egg", "has_sig": true, "md5_digest": "006c69d93e8984407419c66cdff8c73d", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": ">=3", "size": 24915, "upload_time": "2019-04-09T10:58:31", "url": "https://files.pythonhosted.org/packages/55/92/84fe4ae23866a2fdaf494c126955d1418d6c054d86873424597fb2cf5057/weclapp_cli-1.0.1-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "154c63b536025935fb2beb4f2124171a", "sha256": "da2b817167e2a19aca11ab3f70745e7e380eedc555d9a7c8ef315ae951a217b6" }, "downloads": -1, "filename": "weclapp_cli-1.0.1-py3-none-any.whl", "has_sig": true, "md5_digest": "154c63b536025935fb2beb4f2124171a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 32970, "upload_time": "2019-04-09T10:58:27", "url": "https://files.pythonhosted.org/packages/33/89/1d593acb9a3fc9851a0d8a23d128caa231730c024f17d5052ff20d2ca8cf/weclapp_cli-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f6dc7ee98bbf4c10045095f78acbe959", "sha256": "c62bfc024c66a6c4e27dd024e7413216f30d05fa28b97db37bfde100e97ac52a" }, "downloads": -1, "filename": "weclapp-cli-1.0.1.tar.gz", "has_sig": true, "md5_digest": "f6dc7ee98bbf4c10045095f78acbe959", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 21250, "upload_time": "2019-04-09T10:58:29", "url": "https://files.pythonhosted.org/packages/b3/48/48c010f7f24e8c9cefd6657df97b34411499957fc57368b8a07f7d58718e/weclapp-cli-1.0.1.tar.gz" } ] }