usc-isi-i2 / t2wml

Table to Wikidata Mapping Language
MIT License
22 stars 11 forks source link

Need options for the P585 precision and format dropdown menus #634

Closed g1eb closed 2 years ago

g1eb commented 2 years ago

We discussed adding dropdown menus for the P585 precision and format menus. @kyao could you point me to where we can get these options? Thanks!!

kyao commented 2 years ago

For precision options are: year, month, day Internally the options map to: 9, 10, 11

g1eb commented 2 years ago

Ke-Thia, just to clarify, do you mean year=9, month=10 and day=11?

kyao commented 2 years ago

Yes, that is correct

g1eb commented 2 years ago

Sounds good, I'll add the dropdown menu with those options for the precision. Do you have any pointers on where to get the options for the format dropdown menu?

kyao commented 2 years ago

Let's use these date formats in the dropdown menu. The user should be able to enter other formats.

kyao commented 2 years ago

For the precisions it looks like t2wml will automatically convert the stings to integers (year -> 9). @devowit Is this correct?

g1eb commented 2 years ago

@devowit I'm getting an error when trying to save these date format values, do we need to wrap them in quotes?

errorCode: 500
errorDescription: "Error returned from get_causx_partial_csv: while scanning for the next token\nfound character '%' that cannot start any token\n  in \"<unicode string>\", line 15, column 23:\n                  format: %Y\n                          ^300"
errorTitle: "ValueError"
devowit commented 2 years ago

yes, needs to be wrapped in quotes because internally everything gets converted to yaml and yaml treats % as a special character.....

g1eb commented 2 years ago

gotcha, that's what I did to get it to work, we can close this ticket I think