Skip to content

Importing DSU entries

Gene M. Angelo, Jr edited this page Jan 7, 2024 · 4 revisions

dsu provides a means to import entry group entry data from a previously exported csv file (see Exporting DSU Entries).

If you want to import a previously exported csv file, you can import dsu entries from a csv file by using any of the following commands:

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

NOTE: Each import command will prompt you to confirm the import. If confirmed, dsu will import the entry group entry data from the csv file into dsu.

Examples

Importing all entries from a csv file

You can import all entry group entries from a csv file.

The following command will import all the dsu entries from the given csv file, and merge the imported entries with any existing entry group entries you may have.

dsu import all -i ~/Downloads/dsu-20231225201546-2023-01-01-thru-2024-01-01.csv

The following command will import all the dsu entries from the given csv file, and overwrite all entry groups entries with the same entry group date using the dsu export all shortcut command.

dsu m a -m false -i ~/Downloads/dsu-20231225201546-2023-01-01-thru-2024-01-01.csv

Importing specific entries from a csv file

You can import specific entry group entries from a csv file for a date range.

The following command will import the dsu entries from the given csv file for the given date range, and merge the imported entries with any existing entry group entries you may have.

dsu import dates --from 1/1/2023 --to 12/31/2023 -i ~/Downloads/dsu-20231225201546-2023-01-01-thru-2024-01-01.csv

The following command will import the dsu entries from the given csv file for the given date range, and overwrite all entry groups entries with the same entry group date using the dsu import dates shortcut command.

dsu m dd -m false -f 1/1/2023 -t 12/31/2023 -i ~/Downloads/dsu-20231225201546-2023-01-01-thru-2024-01-01.csv