{"action":"created","comment":{"url":"https://api.github.com/repos/erlerobot/HRIM/pulls/comments/240161504","pull_request_review_id":183124687,"id":240161504,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MDE2MTUwNA==","diff_hunk":"@@ -0,0 +1,98 @@\n+import sys\n+sys.path.insert(0, 'scripts')\n+import printing\n+import parsing\n+import compiling\n+import os\n+from classes import *\n+\n+def main(args):\n+\tif args[1] == \"show\":\n+\t\textend = False\n+\t\t# if topic/properties not defined on the parsed file should show their full content or not when printing\n+\t\tif len(args) == 4:\n+\t\t\tif args[3] == \"1\":\n+\t\t\t\textend = True\n+\t\t# check for file input\n+\t\tif len(args) < 3:\n+\t\t\tprint \"Please input file to parse\"\n+\t\t\tsys.exit()\n+\t\tmodule = parsing.main(args[2])\n+\t\tprinting.main(module, extend)\n+\telif args[1] == \"generate\":\n+\t\textend = False\n+\t\t# check for file input\n+\t\tif len(args) < 3:\n+\t\t\tprint \"Please input file to parse\"\n+\t\t\tsys.exit()\n+\t\tif args[2] == \"all\":\n+\t\t\tpath = os.getcwd()\n+\t\t\tfor file in [\n+\t\t\t\tpath+\"/models/composite/mobilebase/mobilebase.xml\",\n+\t\t\t\tpath+\"/models/composite/conveyor/conveyor.xml\",\n+\t\t\t\tpath+\"/models/composite/arm/arm.xml\",\n+\t\t\t\tpath+\"/models/power/battery/battery.xml\",\n+\t\t\t\tpath+\"/models/actuator/gripper/gripper.xml\",\n+\t\t\t\tpath+\"/models/actuator/electricmotor/electricmotor.xml\",\n+\t\t\t\tpath+\"/models/actuator/servo/servo.xml\",\n+\t\t\t\tpath+\"/models/sensor/lidar/lidar.xml\",\n+\t\t\t\tpath+\"/models/sensor/rangefinder/rangefinder.xml\",\n+\t\t\t\tpath+\"/models/sensor/thermometer/thermometer.xml\",\n+\t\t\t\tpath+\"/models/sensor/3dcamera/3dcamera_stereo.xml\",\n+\t\t\t\tpath+\"/models/sensor/3dcamera/3dcamera_tof.xml\",\n+\t\t\t\tpath+\"/models/sensor/3dcamera/3dcamera_depth.xml\",\n+\t\t\t\tpath+\"/models/sensor/imu/imu.xml\",\n+\t\t\t\tpath+\"/models/sensor/hygrometer/hygrometer.xml\",\n+\t\t\t\tpath+\"/models/sensor/forcetorque/forcetorque.xml\",\n+\t\t\t\tpath+\"/models/sensor/gps/gps.xml\",\n+\t\t\t\tpath+\"/models/sensor/gasdetector/gasdetector.xml\",\n+\t\t\t\tpath+\"/models/sensor/torque/torque.xml\",\n+\t\t\t\tpath+\"/models/sensor/force/force.xml\",\n+\t\t\t\tpath+\"/models/sensor/microphone/microphone.xml\",\n+\t\t\t\tpath+\"/models/sensor/camera/camera.xml\",\n+\t\t\t\tpath+\"/models/sensor/encoder/encoder.xml\"\n+\n+\t\t\t]:\n+\t\t\t\tos.chdir(path)\n+\t\t\t\tmodule = parsing.main(file)\n+\t\t\t\tcompiling.main(module)\n+\t\telif args[2] == \"allClean\":\n+\t\t\tpath = os.getcwd()\n+\t\t\tfor file in [\n+\t\t\t\tpath+\"/models/composite/mobilebase/mobilebase_clean.xml\",","path":"hrim.py","position":null,"original_position":62,"commit_id":"928390266550c8e3eccd40fe218553ce2b02e2ad","original_commit_id":"089b7f0768bce58e447d76f0d2aa3afa5703168a","user":{"login":"ibaiape","id":17425970,"node_id":"MDQ6VXNlcjE3NDI1OTcw","avatar_url":"https://avatars3.githubusercontent.com/u/17425970?v=4","gravatar_id":"","url":"https://api.github.com/users/ibaiape","html_url":"https://github.com/ibaiape","followers_url":"https://api.github.com/users/ibaiape/followers","following_url":"https://api.github.com/users/ibaiape/following{/other_user}","gists_url":"https://api.github.com/users/ibaiape/gists{/gist_id}","starred_url":"https://api.github.com/users/ibaiape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibaiape/subscriptions","organizations_url":"https://api.github.com/users/ibaiape/orgs","repos_url":"https://api.github.com/users/ibaiape/repos","events_url":"https://api.github.com/users/ibaiape/events{/privacy}","received_events_url":"https://api.github.com/users/ibaiape/received_events","type":"User","site_admin":false},"body":"Implemented in https://github.com/erlerobot/HRIM/commit/928390266550c8e3eccd40fe218553ce2b02e2ad.\r\n\r\nCurrently the main [regex](https://github.com/erlerobot/HRIM/commit/928390266550c8e3eccd40fe218553ce2b02e2ad#diff-9ce68efd9817cf2f47a2e5a916019d8dR26) makes sure the \"captured\" **.xml** files are inside a categorization folder (i.e. sensor, actuator...) and aren't inside a \"topic\" folder (file separation for each module's own topics). It ignores OS differences as it checks for a single character instead of a slash/backslash, might be a bit hacky. Verified it also works on a Windows (7) system.\r\n\r\nThe check for [development files] is done checking for the filename ending in *_clean.xml*. This is because the [findModels](https://github.com/erlerobot/HRIM/commit/928390266550c8e3eccd40fe218553ce2b02e2ad#diff-9ce68efd9817cf2f47a2e5a916019d8dR12) method should filter everything but the models, both final and development ones.","created_at":"2018-12-10T10:44:28Z","updated_at":"2018-12-10T10:44:29Z","html_url":"https://github.com/erlerobot/HRIM/pull/16#discussion_r240161504","pull_request_url":"https://api.github.com/repos/erlerobot/HRIM/pulls/16","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/erlerobot/HRIM/pulls/comments/240161504"},"html":{"href":"https://github.com/erlerobot/HRIM/pull/16#discussion_r240161504"},"pull_request":{"href":"https://api.github.com/repos/erlerobot/HRIM/pulls/16"}},"in_reply_to_id":238253035},"pull_request":{"url":"https://api.github.com/repos/erlerobot/HRIM/pulls/16","id":232245199,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyMjQ1MTk5","html_url":"https://github.com/erlerobot/HRIM/pull/16","diff_url":"https://github.com/erlerobot/HRIM/pull/16.diff","patch_url":"https://github.com/erlerobot/HRIM/pull/16.patch","issue_url":"https://api.github.com/repos/erlerobot/HRIM/issues/16","number":16,"state":"open","locked":false,"title":"Update HRIM structure","user":{"login":"ibaiape","id":17425970,"node_id":"MDQ6VXNlcjE3NDI1OTcw","avatar_url":"https://avatars3.githubusercontent.com/u/17425970?v=4","gravatar_id":"","url":"https://api.github.com/users/ibaiape","html_url":"https://github.com/ibaiape","followers_url":"https://api.github.com/users/ibaiape/followers","following_url":"https://api.github.com/users/ibaiape/following{/other_user}","gists_url":"https://api.github.com/users/ibaiape/gists{/gist_id}","starred_url":"https://api.github.com/users/ibaiape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibaiape/subscriptions","organizations_url":"https://api.github.com/users/ibaiape/orgs","repos_url":"https://api.github.com/users/ibaiape/repos","events_url":"https://api.github.com/users/ibaiape/events{/privacy}","received_events_url":"https://api.github.com/users/ibaiape/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-20T09:27:40Z","updated_at":"2018-12-10T10:44:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2825730bb58d00ad6d36ced1b54a6456a64e3ebe","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/erlerobot/HRIM/pulls/16/commits","review_comments_url":"https://api.github.com/repos/erlerobot/HRIM/pulls/16/comments","review_comment_url":"https://api.github.com/repos/erlerobot/HRIM/pulls/comments{/number}","comments_url":"https://api.github.com/repos/erlerobot/HRIM/issues/16/comments","statuses_url":"https://api.github.com/repos/erlerobot/HRIM/statuses/928390266550c8e3eccd40fe218553ce2b02e2ad","head":{"label":"erlerobot:xml","ref":"xml","sha":"928390266550c8e3eccd40fe218553ce2b02e2ad","user":{"login":"erlerobot","id":5610713,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2MTA3MTM=","avatar_url":"https://avatars2.githubusercontent.com/u/5610713?v=4","gravatar_id":"","url":"https://api.github.com/users/erlerobot","html_url":"https://github.com/erlerobot","followers_url":"https://api.github.com/users/erlerobot/followers","following_url":"https://api.github.com/users/erlerobot/following{/other_user}","gists_url":"https://api.github.com/users/erlerobot/gists{/gist_id}","starred_url":"https://api.github.com/users/erlerobot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erlerobot/subscriptions","organizations_url":"https://api.github.com/users/erlerobot/orgs","repos_url":"https://api.github.com/users/erlerobot/repos","events_url":"https://api.github.com/users/erlerobot/events{/privacy}","received_events_url":"https://api.github.com/users/erlerobot/received_events","type":"Organization","site_admin":false},"repo":{"id":100569450,"node_id":"MDEwOlJlcG9zaXRvcnkxMDA1Njk0NTA=","name":"HRIM","full_name":"erlerobot/HRIM","private":false,"owner":{"login":"erlerobot","id":5610713,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2MTA3MTM=","avatar_url":"https://avatars2.githubusercontent.com/u/5610713?v=4","gravatar_id":"","url":"https://api.github.com/users/erlerobot","html_url":"https://github.com/erlerobot","followers_url":"https://api.github.com/users/erlerobot/followers","following_url":"https://api.github.com/users/erlerobot/following{/other_user}","gists_url":"https://api.github.com/users/erlerobot/gists{/gist_id}","starred_url":"https://api.github.com/users/erlerobot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erlerobot/subscriptions","organizations_url":"https://api.github.com/users/erlerobot/orgs","repos_url":"https://api.github.com/users/erlerobot/repos","events_url":"https://api.github.com/users/erlerobot/events{/privacy}","received_events_url":"https://api.github.com/users/erlerobot/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/erlerobot/HRIM","description":"A standard interface for robot modules.","fork":false,"url":"https://api.github.com/repos/erlerobot/HRIM","forks_url":"https://api.github.com/repos/erlerobot/HRIM/forks","keys_url":"https://api.github.com/repos/erlerobot/HRIM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erlerobot/HRIM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erlerobot/HRIM/teams","hooks_url":"https://api.github.com/repos/erlerobot/HRIM/hooks","issue_events_url":"https://api.github.com/repos/erlerobot/HRIM/issues/events{/number}","events_url":"https://api.github.com/repos/erlerobot/HRIM/events","assignees_url":"https://api.github.com/repos/erlerobot/HRIM/assignees{/user}","branches_url":"https://api.github.com/repos/erlerobot/HRIM/branches{/branch}","tags_url":"https://api.github.com/repos/erlerobot/HRIM/tags","blobs_url":"https://api.github.com/repos/erlerobot/HRIM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erlerobot/HRIM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erlerobot/HRIM/git/refs{/sha}","trees_url":"https://api.github.com/repos/erlerobot/HRIM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erlerobot/HRIM/statuses/{sha}","languages_url":"https://api.github.com/repos/erlerobot/HRIM/languages","stargazers_url":"https://api.github.com/repos/erlerobot/HRIM/stargazers","contributors_url":"https://api.github.com/repos/erlerobot/HRIM/contributors","subscribers_url":"https://api.github.com/repos/erlerobot/HRIM/subscribers","subscription_url":"https://api.github.com/repos/erlerobot/HRIM/subscription","commits_url":"https://api.github.com/repos/erlerobot/HRIM/commits{/sha}","git_commits_url":"https://api.github.com/repos/erlerobot/HRIM/git/commits{/sha}","comments_url":"https://api.github.com/repos/erlerobot/HRIM/comments{/number}","issue_comment_url":"https://api.github.com/repos/erlerobot/HRIM/issues/comments{/number}","contents_url":"https://api.github.com/repos/erlerobot/HRIM/contents/{+path}","compare_url":"https://api.github.com/repos/erlerobot/HRIM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erlerobot/HRIM/merges","archive_url":"https://api.github.com/repos/erlerobot/HRIM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erlerobot/HRIM/downloads","issues_url":"https://api.github.com/repos/erlerobot/HRIM/issues{/number}","pulls_url":"https://api.github.com/repos/erlerobot/HRIM/pulls{/number}","milestones_url":"https://api.github.com/repos/erlerobot/HRIM/milestones{/number}","notifications_url":"https://api.github.com/repos/erlerobot/HRIM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erlerobot/HRIM/labels{/name}","releases_url":"https://api.github.com/repos/erlerobot/HRIM/releases{/id}","deployments_url":"https://api.github.com/repos/erlerobot/HRIM/deployments","created_at":"2017-08-17T06:28:50Z","updated_at":"2018-12-04T23:47:46Z","pushed_at":"2018-12-10T10:31:44Z","git_url":"git://github.com/erlerobot/HRIM.git","ssh_url":"git@github.com:erlerobot/HRIM.git","clone_url":"https://github.com/erlerobot/HRIM.git","svn_url":"https://github.com/erlerobot/HRIM","homepage":"http://therobotmodel.com","size":449,"stargazers_count":29,"watchers_count":29,"language":"CMake","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":6,"open_issues":5,"watchers":29,"default_branch":"master"}},"base":{"label":"erlerobot:master","ref":"master","sha":"505752074dadf31c08795cb46b83c407205df018","user":{"login":"erlerobot","id":5610713,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2MTA3MTM=","avatar_url":"https://avatars2.githubusercontent.com/u/5610713?v=4","gravatar_id":"","url":"https://api.github.com/users/erlerobot","html_url":"https://github.com/erlerobot","followers_url":"https://api.github.com/users/erlerobot/followers","following_url":"https://api.github.com/users/erlerobot/following{/other_user}","gists_url":"https://api.github.com/users/erlerobot/gists{/gist_id}","starred_url":"https://api.github.com/users/erlerobot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erlerobot/subscriptions","organizations_url":"https://api.github.com/users/erlerobot/orgs","repos_url":"https://api.github.com/users/erlerobot/repos","events_url":"https://api.github.com/users/erlerobot/events{/privacy}","received_events_url":"https://api.github.com/users/erlerobot/received_events","type":"Organization","site_admin":false},"repo":{"id":100569450,"node_id":"MDEwOlJlcG9zaXRvcnkxMDA1Njk0NTA=","name":"HRIM","full_name":"erlerobot/HRIM","private":false,"owner":{"login":"erlerobot","id":5610713,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2MTA3MTM=","avatar_url":"https://avatars2.githubusercontent.com/u/5610713?v=4","gravatar_id":"","url":"https://api.github.com/users/erlerobot","html_url":"https://github.com/erlerobot","followers_url":"https://api.github.com/users/erlerobot/followers","following_url":"https://api.github.com/users/erlerobot/following{/other_user}","gists_url":"https://api.github.com/users/erlerobot/gists{/gist_id}","starred_url":"https://api.github.com/users/erlerobot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erlerobot/subscriptions","organizations_url":"https://api.github.com/users/erlerobot/orgs","repos_url":"https://api.github.com/users/erlerobot/repos","events_url":"https://api.github.com/users/erlerobot/events{/privacy}","received_events_url":"https://api.github.com/users/erlerobot/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/erlerobot/HRIM","description":"A standard interface for robot modules.","fork":false,"url":"https://api.github.com/repos/erlerobot/HRIM","forks_url":"https://api.github.com/repos/erlerobot/HRIM/forks","keys_url":"https://api.github.com/repos/erlerobot/HRIM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erlerobot/HRIM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erlerobot/HRIM/teams","hooks_url":"https://api.github.com/repos/erlerobot/HRIM/hooks","issue_events_url":"https://api.github.com/repos/erlerobot/HRIM/issues/events{/number}","events_url":"https://api.github.com/repos/erlerobot/HRIM/events","assignees_url":"https://api.github.com/repos/erlerobot/HRIM/assignees{/user}","branches_url":"https://api.github.com/repos/erlerobot/HRIM/branches{/branch}","tags_url":"https://api.github.com/repos/erlerobot/HRIM/tags","blobs_url":"https://api.github.com/repos/erlerobot/HRIM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erlerobot/HRIM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erlerobot/HRIM/git/refs{/sha}","trees_url":"https://api.github.com/repos/erlerobot/HRIM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erlerobot/HRIM/statuses/{sha}","languages_url":"https://api.github.com/repos/erlerobot/HRIM/languages","stargazers_url":"https://api.github.com/repos/erlerobot/HRIM/stargazers","contributors_url":"https://api.github.com/repos/erlerobot/HRIM/contributors","subscribers_url":"https://api.github.com/repos/erlerobot/HRIM/subscribers","subscription_url":"https://api.github.com/repos/erlerobot/HRIM/subscription","commits_url":"https://api.github.com/repos/erlerobot/HRIM/commits{/sha}","git_commits_url":"https://api.github.com/repos/erlerobot/HRIM/git/commits{/sha}","comments_url":"https://api.github.com/repos/erlerobot/HRIM/comments{/number}","issue_comment_url":"https://api.github.com/repos/erlerobot/HRIM/issues/comments{/number}","contents_url":"https://api.github.com/repos/erlerobot/HRIM/contents/{+path}","compare_url":"https://api.github.com/repos/erlerobot/HRIM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erlerobot/HRIM/merges","archive_url":"https://api.github.com/repos/erlerobot/HRIM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erlerobot/HRIM/downloads","issues_url":"https://api.github.com/repos/erlerobot/HRIM/issues{/number}","pulls_url":"https://api.github.com/repos/erlerobot/HRIM/pulls{/number}","milestones_url":"https://api.github.com/repos/erlerobot/HRIM/milestones{/number}","notifications_url":"https://api.github.com/repos/erlerobot/HRIM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erlerobot/HRIM/labels{/name}","releases_url":"https://api.github.com/repos/erlerobot/HRIM/releases{/id}","deployments_url":"https://api.github.com/repos/erlerobot/HRIM/deployments","created_at":"2017-08-17T06:28:50Z","updated_at":"2018-12-04T23:47:46Z","pushed_at":"2018-12-10T10:31:44Z","git_url":"git://github.com/erlerobot/HRIM.git","ssh_url":"git@github.com:erlerobot/HRIM.git","clone_url":"https://github.com/erlerobot/HRIM.git","svn_url":"https://github.com/erlerobot/HRIM","homepage":"http://therobotmodel.com","size":449,"stargazers_count":29,"watchers_count":29,"language":"CMake","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":6,"open_issues":5,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/erlerobot/HRIM/pulls/16"},"html":{"href":"https://github.com/erlerobot/HRIM/pull/16"},"issue":{"href":"https://api.github.com/repos/erlerobot/HRIM/issues/16"},"comments":{"href":"https://api.github.com/repos/erlerobot/HRIM/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/erlerobot/HRIM/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/erlerobot/HRIM/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/erlerobot/HRIM/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/erlerobot/HRIM/statuses/928390266550c8e3eccd40fe218553ce2b02e2ad"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ibaiape"}}