Re: European capitals and lenght of tag config

European capitals and lenght of tag config
March 14, 2019 01:48PM
Hello guys,

I recieved a request for nice challenge - find cache in 10 of european capital cities. Due to guidelines, of course we can't define capital cities by lat/lon areas - but it is possible if we use counties and regions, rarely whole countries.
Because we have to mix counties, regions and countries in configuration, I decided to use popular Multiple test Checker (by Target.) enhanced script, created this checker:

It works fine, but I bumped into limitation - maximum number of characters in tag config. So I could list only 44 countries and remove 6, in order to fit the code into maxchar limit. It's not a big problem, but still: If you have any idea, how to make it more effective, please, give me a hint. Maybe it's possible to write same config more effectively.

More background to idea:
Most of the capitals are defined by their counties (like Berlin, Paris, Bratislava I).
But some countries does not have counties at all - there are capitals defined by regions (example - Malta as whole island of Malta, or Capital region on Iceland).
In addition - some countries does not have regions at all - nothing. There I needed to use only whole country level (Liechtenstein, Monaco, San Marino).

I needed to drop these 6 countries:

{"func":"number","conf":{"limit":1,"country":["Armenia"],"region": ["Yerevan"]}},
{"func":"number","conf":{"limit":1,"country":["Azerbaijan"],"region": ["Bakı İnzibati Ərazisi"]}},
{"func":"number","conf":{"limit":1,"country":["Kazakhstan"],"region": ["Астана"]}},
{"func":"number","conf":{"limit":1,"country":["Vatican City State"]}}

Thank you for your thoughts.

Re: European capitals and lenght of tag config
March 14, 2019 08:04PM
My multiple checker could use a combined single field for "country,region,county" to shorten the tag in a single list of these combinations. Here is an example

I see immediatelly some problems like Bratislava which has many counties. It may need different test for country,region and country,county pairs to be precise. Anyway... the tag size is not a problem this way.
Re: European capitals and lenght of tag config
March 15, 2019 04:39AM
One feature I've put into that script is the ability to put repeated configuration into the "opt" field. So you can put the func and limit under there. That would result in the start of your config being:

{"func":"at_least","opt":{"req":10,"func":"number","conf":{"limit":1}},"conf":[{"conf":{"country":["Albania"],"county":["Tiran\u00eb"]}},{"conf":{"country":["Andorra"],"region":["Andorra la Vella"]}},{"conf":{"country":["Austria"],"county":["Wien"]}},{"conf":{"country":["Belarus"],"region":["Minsk"]}},
Re: European capitals and lenght of tag config
March 19, 2019 12:26AM
Hello, thank you for great help - I used sumbloke's solution, because CO liked that version of output more. He has suggested that he does not want those additional countries anyway. But it's good to know about these options for future. Oh and I included all 5 counties of Bratislava, now they could fit into the limit. Thanks again.
Sorry, you do not have permission to post/reply in this forum.