Closed dbrgn closed 10 years ago
Added an inital implementation of tagid output, also argument subparsers to switch between swid and tagid output.
I'm not sure if this solution is good, I don't like how the command is invoked regarding common options and options for subcomands:
python main.py --regid regid.2000-03.asdf tagid
to get tagid output with a custom regidpython main.py tagid --regid regid.2000-03.asdf
does not work, because --regid
is a common optionI' didn't add any new tests atm, I just modified the current tests to work with the new setup. I will add tests when we decided how we will proceed.
@cfaessler and @dbrgn, what do you think?
BTW. In the new standard, the tagid ist called "software_id" (page 13 in the ISO standard pdf). I couldn't find any reference for the fact, that the tagid/software_id, uniqueid or regid shall not contain underscores. It is clearly allowed to user underscores in the regid, as every space should be replaced with an underscore character. There are no exact rules for the uniqueid (except, it must be a vaild XML attribute), as the uniqueid can contain the regid, the uniqueid must allow underscores. TLDR: We cannot parse the software_id.
A not parsable software_id is indeed big problem in the backend. Maybe we could enforce "no-whitespace/underscore" in the regid/uniqueid
Or are we shure that there is a use case for parsing/saving software_id's? Use case could be as follows:
See #84 and #85
Tag-ID consists of regid_uniqueID.