LibraryOfCongress / bagit-python

Work with BagIt packages from Python.
http://libraryofcongress.github.io/bagit-python
216 stars 85 forks source link

Argument to write 'Bag-Size' to created bags? #142

Open axfelix opened 4 years ago

axfelix commented 4 years ago

Hi,

Should there be an argument to pass to make_bag() that adds a Bag-Size property automatically? That seems like an appropriate time to hook this in rather than trying to calculate and append a standard property after the fact.

nkrabben commented 4 years ago

Does the oxum meet your needs for a Bag-Size property? It's in bag-info.txt in the form ####.### where the first part is the total bytes in the data folder and the second is the total number files in the data folder.

axfelix commented 4 years ago

Yup, I think so! Just looking to have that named element as I believe it's mentioned in the spec.