arthurpsmith / wikidata-tools

My collection of tools for interacting with the wikidata database
14 stars 15 forks source link

add support for CN (P1209) #10

Closed stevenliuyi closed 5 years ago

stevenliuyi commented 5 years ago

Hi, I added support for the property P1209.

arthurpsmith commented 5 years ago

I see what you're trying to do - however, that would break the previous property, also it's not quite following the pattern of the others. I'll take a look.

stevenliuyi commented 5 years ago

I'm sorry that I placed it in the wrong place and didn't notice the previous property would break. I've just made a quick fix. Regarding the pattern of the others, do you mean that url_prefix should be used instead of hardcoding the full URL?

arthurpsmith commented 5 years ago

Thanks - yes, using the url_prefix is better, so all you would need I think is to set the $link_string to 'typeNum=1&pubCode=$newspaper_id' or the other string depending on the match. Make sense?

stevenliuyi commented 5 years ago

Thank you! Let me know if there is still a problem.

arthurpsmith commented 5 years ago

@stevenliuyi Ok, it's merged, and installed, and I added the formatter URL on the property and tested it on a couple of cases, seems to be working - thanks!