{"id":16369638,"url":"https://github.com/dcsunset/taskwarrior-lib","last_synced_at":"2025-03-23T02:33:55.501Z","repository":{"id":42036850,"uuid":"272649078","full_name":"DCsunset/taskwarrior-lib","owner":"DCsunset","description":"A Node.js library for interacting with taskwarrior","archived":false,"fork":false,"pushed_at":"2022-11-09T03:00:42.000Z","size":34,"stargazers_count":9,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-11T22:44:49.239Z","etag":null,"topics":["library","nodejs","taskwarrior","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DCsunset.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-16T08:12:12.000Z","updated_at":"2024-07-05T21:55:26.000Z","dependencies_parsed_at":"2023-01-21T14:31:17.340Z","dependency_job_id":null,"html_url":"https://github.com/DCsunset/taskwarrior-lib","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCsunset%2Ftaskwarrior-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCsunset%2Ftaskwarrior-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCsunset%2Ftaskwarrior-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCsunset%2Ftaskwarrior-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DCsunset","download_url":"https://codeload.github.com/DCsunset/taskwarrior-lib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221843005,"owners_count":16890248,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["library","nodejs","taskwarrior","typescript"],"created_at":"2024-10-11T02:55:52.819Z","updated_at":"2024-10-28T14:47:36.001Z","avatar_url":"https://github.com/DCsunset.png","language":"TypeScript","readme":"# taskwarrior-lib\n\n[![npm version](https://badgen.net/npm/v/taskwarrior-lib)](https://www.npmjs.com/package/taskwarrior-lib)\n[![license](https://badgen.net/github/license/dcsunset/taskwarrior-lib)](https://github.com/DCsunset/taskwarrior-lib)\n\n\nA Node.js library for interacting with taskwarrior\n\n## Installation\n\n```\nnpm install taskwarrior-lib\n```\n\n## Requirements\n\n* [Taskwarrior](https://taskwarrior.org/) v2.4.5 or above (which supports `import` command)\n\n## Usage\n\nThe following examples are using ES modules,\nand CommonJS modules are also supported.\n\nTo import the library:\n\n```js\nimport { TaskwarriorLib } from 'taskwarrior-lib';\nconst taskwarrior = new TaskwarriorLib();\n```\n\nOr you can specify the taskwarrior config path and data path:\n\n```js\nconst taskwarrior = new TaskwarriorLib(\n\t'~/.taskrc',\n\t'~/.task'\n);\n```\n\nTo add tasks:\n\n```js\nlet msg = taskwarrior.update([\n\t{\n\t\tdescription: 'test 1',\n\t\tpriority: 'L'\n\t},\n\t{\n\t\tdescription: 'test 2',\n\t\tpriority: 'M'\n\t}\n]);\nconsole.log(msg);\n```\n\nTo load tasks:\n\n```js\nconst tasks = taskwarrior.load('status:pending');\nconsole.log(tasks);\n```\n\nTo modify tasks:\n\n```js\nconst task = tasks[tasks.length - 1];\ntask.due = 'now+1d';\ntask.priority = 'H';\nlet msg = taskwarrior.update([task]);\nconsole.log(msg);\n```\n\nTo delete tasks:\n\n```js\ntaskwarrior.del(tasks.slice(tasks.length - 1));\n```\n\n## License\n\nMIT License\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcsunset%2Ftaskwarrior-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcsunset%2Ftaskwarrior-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcsunset%2Ftaskwarrior-lib/lists"}