Skip to content

Exporting DSU entries

Gene M. Angelo, Jr edited this page Feb 18, 2024 · 4 revisions

Updates for dsu 3.0.0 coming soon

dsu provides the means to export its data into a csv file for convenience.

If you want to use a csv file, you can export dsu entries to a csv file by using any of the following commands:

  • dsu export all
  • dsu x a # Equivalent to the above, only using shortcuts
  • dsu export dates OPTIONS
  • dsu x dd OPTIONS # Equivalent to the above, only using shortcuts

The export command will prompt you to confirm the export. If confirmed, dsu will write a csv file to your operating systems temp folder, in the format of "dsu-<timestamp>-<from date>-thru-<to date>.csv".

Where:

  • <timestamp> = '%Y%m%d%H%M%S'
  • <from date> = the date of the earliest entry group exported (if export all) or the earliest date of the entry group dates to be exported (if export dates).
  • <to date> = the date of the most resent entry group exported (if export all) or the most recent date of the entry group dates to be exported (if export dates).

Examples

The following command, when run on December 25, 2023, at 20:15:46...

dsu export dates -f 1/1/1999 -t 12/23/2023

dsu x dd -f 1/1/1999 -t 12/23/2023 # Equivalent to the above, only using shortcuts

...will export dsu entries for all Entry Groups that fall between the dates of January 1st, 1999 through December 23rd 2023 in the time zone it was executed, and write them to the following file:

/var/folders/yv/5n77gtzn7z33ytwgr9mlbbrhf5rws6/T/dsu-20231225201546-1999-01-01-thru-2023-12-23.csv

For more information, see dsu help (dsu export or dsu help export).