{"action":"created","issue":{"url":"https://api.github.com/repos/ConsenSys/surya/issues/75","repository_url":"https://api.github.com/repos/ConsenSys/surya","labels_url":"https://api.github.com/repos/ConsenSys/surya/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/ConsenSys/surya/issues/75/comments","events_url":"https://api.github.com/repos/ConsenSys/surya/issues/75/events","html_url":"https://github.com/ConsenSys/surya/issues/75","id":387320703,"node_id":"MDU6SXNzdWUzODczMjA3MDM=","number":75,"title":"Unified Input/Output Rules","user":{"login":"chronaeon","id":20974007,"node_id":"MDQ6VXNlcjIwOTc0MDA3","avatar_url":"https://avatars2.githubusercontent.com/u/20974007?v=4","gravatar_id":"","url":"https://api.github.com/users/chronaeon","html_url":"https://github.com/chronaeon","followers_url":"https://api.github.com/users/chronaeon/followers","following_url":"https://api.github.com/users/chronaeon/following{/other_user}","gists_url":"https://api.github.com/users/chronaeon/gists{/gist_id}","starred_url":"https://api.github.com/users/chronaeon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chronaeon/subscriptions","organizations_url":"https://api.github.com/users/chronaeon/orgs","repos_url":"https://api.github.com/users/chronaeon/repos","events_url":"https://api.github.com/users/chronaeon/events{/privacy}","received_events_url":"https://api.github.com/users/chronaeon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-04T14:47:06Z","updated_at":"2018-12-05T02:11:07Z","closed_at":null,"author_association":"NONE","body":"Right now Surya has some mixed input/output rules. I propose unifying them to a common format.\r\n\r\nFor output, I suggest sending everything to stdout. For input, we should extend the rules Surya already has. Here is the current output from surya --help:\r\n\r\n```\r\nsurya <cmd> [args]\r\n\r\nCommands:\r\n  surya describe <files..>                  show file contracts structure.\r\n  surya graph <files..>                     generate graph of contract function\r\n                                            calls.\r\n  surya inheritance <files..>               generate graph of contract\r\n                                            inheritance tree.\r\n  surya dependencies <target_contract>      output a linearized list of smart\r\n  <files..>                                 contract dependencies (linerized\r\n                                            inherited parents).\r\n  surya parse <file>                        output AST generated by the parser\r\n                                            for the specified file in a textual\r\n                                            tree format.\r\n  surya ftrace <function_identifier>        output the selected function call\r\n  <function_visibility_restrictor>          trace in a textual tree format.\r\n  <files..>                                 External calls are marked in\r\n                                            `orange` and internal calls are\r\n                                            `uncolored`.\r\n  surya mdreport <outfile> <infiles..>      output a markdown file\r\n\r\nOptions:\r\n  -h, --help     Show help                                             [boolean]\r\n  -v, --version  Show version number                                   [boolean]\r\n```\r\n\r\nFor a new format I would suggest we use the following convention across all of Surya's operations\r\n**input**\r\n`surya <cmd> infile1.sol infile2.sol ...`\r\n\r\n**output**\r\n*stdout*"},"comment":{"url":"https://api.github.com/repos/ConsenSys/surya/issues/comments/444332132","html_url":"https://github.com/ConsenSys/surya/issues/75#issuecomment-444332132","issue_url":"https://api.github.com/repos/ConsenSys/surya/issues/75","id":444332132,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDMzMjEzMg==","user":{"login":"chronaeon","id":20974007,"node_id":"MDQ6VXNlcjIwOTc0MDA3","avatar_url":"https://avatars2.githubusercontent.com/u/20974007?v=4","gravatar_id":"","url":"https://api.github.com/users/chronaeon","html_url":"https://github.com/chronaeon","followers_url":"https://api.github.com/users/chronaeon/followers","following_url":"https://api.github.com/users/chronaeon/following{/other_user}","gists_url":"https://api.github.com/users/chronaeon/gists{/gist_id}","starred_url":"https://api.github.com/users/chronaeon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chronaeon/subscriptions","organizations_url":"https://api.github.com/users/chronaeon/orgs","repos_url":"https://api.github.com/users/chronaeon/repos","events_url":"https://api.github.com/users/chronaeon/events{/privacy}","received_events_url":"https://api.github.com/users/chronaeon/received_events","type":"User","site_admin":false},"created_at":"2018-12-05T02:11:07Z","updated_at":"2018-12-05T02:11:07Z","author_association":"NONE","body":"Agreed! :) I'm just talking about the syntax for reading commands into Surya.\r\n\r\nSo it would look something like this:\r\n\r\n\r\n```\r\nsurya parameter1 parameter2 parameter3\r\n``\r\n\r\n|  surya |  parameter1 | parameter2 | parameter3  | parameter4  |\r\n|---|---|---|---|---|\r\n|  surya |  mdreport | files  |   |   |\r\n| surya  | describe  | files  |   |   |\r\n| surya  | graph  |  files |   |   |\r\n|  surya | inheritance  |  files |   |   |\r\n|  surya | parse  | files  |   |   |\r\n|  surya | dependencies  | files  | target  |   |\r\n|  surya | ftrace  |  files |  identifier | visibilityRestrictor  |\r\n"}}
{"actor":{"display_login":"chronaeon"}}