denshoproject / ddr-cmdln

Command-line tools for automating the Densho Digital Repository's various processes.
Other
0 stars 2 forks source link

Remove code from ddr-defs #116

Open gjost opened 5 years ago

gjost commented 5 years ago

The various format conversion functions (jsonload_, jsondump, csvload, csvdump, display, formprep, formpost, etc) in ddr-defs:repo_models are a useful mechanism but as much as possible these should be simple calls to DDR.converters. Custom code should be kept to a minimum. Code from custom functions should be incorporated into DDR.converters as early as possible. This will help keep ddr-defs simple and easy for users.

The ultimate goal would be to be able to specify the exact format of a field ('datetime', 'listofdicts', etc) in FIELDS and DDR would just do the right thing.