timewarrior/doc/man1/timew-import.1.adoc
Thomas Lauf b3d9562c54
Some checks failed
tests / tests (alpine-edge, Alpine Edge, ubuntu-latest) (push) Has been cancelled
tests / tests (alpine-latest, Alpine Latest, ubuntu-latest) (push) Has been cancelled
tests / tests (archlinux, Archlinux Base, ubuntu-latest) (push) Has been cancelled
tests / tests (centos-stream9, Centos Stream9, ubuntu-latest) (push) Has been cancelled
tests / tests (debianstable, Debian Stable, ubuntu-latest) (push) Has been cancelled
tests / tests (debiantesting, Debian Testing, ubuntu-latest) (push) Has been cancelled
tests / tests (fedora41, Fedora 41, ubuntu-latest) (push) Has been cancelled
tests / tests (fedora42, Fedora 42, ubuntu-latest) (push) Has been cancelled
tests / tests (opensuseleap, OpenSUSE Leap, ubuntu-latest) (push) Has been cancelled
tests / tests (opensusetumbleweed, OpenSUSE Tumbleweed, ubuntu-latest) (push) Has been cancelled
tests / tests (osx-13, macOS 13, macos-13) (push) Has been cancelled
tests / tests (osx-14, macOS 14, macos-14) (push) Has been cancelled
tests / tests (osx-15, macOS 15, macos-15) (push) Has been cancelled
tests / tests (ubuntu2204, Ubuntu 22.04, ubuntu-latest) (push) Has been cancelled
tests / tests (ubuntu2204, Ubuntu 24.04, ubuntu-latest) (push) Has been cancelled
Add import command
The import command lets the user import time tracking data as produced by the export command, i.e. a JSON array of interval objects.

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2025-06-25 20:00:16 +02:00

45 lines
1.1 KiB
Text

= timew-import(1)
== NAME
timew-import - import time-tracking data from files
== SYNOPSIS
[verse]
*timew import* _<file>_**...**
== DESCRIPTION
Import tracked time from `file`.
The files have to be in JSON format, as exported by **timew-export**(1), i.e. a single array with interval objects.
When importing, the intervals are checked for overlaps with existing intervals.
If an overlap is found, the import will abort at the first overlap and no more intervals are imported, unless the `:adjust` hint is specified.
In general, it is recommended to create a backup of your data before importing.
== HINTS
**:adjust**::
When given, the imported interval will overwrite any existing intervals that it overlaps with.
== EXAMPLES
*Import intervals from a file*::
+
Import intervals from a single file:
+
[source]
----
timew import intervals.json
----
+
Any file path that does not start with a `/` is interpreted as relative to the current working directory.
*Import intervals from multiple files*::
+
One can also use shell wildcards and absolute paths:
+
[source]
----
timew import /path/to/intervals/*.json
----