{"action":"opened","issue":{"url":"https://api.github.com/repos/steko/totalopenstation/issues/8","labels_url":"https://api.github.com/repos/steko/totalopenstation/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/steko/totalopenstation/issues/8/comments","events_url":"https://api.github.com/repos/steko/totalopenstation/issues/8/events","html_url":"https://github.com/steko/totalopenstation/issues/8","id":58802782,"number":8,"title":"Add some way to automagically find out which format a data file uses","user":{"login":"steko","id":40545,"avatar_url":"https://avatars.githubusercontent.com/u/40545?v=3","gravatar_id":"","url":"https://api.github.com/users/steko","html_url":"https://github.com/steko","followers_url":"https://api.github.com/users/steko/followers","following_url":"https://api.github.com/users/steko/following{/other_user}","gists_url":"https://api.github.com/users/steko/gists{/gist_id}","starred_url":"https://api.github.com/users/steko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steko/subscriptions","organizations_url":"https://api.github.com/users/steko/orgs","repos_url":"https://api.github.com/users/steko/repos","events_url":"https://api.github.com/users/steko/events{/privacy}","received_events_url":"https://api.github.com/users/steko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/steko/totalopenstation/milestones/4","labels_url":"https://api.github.com/repos/steko/totalopenstation/milestones/4/labels","id":994096,"number":4,"title":"future","description":null,"creator":{"login":"steko","id":40545,"avatar_url":"https://avatars.githubusercontent.com/u/40545?v=3","gravatar_id":"","url":"https://api.github.com/users/steko","html_url":"https://github.com/steko","followers_url":"https://api.github.com/users/steko/followers","following_url":"https://api.github.com/users/steko/following{/other_user}","gists_url":"https://api.github.com/users/steko/gists{/gist_id}","starred_url":"https://api.github.com/users/steko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steko/subscriptions","organizations_url":"https://api.github.com/users/steko/orgs","repos_url":"https://api.github.com/users/steko/repos","events_url":"https://api.github.com/users/steko/events{/privacy}","received_events_url":"https://api.github.com/users/steko/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2015-02-24T20:51:12Z","updated_at":"2015-02-24T20:51:19Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-02-24T20:51:19Z","updated_at":"2015-02-24T20:51:19Z","closed_at":null,"body":"Currently, the user has to tell the program which input format the data use. While this usability problem could partly be mitigated when <<issue 6>> is fixed, this leaves our library without a way to automatically find out which format should be used when parsing data.\n\nA possible approach to this problem would be to write, for each format, two sets of conditions:\n# necessary (evaluated with the //all()// builtin)\n# sufficient (evaluated with the //any()// builtin)\n\nThese conditions to evaluate could be like:\n* file contains a particular text string at a certain position\n* file contains lines that return //True// when parsed with the //is_point// function (but this would be computationally expensive)\n\nStaying on the subject of “computationally expensive”, there would be no use in parsing the //same// file a dozen of times to obtain the same response. A string could be added to the file, then, in the same fashion as the //coding// line in Python source files, like:\n    \n    # -*- tops-format: zeiss_rec_500 -*-\n    \n\nThe import routine should first look for this string, and only in case it doesn't find one, parse the full content of the file.\n\nIf for some reason parsing data using that format doesn't work, the program should do again an identification process.\n\nWhile there are some rough corners, having this feature would prove very useful and widen the field of opportunities for Total Open Station to be used in a range of different contexts.\n\n----------------------------------------\n- Bitbucket: https://bitbucket.org/steko/totalopenstation/issue/8\n- Originally reported by: Stefano Costa\n- Originally created at: 2009-12-12T00:22:22.172\n"}}