Importing DSU entries - gangelo/dsu GitHub Wiki
Updates for dsu 3.0.0 coming soon
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 alldsu m a# Equivalent to the above, only using shortcutsdsu import dates OPTIONSdsu m dd OPTIONS# Equivalent to the above, only using shortcuts
The 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