{"action":"created","issue":{"url":"https://api.github.com/repos/georgjaehnig/serchilo-drupal/issues/94","labels_url":"https://api.github.com/repos/georgjaehnig/serchilo-drupal/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/georgjaehnig/serchilo-drupal/issues/94/comments","events_url":"https://api.github.com/repos/georgjaehnig/serchilo-drupal/issues/94/events","html_url":"https://github.com/georgjaehnig/serchilo-drupal/issues/94","id":66590641,"number":94,"title":"URL parameter syntax","user":{"login":"georgjaehnig","id":1092628,"avatar_url":"https://avatars.githubusercontent.com/u/1092628?v=3","gravatar_id":"","url":"https://api.github.com/users/georgjaehnig","html_url":"https://github.com/georgjaehnig","followers_url":"https://api.github.com/users/georgjaehnig/followers","following_url":"https://api.github.com/users/georgjaehnig/following{/other_user}","gists_url":"https://api.github.com/users/georgjaehnig/gists{/gist_id}","starred_url":"https://api.github.com/users/georgjaehnig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgjaehnig/subscriptions","organizations_url":"https://api.github.com/users/georgjaehnig/orgs","repos_url":"https://api.github.com/users/georgjaehnig/repos","events_url":"https://api.github.com/users/georgjaehnig/events{/privacy}","received_events_url":"https://api.github.com/users/georgjaehnig/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-06T12:04:51Z","updated_at":"2015-04-06T13:04:16Z","closed_at":null,"body":"I plan to change the URL parameter syntax (again) – which I want to discuss beforehand.\r\n\r\n# Current syntax\r\n\r\nCurrently, the syntax [follows the OpenSearch template syntax](http://www.serchilo.net/help/url). In short, this means that\r\n\r\n1. arguments get prefixed with 's:' (for Serchilo), e.g.:\r\n\r\n   `{s:query}`\r\n\r\n2. variables get a category prefix or no prefix, e.g.\r\n\r\n   `{language}`\r\n   `{user:name}`\r\n\r\n# New syntax\r\n\r\nThe new syntax shall better distinguish between variables and arguments, and allow further extensions. For old Serchilo users, it will look familiar to the pre-2013 syntax.\r\n\r\nIt shall come with two main concepts:\r\n\r\n1. Arguments are prefixed with `%`, Variables with `$`. For example:\r\n\r\n   `{%query}`\r\n   `{$language}`\r\n   `{$user:name}`\r\n\r\n2. Optional key/value pairs can be added, separated by `|`. For example:\r\n\r\n   `{%Datum|type=date|output=Y-m-d}`\r\n   `{%second argument|order=2}`\r\n   `{%city|function=de.city}`\r\n\r\n(The key/value names in the examples are not relevant right now but they show about what extentions I am thinking of.)\r\n\r\n\r\n# Discussion\r\n\r\nWith these changes, the syntax is not compatible anymore to OpenSearch. But actually, it wasn't even now, as OpenSearch [seems to have required the `{searchTerms}` parameter](http://www.opensearch.org/Specifications/OpenSearch/1.1#Required_template_parameters\r\n) which wasn't present in Serchilo URLs. And the new syntax gives more clarity – and allows a lot of more extensions.\r\n\r\nWhat I am asking you now:\r\n\r\n1. Is the syntax clear and self-explaining?\r\n2. Do you know of other, already-established URL syntaxes that would also suit our needs?\r\n\r\nAnd if all is OK, then a simple \"Yes, looks good\" would also help. :)"},"comment":{"url":"https://api.github.com/repos/georgjaehnig/serchilo-drupal/issues/comments/90054256","html_url":"https://github.com/georgjaehnig/serchilo-drupal/issues/94#issuecomment-90054256","issue_url":"https://api.github.com/repos/georgjaehnig/serchilo-drupal/issues/94","id":90054256,"user":{"login":"jneubarth-ai","id":10724396,"avatar_url":"https://avatars.githubusercontent.com/u/10724396?v=3","gravatar_id":"","url":"https://api.github.com/users/jneubarth-ai","html_url":"https://github.com/jneubarth-ai","followers_url":"https://api.github.com/users/jneubarth-ai/followers","following_url":"https://api.github.com/users/jneubarth-ai/following{/other_user}","gists_url":"https://api.github.com/users/jneubarth-ai/gists{/gist_id}","starred_url":"https://api.github.com/users/jneubarth-ai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jneubarth-ai/subscriptions","organizations_url":"https://api.github.com/users/jneubarth-ai/orgs","repos_url":"https://api.github.com/users/jneubarth-ai/repos","events_url":"https://api.github.com/users/jneubarth-ai/events{/privacy}","received_events_url":"https://api.github.com/users/jneubarth-ai/received_events","type":"User","site_admin":false},"created_at":"2015-04-06T13:04:16Z","updated_at":"2015-04-06T13:04:16Z","body":"+1 for the possibility to specify the output format of dates. I use two Serchilo commands frequently where the date formats differ, so that would be a useful feature. Does it make sense to specify the input format as well or is there a default for this?\r\n\r\nConcerning the `{%second argument|order=2}`: Shouldn't the key be `index` instead of `order`? Or maybe I'm missing the purpose of this extension."}}