{"action":"created","issue":{"url":"https://api.github.com/repos/ultrabug/py3status/issues/420","repository_url":"https://api.github.com/repos/ultrabug/py3status","labels_url":"https://api.github.com/repos/ultrabug/py3status/issues/420/labels{/name}","comments_url":"https://api.github.com/repos/ultrabug/py3status/issues/420/comments","events_url":"https://api.github.com/repos/ultrabug/py3status/issues/420/events","html_url":"https://github.com/ultrabug/py3status/pull/420","id":172451279,"number":420,"title":"Improved formatter","user":{"login":"tobes","id":56311,"avatar_url":"https://avatars.githubusercontent.com/u/56311?v=3","gravatar_id":"","url":"https://api.github.com/users/tobes","html_url":"https://github.com/tobes","followers_url":"https://api.github.com/users/tobes/followers","following_url":"https://api.github.com/users/tobes/following{/other_user}","gists_url":"https://api.github.com/users/tobes/gists{/gist_id}","starred_url":"https://api.github.com/users/tobes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobes/subscriptions","organizations_url":"https://api.github.com/users/tobes/orgs","repos_url":"https://api.github.com/users/tobes/repos","events_url":"https://api.github.com/users/tobes/events{/privacy}","received_events_url":"https://api.github.com/users/tobes/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ultrabug/py3status/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"ultrabug","id":474389,"avatar_url":"https://avatars.githubusercontent.com/u/474389?v=3","gravatar_id":"","url":"https://api.github.com/users/ultrabug","html_url":"https://github.com/ultrabug","followers_url":"https://api.github.com/users/ultrabug/followers","following_url":"https://api.github.com/users/ultrabug/following{/other_user}","gists_url":"https://api.github.com/users/ultrabug/gists{/gist_id}","starred_url":"https://api.github.com/users/ultrabug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ultrabug/subscriptions","organizations_url":"https://api.github.com/users/ultrabug/orgs","repos_url":"https://api.github.com/users/ultrabug/repos","events_url":"https://api.github.com/users/ultrabug/events{/privacy}","received_events_url":"https://api.github.com/users/ultrabug/received_events","type":"User","site_admin":false},"assignees":[{"login":"ultrabug","id":474389,"avatar_url":"https://avatars.githubusercontent.com/u/474389?v=3","gravatar_id":"","url":"https://api.github.com/users/ultrabug","html_url":"https://github.com/ultrabug","followers_url":"https://api.github.com/users/ultrabug/followers","following_url":"https://api.github.com/users/ultrabug/following{/other_user}","gists_url":"https://api.github.com/users/ultrabug/gists{/gist_id}","starred_url":"https://api.github.com/users/ultrabug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ultrabug/subscriptions","organizations_url":"https://api.github.com/users/ultrabug/orgs","repos_url":"https://api.github.com/users/ultrabug/repos","events_url":"https://api.github.com/users/ultrabug/events{/privacy}","received_events_url":"https://api.github.com/users/ultrabug/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-08-22T13:23:46Z","updated_at":"2016-08-26T08:34:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ultrabug/py3status/pulls/420","html_url":"https://github.com/ultrabug/py3status/pull/420","diff_url":"https://github.com/ultrabug/py3status/pull/420.diff","patch_url":"https://github.com/ultrabug/py3status/pull/420.patch"},"body":"So `_safe_format()` had a few issues where it didn't behave as i would have liked.\r\n\r\neg `'{empty}|nothing here'` would return `''` rather than `'nothing here'`\r\n\r\nAdditionally the code was starting to become quite hard to read, possibly buggy, and prevented expansion of new ideas eg block commands things like `[\\?max_length=10 {file-name}]` `[\\?if=param Hello]`\r\n\r\nAnyhow I have written a formatter it uses a simple parser similar to the config parser.  It also makes py3.py much shorter and easier to read.\r\n\r\nPlus it has tests `python formatter.py`\r\n\r\nI think seeing as we are going to shift modules to safe_format() that having a solid implementation is an improvement. \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ultrabug/py3status/issues/comments/242666835","html_url":"https://github.com/ultrabug/py3status/pull/420#issuecomment-242666835","issue_url":"https://api.github.com/repos/ultrabug/py3status/issues/420","id":242666835,"user":{"login":"ultrabug","id":474389,"avatar_url":"https://avatars.githubusercontent.com/u/474389?v=3","gravatar_id":"","url":"https://api.github.com/users/ultrabug","html_url":"https://github.com/ultrabug","followers_url":"https://api.github.com/users/ultrabug/followers","following_url":"https://api.github.com/users/ultrabug/following{/other_user}","gists_url":"https://api.github.com/users/ultrabug/gists{/gist_id}","starred_url":"https://api.github.com/users/ultrabug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ultrabug/subscriptions","organizations_url":"https://api.github.com/users/ultrabug/orgs","repos_url":"https://api.github.com/users/ultrabug/repos","events_url":"https://api.github.com/users/ultrabug/events{/privacy}","received_events_url":"https://api.github.com/users/ultrabug/received_events","type":"User","site_admin":false},"created_at":"2016-08-26T08:34:01Z","updated_at":"2016-08-26T08:34:01Z","body":"That's a huge one :astonished: thanks !\r\n\r\nTested OK !\r\n\r\nNote: those tests are awesome, but we shall move them to a proper py.test way later"}}
{"actor":{"display_login":"ultrabug"}}