{"action":"opened","issue":{"url":"https://api.github.com/repos/petermr/cmine/issues/2","labels_url":"https://api.github.com/repos/petermr/cmine/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/petermr/cmine/issues/2/comments","events_url":"https://api.github.com/repos/petermr/cmine/issues/2/events","html_url":"https://github.com/petermr/cmine/issues/2","id":102124524,"number":2,"title":"Document: main processing loop","user":{"login":"petermr","id":733515,"avatar_url":"https://avatars.githubusercontent.com/u/733515?v=3","gravatar_id":"","url":"https://api.github.com/users/petermr","html_url":"https://github.com/petermr","followers_url":"https://api.github.com/users/petermr/followers","following_url":"https://api.github.com/users/petermr/following{/other_user}","gists_url":"https://api.github.com/users/petermr/gists{/gist_id}","starred_url":"https://api.github.com/users/petermr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petermr/subscriptions","organizations_url":"https://api.github.com/users/petermr/orgs","repos_url":"https://api.github.com/users/petermr/repos","events_url":"https://api.github.com/users/petermr/events{/privacy}","received_events_url":"https://api.github.com/users/petermr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"petermr","id":733515,"avatar_url":"https://avatars.githubusercontent.com/u/733515?v=3","gravatar_id":"","url":"https://api.github.com/users/petermr","html_url":"https://github.com/petermr","followers_url":"https://api.github.com/users/petermr/followers","following_url":"https://api.github.com/users/petermr/following{/other_user}","gists_url":"https://api.github.com/users/petermr/gists{/gist_id}","starred_url":"https://api.github.com/users/petermr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petermr/subscriptions","organizations_url":"https://api.github.com/users/petermr/orgs","repos_url":"https://api.github.com/users/petermr/repos","events_url":"https://api.github.com/users/petermr/events{/privacy}","received_events_url":"https://api.github.com/users/petermr/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-08-20T12:06:02Z","updated_at":"2015-08-20T12:06:02Z","closed_at":null,"body":"Main processing loop is in:\r\n```\r\norg.xmlcml.cmine.args.DefaultArgProcessor\r\n```\r\nThe main loop is\r\n```\r\n\tpublic void runAndOutput() {\r\n\t\tensureCMDirList();\r\n\t\tif (cmDirList.size() == 0) {\r\n\t\t\tif (project != null) {\r\n\t\t\t\toutput = project;\r\n\t\t\t} else if (output != null) {\r\n\t\t\t\tLOG.warn(\"please replace --output with --project\");\r\n\t\t\t\tproject = output;\r\n\t\t\t} else {\r\n\t\t\t\tLOG.error(\"Cannot create output: --project or --output must be given\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tLOG.debug(\"treating as CMDir creation under project \"+project);\r\n\t\t\trunRunMethodsOnChosenArgOptions();\r\n\t\t} else {\r\n\t\t\tfor (int i = 0; i < cmDirList.size(); i++) {\r\n\t\t\t\tcurrentCMDir = cmDirList.get(i);\r\n\t\t\t\tLOG.trace(\"running dir: \"+currentCMDir.getDirectory());\r\n\t\t\t\tcTreeLog = currentCMDir.getOrCreateCTreeLog(this, logfileName);\r\n\t\t\t\tcurrentCMDir.ensureContentProcessor(this);\r\n\t\t\t\trunInitMethodsOnChosenArgOptions();\r\n\t\t\t\trunRunMethodsOnChosenArgOptions();\r\n\t\t\t\trunOutputMethodsOnChosenArgOptions();\r\n\t\t\t}\r\n\t\t}\r\n\t\trunFinalMethodsOnChosenArgOptions();\r\n\t\twriteLog();\r\n\t}\r\n"}}