├── .cargo └── audit.toml ├── .clang-format ├── .devcontainer ├── Dockerfile ├── devcontainer.json └── reinstall-cmake.sh ├── .dockerignore ├── .git-blame-ignore-revs ├── .github ├── CONTRIBUTING.md ├── FUNDING.yml ├── dependabot.yml ├── issue_template.md └── workflows │ ├── checks.yml │ ├── docker-image.yaml │ ├── metadata-check.sh │ ├── release-check.yaml │ ├── security.yml │ └── tests.yaml ├── .gitignore ├── .gitmodules ├── .pre-commit-config.yaml ├── AUTHORS ├── CMakeLists.txt ├── CONTRIBUTING.md ├── COPYING ├── Cargo.lock ├── Cargo.toml ├── ChangeLog ├── DEVELOPER.md ├── INSTALL ├── LICENSE ├── README.md ├── RELEASING.md ├── SECURITY.md ├── cmake.h.in ├── cmake └── CXXSniffer.cmake ├── commit.h.in ├── doc ├── CMakeLists.txt ├── README.md ├── devel │ ├── README.md │ ├── contrib │ │ ├── README.md │ │ ├── branching.md │ │ ├── coding_style.md │ │ ├── development.md │ │ ├── first_time.md │ │ ├── releasing.md │ │ └── rust-and-c++.md │ └── rfcs │ │ ├── README.md │ │ ├── cli.md │ │ ├── client.md │ │ ├── dom.md │ │ ├── plans.md │ │ ├── protocol.md │ │ ├── recurrence.md │ │ ├── request.md │ │ ├── rules.md │ │ ├── sync.md │ │ ├── task.md │ │ ├── workweek.md │ │ └── year.png ├── man │ ├── task-color.5.in │ ├── task-sync.5.in │ ├── task.1.in │ └── taskrc.5.in ├── rc │ ├── bubblegum-256.theme │ ├── dark-16.theme │ ├── dark-256.theme │ ├── dark-blue-256.theme │ ├── dark-gray-256.theme │ ├── dark-gray-blue-256.theme │ ├── dark-green-256.theme │ ├── dark-red-256.theme │ ├── dark-violets-256.theme │ ├── dark-yellow-green.theme │ ├── holidays.cs-CZ.rc │ ├── holidays.da-DK.rc │ ├── holidays.de-AT.rc │ ├── holidays.de-BE.rc │ ├── holidays.de-CH.rc │ ├── holidays.de-DE.rc │ ├── holidays.el-GR.rc │ ├── holidays.en-CA.rc │ ├── holidays.en-GB.rc │ ├── holidays.en-NZ.rc │ ├── holidays.en-US.rc │ ├── holidays.es-CO.rc │ ├── holidays.es-ES.rc │ ├── holidays.es-US.rc │ ├── holidays.fi-FI.rc │ ├── holidays.fr-BE.rc │ ├── holidays.fr-CA.rc │ ├── holidays.fr-FR.rc │ ├── holidays.hr-HR.rc │ ├── holidays.hu-HU.rc │ ├── holidays.is-IS.rc │ ├── holidays.it-IT.rc │ ├── holidays.nb-NO.rc │ ├── holidays.nl-BE.rc │ ├── holidays.nl-NL.rc │ ├── holidays.pl-PL.rc │ ├── holidays.por-PRT.rc │ ├── holidays.pt-BR.rc │ ├── holidays.pt-PT.rc │ ├── holidays.ru-RU.rc │ ├── holidays.sk-SK.rc │ ├── holidays.sv-FI.rc │ ├── holidays.sv-SE.rc │ ├── holidays.tr-TR.rc │ ├── light-16.theme │ ├── light-256.theme │ ├── no-color.theme │ ├── refresh │ ├── solarized-dark-256.theme │ └── solarized-light-256.theme └── ref │ ├── task-ref.pages │ └── task-ref.pdf ├── docker-compose.yml ├── docker └── task.dockerfile ├── index.html ├── misc ├── README.md └── themes │ ├── README │ ├── run.dark │ ├── run.default │ ├── run.light │ ├── run.solar.dark │ ├── run.solar.light │ └── setup ├── performance ├── CMakeLists.txt ├── compare_runs.py ├── load ├── run_perf └── sample-text.txt ├── scripts ├── CMakeLists.txt ├── add-ons │ ├── README │ └── update-holidays.pl ├── bash │ └── task.sh ├── fish │ └── task.fish ├── hooks │ ├── README │ ├── on-add │ ├── on-add.the │ ├── on-exit │ ├── on-exit.shadow-file │ ├── on-launch │ └── on-modify ├── vim │ ├── README │ ├── ftdetect │ │ └── task.vim │ └── syntax │ │ ├── taskdata.vim │ │ ├── taskedit.vim │ │ └── taskrc.vim └── zsh │ └── _task ├── src ├── .gitignore ├── CLI2.cpp ├── CLI2.h ├── CMakeLists.txt ├── Context.cpp ├── Context.h ├── DOM.cpp ├── DOM.h ├── Eval.cpp ├── Eval.h ├── Filter.cpp ├── Filter.h ├── Hooks.cpp ├── Hooks.h ├── Lexer.cpp ├── Lexer.h ├── Operation.cpp ├── Operation.h ├── TDB2.cpp ├── TDB2.h ├── TF2.cpp ├── TF2.h ├── Task.cpp ├── Task.h ├── Variant.cpp ├── Variant.h ├── Version.cpp ├── Version.h ├── ViewTask.cpp ├── ViewTask.h ├── calc.cpp ├── columns │ ├── CMakeLists.txt │ ├── ColDepends.cpp │ ├── ColDepends.h │ ├── ColDescription.cpp │ ├── ColDescription.h │ ├── ColDue.cpp │ ├── ColDue.h │ ├── ColEnd.cpp │ ├── ColEnd.h │ ├── ColEntry.cpp │ ├── ColEntry.h │ ├── ColID.cpp │ ├── ColID.h │ ├── ColIMask.cpp │ ├── ColIMask.h │ ├── ColLast.cpp │ ├── ColLast.h │ ├── ColMask.cpp │ ├── ColMask.h │ ├── ColModified.cpp │ ├── ColModified.h │ ├── ColParent.cpp │ ├── ColParent.h │ ├── ColProject.cpp │ ├── ColProject.h │ ├── ColRType.cpp │ ├── ColRType.h │ ├── ColRecur.cpp │ ├── ColRecur.h │ ├── ColScheduled.cpp │ ├── ColScheduled.h │ ├── ColStart.cpp │ ├── ColStart.h │ ├── ColStatus.cpp │ ├── ColStatus.h │ ├── ColTags.cpp │ ├── ColTags.h │ ├── ColTemplate.cpp │ ├── ColTemplate.h │ ├── ColTypeDate.cpp │ ├── ColTypeDate.h │ ├── ColTypeDuration.cpp │ ├── ColTypeDuration.h │ ├── ColTypeNumeric.cpp │ ├── ColTypeNumeric.h │ ├── ColTypeString.cpp │ ├── ColTypeString.h │ ├── ColUDA.cpp │ ├── ColUDA.h │ ├── ColUUID.cpp │ ├── ColUUID.h │ ├── ColUntil.cpp │ ├── ColUntil.h │ ├── ColUrgency.cpp │ ├── ColUrgency.h │ ├── ColWait.cpp │ ├── ColWait.h │ ├── Column.cpp │ └── Column.h ├── commands │ ├── CMakeLists.txt │ ├── CmdAdd.cpp │ ├── CmdAdd.h │ ├── CmdAliases.cpp │ ├── CmdAliases.h │ ├── CmdAnnotate.cpp │ ├── CmdAnnotate.h │ ├── CmdAppend.cpp │ ├── CmdAppend.h │ ├── CmdAttributes.cpp │ ├── CmdAttributes.h │ ├── CmdBurndown.cpp │ ├── CmdBurndown.h │ ├── CmdCalc.cpp │ ├── CmdCalc.h │ ├── CmdCalendar.cpp │ ├── CmdCalendar.h │ ├── CmdColor.cpp │ ├── CmdColor.h │ ├── CmdColumns.cpp │ ├── CmdColumns.h │ ├── CmdCommands.cpp │ ├── CmdCommands.h │ ├── CmdConfig.cpp │ ├── CmdConfig.h │ ├── CmdContext.cpp │ ├── CmdContext.h │ ├── CmdCount.cpp │ ├── CmdCount.h │ ├── CmdCustom.cpp │ ├── CmdCustom.h │ ├── CmdDelete.cpp │ ├── CmdDelete.h │ ├── CmdDenotate.cpp │ ├── CmdDenotate.h │ ├── CmdDiagnostics.cpp │ ├── CmdDiagnostics.h │ ├── CmdDone.cpp │ ├── CmdDone.h │ ├── CmdDuplicate.cpp │ ├── CmdDuplicate.h │ ├── CmdEdit.cpp │ ├── CmdEdit.h │ ├── CmdExec.cpp │ ├── CmdExec.h │ ├── CmdExport.cpp │ ├── CmdExport.h │ ├── CmdGet.cpp │ ├── CmdGet.h │ ├── CmdHelp.cpp │ ├── CmdHelp.h │ ├── CmdHistory.cpp │ ├── CmdHistory.h │ ├── CmdIDs.cpp │ ├── CmdIDs.h │ ├── CmdImport.cpp │ ├── CmdImport.h │ ├── CmdImportV2.cpp │ ├── CmdImportV2.h │ ├── CmdInfo.cpp │ ├── CmdInfo.h │ ├── CmdLog.cpp │ ├── CmdLog.h │ ├── CmdLogo.cpp │ ├── CmdLogo.h │ ├── CmdModify.cpp │ ├── CmdModify.h │ ├── CmdNews.cpp │ ├── CmdNews.h │ ├── CmdPrepend.cpp │ ├── CmdPrepend.h │ ├── CmdProjects.cpp │ ├── CmdProjects.h │ ├── CmdPurge.cpp │ ├── CmdPurge.h │ ├── CmdReports.cpp │ ├── CmdReports.h │ ├── CmdShow.cpp │ ├── CmdShow.h │ ├── CmdStart.cpp │ ├── CmdStart.h │ ├── CmdStats.cpp │ ├── CmdStats.h │ ├── CmdStop.cpp │ ├── CmdStop.h │ ├── CmdSummary.cpp │ ├── CmdSummary.h │ ├── CmdSync.cpp │ ├── CmdSync.h │ ├── CmdTags.cpp │ ├── CmdTags.h │ ├── CmdTimesheet.cpp │ ├── CmdTimesheet.h │ ├── CmdUDAs.cpp │ ├── CmdUDAs.h │ ├── CmdUndo.cpp │ ├── CmdUndo.h │ ├── CmdUnique.cpp │ ├── CmdUnique.h │ ├── CmdUrgency.cpp │ ├── CmdUrgency.h │ ├── CmdVersion.cpp │ ├── CmdVersion.h │ ├── Command.cpp │ └── Command.h ├── dependency.cpp ├── dependency.h ├── feedback.cpp ├── feedback.h ├── legacy.cpp ├── legacy.h ├── lex.cpp ├── main.cpp ├── nag.cpp ├── nag.h ├── recur.cpp ├── recur.h ├── rules.cpp ├── rules.h ├── sort.cpp ├── sort.h ├── taskchampion-cpp │ ├── .gitignore │ ├── CMakeLists.txt │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── util.cpp └── util.h └── test ├── CMakeLists.txt ├── README.md ├── abbreviation.test.py ├── add.test.py ├── alias.test.py ├── annotate.test.py ├── append.test.py ├── args.test.py ├── basetest ├── CMakeLists.txt ├── README ├── __init__.py ├── compat.py ├── exceptions.py ├── hooks.py ├── meta.py ├── task.py ├── testing.py └── utils.py ├── bash_completion.test.py ├── bash_tap.sh ├── bash_tap_tw.sh ├── blocked.test.py ├── bulk.test.py ├── burndown.test.py ├── calc.test.py ├── calendar.test.py ├── caseless.test.py ├── col_test.cpp ├── color.cmd.test.py ├── color.rules.test.py ├── columns.test.py ├── commands.test.py ├── completed.test.py ├── configuration.test.py ├── confirmation.test.py ├── context.test.py ├── conversion ├── count.test.py ├── custom.config.test.py ├── custom.recur_ind.test.py ├── custom.tag_ind.test.py ├── custom.test.py ├── date.iso.test.py ├── dateformat.test.py ├── datesort.test.py ├── datetime-negative.test.py ├── debug.test.py ├── default.test.py ├── delete.test.py ├── denotate.test.py ├── dependencies.test.py ├── diag.test.py ├── diag_color.test.py ├── docker ├── arch ├── debianstable ├── debiantesting ├── fedora40 ├── fedora41 ├── opensuse ├── ubuntu2004 └── ubuntu2204 ├── dom2.test.py ├── dom_test.cpp ├── due.test.py ├── duplicate.test.py ├── edit.test.py ├── encoding.test.py ├── enpassant.test.py ├── eval_test.cpp ├── exec.test.py ├── export.test.py ├── feature.559.test.py ├── feature.default.project.test.py ├── feature.print.empty.columns.test.py ├── feature.recurrence.test.py ├── feedback.test.py ├── filter.test.py ├── fontunderline.test.py ├── format.test.py ├── gc.test.py ├── helpers.test.py ├── history.test.py ├── hooks.env.test.py ├── hooks.on-add.test.py ├── hooks.on-exit.test.py ├── hooks.on-launch.test.py ├── hooks.on-modify.test.py ├── hyphenate.test.py ├── ids.test.py ├── import-v2.test.py ├── import.test.py ├── info.test.py ├── lexer_test.cpp ├── limit.test.py ├── list.all.projects.test.py ├── log.test.py ├── logo.test.py ├── make_tc_task.cpp ├── math.test.py ├── modify.test.py ├── nag.test.py ├── news.test.py ├── obfuscate.test.py ├── oldest.test.py ├── operators.test.py ├── overdue.test.py ├── partial.test.py ├── prepend.test.py ├── pri_sort.test.py ├── project.test.py ├── purge.test.py ├── quotes.test.py ├── rc.override.test.py ├── read-only.test.py ├── recurrence.test.py ├── reports.test.py ├── scripts └── test_macos.sh ├── search.test.py ├── sequence.test.py ├── shell.test.py ├── show.test.py ├── simpletap ├── CMakeLists.txt └── __init__.py ├── sorting.test.py ├── special.test.py ├── start.test.py ├── stats.test.py ├── substitute.test.py ├── sugar.test.py ├── summary.test.py ├── t_test.cpp ├── tag.test.py ├── taskrc.test.py ├── tc_cpp_test.cpp ├── tdb2_test.cpp ├── template.test.py ├── test.cpp ├── test.h ├── test_hooks ├── on-add-accept ├── on-add-misbehave1 ├── on-add-misbehave2 ├── on-add-misbehave3 ├── on-add-misbehave4 ├── on-add-misbehave5 ├── on-add-misbehave6 ├── on-add-modify ├── on-add-reject ├── on-add.dummy ├── on-exit-bad ├── on-exit-good ├── on-exit-misbehave1 ├── on-exit-misbehave2 ├── on-exit.dummy ├── on-launch-bad ├── on-launch-good ├── on-launch-good-env ├── on-launch-misbehave1 ├── on-launch-misbehave2 ├── on-launch.dummy ├── on-modify-accept ├── on-modify-for-template-badexit.py ├── on-modify-for-template.py ├── on-modify-misbehave2 ├── on-modify-misbehave3 ├── on-modify-misbehave4 ├── on-modify-misbehave5 ├── on-modify-misbehave6 ├── on-modify-reject ├── on-modify-revert ├── on-modify.dummy └── wrapper.sh ├── timesheet.test.py ├── tw-1379.test.py ├── tw-1637.test.sh ├── tw-1643.test.sh ├── tw-1688.test.sh ├── tw-1715.test.sh ├── tw-1718.test.sh ├── tw-1804.test.sh ├── tw-1837.test.py ├── tw-1883.test.sh ├── tw-1895.test.sh ├── tw-1938.test.sh ├── tw-1999.test.py ├── tw-20.test.py ├── tw-2124.test.sh ├── tw-2189.test.sh ├── tw-2257.test.sh ├── tw-2386.test.sh ├── tw-2392.test.sh ├── tw-2429.test.sh ├── tw-2451.test.sh ├── tw-2514.test.sh ├── tw-2530.test.sh ├── tw-2550.test.sh ├── tw-2575.test.py ├── tw-2581.test.sh ├── tw-262.test.py ├── tw-295.test.py ├── tw-3102.test.sh ├── tw-3109.test.sh ├── tw-3527.test.py ├── tw_2689_test.cpp ├── uda.test.py ├── uda_orphan.test.py ├── uda_report.test.py ├── uda_sort.test.py ├── undo.test.py ├── unicode.test.py ├── unique.test.py ├── unusual_task.test.py ├── upgrade.test.py ├── urgency.test.py ├── urgency_inherit.test.py ├── util_test.cpp ├── uuid.test.py ├── variant_add_test.cpp ├── variant_and_test.cpp ├── variant_cast_test.cpp ├── variant_divide_test.cpp ├── variant_equal_test.cpp ├── variant_exp_test.cpp ├── variant_gt_test.cpp ├── variant_gte_test.cpp ├── variant_inequal_test.cpp ├── variant_lt_test.cpp ├── variant_lte_test.cpp ├── variant_match_test.cpp ├── variant_math_test.cpp ├── variant_modulo_test.cpp ├── variant_multiply_test.cpp ├── variant_nomatch_test.cpp ├── variant_not_test.cpp ├── variant_or_test.cpp ├── variant_partial_test.cpp ├── variant_subtract_test.cpp ├── variant_xor_test.cpp ├── verbose.test.py ├── version.test.py ├── view_test.cpp └── wait.test.py /.cargo/audit.toml: -------------------------------------------------------------------------------- 1 | [advisories] 2 | ignore = [ 3 | "RUSTSEC-2021-0124", # see https://github.com/GothenburgBitFactory/taskwarrior/issues/2830 4 | "RUSTSEC-2020-0159", # segfault in localtime_r - low risk to TC 5 | "RUSTSEC-2020-0071", # same localtime_r bug as above 6 | ] 7 | -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | Language: Cpp 3 | BasedOnStyle: Google 4 | ColumnLimit: 100 5 | ... 6 | -------------------------------------------------------------------------------- /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/devcontainers/cpp:1-ubuntu-22.04 2 | 3 | ARG REINSTALL_CMAKE_VERSION_FROM_SOURCE="3.22.2" 4 | 5 | # Optionally install the cmake for vcpkg 6 | COPY ./reinstall-cmake.sh /tmp/ 7 | 8 | RUN if [ "${REINSTALL_CMAKE_VERSION_FROM_SOURCE}" != "none" ]; then \ 9 | chmod +x /tmp/reinstall-cmake.sh && /tmp/reinstall-cmake.sh ${REINSTALL_CMAKE_VERSION_FROM_SOURCE}; \ 10 | fi \ 11 | && rm -f /tmp/reinstall-cmake.sh 12 | 13 | RUN sudo apt-get update && sudo apt-get install uuid-dev faketime 14 | 15 | # [Optional] Uncomment this section to install additional vcpkg ports. 16 | # RUN su vscode -c "${VCPKG_ROOT}/vcpkg install " 17 | 18 | # [Optional] Uncomment this section to install additional packages. 19 | # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ 20 | # && apt-get -y install --no-install-recommends 21 | -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the 2 | // README at: https://github.com/devcontainers/templates/tree/main/src/cpp 3 | { 4 | "name": "Taskwarrior development environment", 5 | "build": { 6 | "dockerfile": "Dockerfile" 7 | }, 8 | // Features to add to the dev container. More info: https://containers.dev/features. 9 | "features": { 10 | "ghcr.io/devcontainers/features/rust:1": {} 11 | } 12 | 13 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 14 | // "forwardPorts": [], 15 | 16 | // Use 'postCreateCommand' to run commands after the container is created. 17 | // "postCreateCommand": "gcc -v", 18 | 19 | // Configure tool-specific properties. 20 | // "customizations": {}, 21 | 22 | // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. 23 | // "remoteUser": "root" 24 | } 25 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | target 2 | -------------------------------------------------------------------------------- /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # initial bulk run of formatting with pre-commit 2 | 93356b39c3086fdf8dd41d7357bb1c115ff69cb1 3 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Please see the ["Contributing to Taskwarrior"](https://github.com/GothenburgBitFactory/taskwarrior/tree/develop/doc/devel/contrib) section of the developer documentation. 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: GothenburgBitFactory 2 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | # Enable version updates for GitHub actions 4 | - package-ecosystem: "github-actions" 5 | directory: "/" 6 | schedule: 7 | interval: "weekly" 8 | # Enable version updates for git submodules 9 | - package-ecosystem: "gitsubmodule" 10 | directory: "/" 11 | schedule: 12 | interval: "daily" 13 | # Enable updates for Rust packages 14 | - package-ecosystem: "cargo" 15 | directory: "/" # Location of package manifests 16 | schedule: 17 | interval: "daily" 18 | ignore: 19 | # skip patch updates, as they can be quite noisy, but keep 20 | # minor and major updates so that we don't fall too far 21 | # behind 22 | - dependency-name: "*" 23 | update-types: ["version-update:semver-patch"] 24 | -------------------------------------------------------------------------------- /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | #### To report a bug... 2 | 3 | * What command(s) did you run? 4 | * What did you expect to happen? 5 | * What actually happened? 6 | * Paste the output of the ```task diag``` command. 7 | 8 | #### To request a feature... 9 | 10 | * Clearly describe the feature. 11 | * Clearly state the use case. We are only interested in use cases, do not waste time with implementation details or suggested syntax. 12 | * Please see our notes on [How to request a feature](https://taskwarrior.org/docs/features/) 13 | -------------------------------------------------------------------------------- /.github/workflows/docker-image.yaml: -------------------------------------------------------------------------------- 1 | name: Taskwarrior Docker image 2 | 3 | on: 4 | workflow_dispatch: 5 | workflow_run: 6 | workflows: [tests] 7 | branches: 8 | - develop 9 | - stable 10 | types: 11 | - completed 12 | 13 | env: 14 | REGISTRY: "ghcr.io" 15 | 16 | jobs: 17 | build-and-push-docker-image: 18 | runs-on: ubuntu-latest 19 | if: ${{ github.event.workflow_run.conclusion == 'success' }} 20 | permissions: 21 | contents: read 22 | packages: write 23 | id-token: write 24 | 25 | steps: 26 | - name: Create lowercase repository name 27 | run: | 28 | GHCR_REPOSITORY="${{ github.repository_owner }}" 29 | echo "REPOSITORY=${GHCR_REPOSITORY,,}" >> ${GITHUB_ENV} 30 | - name: Checkout repository 31 | uses: actions/checkout@v4 32 | with: 33 | submodules: "recursive" 34 | 35 | - name: Install cosign 36 | uses: sigstore/cosign-installer@v3.8.2 37 | 38 | - name: Log into registry ${{ env.REGISTRY }} 39 | uses: docker/login-action@v3.4.0 40 | with: 41 | registry: ${{ env.REGISTRY }} 42 | username: ${{ github.repository_owner }} 43 | password: ${{ secrets.GITHUB_TOKEN }} 44 | 45 | - name: Build and push Taskwarrior Docker image 46 | id: build-and-push 47 | uses: docker/build-push-action@v6.18.0 48 | with: 49 | context: . 50 | file: "./docker/task.dockerfile" 51 | push: true 52 | tags: ${{ env.REGISTRY }}/${{ env.REPOSITORY }}/task:${{ github.ref_name }} 53 | 54 | - name: Sign the published Docker image 55 | env: 56 | COSIGN_EXPERIMENTAL: "true" 57 | run: cosign sign ${{ env.REGISTRY }}/${{ env.REPOSITORY }}/task@${{ steps.build-and-push.outputs.digest }} 58 | -------------------------------------------------------------------------------- /.github/workflows/metadata-check.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Check the 'cargo metadata' for various requirements 4 | 5 | set -e 6 | 7 | META=$(mktemp) 8 | trap 'rm -rf -- "${META}"' EXIT 9 | 10 | cargo metadata --locked --format-version 1 > "${META}" 11 | 12 | get_msrv() { 13 | local package="${1}" 14 | jq -r '.packages[] | select(.name == "'"${package}"'") | .rust_version' "${META}" 15 | } 16 | 17 | check_msrv() { 18 | local taskchampion_msrv=$(get_msrv taskchampion) 19 | local taskchampion_lib_msrv=$(get_msrv taskchampion-lib) 20 | 21 | echo "Found taskchampion MSRV ${taskchampion_msrv}" 22 | echo "Found taskchampion-lib MSRV ${taskchampion_lib_msrv}" 23 | 24 | if [ "${taskchampion_msrv}" != "${taskchampion_lib_msrv}" ]; then 25 | echo "Those MSRVs should be the same (or taskchampion-lib should be greater, in which case adjust this script)" 26 | exit 1 27 | else 28 | echo "✓ MSRVs are at the same version." 29 | fi 30 | } 31 | 32 | check_msrv 33 | -------------------------------------------------------------------------------- /.github/workflows/release-check.yaml: -------------------------------------------------------------------------------- 1 | name: release-tests 2 | on: [push, pull_request] 3 | jobs: 4 | check-tarball: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/checkout@v4 8 | 9 | - uses: dtolnay/rust-toolchain@stable 10 | id: toolchain 11 | 12 | - name: Cache cargo registry 13 | uses: actions/cache@v4 14 | with: 15 | path: ~/.cargo/registry 16 | key: ${{ runner.os }}-cargo-registry-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }} 17 | 18 | - name: Install uuid-dev 19 | run: sudo apt install uuid-dev 20 | 21 | - name: make a release tarball and build from it 22 | run: | 23 | cmake -S. -Bbuild && 24 | make -Cbuild package_source && 25 | tar -xf build/task-*.tar.gz && 26 | cd task-*.*.* && 27 | cmake -S. -Bbuild && 28 | cmake --build build --target task_executable 29 | -------------------------------------------------------------------------------- /.github/workflows/security.yml: -------------------------------------------------------------------------------- 1 | name: security 2 | 3 | on: 4 | schedule: 5 | - cron: '0 0 * * *' 6 | push: 7 | paths: 8 | - '**/Cargo.toml' 9 | - '**/Cargo.lock' 10 | 11 | jobs: 12 | audit: 13 | runs-on: ubuntu-latest 14 | permissions: write-all 15 | name: "Audit Rust Dependencies" 16 | steps: 17 | - uses: actions/checkout@v4 18 | - uses: rustsec/audit-check@master 19 | with: 20 | token: ${{ secrets.GITHUB_TOKEN }} 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | cmake.h 2 | commit.h 3 | .cache 4 | *~ 5 | .*.swp 6 | Session.vim 7 | package-config/osx/binary/task 8 | /*build*/ 9 | patches 10 | tutorials 11 | .prove 12 | /target/ 13 | /.idea/ 14 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "src/libshared"] 2 | path = src/libshared 3 | url = https://github.com/GothenburgBitFactory/libshared.git 4 | [submodule "src/taskchampion-cpp/corrosion"] 5 | path = src/taskchampion-cpp/corrosion 6 | url = https://github.com/corrosion-rs/corrosion.git 7 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # See https://pre-commit.com for more information 2 | # See https://pre-commit.com/hooks.html for more hooks 3 | repos: 4 | - repo: https://github.com/pre-commit/pre-commit-hooks 5 | rev: v5.0.0 6 | hooks: 7 | - id: trailing-whitespace 8 | - id: end-of-file-fixer 9 | - id: check-yaml 10 | - id: check-added-large-files 11 | - repo: https://github.com/pre-commit/mirrors-clang-format 12 | rev: v20.1.4 13 | hooks: 14 | - id: clang-format 15 | types_or: [c++, c] 16 | - repo: https://github.com/psf/black 17 | rev: 25.1.0 18 | hooks: 19 | - id: black 20 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | doc/devel/contrib/development.md -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | Taskwarrior - a command line task list manager. 2 | 3 | Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included 13 | in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | https://www.opensource.org/licenses/mit-license.php 24 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | 3 | members = [ 4 | "src/taskchampion-cpp", 5 | ] 6 | 7 | resolver = "2" 8 | -------------------------------------------------------------------------------- /DEVELOPER.md: -------------------------------------------------------------------------------- 1 | See [Developing Taskwarrior](./doc/devel/contrib/README.md). 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | https://www.opensource.org/licenses/mit-license.php 4 | 5 | Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included 15 | in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 18 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 20 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | -------------------------------------------------------------------------------- /RELEASING.md: -------------------------------------------------------------------------------- 1 | doc/devel/contrib/releasing.md -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security 2 | 3 | To report a vulnerability, please contact Dustin via signal, [`djmitche.78`](https://signal.me/#eu/2T98jpkMAzvFL2wg3OkZnNrfhk1DFfu6eqkMEPqcAuCsLZPVk39A67rp4khmrMNF). 4 | Initial response is expected within ~48h. 5 | 6 | We kindly ask to follow the responsible disclosure model and refrain from sharing information until: 7 | 8 | 1. Vulnerabilities are patched in Taskwarrior + 60 days to coordinate with distributions. 9 | 2. 90 days since the vulnerability is disclosed to us. 10 | 11 | We recognise the legitimacy of public interest and accept that security researchers can publish information after 90-days deadline unilaterally. 12 | 13 | We will assist with obtaining CVE and acknowledge the vulnerabilities reported. 14 | -------------------------------------------------------------------------------- /cmake.h.in: -------------------------------------------------------------------------------- 1 | /* cmake.h.in. Creates cmake.h during a cmake run */ 2 | 3 | /* Product identification */ 4 | #define PRODUCT_TASKWARRIOR 1 5 | 6 | /* Package information */ 7 | #define PACKAGE "${PACKAGE}" 8 | #define VERSION "${VERSION}" 9 | #define PACKAGE_BUGREPORT "${PACKAGE_BUGREPORT}" 10 | #define PACKAGE_NAME "${PACKAGE_NAME}" 11 | #define PACKAGE_TARNAME "${PACKAGE_TARNAME}" 12 | #define PACKAGE_VERSION "${PACKAGE_VERSION}" 13 | #define PACKAGE_STRING "${PACKAGE_STRING}" 14 | 15 | #define CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" 16 | 17 | /* Installation details */ 18 | #define TASK_RCDIR "${CMAKE_INSTALL_PREFIX}/${TASK_RCDIR}" 19 | 20 | /* git information */ 21 | #cmakedefine HAVE_COMMIT 22 | 23 | /* cmake information */ 24 | #cmakedefine HAVE_CMAKE 25 | #define CMAKE_VERSION "${CMAKE_VERSION}" 26 | 27 | /* Compiling platform */ 28 | #cmakedefine LINUX 29 | #cmakedefine DARWIN 30 | #cmakedefine CYGWIN 31 | #cmakedefine FREEBSD 32 | #cmakedefine OPENBSD 33 | #cmakedefine NETBSD 34 | #cmakedefine DRAGONFLY 35 | #cmakedefine HAIKU 36 | #cmakedefine SOLARIS 37 | #cmakedefine KFREEBSD 38 | #cmakedefine GNUHURD 39 | #cmakedefine UNKNOWN 40 | 41 | /* Found tm_gmtoff */ 42 | #cmakedefine HAVE_TM_GMTOFF 43 | 44 | /* Found st.st_birthtime struct member */ 45 | #cmakedefine HAVE_ST_BIRTHTIME 46 | 47 | /* Found get_current_dir_name */ 48 | #cmakedefine HAVE_GET_CURRENT_DIR_NAME 49 | 50 | /* Found uuid_unparse_lower in the uuid library */ 51 | #cmakedefine HAVE_UUID_UNPARSE_LOWER 52 | 53 | /* Found wordexp.h */ 54 | #cmakedefine HAVE_WORDEXP 55 | 56 | /* Undefine this to eliminate the execute command */ 57 | #define HAVE_EXECUTE 1 58 | -------------------------------------------------------------------------------- /cmake/CXXSniffer.cmake: -------------------------------------------------------------------------------- 1 | message ("-- Configuring C++17") 2 | message ("-- System: ${CMAKE_SYSTEM_NAME}") 3 | 4 | include (CheckCXXCompilerFlag) 5 | 6 | CHECK_CXX_COMPILER_FLAG("-std=c++17" _HAS_CXX17) 7 | 8 | if (_HAS_CXX17) 9 | set (CMAKE_CXX_STANDARD 17) 10 | set (CMAKE_CXX_EXTENSIONS OFF) 11 | else (_HAS_CXX17) 12 | message (FATAL_ERROR "C++17 support missing. Try upgrading your C++ compiler. If you have a good reason for using an outdated compiler, please let us know at support@gothenburgbitfactory.org.") 13 | endif (_HAS_CXX17) 14 | 15 | if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") 16 | set (LINUX true) 17 | elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") 18 | set (DARWIN true) 19 | set (_CXX14_FLAGS "${_CXX14_FLAGS} -stdlib=libc++") 20 | elseif (${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD") 21 | set (KFREEBSD true) 22 | elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") 23 | set (FREEBSD true) 24 | elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") 25 | set (OPENBSD true) 26 | elseif (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") 27 | set (NETBSD true) 28 | elseif (${CMAKE_SYSTEM_NAME} MATCHES "DragonFly") 29 | set (DRAGONFLY true) 30 | elseif (${CMAKE_SYSTEM_NAME} MATCHES "SunOS") 31 | set (SOLARIS true) 32 | elseif (${CMAKE_SYSTEM_NAME} STREQUAL "GNU") 33 | set (GNUHURD true) 34 | elseif (${CMAKE_SYSTEM_NAME} STREQUAL "CYGWIN") 35 | set (CYGWIN true) 36 | set (CMAKE_CXX_EXTENSIONS ON) 37 | else (${CMAKE_SYSTEM_NAME} MATCHES "Linux") 38 | set (UNKNOWN true) 39 | endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") 40 | 41 | set (CMAKE_CXX_FLAGS "${_CXX14_FLAGS} ${CMAKE_CXX_FLAGS}") 42 | set (CMAKE_CXX_FLAGS "-Wall -Wextra -Wsign-compare -Wreturn-type ${CMAKE_CXX_FLAGS}") 43 | -------------------------------------------------------------------------------- /commit.h.in: -------------------------------------------------------------------------------- 1 | /* commit.h.in. Creates commit.h during a cmake run */ 2 | 3 | /* git information */ 4 | #define COMMIT "${COMMIT}" 5 | -------------------------------------------------------------------------------- /doc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 3.22) 2 | message ("-- Configuring man pages") 3 | set (man_FILES task-color.5 task-sync.5 taskrc.5 task.1) 4 | foreach (man_FILE ${man_FILES}) 5 | configure_file ( 6 | man/${man_FILE}.in 7 | man/${man_FILE}) 8 | endforeach (man_FILE) 9 | 10 | install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man/ DESTINATION ${TASK_MAN1DIR} 11 | FILES_MATCHING PATTERN "*.1") 12 | install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man/ DESTINATION ${TASK_MAN5DIR} 13 | FILES_MATCHING PATTERN "*.5") 14 | install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/rc/ DESTINATION ${TASK_RCDIR}) 15 | 16 | install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/ref/task-ref.pdf DESTINATION ${TASK_DOCDIR}) 17 | -------------------------------------------------------------------------------- /doc/README.md: -------------------------------------------------------------------------------- 1 | # Documentation 2 | 3 | This directory contains Taskwarrior documentation that is built and installed along with the executable: 4 | 5 | * [`man`](man/) contains the source for the Taskwarrior manual pages. 6 | * [`rc`](rc/) contains rcfiles that will be installed in `/usr/share/doc/task/rc` or equivalent. 7 | * [`ref`](ref/) contains reference documentation that will be installed in `/usr/share/doc/task` or equivalent. 8 | 9 | It also contains [developer documentation](devel/README.md) with a high-level view of how Taskwarrior development is done and how the pieces of the system fit together. 10 | -------------------------------------------------------------------------------- /doc/devel/README.md: -------------------------------------------------------------------------------- 1 | # Development Documentation 2 | 3 | This directory contains the _development_ documentation for Taskwarrior. 4 | For all other documenation, see https://taskwarrior.org. 5 | 6 | * [Contributing To Taskwarrior](contrib/README.md) 7 | * [Taskwarrior RFCs](rfcs/README.md) 8 | 9 | ## Taskwarrior and TaskChampion 10 | 11 | As of the 3.0 release, Taskwarrior uses TaskChampion to manage task data. 12 | Find documentation of TaskChampion here: 13 | 14 | * [TaskChampion Repository](https://github.com/GothenburgBitFactory/taskchampion/) 15 | * [TaskChampion Book](https://gothenburgbitfactory.github.io/taskchampion/) 16 | * [TaskChampion API Documentation](https://docs.rs/taskchampion) 17 | -------------------------------------------------------------------------------- /doc/devel/contrib/README.md: -------------------------------------------------------------------------------- 1 | # Contributing To Taskwarrior 2 | 3 | * [Welcome, Open Source Contributor](first_time.md) 4 | * [Developing Taskwarrior](development.md) 5 | * [Coding Style](coding_style.md) 6 | * [Branching Model](branching.md) 7 | * [Rust and C++](rust-and-c++.md) 8 | * [Releasing Taskwarrior](releasing.md) 9 | -------------------------------------------------------------------------------- /doc/devel/contrib/branching.md: -------------------------------------------------------------------------------- 1 | Software development typically requires a standardized branching model, to manage complexity and parallel efforts. 2 | The branching model can be a source of confusion for developers, so this document describes how branching is used. 3 | 4 | We use the following branching model: 5 | 6 | * `develop` is the current development branch. All work is done here, and upon 7 | release it will be branched to a release branch. While `develop` is not 8 | stable, we utilize CI to ensure we're at least not merging improvements that 9 | break existing tests, and hence should be relatively safe. We still recommend 10 | making backups when using the development branch. 11 | 12 | * The most recent minor release is in a branch named after the release, e.g., `2.7.0`. 13 | This branch is used for bug-fixes of the latest release. 14 | -------------------------------------------------------------------------------- /doc/devel/contrib/coding_style.md: -------------------------------------------------------------------------------- 1 | # Coding Style 2 | 3 | The coding style used for the Taskwarrior is based on the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html), with small modifications in the line length. 4 | 5 | # Automatic formatting 6 | 7 | In order to have consistancy and automatic formatting [pre-commit](https://pre-commit.com) is used to apply [clang-format](https://clang.llvm.org/docs/ClangFormat.html) and [black](https://github.com/psf/black) are used. 8 | In order to set them up locally please run: 9 | ```python 10 | pip install pre-commit 11 | pre-commit install 12 | ``` 13 | 14 | For more information refer to the [quick-start of pre-commit](https://pre-commit.com/#quick-start). 15 | The setup is also included in the CI, hence if one can not install it automatically then the CI will take care for it in the PR. 16 | 17 | ## Rust 18 | 19 | Rust code should be formatted with `rustfmt` and generally follow Rust style guidelines. 20 | -------------------------------------------------------------------------------- /doc/devel/contrib/releasing.md: -------------------------------------------------------------------------------- 1 | # Releasing Taskwarrior 2 | 3 | To release Taskwarrior, follow this process: 4 | 5 | - Examine the changes since the last version, and update `src/commands/CmdNews.cpp` accordingly. 6 | There are instructions at the top of the file. 7 | - Create a release PR 8 | - Update version in CMakeLists.txt 9 | - Update Changelog 10 | - get this merged 11 | - On `develop` after that PR merges, create a release tarball: 12 | - `git clone . release-tarball` 13 | - `cd release-tarball/` 14 | - `cmake -S. -Bbuild` 15 | - `make -Cbuild package_source` 16 | - copy build/task-*.tar.gz elsewhere and delete the `release-tarball` dir 17 | - NOTE: older releases had a `test-*.tar.gz` but it's unclear how to generate this 18 | - Update `stable` to the released commit and push upstream 19 | - Tag the commit as vX.Y.Z and push the tag upstream 20 | - Find the tag under https://github.com/GothenburgBitFactory/taskwarrior/tags and create a release from it 21 | - Give it a clever title if you can think of one; refer to previous releases 22 | - Include the tarball from earlier 23 | - Update https://github.com/GothenburgBitFactory/tw.org 24 | - Add a new item in `content/news` 25 | - Update `data/projects.json` with the latest version and a fake next version for "devel" 26 | - Update `data/releases.json` with the new version, and copy the tarball into `content/download`. 27 | - Update various things, in a new PR: 28 | - `cargo update` 29 | - `git submodule update --remote --merge` 30 | -------------------------------------------------------------------------------- /doc/devel/contrib/rust-and-c++.md: -------------------------------------------------------------------------------- 1 | # Rust and C++ 2 | 3 | Taskwarrior has historically been a C++ project, but as of taskwarrior-3.0.0, the storage backend is now provided by a Rust library called TaskChampion. 4 | 5 | ## TaskChampion 6 | 7 | TaskChampion implements storage and access to "replicas" containing a user's tasks. 8 | It defines an abstract model for this data, and also provides a simple Rust API for manipulating replicas. 9 | It also defines a method of synchronizing replicas and provides an implementation of that method in the form of a sync server. 10 | 11 | Other applications, besides Taskwarrior, can use TaskChampion to manage tasks. 12 | Taskwarrior is just one application using the TaskChampion interface. 13 | 14 | ## Taskwarrior's use of TaskChampion 15 | 16 | Taskwarrior's interface to TaskChampion is in `src/taskchampion-cpp`. 17 | This links to `taskchampion` as a Rust dependency, and uses [cxx](https://cxx.rs) to build a C++ API for it. 18 | That API is defined, and documented, in `src/taskchampion-cpp/src/lib.rs`, and available in the `tc` namespace in C++ code. 19 | -------------------------------------------------------------------------------- /doc/devel/rfcs/README.md: -------------------------------------------------------------------------------- 1 | # Taskwarrior RFCS 2 | 3 | In the mid-2010's, Taskwarrior development was organized around RFCs, as a way to invite comment before designs were finalized. 4 | Although these documents were less formal than [IETF RFCs](https://www.ietf.org/rfc) they serve a similar purpose. 5 | In more recent years, use of RFCs has been discontinued, and the documents linked here should be considered historical. 6 | Many were never completely implemented. 7 | 8 | * [General Plans](plans.md) 9 | * [Rules System](rules.md) 10 | * [Full DOM Support ](dom.md) 11 | * [Work Week Support](workweek.md) 12 | * [Recurrence](recurrence.md) 13 | * [Taskwarrior JSON Format](task.md) 14 | * [CLI Updates ](cli.md) 15 | * [Taskserver Sync Protocol](protocol.md) 16 | * [Taskserver Message Format](request.md) 17 | * [Taskserver Sync Algorithm](sync.md) 18 | * [Taskserver Client](client.md) 19 | -------------------------------------------------------------------------------- /doc/devel/rfcs/workweek.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Taskwarrior - Work Week Support" 3 | --- 4 | 5 | ## Work in Progress 6 | 7 | This design document is a work in progress, and subject to change. 8 | Once finalized, the feature will be scheduled for an upcoming release. 9 | 10 | 11 | # Work Week Support 12 | 13 | Taskwarrior supports the idea that a week starts on either a Sunday or a Monday, as determined by configuration. 14 | This was added eight years ago, simply for display purposes in the `calendar` report. 15 | Since then its use has propagated and it influences the `sow` date reference.0 16 | 17 | Further requests have been made to make this more flexible, so that the notion of 'weekend' can be defined. 18 | Furthermore, the idea that every week has a weekend has also been questioned. 19 | 20 | It has become clear that a `weekstart` setting, and the notion of a weekend are no longer useful. 21 | 22 | ## Proposed Support 23 | 24 | One option is to allow the user to completely define a work week in the following way: 25 | 26 | workweek=1,2,3,4,5 27 | 28 | With Sunday as day zero, this states that the work week is the typical Monday - Friday. 29 | From this setting, the meaning of `soww` and `eoww` can be determined, as well as `recur:weekday`. 30 | -------------------------------------------------------------------------------- /doc/devel/rfcs/year.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GothenburgBitFactory/taskwarrior/440d3f8c92d9ae99d5627e88b71f793bbd1a7bca/doc/devel/rfcs/year.png -------------------------------------------------------------------------------- /doc/rc/holidays.por-PRT.rc: -------------------------------------------------------------------------------- 1 | holidays.pt-PT.rc -------------------------------------------------------------------------------- /doc/rc/refresh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | for i in holidays*rc 4 | do 5 | locale=${i:9:5} 6 | echo $locale 7 | ../../scripts/add-ons/update-holidays.pl --locale $locale --file holidays.${locale}.rc 8 | done 9 | -------------------------------------------------------------------------------- /doc/ref/task-ref.pages: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GothenburgBitFactory/taskwarrior/440d3f8c92d9ae99d5627e88b71f793bbd1a7bca/doc/ref/task-ref.pages -------------------------------------------------------------------------------- /doc/ref/task-ref.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GothenburgBitFactory/taskwarrior/440d3f8c92d9ae99d5627e88b71f793bbd1a7bca/doc/ref/task-ref.pdf -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | test-fedora40: 4 | build: 5 | context: . 6 | dockerfile: test/docker/fedora40 7 | network_mode: "host" 8 | security_opt: 9 | - label=type:container_runtime_t 10 | tty: true 11 | test-fedora41: 12 | build: 13 | context: . 14 | dockerfile: test/docker/fedora41 15 | network_mode: "host" 16 | security_opt: 17 | - label=type:container_runtime_t 18 | tty: true 19 | test-ubuntu2004: 20 | build: 21 | context: . 22 | dockerfile: test/docker/ubuntu2004 23 | network_mode: "host" 24 | security_opt: 25 | - label=type:container_runtime_t 26 | tty: true 27 | test-ubuntu2204: 28 | build: 29 | context: . 30 | dockerfile: test/docker/ubuntu2204 31 | network_mode: "host" 32 | security_opt: 33 | - label=type:container_runtime_t 34 | tty: true 35 | test-debiantesting: 36 | build: 37 | context: . 38 | dockerfile: test/docker/debiantesting 39 | network_mode: "host" 40 | security_opt: 41 | - label=type:container_runtime_t 42 | tty: true 43 | test-opensuse: 44 | build: 45 | context: . 46 | dockerfile: test/docker/opensuse 47 | network_mode: "host" 48 | security_opt: 49 | - label=type:container_runtime_t 50 | tty: true 51 | test-arch: 52 | build: 53 | context: . 54 | dockerfile: test/docker/arch 55 | network_mode: "host" 56 | security_opt: 57 | - label=type:container_runtime_t 58 | tty: true 59 | -------------------------------------------------------------------------------- /docker/task.dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:22.04 AS base 2 | 3 | FROM base AS builder 4 | 5 | ENV DEBIAN_FRONTEND noninteractive 6 | 7 | RUN apt-get update && \ 8 | apt-get install -y \ 9 | build-essential \ 10 | cmake \ 11 | curl \ 12 | git \ 13 | libgnutls28-dev \ 14 | uuid-dev 15 | 16 | # Setup language environment 17 | ENV LC_ALL en_US.UTF-8 18 | ENV LANG en_US.UTF-8 19 | ENV LANGUAGE en_US.UTF-8 20 | 21 | # Add source directory 22 | ADD .. /root/code/ 23 | WORKDIR /root/code/ 24 | 25 | # Setup Rust 26 | RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ 27 | sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs 28 | 29 | # Build Taskwarrior 30 | RUN git clean -dfx && \ 31 | git submodule init && \ 32 | git submodule update && \ 33 | cmake -S . -B build -DCMAKE_BUILD_TYPE=Release . && \ 34 | cmake --build build -j 8 35 | 36 | FROM base AS runner 37 | 38 | # Install Taskwarrior 39 | COPY --from=builder /root/code/build/src/task /usr/local/bin 40 | 41 | # Initialize Taskwarrior 42 | RUN ( echo "yes" | task ) || true 43 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | Taskwarrior Docs 2 | -------------------------------------------------------------------------------- /misc/README.md: -------------------------------------------------------------------------------- 1 | # misc/ 2 | 3 | This directory contains bits and bobs that do not belong elsewhere. 4 | -------------------------------------------------------------------------------- /misc/themes/README: -------------------------------------------------------------------------------- 1 | Themes 2 | 3 | These scripts are a way to generate a little sample data, and show the color 4 | themes. It is not intended for general use. 5 | 6 | To generate samples of themes, first execute the 'setup' script to generate the 7 | sample data. Note that this data may need to be tweaked to include qualities 8 | that need to be illustrated in theme sample. 9 | 10 | Using a dark-background terminal (black recommended), run the following: 11 | 12 | run.dark 13 | 14 | Using a light-background terminal, run the following: 15 | 16 | run.light 17 | 18 | Using a solarized dark terminal, run the following: 19 | 20 | run.solar.dark 21 | 22 | Using a solarized light terminal, run the following: 23 | 24 | run.solar.light 25 | 26 | Note that for the solarized themes, the terminal color palette needs to be set 27 | to specific colors. 28 | -------------------------------------------------------------------------------- /misc/themes/run.dark: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for theme in $PWD/../../rc/dark-16.theme \ 4 | $PWD/../../rc/dark-256.theme \ 5 | $PWD/../../rc/dark-blue-256.theme \ 6 | $PWD/../../rc/dark-gray-256.theme \ 7 | $PWD/../../rc/dark-gray-blue-256.theme \ 8 | $PWD/../../rc/dark-green-256.theme \ 9 | $PWD/../../rc/dark-red-256.theme \ 10 | $PWD/../../rc/dark-violets-256.theme \ 11 | $PWD/../../rc/dark-yellow-green.theme 12 | do 13 | cat <x 14 | data.location=. 15 | confirmation=off 16 | detection=off 17 | _forcecolor=on 18 | default.height=24 19 | verbose=off 20 | include $theme 21 | EOF 22 | 23 | echo "--- $theme -----------------------------------------------------" 24 | echo '$ task color legend' 25 | task rc:x color legend 26 | echo '$ task list' 27 | task rc:x list 28 | echo '$ task summary' 29 | task rc:x summary 30 | echo '$ task ghistory' 31 | task rc:x ghistory 32 | echo '$ task calendar' 33 | task rc:x calendar 34 | echo '$ task burndown.daily' 35 | task rc:x burndown.daily 36 | done 37 | -------------------------------------------------------------------------------- /misc/themes/run.default: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cat <x 4 | data.location=. 5 | confirmation=off 6 | detection=off 7 | _forcecolor=on 8 | default.height=24 9 | verbose=off 10 | EOF 11 | 12 | echo "--- DEFAULT -----------------------------------------------------" 13 | echo '$ task color legend' 14 | task rc:x color legend 15 | echo '$ task list' 16 | task rc:x list 17 | echo '$ task summary' 18 | task rc:x summary 19 | echo '$ task ghistory' 20 | task rc:x ghistory 21 | echo '$ task calendar' 22 | task rc:x calendar 23 | echo '$ task burndown.daily' 24 | task rc:x burndown.daily 25 | -------------------------------------------------------------------------------- /misc/themes/run.light: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for theme in $PWD/../../rc/light-16.theme \ 4 | $PWD/../../rc/light-256.theme 5 | do 6 | cat <x 7 | data.location=. 8 | confirmation=off 9 | detection=off 10 | _forcecolor=on 11 | default.height=24 12 | verbose=off 13 | include $theme 14 | EOF 15 | 16 | echo "--- $theme -----------------------------------------------------" 17 | echo '$ task color legend' 18 | task rc:x color legend 19 | echo '$ task list' 20 | task rc:x list 21 | echo '$ task summary' 22 | task rc:x summary 23 | echo '$ task ghistory' 24 | task rc:x ghistory 25 | echo '$ task calendar' 26 | task rc:x calendar 27 | echo '$ task burndown.daily' 28 | task rc:x burndown.daily 29 | done 30 | -------------------------------------------------------------------------------- /misc/themes/run.solar.dark: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for theme in $PWD/../../rc/solarized-dark-256.theme 4 | do 5 | cat <x 6 | data.location=. 7 | confirmation=off 8 | detection=off 9 | _forcecolor=on 10 | default.height=24 11 | verbose=off 12 | include $theme 13 | EOF 14 | 15 | echo "--- $theme -----------------------------------------------------" 16 | echo '$ task color legend' 17 | task rc:x color legend 18 | echo '$ task list' 19 | task rc:x list 20 | echo '$ task summary' 21 | task rc:x summary 22 | echo '$ task ghistory' 23 | task rc:x ghistory 24 | echo '$ task calendar' 25 | task rc:x calendar 26 | echo '$ task burndown.daily' 27 | task rc:x burndown.daily 28 | done 29 | -------------------------------------------------------------------------------- /misc/themes/run.solar.light: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for theme in $PWD/../../rc/solarized-light-256.theme 4 | do 5 | cat <x 6 | data.location=. 7 | confirmation=off 8 | detection=off 9 | _forcecolor=on 10 | default.height=24 11 | verbose=off 12 | include $theme 13 | EOF 14 | 15 | echo "--- $theme -----------------------------------------------------" 16 | echo '$ task color legend' 17 | task rc:x color legend 18 | echo '$ task list' 19 | task rc:x list 20 | echo '$ task summary' 21 | task rc:x summary 22 | echo '$ task ghistory' 23 | task rc:x ghistory 24 | echo '$ task calendar' 25 | task rc:x calendar 26 | echo '$ task burndown.daily' 27 | task rc:x burndown.daily 28 | done 29 | -------------------------------------------------------------------------------- /misc/themes/setup: -------------------------------------------------------------------------------- 1 | rm pending.data completed.data undo.data x 2 | 3 | cat <>x 4 | 5 | data.location=. 6 | confirmation=off 7 | _forcecolor=on 8 | EOF 9 | 10 | task rc:x add Ordinary task 11 | task rc:x add Started task 12 | task rc:x 2 start 13 | task rc:x add High priority task pri:H 14 | task rc:x add Medium priority task pri:M 15 | task rc:x add Low priority task pri:L 16 | task rc:x add Household task project:Home 17 | task rc:x add Outdoor task project:Garden 18 | task rc:x add Overdue task due:yesterday 19 | task rc:x add Due task due:tomorrow 20 | task rc:x add Not yet due tasks due:eom 21 | task rc:x add Recurring task due:eom recur:monthly 22 | task rc:x add Tagged task +tag1 23 | task rc:x add Blocking task 24 | task rc:x add Dependent task 25 | 26 | task rc:x log Completed_1 project:Garden 27 | task rc:x log Completed_2 project:Garden 28 | task rc:x log Completed_3 project:Home 29 | task rc:x add Deleted_1 30 | 31 | task rc:x 14 mod depends:13 32 | task rc:x 15 delete 33 | -------------------------------------------------------------------------------- /performance/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 3.22) 2 | 3 | configure_file(compare_runs.py compare_runs.py COPYONLY) 4 | configure_file(load load) 5 | configure_file(run_perf run_perf) 6 | 7 | add_custom_target (performance ${CMAKE_BINARY_DIR}/performance/run_perf 8 | DEPENDS task_executable 9 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/performance) 10 | -------------------------------------------------------------------------------- /performance/load: -------------------------------------------------------------------------------- 1 | #! /usr/bin/perl 2 | 3 | use strict; 4 | use warnings; 5 | 6 | if (open my $fh, '>', 'perf.rc') 7 | { 8 | print $fh "data.location=.\n", 9 | "color=on\n", 10 | "_forcecolor=on\n", 11 | "verbose=label\n", 12 | "hooks=off\n", 13 | "color.debug=\n"; 14 | close $fh; 15 | } 16 | 17 | my $filename = '${CMAKE_SOURCE_DIR}/performance/sample-text.txt'; 18 | open(my $fh, '<:encoding(UTF-8)', $filename) 19 | or die "Could not open file '$filename' $!"; 20 | 21 | # Read all the data. 22 | my $id = 1; 23 | while (my $line = <$fh>) 24 | { 25 | if ($. % 20 != 19) 26 | { 27 | # Names are both projects and tags. 28 | $line =~ s/([A-Z]{2,})/$1 project:$1 +$1/g; 29 | } 30 | 31 | if ($. % 20 == 19) 32 | { 33 | my $anno_id = $id - 1; 34 | qx{${CMAKE_BINARY_DIR}/src/task rc:perf.rc rc.gc=off $anno_id annotate $line}; 35 | print "[$.] task rc:perf.rc rc.gc=off $anno_id annotate $line\n" if $?; 36 | } 37 | elsif ($. % 4 == 1) 38 | { 39 | qx{${CMAKE_BINARY_DIR}/src/task rc:perf.rc rc.gc=off add $line}; 40 | print "[$.] task rc:perf.rc rc.gc=off add $line\n" if $?; 41 | ++$id; 42 | } 43 | else 44 | { 45 | qx{${CMAKE_BINARY_DIR}/src/task rc:perf.rc rc.gc=off log $line}; 46 | print "[$.] task rc:perf.rc rc.gc=off log $line\n" if $?; 47 | } 48 | } 49 | 50 | exit 0; 51 | -------------------------------------------------------------------------------- /performance/run_perf: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | echo 'Performance: setup' 4 | rm -f ./taskchampion.sqlite3 5 | if [[ -e ./data/taskchampion.sqlite3 ]] 6 | then 7 | echo ' - Using existing data.' 8 | cp data/* . 9 | else 10 | echo ' - Loading data. This step will take several minutes.' 11 | ./load 12 | mkdir -p data 13 | cp taskchampion.sqlite3 perf.rc data 14 | fi 15 | 16 | # Allow override. 17 | if [[ -z $TASK ]] 18 | then 19 | TASK=${CMAKE_BINARY_DIR}/src/task 20 | fi 21 | 22 | # Run benchmarks. 23 | # Note that commands are run twice - warm cache testing. 24 | 25 | echo 'Performance: benchmarks' 26 | 27 | echo ' - task next...' 28 | $TASK rc.debug:1 rc:perf.rc next >/dev/null 2>&1 29 | $TASK rc.debug:1 rc:perf.rc next 2>&1 | grep "Perf task" 30 | 31 | echo ' - task list...' 32 | $TASK rc.debug:1 rc:perf.rc list >/dev/null 2>&1 33 | $TASK rc.debug:1 rc:perf.rc list 2>&1 | grep "Perf task" 34 | 35 | echo ' - task all...' 36 | $TASK rc.debug:1 rc:perf.rc all >/dev/null 2>&1 37 | $TASK rc.debug:1 rc:perf.rc all 2>&1 | grep "Perf task" 38 | 39 | echo ' - task add...' 40 | $TASK rc.debug:1 rc:perf.rc add >/dev/null 2>&1 41 | $TASK rc.debug:1 rc:perf.rc add This is a task with an average sized description length project:P priority:H +tag1 +tag2 2>&1 | grep "Perf task" 42 | 43 | echo ' - task export...' 44 | $TASK rc.debug:1 rc:perf.rc export >/dev/null 2>&1 45 | $TASK rc.debug:1 rc:perf.rc export 2>&1 >export.json | grep "Perf task" 46 | 47 | echo ' - task import...' 48 | rm -f ./taskchampion.sqlite3 49 | $TASK rc.debug:1 rc:perf.rc import ${CMAKE_SOURCE_DIR}/performance/export.json 2>&1 | grep "Perf task" 50 | 51 | echo 'End' 52 | exit 0 53 | -------------------------------------------------------------------------------- /scripts/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 3.22) 2 | install (DIRECTORY bash fish vim hooks 3 | DESTINATION ${TASK_DOCDIR}/scripts) 4 | install (FILES zsh/_task 5 | DESTINATION share/zsh/site-functions) 6 | install (DIRECTORY add-ons 7 | DESTINATION ${TASK_DOCDIR}/scripts 8 | FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE 9 | GROUP_READ GROUP_EXECUTE 10 | WORLD_READ WORLD_EXECUTE) 11 | -------------------------------------------------------------------------------- /scripts/add-ons/README: -------------------------------------------------------------------------------- 1 | The import/export add-on scripts have been relocated online. Please see: 2 | 3 | https://taskwarrior.org/tools 4 | -------------------------------------------------------------------------------- /scripts/hooks/README: -------------------------------------------------------------------------------- 1 | Example Hook Scripts 2 | 3 | Hooks are supported in Taskwarrior 2.4.0 and later. Hooks require no 4 | configuration, and simply need to exist, in the expected location, with the 5 | expected name, with execute permission. If these conditions are met, the hook 6 | scripts will be run. 7 | 8 | Expected Location 9 | The hooks scripts all reside in one location, which is in a 'hooks' 10 | subdirectory, in your ~/.task (or rc.data.location override) directory. 11 | You can use the command `task diagnostics` to verify hooks location. 12 | 13 | Expected Name 14 | A hook scripts must be named according to which event triggers the script. A 15 | script named 'on-add' will be triggered by a task add event. Multiple hook 16 | scripts can coexist, and will all be run, in collating sequence. If there are 17 | two scripts, named 'on-add-check-for-missing-priority' and 'on-add.x', they 18 | are both executed, in the order shown here. 19 | 20 | Expected Permissions 21 | A hook script must have execute permission for the user running taskwarrior, 22 | otherwise it is skipped. 23 | 24 | Interface 25 | Each hook script has a unique interface. This is documented in the example 26 | scripts here. 27 | -------------------------------------------------------------------------------- /scripts/hooks/on-add: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-add event is triggered separately for each task added. This hook 4 | # script can accept/reject the addition. Processing will continue. 5 | 6 | # Input: 7 | # - Line of JSON for proposed new task. 8 | read new_task 9 | 10 | # Output: 11 | # - JSON, modified or unmodified. 12 | # - Optional feedback/error. 13 | echo $new_task 14 | echo 'on-add' 15 | 16 | # Status: 17 | # - 0: JSON accepted, non-JSON is feedback. 18 | # - non-0: JSON ignored, non-JSON is error. 19 | exit 0 20 | -------------------------------------------------------------------------------- /scripts/hooks/on-add.the: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | read new_task 4 | 5 | if (echo $new_task | grep -qE '[tT]eh'); 6 | then 7 | new_task=$(echo $new_task | sed -r 's/([tT])eh/\1he/g') 8 | echo "Auto-corrected 'teh' --> 'the'" 9 | fi 10 | 11 | echo $new_task 12 | exit 0 13 | -------------------------------------------------------------------------------- /scripts/hooks/on-exit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-exit event is triggered once, after all processing is complete. 4 | # This hook script has no effect on processing. 5 | 6 | # Input: 7 | # - line of JSON for each modified task 8 | 9 | # Output: 10 | # - Optional feedback/error. 11 | 12 | n=0 13 | while read modified_task 14 | do 15 | n=$(($n + 1)) 16 | done 17 | 18 | echo "on-exit: Counted $n added/modified tasks." 19 | 20 | # Status: 21 | # - 0: Non-JSON is feedback. 22 | # - non-0: Non-JSON is error. 23 | exit 0 24 | -------------------------------------------------------------------------------- /scripts/hooks/on-exit.shadow-file: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This hook script replaces the shadow file feature, found in Taskwarrior 4 | # prior to version 2.4.0. 5 | # 6 | # This script assumes that the legacy shadow file settings are still used. 7 | # Although those settings are now not recognized by Taskwarrior, іt is 8 | # harmless to store configuration settings for extensions in .taskrc. 9 | 10 | # The command to run, to generate the shadow file. If this is not available, 11 | # then the default.command is used. 12 | SHADOW_COMMAND=$(task _get rc.shadow.command) 13 | if [[ -z "$SHADOW_COMMAND" ]] 14 | then 15 | SHADOW_COMMAND=$(task _get rc.default.command) 16 | fi 17 | 18 | # The file to overwrite. 19 | SHADOW_FILE=$(task _get rc.shadow.file) 20 | 21 | # Run the command, inserting a series of override settings: 22 | # rc.detection=off Disables terminal size detection 23 | # rc.gc=off Disables GC, thus not changing IDs unexpectedly 24 | # rc.color=off Disable color in the shadow file 25 | # rc.hooks=off Disable hooks, to prevent race condition 26 | task $SHADOW_COMMAND rc.detection=off rc.gc=off rc.color=off rc.hooks=off > $SHADOW_FILE 2>/dev/null 27 | if [[ $? != 0 ]] 28 | then 29 | echo Could not create $SHADOW_FILE 30 | exit 1 31 | fi 32 | 33 | echo Shadow file $SHADOW_FILE updated. 34 | exit 0 35 | -------------------------------------------------------------------------------- /scripts/hooks/on-launch: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-launch event is triggered once, after initialization, before any 4 | # processing occurs. This hooks script has no effect on processing. 5 | 6 | # Input: 7 | # - None 8 | 9 | # Output: 10 | # - Optional feedback/error. 11 | echo 'on-launch' 12 | 13 | # Status: 14 | # - 0: JSON ignored, non-JSON is feedback. 15 | # - non-0: JSON ignored, non-JSON is error. 16 | exit 0 17 | -------------------------------------------------------------------------------- /scripts/hooks/on-modify: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-modify event is triggered separately for each task modified. This hook 4 | # script can accept/reject the modification. Processing will continue. 5 | 6 | # Input: 7 | # - line of JSON for the original task 8 | # - line of JSON for the modified task, the diff being the modification 9 | read original_task 10 | read modified_task 11 | 12 | # Output: 13 | # - JSON, modified or unmodified. 14 | # - Optional feedback/error. 15 | echo $modified_task 16 | echo 'on-modify' 17 | 18 | # Status: 19 | # - 0: JSON accepted, non-JSON is feedback. 20 | # - non-0: JSON ignored, non-JSON is error. 21 | exit 0 22 | -------------------------------------------------------------------------------- /scripts/vim/ftdetect/task.vim: -------------------------------------------------------------------------------- 1 | " Vim support file to detect Taskwarrior data and configuration files and 2 | " single task edits 3 | " 4 | " Maintainer: John Florian 5 | " Updated: Thu Dec 10 18:28:26 EST 2009 6 | " 7 | " Copyright 2009 - 2021 John Florian 8 | " 9 | " This file is available under the MIT license. 10 | " For the full text of this license, see COPYING. 11 | 12 | 13 | " Taskwarrior data files 14 | au BufRead,BufNewFile {pending,completed,undo}.data set filetype=taskdata 15 | au BufRead,BufNewFile backlog.data set filetype=javascript 16 | 17 | " Taskwarrior configuration file 18 | au BufRead,BufNewFile .taskrc set filetype=taskrc 19 | au BufRead,BufNewFile taskrc set filetype=taskrc 20 | 21 | " Taskwarrior handling of 'task 42 edit' 22 | au BufRead,BufNewFile *.task set filetype=taskedit 23 | 24 | " vim:noexpandtab 25 | -------------------------------------------------------------------------------- /scripts/vim/syntax/taskdata.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: taskwarrior data 3 | " Maintainer: John Florian 4 | " Updated: Wed Jul 8 19:46:20 EDT 2009 5 | " 6 | " Copyright 2009 - 2021 John Florian 7 | " 8 | " This file is available under the MIT license. 9 | " For the full text of this license, see COPYING. 10 | 11 | 12 | " For version 5.x: Clear all syntax items. 13 | " For version 6.x: Quit when a syntax file was already loaded. 14 | if version < 600 15 | syntax clear 16 | elseif exists("b:current_syntax") 17 | finish 18 | endif 19 | 20 | " Key Names for values. 21 | syn keyword taskdataKey description due end entry imask mask parent 22 | syn keyword taskdataKey priority project recur start status tags uuid 23 | syn keyword taskdataKey modified scheduled until wait 24 | syn match taskdataKey "annotation_\d\+" 25 | syn match taskdataUndo "^time.*$" 26 | syn match taskdataUndo "^\(old \|new \|---\)" 27 | 28 | " Values associated with key names. 29 | " 30 | " Strings 31 | syn region taskdataString matchgroup=Normal start=+"+ skip=+\\"+ end=+"+ 32 | \ contains=taskdataEncoded,taskdataUUID,@Spell 33 | " 34 | " Special Embedded Characters (e.g., ",") 35 | syn match taskdataEncoded "&\a\+;" contained 36 | " UUIDs 37 | syn match taskdataUUID "\x\{8}-\(\x\{4}-\)\{3}\x\{12}" contained 38 | 39 | 40 | " The default methods for highlighting. Can be overridden later. 41 | hi def link taskdataEncoded Function 42 | hi def link taskdataKey Statement 43 | hi def link taskdataString String 44 | hi def link taskdataUUID Special 45 | hi def link taskdataUndo Type 46 | 47 | let b:current_syntax = "taskdata" 48 | 49 | " vim:noexpandtab 50 | -------------------------------------------------------------------------------- /scripts/vim/syntax/taskedit.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: support for 'task 42 edit' 3 | " Maintainer: John Florian 4 | " Updated: Wed Jul 8 19:46:32 EDT 2009 5 | " 6 | " Copyright 2009 - 2021 John Florian 7 | " 8 | " This file is available under the MIT license. 9 | " For the full text of this license, see COPYING. 10 | 11 | 12 | " For version 5.x: Clear all syntax items. 13 | " For version 6.x: Quit when a syntax file was already loaded. 14 | if version < 600 15 | syntax clear 16 | elseif exists("b:current_syntax") 17 | finish 18 | endif 19 | 20 | syn match taskeditHeading "^\s*#\s*Name\s\+Editable details\s*$" contained 21 | syn match taskeditHeading "^\s*#\s*-\+\s\+-\+\s*$" contained 22 | syn match taskeditReadOnly "^\s*#\s*\(UU\)\?ID:.*$" contained 23 | syn match taskeditReadOnly "^\s*#\s*Status:.*$" contained 24 | syn match taskeditReadOnly "^\s*#\s*i\?Mask:.*$" contained 25 | syn region taskeditKeyValue matchgroup=taskeditKey start="^ \S.\{-}:" skip="^\s*#" end="^ \S.\{-}:"me=s-1,he=s-1,re=s-1 contains=taskeditKey,taskeditValue,taskeditComment 26 | syn match taskeditValue ".*$" contained contains=@Spell 27 | syn match taskeditComment "^\s*#.*$" contains=taskeditReadOnly,taskeditHeading 28 | 29 | " The default methods for highlighting. Can be overridden later. 30 | hi def link taskeditComment Comment 31 | hi def link taskeditHeading Function 32 | hi def link taskeditKey Statement 33 | hi def link taskeditReadOnly Special 34 | hi def link taskeditValue String 35 | 36 | let b:current_syntax = "taskedit" 37 | 38 | " vim:noexpandtab 39 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | liblibshared.a 2 | -------------------------------------------------------------------------------- /src/columns/ColDue.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_COLDUE 28 | #define INCLUDED_COLDUE 29 | 30 | #include 31 | 32 | class ColumnDue : public ColumnTypeDate { 33 | public: 34 | ColumnDue(); 35 | void setStyle(const std::string&); 36 | }; 37 | 38 | #endif 39 | //////////////////////////////////////////////////////////////////////////////// 40 | -------------------------------------------------------------------------------- /src/columns/ColEnd.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #include 28 | // cmake.h include header must come first 29 | 30 | #include 31 | 32 | //////////////////////////////////////////////////////////////////////////////// 33 | ColumnEnd::ColumnEnd() { 34 | _name = "end"; 35 | _label = "Completed"; 36 | } 37 | 38 | //////////////////////////////////////////////////////////////////////////////// 39 | -------------------------------------------------------------------------------- /src/columns/ColEnd.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_COLEND 28 | #define INCLUDED_COLEND 29 | 30 | #include 31 | 32 | class ColumnEnd : public ColumnTypeDate { 33 | public: 34 | ColumnEnd(); 35 | }; 36 | 37 | #endif 38 | //////////////////////////////////////////////////////////////////////////////// 39 | -------------------------------------------------------------------------------- /src/columns/ColEntry.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_COLENTRY 28 | #define INCLUDED_COLENTRY 29 | 30 | #include 31 | 32 | class ColumnEntry : public ColumnTypeDate { 33 | public: 34 | ColumnEntry(); 35 | void setStyle(const std::string&); 36 | }; 37 | 38 | #endif 39 | //////////////////////////////////////////////////////////////////////////////// 40 | -------------------------------------------------------------------------------- /src/columns/ColID.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_COLID 28 | #define INCLUDED_COLID 29 | 30 | #include 31 | 32 | class ColumnID : public ColumnTypeNumeric { 33 | public: 34 | ColumnID(); 35 | void measure(Task&, unsigned int&, unsigned int&); 36 | void render(std::vector&, Task&, int, Color&); 37 | 38 | private: 39 | }; 40 | 41 | #endif 42 | //////////////////////////////////////////////////////////////////////////////// 43 | -------------------------------------------------------------------------------- /src/columns/ColIMask.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_COLIMASK 28 | #define INCLUDED_COLIMASK 29 | 30 | #include 31 | 32 | class ColumnIMask : public ColumnTypeNumeric { 33 | public: 34 | ColumnIMask(); 35 | void measure(Task&, unsigned int&, unsigned int&); 36 | void render(std::vector&, Task&, int, Color&); 37 | 38 | private: 39 | }; 40 | 41 | #endif 42 | //////////////////////////////////////////////////////////////////////////////// 43 | -------------------------------------------------------------------------------- /src/columns/ColLast.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_COLLAST 28 | #define INCLUDED_COLLAST 29 | 30 | #include 31 | 32 | class ColumnLast : public ColumnTypeNumeric { 33 | public: 34 | ColumnLast(); 35 | void measure(Task&, unsigned int&, unsigned int&); 36 | void render(std::vector&, Task&, int, Color&); 37 | 38 | private: 39 | }; 40 | 41 | #endif 42 | //////////////////////////////////////////////////////////////////////////////// 43 | -------------------------------------------------------------------------------- /src/columns/ColMask.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_COLMASK 28 | #define INCLUDED_COLMASK 29 | 30 | #include 31 | 32 | class ColumnMask : public ColumnTypeString { 33 | public: 34 | ColumnMask(); 35 | void measure(Task&, unsigned int&, unsigned int&); 36 | void render(std::vector&, Task&, int, Color&); 37 | 38 | private: 39 | }; 40 | 41 | #endif 42 | //////////////////////////////////////////////////////////////////////////////// 43 | -------------------------------------------------------------------------------- /src/columns/ColModified.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #include 28 | // cmake.h include header must come first 29 | 30 | #include 31 | 32 | //////////////////////////////////////////////////////////////////////////////// 33 | ColumnModified::ColumnModified() { 34 | _name = "modified"; 35 | _label = "Modified"; 36 | } 37 | 38 | //////////////////////////////////////////////////////////////////////////////// 39 | -------------------------------------------------------------------------------- /src/columns/ColModified.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_COLMODIFIED 28 | #define INCLUDED_COLMODIFIED 29 | 30 | #include 31 | 32 | class ColumnModified : public ColumnTypeDate { 33 | public: 34 | ColumnModified(); 35 | }; 36 | 37 | #endif 38 | //////////////////////////////////////////////////////////////////////////////// 39 | -------------------------------------------------------------------------------- /src/columns/ColParent.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_COLPARENT 28 | #define INCLUDED_COLPARENT 29 | 30 | #include 31 | 32 | class ColumnParent : public ColumnTypeString { 33 | public: 34 | ColumnParent(); 35 | void measure(Task&, unsigned int&, unsigned int&); 36 | void render(std::vector&, Task&, int, Color&); 37 | 38 | private: 39 | }; 40 | 41 | #endif 42 | //////////////////////////////////////////////////////////////////////////////// 43 | -------------------------------------------------------------------------------- /src/columns/ColScheduled.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_COLSCHED 28 | #define INCLUDED_COLSCHED 29 | 30 | #include 31 | 32 | class ColumnScheduled : public ColumnTypeDate { 33 | public: 34 | ColumnScheduled(); 35 | void setStyle(const std::string&); 36 | }; 37 | 38 | #endif 39 | //////////////////////////////////////////////////////////////////////////////// 40 | -------------------------------------------------------------------------------- /src/columns/ColStart.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_COLSTART 28 | #define INCLUDED_COLSTART 29 | 30 | #include 31 | 32 | class ColumnStart : public ColumnTypeDate { 33 | public: 34 | ColumnStart(); 35 | void setStyle(const std::string&); 36 | void measure(Task&, unsigned int&, unsigned int&); 37 | void render(std::vector&, Task&, int, Color&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/columns/ColStatus.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_COLSTATUS 28 | #define INCLUDED_COLSTATUS 29 | 30 | #include 31 | 32 | class ColumnStatus : public ColumnTypeString { 33 | public: 34 | ColumnStatus(); 35 | void setStyle(const std::string&); 36 | void measure(Task&, unsigned int&, unsigned int&); 37 | void render(std::vector&, Task&, int, Color&); 38 | 39 | private: 40 | }; 41 | 42 | #endif 43 | //////////////////////////////////////////////////////////////////////////////// 44 | -------------------------------------------------------------------------------- /src/columns/ColTemplate.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_COLTEMPLATE 28 | #define INCLUDED_COLTEMPLATE 29 | 30 | #include 31 | 32 | class ColumnTemplate : public ColumnTypeString { 33 | public: 34 | ColumnTemplate(); 35 | void measure(Task&, unsigned int&, unsigned int&); 36 | void render(std::vector&, Task&, int, Color&); 37 | 38 | private: 39 | }; 40 | 41 | #endif 42 | //////////////////////////////////////////////////////////////////////////////// 43 | -------------------------------------------------------------------------------- /src/columns/ColTypeDuration.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_COLTYPEDURATION 28 | #define INCLUDED_COLTYPEDURATION 29 | 30 | #include 31 | #include 32 | 33 | #include 34 | 35 | class ColumnTypeDuration : public Column { 36 | public: 37 | ColumnTypeDuration(); 38 | virtual bool validate(const std::string&) const; 39 | virtual void modify(Task&, const std::string&); 40 | }; 41 | 42 | #endif 43 | 44 | //////////////////////////////////////////////////////////////////////////////// 45 | -------------------------------------------------------------------------------- /src/columns/ColTypeNumeric.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_COLTYPENUMERIC 28 | #define INCLUDED_COLTYPENUMERIC 29 | 30 | #include 31 | #include 32 | 33 | #include 34 | 35 | class ColumnTypeNumeric : public Column { 36 | public: 37 | ColumnTypeNumeric(); 38 | virtual bool validate(const std::string&) const; 39 | virtual void modify(Task&, const std::string&); 40 | }; 41 | 42 | #endif 43 | 44 | //////////////////////////////////////////////////////////////////////////////// 45 | -------------------------------------------------------------------------------- /src/columns/ColTypeString.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_COLTYPESTRING 28 | #define INCLUDED_COLTYPESTRING 29 | 30 | #include 31 | #include 32 | 33 | #include 34 | 35 | class ColumnTypeString : public Column { 36 | public: 37 | ColumnTypeString(); 38 | virtual bool validate(const std::string&) const; 39 | virtual void modify(Task&, const std::string&); 40 | }; 41 | 42 | #endif 43 | 44 | //////////////////////////////////////////////////////////////////////////////// 45 | -------------------------------------------------------------------------------- /src/columns/ColUUID.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_COLUUID 28 | #define INCLUDED_COLUUID 29 | 30 | #include 31 | 32 | class ColumnUUID : public ColumnTypeString { 33 | public: 34 | ColumnUUID(); 35 | void measure(Task&, unsigned int&, unsigned int&); 36 | void render(std::vector&, Task&, int, Color&); 37 | 38 | private: 39 | }; 40 | 41 | #endif 42 | //////////////////////////////////////////////////////////////////////////////// 43 | -------------------------------------------------------------------------------- /src/columns/ColUntil.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #include 28 | // cmake.h include header must come first 29 | 30 | #include 31 | 32 | //////////////////////////////////////////////////////////////////////////////// 33 | ColumnUntil::ColumnUntil() { 34 | _name = "until"; 35 | _label = "Until"; 36 | } 37 | 38 | //////////////////////////////////////////////////////////////////////////////// 39 | -------------------------------------------------------------------------------- /src/columns/ColUntil.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_COLUNTIL 28 | #define INCLUDED_COLUNTIL 29 | 30 | #include 31 | 32 | class ColumnUntil : public ColumnTypeDate { 33 | public: 34 | ColumnUntil(); 35 | }; 36 | 37 | #endif 38 | //////////////////////////////////////////////////////////////////////////////// 39 | -------------------------------------------------------------------------------- /src/columns/ColUrgency.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_COLURGENCY 28 | #define INCLUDED_COLURGENCY 29 | 30 | #include 31 | 32 | class ColumnUrgency : public ColumnTypeNumeric { 33 | public: 34 | ColumnUrgency(); 35 | void measure(Task&, unsigned int&, unsigned int&); 36 | void render(std::vector&, Task&, int, Color&); 37 | 38 | private: 39 | }; 40 | 41 | #endif 42 | //////////////////////////////////////////////////////////////////////////////// 43 | -------------------------------------------------------------------------------- /src/columns/ColWait.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #include 28 | // cmake.h include header must come first 29 | 30 | #include 31 | 32 | //////////////////////////////////////////////////////////////////////////////// 33 | ColumnWait::ColumnWait() { 34 | _name = "wait"; 35 | _label = "Wait"; 36 | } 37 | 38 | //////////////////////////////////////////////////////////////////////////////// 39 | -------------------------------------------------------------------------------- /src/columns/ColWait.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_COLWAIT 28 | #define INCLUDED_COLWAIT 29 | 30 | #include 31 | 32 | class ColumnWait : public ColumnTypeDate { 33 | public: 34 | ColumnWait(); 35 | }; 36 | 37 | #endif 38 | //////////////////////////////////////////////////////////////////////////////// 39 | -------------------------------------------------------------------------------- /src/commands/CmdAdd.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDADD 28 | #define INCLUDED_CMDADD 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdAdd : public Command { 35 | public: 36 | CmdAdd(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdAliases.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDALIASES 28 | #define INCLUDED_CMDALIASES 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdCompletionAliases : public Command { 35 | public: 36 | CmdCompletionAliases(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdAnnotate.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDANNOTATE 28 | #define INCLUDED_CMDANNOTATE 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdAnnotate : public Command { 35 | public: 36 | CmdAnnotate(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdAppend.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDAPPEND 28 | #define INCLUDED_CMDAPPEND 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdAppend : public Command { 35 | public: 36 | CmdAppend(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdAttributes.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDATTRIBUTES 28 | #define INCLUDED_CMDATTRIBUTES 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdZshAttributes : public Command { 35 | public: 36 | CmdZshAttributes(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdCalc.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDCALC 28 | #define INCLUDED_CMDCALC 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdCalc : public Command { 35 | public: 36 | CmdCalc(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdColor.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDCOLOR 28 | #define INCLUDED_CMDCOLOR 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdColor : public Command { 35 | public: 36 | CmdColor(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdColumns.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDCOLUMNS 28 | #define INCLUDED_CMDCOLUMNS 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdColumns : public Command { 35 | public: 36 | CmdColumns(); 37 | int execute(std::string&); 38 | }; 39 | 40 | class CmdCompletionColumns : public Command { 41 | public: 42 | CmdCompletionColumns(); 43 | int execute(std::string&); 44 | }; 45 | 46 | #endif 47 | //////////////////////////////////////////////////////////////////////////////// 48 | -------------------------------------------------------------------------------- /src/commands/CmdCount.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDCOUNT 28 | #define INCLUDED_CMDCOUNT 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdCount : public Command { 35 | public: 36 | CmdCount(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdDelete.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDDELETE 28 | #define INCLUDED_CMDDELETE 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdDelete : public Command { 35 | public: 36 | CmdDelete(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdDenotate.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDDENOTATE 28 | #define INCLUDED_CMDDENOTATE 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdDenotate : public Command { 35 | public: 36 | CmdDenotate(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdDiagnostics.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDDIAGNOSTICS 28 | #define INCLUDED_CMDDIAGNOSTICS 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdDiagnostics : public Command { 35 | public: 36 | CmdDiagnostics(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdDone.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDDONE 28 | #define INCLUDED_CMDDONE 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdDone : public Command { 35 | public: 36 | CmdDone(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdDuplicate.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDDUPLICATE 28 | #define INCLUDED_CMDDUPLICATE 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdDuplicate : public Command { 35 | public: 36 | CmdDuplicate(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdExec.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDEXEC 28 | #define INCLUDED_CMDEXEC 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdExec : public Command { 35 | public: 36 | CmdExec(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdExport.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDEXPORT 28 | #define INCLUDED_CMDEXPORT 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdExport : public Command { 35 | public: 36 | CmdExport(); 37 | int execute(std::string&); 38 | 39 | private: 40 | void validateSortColumns(std::vector&); 41 | }; 42 | 43 | #endif 44 | //////////////////////////////////////////////////////////////////////////////// 45 | -------------------------------------------------------------------------------- /src/commands/CmdGet.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDGET 28 | #define INCLUDED_CMDGET 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdGet : public Command { 35 | public: 36 | CmdGet(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdHelp.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDHELP 28 | #define INCLUDED_CMDHELP 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdHelp : public Command { 35 | public: 36 | CmdHelp(); 37 | int execute(std::string&); 38 | 39 | private: 40 | std::string composeUsage() const; 41 | }; 42 | 43 | #endif 44 | //////////////////////////////////////////////////////////////////////////////// 45 | -------------------------------------------------------------------------------- /src/commands/CmdImportV2.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDIMPORTV2 28 | #define INCLUDED_CMDIMPORTV2 29 | 30 | #include 31 | #include 32 | 33 | #include 34 | 35 | class CmdImportV2 : public Command { 36 | public: 37 | CmdImportV2(); 38 | int execute(std::string &); 39 | 40 | private: 41 | int import(const std::vector> &task_data); 42 | }; 43 | 44 | #endif 45 | //////////////////////////////////////////////////////////////////////////////// 46 | -------------------------------------------------------------------------------- /src/commands/CmdLog.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDLOG 28 | #define INCLUDED_CMDLOG 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdLog : public Command { 35 | public: 36 | CmdLog(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdLogo.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDLOGO 28 | #define INCLUDED_CMDLOGO 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdLogo : public Command { 35 | public: 36 | CmdLogo(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdPrepend.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDPREPEND 28 | #define INCLUDED_CMDPREPEND 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdPrepend : public Command { 35 | public: 36 | CmdPrepend(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdProjects.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDPROJECTS 28 | #define INCLUDED_CMDPROJECTS 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdProjects : public Command { 35 | public: 36 | CmdProjects(); 37 | int execute(std::string&); 38 | }; 39 | 40 | class CmdCompletionProjects : public Command { 41 | public: 42 | CmdCompletionProjects(); 43 | int execute(std::string&); 44 | }; 45 | 46 | #endif 47 | //////////////////////////////////////////////////////////////////////////////// 48 | -------------------------------------------------------------------------------- /src/commands/CmdReports.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDREPORTS 28 | #define INCLUDED_CMDREPORTS 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdReports : public Command { 35 | public: 36 | CmdReports(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdShow.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDSHOW 28 | #define INCLUDED_CMDSHOW 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdShow : public Command { 35 | public: 36 | CmdShow(); 37 | int execute(std::string&); 38 | }; 39 | 40 | class CmdShowRaw : public Command { 41 | public: 42 | CmdShowRaw(); 43 | int execute(std::string&); 44 | }; 45 | 46 | #endif 47 | //////////////////////////////////////////////////////////////////////////////// 48 | -------------------------------------------------------------------------------- /src/commands/CmdStart.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDSTART 28 | #define INCLUDED_CMDSTART 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdStart : public Command { 35 | public: 36 | CmdStart(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdStats.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDSTATS 28 | #define INCLUDED_CMDSTATS 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdStats : public Command { 35 | public: 36 | CmdStats(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdStop.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDSTOP 28 | #define INCLUDED_CMDSTOP 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdStop : public Command { 35 | public: 36 | CmdStop(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdSummary.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDSUMMARY 28 | #define INCLUDED_CMDSUMMARY 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdSummary : public Command { 35 | public: 36 | CmdSummary(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdSync.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDSYNC 28 | #define INCLUDED_CMDSYNC 29 | 30 | #include 31 | #include 32 | 33 | #include 34 | 35 | class CmdSync : public Command { 36 | public: 37 | CmdSync(); 38 | int execute(std::string&); 39 | }; 40 | 41 | #endif 42 | //////////////////////////////////////////////////////////////////////////////// 43 | -------------------------------------------------------------------------------- /src/commands/CmdTags.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDTAGS 28 | #define INCLUDED_CMDTAGS 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdTags : public Command { 35 | public: 36 | CmdTags(); 37 | int execute(std::string&); 38 | }; 39 | 40 | class CmdCompletionTags : public Command { 41 | public: 42 | CmdCompletionTags(); 43 | int execute(std::string&); 44 | }; 45 | 46 | #endif 47 | //////////////////////////////////////////////////////////////////////////////// 48 | -------------------------------------------------------------------------------- /src/commands/CmdTimesheet.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDTIMESHEET 28 | #define INCLUDED_CMDTIMESHEET 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdTimesheet : public Command { 35 | public: 36 | CmdTimesheet(); 37 | int execute(std::string&) override; 38 | bool uses_context() const override; 39 | }; 40 | 41 | #endif 42 | //////////////////////////////////////////////////////////////////////////////// 43 | -------------------------------------------------------------------------------- /src/commands/CmdUDAs.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDUDAS 28 | #define INCLUDED_CMDUDAS 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdUDAs : public Command { 35 | public: 36 | CmdUDAs(); 37 | int execute(std::string&); 38 | }; 39 | 40 | class CmdCompletionUDAs : public Command { 41 | public: 42 | CmdCompletionUDAs(); 43 | int execute(std::string&); 44 | }; 45 | 46 | #endif 47 | //////////////////////////////////////////////////////////////////////////////// 48 | -------------------------------------------------------------------------------- /src/commands/CmdUndo.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDUNDO 28 | #define INCLUDED_CMDUNDO 29 | 30 | #include 31 | #include 32 | 33 | #include 34 | #include 35 | 36 | class CmdUndo : public Command { 37 | public: 38 | CmdUndo(); 39 | int execute(std::string &); 40 | 41 | private: 42 | bool confirm_revert(const std::vector &); 43 | }; 44 | 45 | #endif 46 | //////////////////////////////////////////////////////////////////////////////// 47 | -------------------------------------------------------------------------------- /src/commands/CmdUnique.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDUNIQUE 28 | #define INCLUDED_CMDUNIQUE 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdUnique : public Command { 35 | public: 36 | CmdUnique(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdUrgency.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDURGENCY 28 | #define INCLUDED_CMDURGENCY 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdUrgency : public Command { 35 | public: 36 | CmdUrgency(); 37 | int execute(std::string&); 38 | }; 39 | 40 | #endif 41 | //////////////////////////////////////////////////////////////////////////////// 42 | -------------------------------------------------------------------------------- /src/commands/CmdVersion.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included 13 | // in all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | // 23 | // https://www.opensource.org/licenses/mit-license.php 24 | // 25 | //////////////////////////////////////////////////////////////////////////////// 26 | 27 | #ifndef INCLUDED_CMDVERSION 28 | #define INCLUDED_CMDVERSION 29 | 30 | #include 31 | 32 | #include 33 | 34 | class CmdVersion : public Command { 35 | public: 36 | CmdVersion(); 37 | int execute(std::string&); 38 | }; 39 | 40 | class CmdCompletionVersion : public Command { 41 | public: 42 | CmdCompletionVersion(); 43 | int execute(std::string&); 44 | }; 45 | 46 | #endif 47 | //////////////////////////////////////////////////////////////////////////////// 48 | -------------------------------------------------------------------------------- /src/lex.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | Context context; 9 | 10 | int main(int argc, char** argv) { 11 | for (auto i = 1; i < argc; i++) { 12 | std::cout << "argument '" << argv[i] << "'\n"; 13 | 14 | Lexer l(argv[i]); 15 | std::string token; 16 | Lexer::Type type; 17 | while (l.token(token, type)) 18 | std::cout << " token '" << token << "' " << Lexer::typeToString(type) << "\n"; 19 | } 20 | } 21 | 22 | //////////////////////////////////////////////////////////////////////////////// 23 | -------------------------------------------------------------------------------- /src/taskchampion-cpp/.gitignore: -------------------------------------------------------------------------------- 1 | libtaskchampion_lib.a 2 | -------------------------------------------------------------------------------- /src/taskchampion-cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 3.22) 2 | 3 | OPTION(SYSTEM_CORROSION "Use system provided corrosion instead of vendored version" OFF) 4 | if(SYSTEM_CORROSION) 5 | find_package(Corrosion REQUIRED) 6 | else() 7 | add_subdirectory(${CMAKE_SOURCE_DIR}/src/taskchampion-cpp/corrosion) 8 | endif() 9 | 10 | OPTION (ENABLE_TLS_NATIVE_ROOTS "Use the system's TLS root certificates" OFF) 11 | 12 | if (ENABLE_TLS_NATIVE_ROOTS) 13 | message ("Enabling native TLS roots") 14 | set(TASKCHAMPION_FEATURES "tls-native-roots") 15 | endif (ENABLE_TLS_NATIVE_ROOTS) 16 | 17 | # Import taskchampion-lib as a CMake library. This implements the Rust side of 18 | # the cxxbridge, and depends on the `taskchampion` crate. 19 | corrosion_import_crate( 20 | MANIFEST_PATH "${CMAKE_SOURCE_DIR}/Cargo.toml" 21 | LOCKED 22 | CRATES "taskchampion-lib" 23 | FEATURES "${TASKCHAMPION_FEATURES}") 24 | 25 | # Set up `taskchampion-cpp`, the C++ side of the bridge. 26 | corrosion_add_cxxbridge(taskchampion-cpp 27 | CRATE taskchampion_lib 28 | FILES lib.rs 29 | ) 30 | -------------------------------------------------------------------------------- /src/taskchampion-cpp/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "taskchampion-lib" 3 | version = "0.1.0" 4 | edition = "2021" 5 | publish = false 6 | rust-version = "1.81.0" # MSRV 7 | 8 | [lib] 9 | crate-type = ["staticlib"] 10 | 11 | [dependencies] 12 | taskchampion = "=2.0.2" 13 | cxx = "1.0.133" 14 | 15 | [features] 16 | # use native CA roots, instead of bundled 17 | tls-native-roots = ["taskchampion/tls-native-roots"] 18 | 19 | [build-dependencies] 20 | cxx-build = "1.0.133" 21 | -------------------------------------------------------------------------------- /src/taskchampion-cpp/build.rs: -------------------------------------------------------------------------------- 1 | #[allow(unused_must_use)] 2 | fn main() { 3 | cxx_build::bridge("src/lib.rs"); 4 | println!("cargo:rerun-if-changed=build.rs"); 5 | println!("cargo:rerun-if-changed=src/lib.rs"); 6 | } 7 | -------------------------------------------------------------------------------- /test/basetest/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | configure_file(__init__.py __init__.py COPYONLY) 2 | configure_file(compat.py compat.py COPYONLY) 3 | configure_file(exceptions.py exceptions.py COPYONLY) 4 | configure_file(hooks.py hooks.py COPYONLY) 5 | configure_file(meta.py meta.py COPYONLY) 6 | configure_file(task.py task.py COPYONLY) 7 | configure_file(testing.py testing.py COPYONLY) 8 | configure_file(utils.py utils.py) 9 | -------------------------------------------------------------------------------- /test/basetest/README: -------------------------------------------------------------------------------- 1 | Shell environment variables that affect how and what tests are executed: 2 | 3 | TASKW_SKIP -> Causes any test that needs Taskwarrior (task binary only) to be skipped (TestCase) 4 | 5 | TASK_USE_PATH -> Causes tests to look for "task" in PATH instead of the default location 6 | -------------------------------------------------------------------------------- /test/basetest/__init__.py: -------------------------------------------------------------------------------- 1 | from .task import Task 2 | from .testing import TestCase 3 | 4 | # flake8:noqa 5 | # vim: ai sts=4 et sw=4 6 | -------------------------------------------------------------------------------- /test/basetest/compat.py: -------------------------------------------------------------------------------- 1 | try: 2 | STRING_TYPE = basestring 3 | except NameError: 4 | # Python 3 5 | STRING_TYPE = str 6 | 7 | # vim: ai sts=4 et sw=4 8 | -------------------------------------------------------------------------------- /test/basetest/exceptions.py: -------------------------------------------------------------------------------- 1 | import signal 2 | 3 | sig_names = dict( 4 | (k, v) 5 | for v, k in reversed(sorted(signal.__dict__.items())) 6 | if v.startswith("SIG") and not v.startswith("SIG_") 7 | ) 8 | 9 | 10 | class CommandError(Exception): 11 | def __init__(self, cmd, code, out, err=None, msg=None): 12 | DEFAULT = ( 13 | "Command '{{0}}' was {signal}'ed. " 14 | "SIGABRT usually means task timed out.\n" 15 | ) 16 | if msg is None: 17 | msg_suffix = "\n*** Start STDOUT ***\n{2}\n*** End STDOUT ***\n" 18 | if err is not None: 19 | msg_suffix += "\n*** Start STDERR ***\n{3}\n*** End STDERR ***\n" 20 | 21 | if code < 0: 22 | self.msg = DEFAULT.format(signal=sig_names[abs(code)]) 23 | else: 24 | self.msg = ( 25 | "Command '{0}' finished with unexpected exit " "code '{1}'.\n" 26 | ) 27 | 28 | self.msg += msg_suffix 29 | else: 30 | self.msg = msg 31 | 32 | self.cmd = cmd 33 | self.out = out 34 | self.err = err 35 | self.code = code 36 | 37 | def __str__(self): 38 | return self.msg.format(self.cmd, self.code, self.out, self.err) 39 | 40 | 41 | class HookError(Exception): 42 | pass 43 | 44 | 45 | class TimeoutWaitingFor(object): 46 | def __init__(self, name): 47 | self.name = name 48 | 49 | def __repr__(self): 50 | return "*** Timeout reached while waiting for {0} ***".format(self.name) 51 | 52 | 53 | class StreamsAreMerged(object): 54 | def __repr__(self): 55 | return "*** Streams are merged, STDERR is not available ***" 56 | 57 | 58 | # vim: ai sts=4 et sw=4 59 | -------------------------------------------------------------------------------- /test/basetest/meta.py: -------------------------------------------------------------------------------- 1 | from __future__ import print_function, division 2 | 3 | 4 | class MetaTest(type): 5 | """Helper metaclass to simplify dynamic test creation 6 | 7 | Creates test_methods in the TestCase class dynamically named after the 8 | arguments used. 9 | """ 10 | 11 | @staticmethod 12 | def make_function(classname, *args, **kwargs): 13 | def test(self): 14 | # ### Body of the usual test_testcase ### # 15 | # Override and redefine this method # 16 | pass 17 | 18 | # Title of test in report 19 | test.__doc__ = "{0}".format(args[0]) 20 | 21 | return test 22 | 23 | def __new__(meta, classname, bases, dct): 24 | tests = dct.get("TESTS") 25 | kwargs = dct.get("EXTRA", {}) 26 | 27 | for i, args in enumerate(tests): 28 | func = meta.make_function(classname, *args, **kwargs) 29 | 30 | # Rename the function after a unique identifier 31 | # Name of function must start with test_ to be ran by unittest 32 | func.__name__ = "test_{0}".format(i) 33 | 34 | # Attach the new test to the testclass 35 | dct[func.__name__] = func 36 | 37 | return super(MetaTest, meta).__new__(meta, classname, bases, dct) 38 | 39 | 40 | # vim: ai sts=4 et sw=4 41 | -------------------------------------------------------------------------------- /test/basetest/testing.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | import sys 3 | from .utils import TASKW_SKIP 4 | 5 | 6 | class BaseTestCase(unittest.TestCase): 7 | def tap(self, out): 8 | sys.stderr.write("--- tap output start ---\n") 9 | for line in out.splitlines(): 10 | sys.stderr.write(line + "\n") 11 | sys.stderr.write("--- tap output end ---\n") 12 | 13 | 14 | @unittest.skipIf(TASKW_SKIP, "TASKW_SKIP set, skipping task tests.") 15 | class TestCase(BaseTestCase): 16 | """Automatically skips tests if TASKW_SKIP is present in the environment""" 17 | 18 | pass 19 | 20 | 21 | # vim: ai sts=4 et sw=4 22 | -------------------------------------------------------------------------------- /test/conversion: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | printf "C++: %5d\n" $(ls *.test.cpp | wc -l) 4 | printf "Python: %5d\n" $(head -n1 *.test.py | grep -a '\bpython' | wc -l) 5 | printf "Bash: %5d\n" $(head -n1 *.test.sh | grep -a '\bbash' | wc -l) 6 | echo 7 | printf "Feature %5d\n" $(ls feature.*.test.py | wc -l) 8 | printf "Bug %5d\n" $(ls tw-*.test.sh | wc -l) 9 | echo 10 | printf "Total: %5d\n" $(ls *.test.* | wc -l) 11 | -------------------------------------------------------------------------------- /test/docker/arch: -------------------------------------------------------------------------------- 1 | FROM archlinux/archlinux:base-devel 2 | 3 | RUN pacman -Sy --noconfirm archlinux-keyring 4 | RUN pacman -Syyu --noconfirm 5 | RUN pacman -S --noconfirm util-linux bash-completion cmake python3 git libfaketime curl 6 | 7 | # Setup language environment 8 | ENV LANG en_US.UTF-8 9 | ENV LANGUAGE en_US.UTF-8 10 | 11 | # Add source directory 12 | ADD . /root/code/ 13 | WORKDIR /root/code/ 14 | 15 | # Setup Rust 16 | RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ 17 | sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs 18 | 19 | # Setup taskwarrior 20 | RUN git clean -dfx 21 | RUN git submodule init 22 | RUN git submodule update 23 | RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug . 24 | RUN cmake --build build -j 8 25 | RUN cmake --install build 26 | RUN task --version 27 | 28 | # Setup tests 29 | RUN cmake --build build --target test_runner -j 8 30 | CMD ctest --test-dir build -j 8 --output-on-failure --rerun-failed 31 | -------------------------------------------------------------------------------- /test/docker/debianstable: -------------------------------------------------------------------------------- 1 | FROM debian:stable 2 | 3 | RUN apt-get update 4 | RUN apt-get install -y build-essential cmake git uuid-dev faketime 5 | RUN apt-get install -y python3 curl 6 | 7 | # Setup language environment 8 | ENV LC_ALL en_US.UTF-8 9 | ENV LANG en_US.UTF-8 10 | ENV LANGUAGE en_US.UTF-8 11 | 12 | # Add source directory 13 | ADD . /root/code/ 14 | WORKDIR /root/code/ 15 | 16 | # Setup Rust 17 | RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ 18 | sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs 19 | 20 | # Setup taskwarrior 21 | RUN git clean -dfx 22 | RUN git submodule init 23 | RUN git submodule update 24 | RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug . 25 | RUN cmake --build build -j 8 26 | RUN cmake --install build 27 | RUN task --version 28 | 29 | # Setup tests 30 | RUN cmake --build build --target test_runner -j 8 31 | CMD ctest --test-dir build -j 8 --output-on-failure --rerun-failed 32 | -------------------------------------------------------------------------------- /test/docker/debiantesting: -------------------------------------------------------------------------------- 1 | FROM debian:testing 2 | 3 | RUN apt-get update 4 | RUN apt-get install -y build-essential cmake git uuid-dev faketime 5 | RUN apt-get install -y python3 curl 6 | 7 | # Setup language environment 8 | ENV LC_ALL en_US.UTF-8 9 | ENV LANG en_US.UTF-8 10 | ENV LANGUAGE en_US.UTF-8 11 | 12 | # Add source directory 13 | ADD . /root/code/ 14 | WORKDIR /root/code/ 15 | 16 | # Setup Rust 17 | RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ 18 | sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs 19 | 20 | # Setup taskwarrior 21 | RUN git clean -dfx 22 | RUN git submodule init 23 | RUN git submodule update 24 | RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug . 25 | RUN cmake --build build -j 8 26 | RUN cmake --install build 27 | RUN task --version 28 | 29 | # Setup tests 30 | RUN cmake --build build --target test_runner -j 8 31 | CMD ctest --test-dir build -j 8 --output-on-failure --rerun-failed 32 | -------------------------------------------------------------------------------- /test/docker/fedora40: -------------------------------------------------------------------------------- 1 | FROM fedora:40 2 | 3 | RUN dnf update -y 4 | RUN dnf install python3 git gcc gcc-c++ cmake make libuuid-devel libfaketime glibc-langpack-en curl -y 5 | 6 | # Setup language environment 7 | ENV LC_ALL en_US.UTF-8 8 | ENV LANG en_US.UTF-8 9 | ENV LANGUAGE en_US.UTF-8 10 | 11 | # Add source directory 12 | ADD . /root/code/ 13 | WORKDIR /root/code/ 14 | 15 | # Setup Rust 16 | RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ 17 | sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs 18 | 19 | # Setup taskwarrior 20 | RUN git clean -dfx 21 | RUN git submodule init 22 | RUN git submodule update 23 | RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug . 24 | RUN cmake --build build -j 8 25 | RUN cmake --install build 26 | RUN task --version 27 | 28 | # Setup tests 29 | RUN cmake --build build --target test_runner -j 8 30 | CMD ctest --test-dir build -j 8 --output-on-failure --rerun-failed 31 | -------------------------------------------------------------------------------- /test/docker/fedora41: -------------------------------------------------------------------------------- 1 | FROM fedora:41 2 | 3 | RUN dnf update -y 4 | RUN dnf install python3 git gcc gcc-c++ cmake make libuuid-devel libfaketime glibc-langpack-en curl -y 5 | 6 | # Setup language environment 7 | ENV LC_ALL en_US.UTF-8 8 | ENV LANG en_US.UTF-8 9 | ENV LANGUAGE en_US.UTF-8 10 | 11 | # Add source directory 12 | ADD . /root/code/ 13 | WORKDIR /root/code/ 14 | 15 | # Setup Rust 16 | RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ 17 | sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs 18 | 19 | # Setup taskwarrior 20 | RUN git clean -dfx 21 | RUN git submodule init 22 | RUN git submodule update 23 | RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug . 24 | RUN cmake --build build -j 8 25 | RUN cmake --install build 26 | RUN task --version 27 | 28 | # Setup tests 29 | RUN cmake --build build --target test_runner -j 8 30 | CMD ctest --test-dir build -j 8 --output-on-failure --rerun-failed 31 | -------------------------------------------------------------------------------- /test/docker/opensuse: -------------------------------------------------------------------------------- 1 | FROM opensuse/tumbleweed 2 | 3 | RUN zypper install -y python3 awk coreutils git gcc gcc-c++ cmake make libuuid-devel libfaketime curl 4 | 5 | # Setup language environment 6 | ENV LC_ALL en_US.UTF-8 7 | ENV LANG en_US.UTF-8 8 | ENV LANGUAGE en_US.UTF-8 9 | 10 | # Add source directory 11 | ADD . /root/code/ 12 | WORKDIR /root/code/ 13 | 14 | # Setup Rust 15 | RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ 16 | sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs 17 | 18 | # Setup taskwarrior 19 | RUN git clean -dfx 20 | RUN git submodule init 21 | RUN git submodule update 22 | RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug . 23 | RUN cmake --build build -j 8 24 | RUN cmake --install build 25 | RUN task --version 26 | 27 | # Setup tests 28 | RUN cmake --build build --target test_runner -j 8 29 | CMD ctest --test-dir build -j 8 --output-on-failure --rerun-failed 30 | -------------------------------------------------------------------------------- /test/docker/ubuntu2004: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | 3 | RUN apt-get update && \ 4 | DEBIAN_FRONTEND="noninteractive" apt-get install -y gpg wget curl 5 | 6 | # add Kitware's CMake apt repo 7 | RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - > /usr/share/keyrings/kitware-archive-keyring.gpg && \ 8 | echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' > /etc/apt/sources.list.d/kitware.list 9 | 10 | RUN apt-get update && \ 11 | DEBIAN_FRONTEND="noninteractive" apt-get install -y build-essential git uuid-dev faketime locales python3 cmake 12 | 13 | # Setup language environment 14 | RUN locale-gen en_US.UTF-8 15 | ENV LC_ALL en_US.UTF-8 16 | ENV LANG en_US.UTF-8 17 | ENV LANGUAGE en_US.UTF-8 18 | 19 | # Add source directory 20 | ADD . /root/code/ 21 | WORKDIR /root/code/ 22 | 23 | # Setup Rust 24 | RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ 25 | sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs 26 | 27 | # Setup taskwarrior 28 | RUN git clean -dfx 29 | RUN git submodule init 30 | RUN git submodule update 31 | RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug . 32 | RUN cmake --build build -j 8 33 | RUN cmake --install build 34 | RUN task --version 35 | 36 | # Setup tests 37 | RUN cmake --build build --target test_runner -j 8 38 | CMD ctest --test-dir build -j 8 --output-on-failure --rerun-failed 39 | -------------------------------------------------------------------------------- /test/docker/ubuntu2204: -------------------------------------------------------------------------------- 1 | FROM ubuntu:22.04 2 | 3 | RUN apt-get update 4 | RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y build-essential cmake git uuid-dev faketime locales python3 curl 5 | 6 | # Setup language environment 7 | RUN locale-gen en_US.UTF-8 8 | ENV LC_ALL en_US.UTF-8 9 | ENV LANG en_US.UTF-8 10 | ENV LANGUAGE en_US.UTF-8 11 | 12 | # Add source directory 13 | ADD . /root/code/ 14 | WORKDIR /root/code/ 15 | 16 | # Setup Rust 17 | RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ 18 | sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs 19 | 20 | # Setup taskwarrior 21 | RUN git clean -dfx 22 | RUN git submodule init 23 | RUN git submodule update 24 | RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug . 25 | RUN cmake --build build -j 8 26 | RUN cmake --install build 27 | RUN task --version 28 | 29 | # Setup tests 30 | RUN cmake --build build --target test_runner -j 8 31 | CMD ctest --test-dir build -j 8 --output-on-failure --rerun-failed 32 | -------------------------------------------------------------------------------- /test/scripts/test_macos.sh: -------------------------------------------------------------------------------- 1 | set -ex 2 | 3 | brew install cmake 4 | brew install libfaketime 5 | git clean -dfx 6 | git submodule init 7 | git submodule update 8 | cmake -DCMAKE_BUILD_TYPE=debug . 9 | make -j2 10 | make install 11 | task --version 12 | 13 | pushd test 14 | make 15 | ./run_all -v 16 | cat all.log | grep 'not ok' 17 | ./problems 18 | -------------------------------------------------------------------------------- /test/simpletap/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | configure_file(__init__.py __init__.py COPYONLY) 2 | -------------------------------------------------------------------------------- /test/test_hooks/on-add-accept: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-add event is triggered separately for each task added. This hook 4 | # script can accept/reject the addition. Processing will continue. 5 | 6 | # Input: 7 | # - Line of JSON for proposed new task. 8 | read new_task 9 | 10 | # Output: 11 | # - JSON, modified or unmodified. 12 | # - Optional feedback/error. 13 | echo $new_task 14 | echo 'FEEDBACK' 15 | 16 | # Status: 17 | # - 0: JSON accepted, non-JSON is feedback. 18 | # - non-0: JSON ignored, non-JSON is error. 19 | exit 0 20 | -------------------------------------------------------------------------------- /test/test_hooks/on-add-misbehave1: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-add event is triggered separately for each task added. This hook 4 | # script can accept/reject the addition. Processing will continue. 5 | 6 | # Input: 7 | # - Line of JSON for proposed new task. 8 | 9 | # Output: 10 | # - JSON, modified or unmodified. 11 | # - Optional feedback/error. 12 | echo 'FEEDBACK' 13 | 14 | # Status: 15 | # - 0: JSON accepted, non-JSON is feedback. 16 | # - non-0: JSON ignored, non-JSON is error. 17 | exit 1 18 | -------------------------------------------------------------------------------- /test/test_hooks/on-add-misbehave2: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-add event is triggered separately for each task added. This hook 4 | # script can accept/reject the addition. Processing will continue. 5 | 6 | # Input: 7 | # - Line of JSON for proposed new task. 8 | read new_task 9 | 10 | # Output: 11 | # - JSON, modified or unmodified. 12 | # - Optional feedback/error. 13 | 14 | # Status: 15 | # - 0: JSON accepted, non-JSON is feedback. 16 | # - non-0: JSON ignored, non-JSON is error. 17 | exit 0 18 | -------------------------------------------------------------------------------- /test/test_hooks/on-add-misbehave3: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-add event is triggered separately for each task added. This hook 4 | # script can accept/reject the addition. Processing will continue. 5 | 6 | # Input: 7 | # - Line of JSON for proposed new task. 8 | read new_task 9 | 10 | # Output: 11 | # - JSON, modified or unmodified. 12 | # - Optional feedback/error. 13 | echo $new_task 14 | echo '{"description":"extra","status":"pending"}' 15 | echo 'FEEDBACK' 16 | 17 | # Status: 18 | # - 0: JSON accepted, non-JSON is feedback. 19 | # - non-0: JSON ignored, non-JSON is error. 20 | exit 0 21 | -------------------------------------------------------------------------------- /test/test_hooks/on-add-misbehave4: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-add event is triggered separately for each task added. This hook 4 | # script can accept/reject the addition. Processing will continue. 5 | 6 | # Input: 7 | # - Line of JSON for proposed new task. 8 | read new_task 9 | 10 | # Output: 11 | # - JSON, modified or unmodified. 12 | # - Optional feedback/error. 13 | echo '{"description":"different","status":"pending","uuid":"bad"}' 14 | echo 'FEEDBACK' 15 | 16 | # Status: 17 | # - 0: JSON accepted, non-JSON is feedback. 18 | # - non-0: JSON ignored, non-JSON is error. 19 | exit 0 20 | -------------------------------------------------------------------------------- /test/test_hooks/on-add-misbehave5: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-add event is triggered separately for each task added. This hook 4 | # script can accept/reject the addition. Processing will continue. 5 | 6 | # Input: 7 | # - Line of JSON for proposed new task. 8 | read new_task 9 | 10 | # Output: 11 | # - JSON, modified or unmodified. 12 | # - Optional feedback/error. 13 | echo '{"}' 14 | echo 'FEEDBACK' 15 | 16 | # Status: 17 | # - 0: JSON accepted, non-JSON is feedback. 18 | # - non-0: JSON ignored, non-JSON is error. 19 | exit 0 20 | -------------------------------------------------------------------------------- /test/test_hooks/on-add-misbehave6: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-add event is triggered separately for each task added. This hook 4 | # script can accept/reject the addition. Processing will continue. 5 | 6 | # Input: 7 | # - Line of JSON for proposed new task. 8 | read new_task 9 | 10 | # Output: 11 | # - JSON, modified or unmodified. 12 | # - Optional feedback/error. 13 | echo '{"description":"invalid"}' 14 | echo 'FEEDBACK' 15 | 16 | # Status: 17 | # - 0: JSON accepted, non-JSON is feedback. 18 | # - non-0: JSON ignored, non-JSON is error. 19 | exit 0 20 | -------------------------------------------------------------------------------- /test/test_hooks/on-add-modify: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Input: 4 | # - Line of JSON for proposed new task. 5 | read new_task 6 | 7 | if (echo $new_task | grep -qE '[tT]eh'); 8 | then 9 | new_task=$(echo $new_task | sed -r 's/([tT])eh/\1he/g') 10 | fi 11 | 12 | # Output: 13 | # - JSON, modified 14 | # - Optional feedback/error. 15 | echo $new_task 16 | echo 'FEEDBACK' 17 | 18 | # Status: 19 | # - 0: JSON accepted, non-JSON is feedback. 20 | # - non-0: JSON ignored, non-JSON is error. 21 | exit 0 22 | -------------------------------------------------------------------------------- /test/test_hooks/on-add-reject: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-add event is triggered separately for each task added. This hook 4 | # script can accept/reject the addition. Processing will continue. 5 | 6 | # Input: 7 | # - Line of JSON for proposed new task. 8 | read new_task 9 | 10 | # Output: 11 | # - JSON, modified or unmodified. 12 | # - Optional feedback/error. 13 | echo $new_task 14 | echo 'FEEDBACK' 15 | 16 | # Status: 17 | # - 0: JSON accepted, non-JSON is feedback. 18 | # - non-0: JSON ignored, non-JSON is error. 19 | exit 1 20 | -------------------------------------------------------------------------------- /test/test_hooks/on-add.dummy: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "on-add executed" 4 | 5 | while read TASK; do 6 | echo "New task $TASK" 7 | echo $TASK 8 | done 9 | 10 | exit 0 11 | -------------------------------------------------------------------------------- /test/test_hooks/on-exit-bad: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-exit event is triggered once, after all processing is complete. 4 | # This hooks script has no effect on processing. 5 | 6 | # Input: 7 | # - Read-only line of JSON for each task added/modified 8 | while read modified_task 9 | do 10 | echo 'CHANGED TASK' 11 | done 12 | 13 | # Output: 14 | # - Optional feedback/error. 15 | echo 'FEEDBACK' 16 | 17 | # Status: 18 | # - 0: JSON ignored, non-JSON is feedback. 19 | # - non-0: JSON ignored, non-JSON is error. 20 | exit 1 21 | -------------------------------------------------------------------------------- /test/test_hooks/on-exit-good: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-exit event is triggered once, after all processing is complete. 4 | # This hooks script has no effect on processing. 5 | 6 | # Input: 7 | # - Read-only line of JSON for each task added/modified 8 | while read modified_task 9 | do 10 | echo 'CHANGED TASK' 11 | done 12 | 13 | # Output: 14 | # - Optional feedback/error. 15 | echo 'FEEDBACK' 16 | 17 | # Status: 18 | # - 0: JSON ignored, non-JSON is feedback. 19 | # - non-0: JSON ignored, non-JSON is error. 20 | exit 0 21 | -------------------------------------------------------------------------------- /test/test_hooks/on-exit-misbehave1: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-exit event is triggered once, after all processing is complete. 4 | # This hooks script has no effect on processing. 5 | 6 | # Input: 7 | # - Read-only line of JSON for each task added/modified 8 | 9 | # Output: 10 | # - Optional feedback/error. 11 | echo 'FEEDBACK' 12 | 13 | # Status: 14 | # - 0: JSON ignored, non-JSON is feedback. 15 | # - non-0: JSON ignored, non-JSON is error. 16 | exit 0 17 | -------------------------------------------------------------------------------- /test/test_hooks/on-exit-misbehave2: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-exit event is triggered once, after initialization, before any 4 | # processing occurs. This hooks script has no effect on processing. 5 | 6 | # Input: 7 | # - None 8 | 9 | # Output: 10 | # - Optional feedback/error. 11 | echo '{"description":"extra","status":"pending"}' 12 | echo 'FEEDBACK' 13 | 14 | # Status: 15 | # - 0: JSON ignored, non-JSON is feedback. 16 | # - non-0: JSON ignored, non-JSON is error. 17 | exit 0 18 | -------------------------------------------------------------------------------- /test/test_hooks/on-exit.dummy: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "on-exit executed" 4 | 5 | while read TASK; do 6 | echo "New/modified task $TASK" 7 | done 8 | 9 | exit 0 10 | -------------------------------------------------------------------------------- /test/test_hooks/on-launch-bad: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-launch event is triggered once, after initialization, before any 4 | # processing occurs. This hooks script has no effect on processing. 5 | 6 | # Input: 7 | # - None 8 | 9 | # Output: 10 | # - Optional feedback/error. 11 | echo 'FEEDBACK' 12 | 13 | # Status: 14 | # - 0: JSON ignored, non-JSON is feedback. 15 | # - non-0: JSON ignored, non-JSON is error. 16 | exit 1 17 | -------------------------------------------------------------------------------- /test/test_hooks/on-launch-good: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-launch event is triggered once, after initialization, before any 4 | # processing occurs. This hooks script has no effect on processing. 5 | 6 | # Input: 7 | # - None 8 | 9 | # Output: 10 | # - Optional feedback/error. 11 | echo 'FEEDBACK' 12 | 13 | # Status: 14 | # - 0: JSON ignored, non-JSON is feedback. 15 | # - non-0: JSON ignored, non-JSON is error. 16 | exit 0 17 | -------------------------------------------------------------------------------- /test/test_hooks/on-launch-good-env: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-launch event is triggered once, after initialization, before any 4 | # processing occurs. This hooks script has no effect on processing. 5 | 6 | # Input: 7 | # - None 8 | 9 | # Output: 10 | # - Optional feedback/error. 11 | echo $1 12 | echo $2 13 | echo $3 14 | echo $4 15 | echo $5 16 | echo $6 17 | #for arg in $* 18 | #do 19 | # echo $arg 20 | #done 21 | 22 | # Status: 23 | # - 0: JSON ignored, non-JSON is feedback. 24 | # - non-0: JSON ignored, non-JSON is error. 25 | exit 0 26 | -------------------------------------------------------------------------------- /test/test_hooks/on-launch-misbehave1: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-launch event is triggered once, after initialization, before any 4 | # processing occurs. This hooks script has no effect on processing. 5 | 6 | # Input: 7 | # - None 8 | 9 | # Output: 10 | # - Optional feedback/error. 11 | echo 'FEEDBACK' 12 | 13 | # Status: 14 | # - 0: JSON ignored, non-JSON is feedback. 15 | # - non-0: JSON ignored, non-JSON is error. 16 | kill -9 $$ 17 | exit 0 18 | -------------------------------------------------------------------------------- /test/test_hooks/on-launch-misbehave2: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-launch event is triggered once, after initialization, before any 4 | # processing occurs. This hooks script has no effect on processing. 5 | 6 | # Input: 7 | # - None 8 | 9 | # Output: 10 | # - Optional feedback/error. 11 | echo '{"description":"extra","status":"pending"}' 12 | echo 'FEEDBACK' 13 | 14 | # Status: 15 | # - 0: JSON ignored, non-JSON is feedback. 16 | # - non-0: JSON ignored, non-JSON is error. 17 | exit 0 18 | -------------------------------------------------------------------------------- /test/test_hooks/on-launch.dummy: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "on-launch executed" 4 | 5 | exit 0 6 | -------------------------------------------------------------------------------- /test/test_hooks/on-modify-accept: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-modify event is triggered separately for each task modified. This hook 4 | # script can accept/reject the modification. Processing will continue. 5 | 6 | # Input: 7 | # - line of JSON for the original task 8 | # - line of JSON for the modified task, the diff being the modification 9 | read original_task 10 | read modified_task 11 | 12 | # Output: 13 | # - JSON, modified or unmodified. 14 | # - Optional feedback/error. 15 | echo $modified_task 16 | echo 'FEEDBACK' 17 | 18 | # Status: 19 | # - 0: JSON accepted, non-JSON is feedback. 20 | # - non-0: JSON ignored, non-JSON is error. 21 | exit 0 22 | -------------------------------------------------------------------------------- /test/test_hooks/on-modify-for-template-badexit.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import json 5 | 6 | original_task = sys.stdin.readline() 7 | modified_task = sys.stdin.readline() 8 | 9 | task = json.loads(modified_task) 10 | task["description"] = "This is an example modify hook" 11 | 12 | # A random message 13 | sys.stdout.write("Hello from the template hook\n") 14 | 15 | sys.stdout.write(json.dumps(task, separators=(",", ":")) + "\n") 16 | sys.exit(1) 17 | 18 | # vim: ai sts=4 et sw=4 19 | -------------------------------------------------------------------------------- /test/test_hooks/on-modify-for-template.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import json 5 | 6 | original_task = sys.stdin.readline() 7 | modified_task = sys.stdin.readline() 8 | 9 | task = json.loads(modified_task) 10 | task["description"] = "This is an example modify hook" 11 | 12 | # A random message 13 | sys.stdout.write("Hello from the template hook\n") 14 | 15 | sys.stdout.write(json.dumps(task, separators=(",", ":")) + "\n") 16 | sys.exit(0) 17 | 18 | # vim: ai sts=4 et sw=4 19 | -------------------------------------------------------------------------------- /test/test_hooks/on-modify-misbehave2: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-modify event is triggered separately for each task modified. This hook 4 | # script can accept/reject the modification. Processing will continue. 5 | 6 | # Input: 7 | # - line of JSON for the original task 8 | # - line of JSON for the modified task, the diff being the modification 9 | read original_task 10 | read modified_task 11 | 12 | # Output: 13 | # - JSON, modified or unmodified. 14 | # - Optional feedback/error. 15 | echo 'FEEDBACK' 16 | 17 | # Status: 18 | # - 0: JSON accepted, non-JSON is feedback. 19 | # - non-0: JSON ignored, non-JSON is error. 20 | exit 0 21 | -------------------------------------------------------------------------------- /test/test_hooks/on-modify-misbehave3: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-modify event is triggered separately for each task modified. This hook 4 | # script can accept/reject the modification. Processing will continue. 5 | 6 | # Input: 7 | # - line of JSON for the original task 8 | # - line of JSON for the modified task, the diff being the modification 9 | read original_task 10 | read modified_task 11 | 12 | # Output: 13 | # - JSON, modified or unmodified. 14 | # - Optional feedback/error. 15 | echo $modified_task 16 | echo '{"description":"extra","status":"pending"}' 17 | echo 'FEEDBACK' 18 | 19 | # Status: 20 | # - 0: JSON accepted, non-JSON is feedback. 21 | # - non-0: JSON ignored, non-JSON is error. 22 | exit 0 23 | -------------------------------------------------------------------------------- /test/test_hooks/on-modify-misbehave4: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-modify event is triggered separately for each task modified. This hook 4 | # script can accept/reject the modification. Processing will continue. 5 | 6 | # Input: 7 | # - line of JSON for the original task 8 | # - line of JSON for the modified task, the diff being the modification 9 | read original_task 10 | read modified_task 11 | 12 | # Output: 13 | # - JSON, modified or unmodified. 14 | # - Optional feedback/error. 15 | echo '{"description":"different","status":"pending","uuid":"bad"}' 16 | echo 'FEEDBACK' 17 | 18 | # Status: 19 | # - 0: JSON accepted, non-JSON is feedback. 20 | # - non-0: JSON ignored, non-JSON is error. 21 | exit 0 22 | -------------------------------------------------------------------------------- /test/test_hooks/on-modify-misbehave5: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-modify event is triggered separately for each task modified. This hook 4 | # script can accept/reject the modification. Processing will continue. 5 | 6 | # Input: 7 | # - line of JSON for the original task 8 | # - line of JSON for the modified task, the diff being the modification 9 | read original_task 10 | read modified_task 11 | 12 | # Output: 13 | # - JSON, modified or unmodified. 14 | # - Optional feedback/error. 15 | echo '{"}' 16 | echo 'FEEDBACK' 17 | 18 | # Status: 19 | # - 0: JSON accepted, non-JSON is feedback. 20 | # - non-0: JSON ignored, non-JSON is error. 21 | exit 0 22 | -------------------------------------------------------------------------------- /test/test_hooks/on-modify-misbehave6: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-modify event is triggered separately for each task modified. This hook 4 | # script can accept/reject the modification. Processing will continue. 5 | 6 | # Input: 7 | # - line of JSON for the original task 8 | # - line of JSON for the modified task, the diff being the modification 9 | read original_task 10 | read modified_task 11 | 12 | # Output: 13 | # - JSON, modified or unmodified. 14 | # - Optional feedback/error. 15 | echo '{"description":"invalid"}' 16 | echo 'FEEDBACK' 17 | 18 | # Status: 19 | # - 0: JSON accepted, non-JSON is feedback. 20 | # - non-0: JSON ignored, non-JSON is error. 21 | exit 0 22 | -------------------------------------------------------------------------------- /test/test_hooks/on-modify-reject: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-modify event is triggered separately for each task modified. This hook 4 | # script can accept/reject the modification. Processing will continue. 5 | 6 | # Input: 7 | # - line of JSON for the original task 8 | # - line of JSON for the modified task, the diff being the modification 9 | read original_task 10 | read modified_task 11 | 12 | # Output: 13 | # - JSON, modified or unmodified. 14 | # - Optional feedback/error. 15 | echo $modified_task 16 | echo 'FEEDBACK' 17 | 18 | # Status: 19 | # - 0: JSON accepted, non-JSON is feedback. 20 | # - non-0: JSON ignored, non-JSON is error. 21 | exit 1 22 | -------------------------------------------------------------------------------- /test/test_hooks/on-modify-revert: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The on-modify event is triggered separately for each task modified. This hook 4 | # script can accept/reject the modification. Processing will continue. 5 | 6 | # Input: 7 | # - line of JSON for the original task 8 | # - line of JSON for the modified task, the diff being the modification 9 | read original_task 10 | read modified_task 11 | 12 | # Output: 13 | # - JSON, modified or unmodified. 14 | # - Optional feedback/error. 15 | echo $original_task 16 | 17 | # Status: 18 | # - 0: JSON accepted, non-JSON is feedback. 19 | # - non-0: JSON ignored, non-JSON is error. 20 | exit 0 21 | -------------------------------------------------------------------------------- /test/test_hooks/on-modify.dummy: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "on-modify executed" 4 | 5 | while read TASK MODTASK; do 6 | echo "Existing task $TASK modified to $MODTASK" 7 | echo $MODTASK 8 | done 9 | 10 | exit 0 11 | -------------------------------------------------------------------------------- /test/test_hooks/wrapper.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SELF=$(basename $0) 4 | ORIGINALHOOK="$(dirname $0)/original_${SELF}" 5 | IN="${ORIGINALHOOK}.log.in" 6 | OUT="${ORIGINALHOOK}.log.out" 7 | 8 | # Let it know that we were executed 9 | echo "% Called at $(python3 -c 'import time; print(time.time())') with '$@'" >> ${IN} 10 | 11 | # Log what arrives via stdin to ${IN} and what comes via stdout to ${OUT} 12 | $ORIGINALHOOK "$@" < <(tee -a ${IN}) > >(tee -a ${OUT}) 13 | # More on the < <() syntax at: https://tldp.org/LDP/abs/html/process-sub.html 14 | 15 | EXITCODE=$? 16 | echo "! Exit code: ${EXITCODE}" >> ${OUT} 17 | 18 | exit $EXITCODE 19 | -------------------------------------------------------------------------------- /test/tw-1637.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . bash_tap_tw.sh 3 | 4 | # This problems only appears for "modify", not for "add" 5 | # The 'proj:mod' is interpreted as 'proj:modified', then DOM lookup substitutes 6 | # the 'modified' date. 7 | task add a 8 | task 1 mod proj:mod 9 | task 1 _project | grep mod 10 | -------------------------------------------------------------------------------- /test/tw-1643.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | source bash_tap_tw.sh 3 | 4 | task add TW-1643 pro:YDKJS +work 5 | task context define work +work 6 | task context work 7 | task pro:YDKJS mod prio:M 8 | task all | grep TW-1643 9 | -------------------------------------------------------------------------------- /test/tw-1688.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . bash_tap_tw.sh 3 | 4 | # TW-1688 task fails to import 5 | # The problem is when a completed task, with a dependency is exported, then 6 | # imported after the data is removed. On import, the circular dependency 7 | # check didn't notice that a UUID failed to exist, and generated a JSON error. 8 | # 9 | # Although an unusual circumstance, people do delete data from their 10 | # completed.data file. 11 | 12 | task add one 13 | task log two depends:1 14 | 15 | task /two/ export > JSON 16 | 17 | rm taskchampion.sqlite3 18 | task import JSON 19 | -------------------------------------------------------------------------------- /test/tw-1715.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . bash_tap_tw.sh 3 | 4 | # This adds a task with a wrong due date. If rc.dateformat is set, it works as expected. 5 | task add basetask due:2015-09-03T08:00:00Z 6 | 7 | # For seeing the problem in test output; not needed to make the test fail. 8 | task export 9 | 10 | task export | grep -E '"due":\s*"20150903T080000Z"' 11 | -------------------------------------------------------------------------------- /test/tw-1718.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . bash_tap_tw.sh 3 | 4 | echo "uda.foo.label=foo" >> taskrc 5 | echo "uda.foo.type=string" >> taskrc 6 | 7 | # This sets foo to "PT13H" despite it being a string UDA 8 | task add bar foo:"3h+10h" 9 | 10 | # Show the problem in TAP output 11 | task _get 1.foo 12 | 13 | task _get 1.foo | grep '3h+10h' 14 | -------------------------------------------------------------------------------- /test/tw-1804.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . bash_tap_tw.sh 3 | 4 | # Import a task with annotation without an description 5 | # Should fail 6 | OUTPUT=`echo '{"description":"Buy the milk","annotations":[{"entry": 1234567890}]}' | task import - 2>&1` || : 7 | [[ $OUTPUT =~ "missing a description" ]] 8 | 9 | # Check that the task was NOT added 10 | [[ `task count` == 0 ]] 11 | 12 | # Import a task with annotation without an entry 13 | echo '{"description":"Buy the milk","annotations":[{"description":"and Cheese"}]}' | task import - 14 | 15 | # Check that the task was added 16 | [[ `task count` == 1 ]] 17 | [[ `task milk count` == 1 ]] 18 | [[ `task _get 1.annotations.count` == 1 ]] 19 | -------------------------------------------------------------------------------- /test/tw-1883.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Test for TW-1883 (#1896 on Github) 3 | # https://github.com/GothenburgBitFactory/taskwarrior/issues/1896 4 | 5 | . bash_tap_tw.sh 6 | 7 | task add sample 8 | task +PENDING '(' ')' 9 | task '(' ')' 10 | task '(' '(' ')' ')' 11 | task '(' '(' ')' '(' ')' ')' 12 | 13 | # Detect that the task is actually displayed 14 | task +PENDING '(' ')' | grep sample 15 | task '(' ')' | grep sample 16 | task '(' '(' ')' ')' | grep sample 17 | task '(' '(' ')' '(' ')' ')' | grep sample 18 | -------------------------------------------------------------------------------- /test/tw-1895.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | . bash_tap_tw.sh 4 | 5 | task add description:'start something' 6 | task | grep something 7 | -------------------------------------------------------------------------------- /test/tw-1938.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Ref: https://github.com/GothenburgBitFactory/taskwarrior/issues/1938 3 | 4 | . bash_tap_tw.sh 5 | 6 | # Add a task with two annotations with the same entry value 7 | echo '{"description": "my description", "annotations": [{"entry": "20170813T120000Z", "description": "first"}, {"entry": "20170813T120000Z", "description": "second"}]}' | task import - 8 | 9 | # Check that the task has 2 annotations 10 | [[ `task _get 1.annotations.count` == 2 ]] 11 | -------------------------------------------------------------------------------- /test/tw-2124.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # A test case for TW-2124. 3 | # https://github.com/GothenburgBitFactory/taskwarrior/issues/2124 4 | 5 | . bash_tap_tw.sh 6 | 7 | # Filtering for description with a dash works 8 | task add foo-bar 9 | task foo-bar list | grep foo-bar 10 | -------------------------------------------------------------------------------- /test/tw-2189.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . bash_tap_tw.sh 3 | 4 | task add "foo \' bar" 5 | task list 6 | 7 | # Assert the task was correctly added 8 | [[ ! -z `task list | grep "foo ' bar"` ]] 9 | [[ `task _get 1.description` == "foo ' bar" ]] 10 | 11 | # Bonus: Assert escaped double quotes are also handled correctly 12 | task add 'foo \" bar' 13 | task list 14 | 15 | # Assert the task was correctly added 16 | [[ ! -z `task list | grep 'foo " bar'` ]] 17 | [[ `task _get 2.description` == 'foo " bar' ]] 18 | -------------------------------------------------------------------------------- /test/tw-2257.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | . bash_tap_tw.sh 4 | 5 | task 'rc.uda.test.type=string' add 'test:"start doing the thing"' hello world 6 | -------------------------------------------------------------------------------- /test/tw-2386.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | . bash_tap_tw.sh 4 | 5 | task add first project:someday 6 | task add second project:bar 7 | 8 | task project:someday list | grep first 9 | -------------------------------------------------------------------------------- /test/tw-2392.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . bash_tap_tw.sh 3 | 4 | # This sets foo to "PT13H" despite it being a string UDA 5 | task add test project:c.vs.2021-01 6 | 7 | # Show the problem in TAP output 8 | task rc.debug.parser:3 project:c.vs.2021-01 _ids 9 | 10 | [[ `task project:c.vs.2021-01 _ids` == "1" ]] 11 | 12 | # Same thing now, but with 11 instead of 01 13 | 14 | # This sets foo to "PT13H" despite it being a string UDA 15 | task add test project:c.vs.2021-11 16 | 17 | # Show the problem in TAP output 18 | task rc.debug.parser:3 project:c.vs.2021-11 _ids 19 | 20 | [[ `task project:c.vs.2021-11 _ids` == "2" ]] 21 | -------------------------------------------------------------------------------- /test/tw-2429.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . bash_tap_tw.sh 3 | 4 | # Setup the tasks, urgent ones and unimportant 5 | for i in `seq 1 5`; do task add unimportant task $i; done 6 | for i in `seq 1 5`; do task add important task $i due:today+${i}d; done 7 | 8 | # Complete all the tasks. Since the highest priority task was completed, 9 | # nagging should not happen. 10 | NAGGING_HAPPENS=`task rc.bulk:0 1-10 done 2>&1 | grep 'more urgent'` || : 11 | 12 | # Nagging should not have happened 13 | [[ -z $NAGGING_HAPPENS ]] 14 | -------------------------------------------------------------------------------- /test/tw-2451.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . bash_tap_tw.sh 3 | 4 | # Setup the tasks 5 | task add Participate in the marine search 6 | task add Find the pearls 7 | 8 | # Search for tasks containing "mar" 9 | task mar 10 | task mar count 11 | [[ `task mar count` == 1 ]] 12 | -------------------------------------------------------------------------------- /test/tw-2514.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . bash_tap_tw.sh 3 | 4 | # Setup the tasks 5 | task add Something I did yesterday 6 | task 1 mod start:yesterday+18h 7 | task 1 done end:yesterday+20h 8 | 9 | # Check that 2 hour interval is reported by task info 10 | task info | grep -F "Start deleted" 11 | [[ ! -z `task info | grep -F "Start deleted (duration: 2:00:00)."` ]] 12 | -------------------------------------------------------------------------------- /test/tw-2530.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . bash_tap_tw.sh 3 | 4 | # Setup the tasks 5 | task add wait:1w this should INDEED show up 6 | task add this should NOT show up 7 | sleep 1 8 | 9 | # Check that the wait.before filter displays the correct number of tasks 10 | task wait.before:1w all 11 | 12 | # Assertion: The task without wait attribute does not show up 13 | [[ -z `task wait.before:1w all | grep NOT` ]] 14 | 15 | # Assertion: The task with the wait attribute DOES show up 16 | [[ ! -z `task wait.before:1w all | grep INDEED` ]] 17 | 18 | # Assertion: There is exactly one task matching the filter 19 | [[ `task wait.before:1w count` == 1 ]] 20 | -------------------------------------------------------------------------------- /test/tw-2550.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . bash_tap_tw.sh 3 | 4 | # Setup the context 5 | task config context.work.read '+work' 6 | task config context.work.write '+work' 7 | 8 | # Create a task outside of the context 9 | task add outside 10 | 11 | # Activate the context 12 | task context work 13 | 14 | # Add multiple tasks within the context, some of which contain numbers or uuids 15 | task add inside 16 | task add inside 2 17 | task add inside 3 18 | task add inside aabbccdd 19 | task add inside 4-5 20 | 21 | # Assertion: Task defined outside of the context should not show up 22 | [[ -z `task all | grep outside` ]] 23 | 24 | # Five tasks were defined within the context 25 | task count 26 | [[ `task count` == "5" ]] 27 | 28 | # Unset the context 29 | task context none 30 | 31 | # Exactly five tasks have the tag work 32 | task +work count 33 | [[ `task +work count` == "5" ]] 34 | -------------------------------------------------------------------------------- /test/tw-2581.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Test setting configuration variable with a trailing comment works 3 | . bash_tap_tw.sh 4 | 5 | # Add configuration variable with a trailing comment into taskrc 6 | echo 'weekstart=Monday # Europe standard' >> taskrc 7 | cat taskrc 8 | 9 | # Use config the change the value to "Sunday" 10 | task config weekstart Sunday 11 | 12 | # Ensure the comment was preserved and value changed 13 | cat taskrc | grep weekstart=Sunday 14 | [[ `cat taskrc | grep weekstart=Sunday` == 'weekstart=Sunday # Europe standard' ]] 15 | -------------------------------------------------------------------------------- /test/tw-3102.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . bash_tap_tw.sh 3 | 4 | task add modtest modified:yesterday 5 | old_modified=`task _get 1.modified` 6 | echo $old_modified 7 | 8 | task 1 start 9 | new_modified=`task _get 1.modified` 10 | echo $new_modified 11 | 12 | # `task start` should have updated modified 13 | [[ $old_modified != $new_modified ]] 14 | -------------------------------------------------------------------------------- /test/tw-3109.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | . bash_tap_tw.sh 3 | 4 | task add emptyval 5 | task 1 done 6 | task 1 mod end: status:pending 7 | task_end=`task 1 info | grep ^End | sed -e 's/^End //' || true` 8 | echo "task_end: $task_end" 9 | 10 | # `task mod end:` should have deleted the end. 11 | [[ "$task_end" == "" ]] 12 | -------------------------------------------------------------------------------- /test/tw-3527.test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import os 5 | import unittest 6 | import re 7 | import json 8 | import string 9 | 10 | # Ensure python finds the local simpletap module 11 | sys.path.append(os.path.dirname(os.path.abspath(__file__))) 12 | 13 | from basetest import Task, TestCase 14 | 15 | 16 | class TestExport(TestCase): 17 | def setUp(self): 18 | self.t = Task() 19 | 20 | # pretty arbitrary, just need several unique tasks 21 | for letter in string.ascii_lowercase: 22 | self.t(f"add test_task +{letter}") 23 | self.t(f"+{letter} done") 24 | 25 | def test_export_stability_for_multiple_id_0(self): 26 | exports = [self.t("export")[1] for _ in range(2)] 27 | json_lists = [json.loads(s.strip()) for s in exports] 28 | # to rule out a typo causing two failed exports 29 | self.assertEqual(len(json_lists[0]), len(string.ascii_lowercase)) 30 | # for better diff view 31 | self.assertEqual(json_lists[0], json_lists[1]) 32 | # the real test 33 | self.assertEqual(exports[0], exports[1]) 34 | 35 | 36 | if __name__ == "__main__": 37 | from simpletap import TAPTestRunner 38 | 39 | unittest.main(testRunner=TAPTestRunner()) 40 | --------------------------------------------------------------------------------