{"action":"created","comment":{"url":"https://api.github.com/repos/eilslabs/Roddy/pulls/comments/102166745","pull_request_review_id":22907475,"id":102166745,"diff_hunk":"@@ -335,4 +336,106 @@ class BashConverter extends ConfigurationConverter {\n \n         return newCfg\n     }\n+\n+    /**\n+     * The easy Bash config format.\n+     *\n+     * This is a very generic helper script which just converts a bash cfg to xml.\n+     * Not everything is covered, it's not built in yet and it needs a lot of improvement.\n+     * But for now, it works.\n+     * To run it faster from within IDEA, copy the content to a groovy console and start it.\n+     *\n+     * Basically a file which contains some info in the header and only config values.\n+     * @param text\n+     * @return\n+     */\n+    String convertToXML(String text) {\n+        String previousLine = \"\"\n+        List<String> allLines = text.readLines()\n+        List<String> header = []\n+        for (int i = 0; i < allLines.size(); i++) {\n+            if (!allLines[i]) continue;\n+            if (isBashComment(allLines[i]))\n+                header << allLines[i]\n+            else\n+                break;\n+        }\n+\n+        if (!header)\n+            throw new IOException(\"Simple Bash configuration files need a valid header\")\n+\n+        // Convert the Bash header\n+        List<String> xmlLines = [];\n+        xmlLines << \"<configuration name='${getHeaderValue(header, \"name\", \"\")}'\".toString()\n+        xmlLines << \"imports='\" + getHeaderValue(header, \"imports\", \"\") + \"'\"\n+        xmlLines << \"description='\" + getHeaderValue(header, \"description\", \"\") + \"'\"\n+        xmlLines << \"usedresourcessize='\" + getHeaderValue(header, \"usedresourcessize\", \"l\") + \"' >\"\n+\n+        xmlLines << \"  <availableAnalyses>\"\n+        getHeaderValues(header, \"analysis\", []).each {\n+            String analysis ->\n+                String[] split = analysis.split(StringConstants.COMMA)\n+                String id = split[0]\n+                String cfg = split[1]\n+                String plg = split[2]","path":"RoddyCore/src/de/dkfz/roddy/config/converters/BashConverter.groovy","position":62,"original_position":62,"commit_id":"adb86fe909ddc609c4deb3e5d22db6d91c317a35","original_commit_id":"adb86fe909ddc609c4deb3e5d22db6d91c317a35","user":{"login":"dankwart-de","id":6582183,"avatar_url":"https://avatars.githubusercontent.com/u/6582183?v=3","gravatar_id":"","url":"https://api.github.com/users/dankwart-de","html_url":"https://github.com/dankwart-de","followers_url":"https://api.github.com/users/dankwart-de/followers","following_url":"https://api.github.com/users/dankwart-de/following{/other_user}","gists_url":"https://api.github.com/users/dankwart-de/gists{/gist_id}","starred_url":"https://api.github.com/users/dankwart-de/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dankwart-de/subscriptions","organizations_url":"https://api.github.com/users/dankwart-de/orgs","repos_url":"https://api.github.com/users/dankwart-de/repos","events_url":"https://api.github.com/users/dankwart-de/events{/privacy}","received_events_url":"https://api.github.com/users/dankwart-de/received_events","type":"User","site_admin":false},"body":"I added a check and further cleaned up the conversion method. As the file is read by the xml loader in a later step, the analysis will be ignored (and a logger message will be added).","created_at":"2017-02-21T09:45:03Z","updated_at":"2017-02-21T09:51:25Z","html_url":"https://github.com/eilslabs/Roddy/pull/15#discussion_r102166745","pull_request_url":"https://api.github.com/repos/eilslabs/Roddy/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/eilslabs/Roddy/pulls/comments/102166745"},"html":{"href":"https://github.com/eilslabs/Roddy/pull/15#discussion_r102166745"},"pull_request":{"href":"https://api.github.com/repos/eilslabs/Roddy/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/eilslabs/Roddy/pulls/15","id":103982314,"html_url":"https://github.com/eilslabs/Roddy/pull/15","diff_url":"https://github.com/eilslabs/Roddy/pull/15.diff","patch_url":"https://github.com/eilslabs/Roddy/pull/15.patch","issue_url":"https://api.github.com/repos/eilslabs/Roddy/issues/15","number":15,"state":"open","locked":false,"title":"Additional cfg files","user":{"login":"dankwart-de","id":6582183,"avatar_url":"https://avatars.githubusercontent.com/u/6582183?v=3","gravatar_id":"","url":"https://api.github.com/users/dankwart-de","html_url":"https://github.com/dankwart-de","followers_url":"https://api.github.com/users/dankwart-de/followers","following_url":"https://api.github.com/users/dankwart-de/following{/other_user}","gists_url":"https://api.github.com/users/dankwart-de/gists{/gist_id}","starred_url":"https://api.github.com/users/dankwart-de/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dankwart-de/subscriptions","organizations_url":"https://api.github.com/users/dankwart-de/orgs","repos_url":"https://api.github.com/users/dankwart-de/repos","events_url":"https://api.github.com/users/dankwart-de/events{/privacy}","received_events_url":"https://api.github.com/users/dankwart-de/received_events","type":"User","site_admin":false},"body":"First version, needs discussion.\r\nTests for BashConvert toXML work.","created_at":"2017-01-31T17:19:49Z","updated_at":"2017-02-21T09:51:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"427b99b45afa2e51ed673e820212a3146455e6c3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/eilslabs/Roddy/pulls/15/commits","review_comments_url":"https://api.github.com/repos/eilslabs/Roddy/pulls/15/comments","review_comment_url":"https://api.github.com/repos/eilslabs/Roddy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eilslabs/Roddy/issues/15/comments","statuses_url":"https://api.github.com/repos/eilslabs/Roddy/statuses/adb86fe909ddc609c4deb3e5d22db6d91c317a35","head":{"label":"eilslabs:additionalCfgFiles","ref":"additionalCfgFiles","sha":"adb86fe909ddc609c4deb3e5d22db6d91c317a35","user":{"login":"eilslabs","id":20515839,"avatar_url":"https://avatars.githubusercontent.com/u/20515839?v=3","gravatar_id":"","url":"https://api.github.com/users/eilslabs","html_url":"https://github.com/eilslabs","followers_url":"https://api.github.com/users/eilslabs/followers","following_url":"https://api.github.com/users/eilslabs/following{/other_user}","gists_url":"https://api.github.com/users/eilslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/eilslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eilslabs/subscriptions","organizations_url":"https://api.github.com/users/eilslabs/orgs","repos_url":"https://api.github.com/users/eilslabs/repos","events_url":"https://api.github.com/users/eilslabs/events{/privacy}","received_events_url":"https://api.github.com/users/eilslabs/received_events","type":"Organization","site_admin":false},"repo":{"id":63849581,"name":"Roddy","full_name":"eilslabs/Roddy","owner":{"login":"eilslabs","id":20515839,"avatar_url":"https://avatars.githubusercontent.com/u/20515839?v=3","gravatar_id":"","url":"https://api.github.com/users/eilslabs","html_url":"https://github.com/eilslabs","followers_url":"https://api.github.com/users/eilslabs/followers","following_url":"https://api.github.com/users/eilslabs/following{/other_user}","gists_url":"https://api.github.com/users/eilslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/eilslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eilslabs/subscriptions","organizations_url":"https://api.github.com/users/eilslabs/orgs","repos_url":"https://api.github.com/users/eilslabs/repos","events_url":"https://api.github.com/users/eilslabs/events{/privacy}","received_events_url":"https://api.github.com/users/eilslabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eilslabs/Roddy","description":"The Roddy workflow development and management system.","fork":false,"url":"https://api.github.com/repos/eilslabs/Roddy","forks_url":"https://api.github.com/repos/eilslabs/Roddy/forks","keys_url":"https://api.github.com/repos/eilslabs/Roddy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eilslabs/Roddy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eilslabs/Roddy/teams","hooks_url":"https://api.github.com/repos/eilslabs/Roddy/hooks","issue_events_url":"https://api.github.com/repos/eilslabs/Roddy/issues/events{/number}","events_url":"https://api.github.com/repos/eilslabs/Roddy/events","assignees_url":"https://api.github.com/repos/eilslabs/Roddy/assignees{/user}","branches_url":"https://api.github.com/repos/eilslabs/Roddy/branches{/branch}","tags_url":"https://api.github.com/repos/eilslabs/Roddy/tags","blobs_url":"https://api.github.com/repos/eilslabs/Roddy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eilslabs/Roddy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eilslabs/Roddy/git/refs{/sha}","trees_url":"https://api.github.com/repos/eilslabs/Roddy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eilslabs/Roddy/statuses/{sha}","languages_url":"https://api.github.com/repos/eilslabs/Roddy/languages","stargazers_url":"https://api.github.com/repos/eilslabs/Roddy/stargazers","contributors_url":"https://api.github.com/repos/eilslabs/Roddy/contributors","subscribers_url":"https://api.github.com/repos/eilslabs/Roddy/subscribers","subscription_url":"https://api.github.com/repos/eilslabs/Roddy/subscription","commits_url":"https://api.github.com/repos/eilslabs/Roddy/commits{/sha}","git_commits_url":"https://api.github.com/repos/eilslabs/Roddy/git/commits{/sha}","comments_url":"https://api.github.com/repos/eilslabs/Roddy/comments{/number}","issue_comment_url":"https://api.github.com/repos/eilslabs/Roddy/issues/comments{/number}","contents_url":"https://api.github.com/repos/eilslabs/Roddy/contents/{+path}","compare_url":"https://api.github.com/repos/eilslabs/Roddy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eilslabs/Roddy/merges","archive_url":"https://api.github.com/repos/eilslabs/Roddy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eilslabs/Roddy/downloads","issues_url":"https://api.github.com/repos/eilslabs/Roddy/issues{/number}","pulls_url":"https://api.github.com/repos/eilslabs/Roddy/pulls{/number}","milestones_url":"https://api.github.com/repos/eilslabs/Roddy/milestones{/number}","notifications_url":"https://api.github.com/repos/eilslabs/Roddy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eilslabs/Roddy/labels{/name}","releases_url":"https://api.github.com/repos/eilslabs/Roddy/releases{/id}","deployments_url":"https://api.github.com/repos/eilslabs/Roddy/deployments","created_at":"2016-07-21T08:04:37Z","updated_at":"2016-11-24T17:15:33Z","pushed_at":"2017-02-21T08:50:00Z","git_url":"git://github.com/eilslabs/Roddy.git","ssh_url":"git@github.com:eilslabs/Roddy.git","clone_url":"https://github.com/eilslabs/Roddy.git","svn_url":"https://github.com/eilslabs/Roddy","homepage":null,"size":273353,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":0,"default_branch":"develop"}},"base":{"label":"eilslabs:develop","ref":"develop","sha":"5eecb2903d0b47913e052c4d810c93e16bc122d3","user":{"login":"eilslabs","id":20515839,"avatar_url":"https://avatars.githubusercontent.com/u/20515839?v=3","gravatar_id":"","url":"https://api.github.com/users/eilslabs","html_url":"https://github.com/eilslabs","followers_url":"https://api.github.com/users/eilslabs/followers","following_url":"https://api.github.com/users/eilslabs/following{/other_user}","gists_url":"https://api.github.com/users/eilslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/eilslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eilslabs/subscriptions","organizations_url":"https://api.github.com/users/eilslabs/orgs","repos_url":"https://api.github.com/users/eilslabs/repos","events_url":"https://api.github.com/users/eilslabs/events{/privacy}","received_events_url":"https://api.github.com/users/eilslabs/received_events","type":"Organization","site_admin":false},"repo":{"id":63849581,"name":"Roddy","full_name":"eilslabs/Roddy","owner":{"login":"eilslabs","id":20515839,"avatar_url":"https://avatars.githubusercontent.com/u/20515839?v=3","gravatar_id":"","url":"https://api.github.com/users/eilslabs","html_url":"https://github.com/eilslabs","followers_url":"https://api.github.com/users/eilslabs/followers","following_url":"https://api.github.com/users/eilslabs/following{/other_user}","gists_url":"https://api.github.com/users/eilslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/eilslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eilslabs/subscriptions","organizations_url":"https://api.github.com/users/eilslabs/orgs","repos_url":"https://api.github.com/users/eilslabs/repos","events_url":"https://api.github.com/users/eilslabs/events{/privacy}","received_events_url":"https://api.github.com/users/eilslabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eilslabs/Roddy","description":"The Roddy workflow development and management system.","fork":false,"url":"https://api.github.com/repos/eilslabs/Roddy","forks_url":"https://api.github.com/repos/eilslabs/Roddy/forks","keys_url":"https://api.github.com/repos/eilslabs/Roddy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eilslabs/Roddy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eilslabs/Roddy/teams","hooks_url":"https://api.github.com/repos/eilslabs/Roddy/hooks","issue_events_url":"https://api.github.com/repos/eilslabs/Roddy/issues/events{/number}","events_url":"https://api.github.com/repos/eilslabs/Roddy/events","assignees_url":"https://api.github.com/repos/eilslabs/Roddy/assignees{/user}","branches_url":"https://api.github.com/repos/eilslabs/Roddy/branches{/branch}","tags_url":"https://api.github.com/repos/eilslabs/Roddy/tags","blobs_url":"https://api.github.com/repos/eilslabs/Roddy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eilslabs/Roddy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eilslabs/Roddy/git/refs{/sha}","trees_url":"https://api.github.com/repos/eilslabs/Roddy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eilslabs/Roddy/statuses/{sha}","languages_url":"https://api.github.com/repos/eilslabs/Roddy/languages","stargazers_url":"https://api.github.com/repos/eilslabs/Roddy/stargazers","contributors_url":"https://api.github.com/repos/eilslabs/Roddy/contributors","subscribers_url":"https://api.github.com/repos/eilslabs/Roddy/subscribers","subscription_url":"https://api.github.com/repos/eilslabs/Roddy/subscription","commits_url":"https://api.github.com/repos/eilslabs/Roddy/commits{/sha}","git_commits_url":"https://api.github.com/repos/eilslabs/Roddy/git/commits{/sha}","comments_url":"https://api.github.com/repos/eilslabs/Roddy/comments{/number}","issue_comment_url":"https://api.github.com/repos/eilslabs/Roddy/issues/comments{/number}","contents_url":"https://api.github.com/repos/eilslabs/Roddy/contents/{+path}","compare_url":"https://api.github.com/repos/eilslabs/Roddy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eilslabs/Roddy/merges","archive_url":"https://api.github.com/repos/eilslabs/Roddy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eilslabs/Roddy/downloads","issues_url":"https://api.github.com/repos/eilslabs/Roddy/issues{/number}","pulls_url":"https://api.github.com/repos/eilslabs/Roddy/pulls{/number}","milestones_url":"https://api.github.com/repos/eilslabs/Roddy/milestones{/number}","notifications_url":"https://api.github.com/repos/eilslabs/Roddy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eilslabs/Roddy/labels{/name}","releases_url":"https://api.github.com/repos/eilslabs/Roddy/releases{/id}","deployments_url":"https://api.github.com/repos/eilslabs/Roddy/deployments","created_at":"2016-07-21T08:04:37Z","updated_at":"2016-11-24T17:15:33Z","pushed_at":"2017-02-21T08:50:00Z","git_url":"git://github.com/eilslabs/Roddy.git","ssh_url":"git@github.com:eilslabs/Roddy.git","clone_url":"https://github.com/eilslabs/Roddy.git","svn_url":"https://github.com/eilslabs/Roddy","homepage":null,"size":273353,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/eilslabs/Roddy/pulls/15"},"html":{"href":"https://github.com/eilslabs/Roddy/pull/15"},"issue":{"href":"https://api.github.com/repos/eilslabs/Roddy/issues/15"},"comments":{"href":"https://api.github.com/repos/eilslabs/Roddy/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/eilslabs/Roddy/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/eilslabs/Roddy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eilslabs/Roddy/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/eilslabs/Roddy/statuses/adb86fe909ddc609c4deb3e5d22db6d91c317a35"}}}}
{"actor":{"display_login":"dankwart-de"}}