{"action":"closed","number":1,"pull_request":{"url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/pulls/1","id":28405323,"html_url":"https://github.com/aniversarioperu/registro_visitas_TC/pull/1","diff_url":"https://github.com/aniversarioperu/registro_visitas_TC/pull/1.diff","patch_url":"https://github.com/aniversarioperu/registro_visitas_TC/pull/1.patch","issue_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/issues/1","number":1,"state":"closed","locked":false,"title":"HTML Parser","user":{"login":"goddamnhippie","id":119947,"avatar_url":"https://avatars.githubusercontent.com/u/119947?v=3","gravatar_id":"","url":"https://api.github.com/users/goddamnhippie","html_url":"https://github.com/goddamnhippie","followers_url":"https://api.github.com/users/goddamnhippie/followers","following_url":"https://api.github.com/users/goddamnhippie/following{/other_user}","gists_url":"https://api.github.com/users/goddamnhippie/gists{/gist_id}","starred_url":"https://api.github.com/users/goddamnhippie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goddamnhippie/subscriptions","organizations_url":"https://api.github.com/users/goddamnhippie/orgs","repos_url":"https://api.github.com/users/goddamnhippie/repos","events_url":"https://api.github.com/users/goddamnhippie/events{/privacy}","received_events_url":"https://api.github.com/users/goddamnhippie/received_events","type":"User","site_admin":false},"body":"Para solucionar el tema de las estructuras diferentes, este parser utiliza un archivo de configuración, donde se pueden definir que campos corresponden a cada llave, así como otras opciones.\n\nEl archivo de configuración está ubicado en `config/parser.yml` y se tienen que definir las siguiente llaves:\n\n`input_dir` (por defecto `input`) indicando la carpeta donde se encuentra el html, en este caso `html_tc`.\n\n`start_detectors` (por defecto vacío) donde se deben listar los posibles contenidos de la primera columna de la fila que contiene los headers. Esto para saltar las filas usadas para títulos.\n\n`end_detectors` (por defecto vacío) donde se debe detener la importación de datos. En este caso se detendrá si encuentra la primera columna vacía.\n\n`field_mappings` (por defecto vacío) donde se deben especificar llaves adicionales, y para cada una de ellas 2 llaves opcionales: `default` y `headers`. Los `headers` son un arreglo de las opciones de header que queremos usar para la llave princpal, y `default` es para tener un valor en caso no se encuentre un `header` correspondiente.\n\nEl archivo actual es una buena referencia, pero podrían faltar opciones de configuración.\n\nEstoy incluyendo el JSON output actual para ver si va por el camino correcto.\n\nPara usarlo necesitas tener Ruby 2.0 o superior e instalar la gema `nokogiri`:\n\n```bash\ngem install nokogiri\n```\n\nY para ejecutar el parser:\n\n```bash\nbin/parse_html\n```\n\nMe avisas que tal. :v:","created_at":"2015-01-31T00:42:36Z","updated_at":"2015-02-01T05:24:16Z","closed_at":"2015-02-01T05:24:16Z","merged_at":"2015-02-01T05:24:16Z","merge_commit_sha":"9e503e5202d0d7af2bb46f64c87ddee9794924b1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/pulls/1/commits","review_comments_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/pulls/1/comments","review_comment_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/pulls/comments/{number}","comments_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/issues/1/comments","statuses_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/statuses/ef95ea1e0991da0086ae1a34a0db210a70e09d8d","head":{"label":"goddamnhippie:master","ref":"master","sha":"ef95ea1e0991da0086ae1a34a0db210a70e09d8d","user":{"login":"goddamnhippie","id":119947,"avatar_url":"https://avatars.githubusercontent.com/u/119947?v=3","gravatar_id":"","url":"https://api.github.com/users/goddamnhippie","html_url":"https://github.com/goddamnhippie","followers_url":"https://api.github.com/users/goddamnhippie/followers","following_url":"https://api.github.com/users/goddamnhippie/following{/other_user}","gists_url":"https://api.github.com/users/goddamnhippie/gists{/gist_id}","starred_url":"https://api.github.com/users/goddamnhippie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goddamnhippie/subscriptions","organizations_url":"https://api.github.com/users/goddamnhippie/orgs","repos_url":"https://api.github.com/users/goddamnhippie/repos","events_url":"https://api.github.com/users/goddamnhippie/events{/privacy}","received_events_url":"https://api.github.com/users/goddamnhippie/received_events","type":"User","site_admin":false},"repo":{"id":30051455,"name":"registro_visitas_TC","full_name":"goddamnhippie/registro_visitas_TC","owner":{"login":"goddamnhippie","id":119947,"avatar_url":"https://avatars.githubusercontent.com/u/119947?v=3","gravatar_id":"","url":"https://api.github.com/users/goddamnhippie","html_url":"https://github.com/goddamnhippie","followers_url":"https://api.github.com/users/goddamnhippie/followers","following_url":"https://api.github.com/users/goddamnhippie/following{/other_user}","gists_url":"https://api.github.com/users/goddamnhippie/gists{/gist_id}","starred_url":"https://api.github.com/users/goddamnhippie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goddamnhippie/subscriptions","organizations_url":"https://api.github.com/users/goddamnhippie/orgs","repos_url":"https://api.github.com/users/goddamnhippie/repos","events_url":"https://api.github.com/users/goddamnhippie/events{/privacy}","received_events_url":"https://api.github.com/users/goddamnhippie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/goddamnhippie/registro_visitas_TC","description":"del Tribunal Constitucional","fork":true,"url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC","forks_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/forks","keys_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/teams","hooks_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/hooks","issue_events_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/issues/events{/number}","events_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/events","assignees_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/assignees{/user}","branches_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/branches{/branch}","tags_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/tags","blobs_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/git/refs{/sha}","trees_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/statuses/{sha}","languages_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/languages","stargazers_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/stargazers","contributors_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/contributors","subscribers_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/subscribers","subscription_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/subscription","commits_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/commits{/sha}","git_commits_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/git/commits{/sha}","comments_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/comments{/number}","issue_comment_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/issues/comments/{number}","contents_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/contents/{+path}","compare_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/merges","archive_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/downloads","issues_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/issues{/number}","pulls_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/pulls{/number}","milestones_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/milestones{/number}","notifications_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/labels{/name}","releases_url":"https://api.github.com/repos/goddamnhippie/registro_visitas_TC/releases{/id}","created_at":"2015-01-30T02:02:58Z","updated_at":"2015-01-31T23:46:31Z","pushed_at":"2015-01-31T23:46:31Z","git_url":"git://github.com/goddamnhippie/registro_visitas_TC.git","ssh_url":"git@github.com:goddamnhippie/registro_visitas_TC.git","clone_url":"https://github.com/goddamnhippie/registro_visitas_TC.git","svn_url":"https://github.com/goddamnhippie/registro_visitas_TC","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"aniversarioperu:master","ref":"master","sha":"eab57173f170dca84666e82e4e3ada8c656c1715","user":{"login":"aniversarioperu","id":5254076,"avatar_url":"https://avatars.githubusercontent.com/u/5254076?v=3","gravatar_id":"","url":"https://api.github.com/users/aniversarioperu","html_url":"https://github.com/aniversarioperu","followers_url":"https://api.github.com/users/aniversarioperu/followers","following_url":"https://api.github.com/users/aniversarioperu/following{/other_user}","gists_url":"https://api.github.com/users/aniversarioperu/gists{/gist_id}","starred_url":"https://api.github.com/users/aniversarioperu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aniversarioperu/subscriptions","organizations_url":"https://api.github.com/users/aniversarioperu/orgs","repos_url":"https://api.github.com/users/aniversarioperu/repos","events_url":"https://api.github.com/users/aniversarioperu/events{/privacy}","received_events_url":"https://api.github.com/users/aniversarioperu/received_events","type":"User","site_admin":false},"repo":{"id":30046381,"name":"registro_visitas_TC","full_name":"aniversarioperu/registro_visitas_TC","owner":{"login":"aniversarioperu","id":5254076,"avatar_url":"https://avatars.githubusercontent.com/u/5254076?v=3","gravatar_id":"","url":"https://api.github.com/users/aniversarioperu","html_url":"https://github.com/aniversarioperu","followers_url":"https://api.github.com/users/aniversarioperu/followers","following_url":"https://api.github.com/users/aniversarioperu/following{/other_user}","gists_url":"https://api.github.com/users/aniversarioperu/gists{/gist_id}","starred_url":"https://api.github.com/users/aniversarioperu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aniversarioperu/subscriptions","organizations_url":"https://api.github.com/users/aniversarioperu/orgs","repos_url":"https://api.github.com/users/aniversarioperu/repos","events_url":"https://api.github.com/users/aniversarioperu/events{/privacy}","received_events_url":"https://api.github.com/users/aniversarioperu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aniversarioperu/registro_visitas_TC","description":"del Tribunal Constitucional","fork":false,"url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC","forks_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/forks","keys_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/teams","hooks_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/hooks","issue_events_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/issues/events{/number}","events_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/events","assignees_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/assignees{/user}","branches_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/branches{/branch}","tags_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/tags","blobs_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/git/refs{/sha}","trees_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/statuses/{sha}","languages_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/languages","stargazers_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/stargazers","contributors_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/contributors","subscribers_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/subscribers","subscription_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/subscription","commits_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/commits{/sha}","git_commits_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/git/commits{/sha}","comments_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/comments{/number}","issue_comment_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/issues/comments/{number}","contents_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/contents/{+path}","compare_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/merges","archive_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/downloads","issues_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/issues{/number}","pulls_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/pulls{/number}","milestones_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/milestones{/number}","notifications_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/labels{/name}","releases_url":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/releases{/id}","created_at":"2015-01-29T23:23:52Z","updated_at":"2015-01-29T23:23:52Z","pushed_at":"2015-02-01T05:24:16Z","git_url":"git://github.com/aniversarioperu/registro_visitas_TC.git","ssh_url":"git@github.com:aniversarioperu/registro_visitas_TC.git","clone_url":"https://github.com/aniversarioperu/registro_visitas_TC.git","svn_url":"https://github.com/aniversarioperu/registro_visitas_TC","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/pulls/1"},"html":{"href":"https://github.com/aniversarioperu/registro_visitas_TC/pull/1"},"issue":{"href":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/issues/1"},"comments":{"href":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/aniversarioperu/registro_visitas_TC/statuses/ef95ea1e0991da0086ae1a34a0db210a70e09d8d"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"aniversarioperu","id":5254076,"avatar_url":"https://avatars.githubusercontent.com/u/5254076?v=3","gravatar_id":"","url":"https://api.github.com/users/aniversarioperu","html_url":"https://github.com/aniversarioperu","followers_url":"https://api.github.com/users/aniversarioperu/followers","following_url":"https://api.github.com/users/aniversarioperu/following{/other_user}","gists_url":"https://api.github.com/users/aniversarioperu/gists{/gist_id}","starred_url":"https://api.github.com/users/aniversarioperu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aniversarioperu/subscriptions","organizations_url":"https://api.github.com/users/aniversarioperu/orgs","repos_url":"https://api.github.com/users/aniversarioperu/repos","events_url":"https://api.github.com/users/aniversarioperu/events{/privacy}","received_events_url":"https://api.github.com/users/aniversarioperu/received_events","type":"User","site_admin":false},"comments":3,"review_comments":0,"commits":20,"additions":164,"deletions":0,"changed_files":3}}