{"action":"created","comment":{"url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/pulls/comments/180553861","pull_request_review_id":110994186,"id":180553861,"diff_hunk":"@@ -3,6 +3,8 @@\n     \"arrow-body-style\": 0,\n     \"no-shadow\": 0,\n     \"no-console\": 0,\n+    \"no-underscore-dangle\": [\"error\", { \"allow\": [\"_private\"] }],","path":".eslintrc","position":4,"original_position":4,"commit_id":"90f9be4970a495a7eb6becdd5cd576adcb788a24","original_commit_id":"c76f0da84ea459cff715018c0f2e48f77a3d55a0","user":{"login":"eshaham","id":7040645,"avatar_url":"https://avatars0.githubusercontent.com/u/7040645?v=4","gravatar_id":"","url":"https://api.github.com/users/eshaham","html_url":"https://github.com/eshaham","followers_url":"https://api.github.com/users/eshaham/followers","following_url":"https://api.github.com/users/eshaham/following{/other_user}","gists_url":"https://api.github.com/users/eshaham/gists{/gist_id}","starred_url":"https://api.github.com/users/eshaham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eshaham/subscriptions","organizations_url":"https://api.github.com/users/eshaham/orgs","repos_url":"https://api.github.com/users/eshaham/repos","events_url":"https://api.github.com/users/eshaham/events{/privacy}","received_events_url":"https://api.github.com/users/eshaham/received_events","type":"User","site_admin":false},"body":"@esakal my way of saying sababa","created_at":"2018-04-10T20:15:51Z","updated_at":"2018-04-10T20:15:51Z","html_url":"https://github.com/eshaham/israeli-ynab-updater/pull/32#discussion_r180553861","pull_request_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/pulls/32","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/eshaham/israeli-ynab-updater/pulls/comments/180553861"},"html":{"href":"https://github.com/eshaham/israeli-ynab-updater/pull/32#discussion_r180553861"},"pull_request":{"href":"https://api.github.com/repos/eshaham/israeli-ynab-updater/pulls/32"}},"in_reply_to_id":178528766},"pull_request":{"url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/pulls/32","id":177639148,"html_url":"https://github.com/eshaham/israeli-ynab-updater/pull/32","diff_url":"https://github.com/eshaham/israeli-ynab-updater/pull/32.diff","patch_url":"https://github.com/eshaham/israeli-ynab-updater/pull/32.patch","issue_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/issues/32","number":32,"state":"open","locked":false,"title":"Setup and scrape tasks which define a set of scrapers and relevant scraping options","user":{"login":"esakal","id":4751797,"avatar_url":"https://avatars3.githubusercontent.com/u/4751797?v=4","gravatar_id":"","url":"https://api.github.com/users/esakal","html_url":"https://github.com/esakal","followers_url":"https://api.github.com/users/esakal/followers","following_url":"https://api.github.com/users/esakal/following{/other_user}","gists_url":"https://api.github.com/users/esakal/gists{/gist_id}","starred_url":"https://api.github.com/users/esakal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esakal/subscriptions","organizations_url":"https://api.github.com/users/esakal/orgs","repos_url":"https://api.github.com/users/esakal/repos","events_url":"https://api.github.com/users/esakal/events{/privacy}","received_events_url":"https://api.github.com/users/esakal/received_events","type":"User","site_admin":false},"body":"## Overview\r\n### Motivation\r\nThis PR was created following #28. \r\n\r\n### A task structure\r\nA task defines a set of scrapers and relevant scraping options. A user can define multiple tasks that serve different budgets (for example separated work and home budget). \r\n\r\nAn example for a real task can be:\r\n```\r\n{\r\n  \"scrapers\": [\r\n    {\r\n      \"id\": \"leumi\",\r\n      \"credentials\": {\r\n        \"username\": \"\",\r\n        \"password\": \"\"\r\n      }\r\n    },\r\n    {\r\n      \"id\": \"leumiCard\",\r\n      \"credentials\": {\r\n        \"username\": \"\",\r\n        \"password\": \"\"\r\n      }\r\n    }\r\n  ],\r\n  \"options\": {\r\n    \"combineInstallments\": false,\r\n    \"dateDiffByMonth\": 3\r\n  },\r\n  \"output\": {\r\n    \"saveLocation\": \"/Users/eransakal/Downloads/Transactions\",\r\n    \"combineReport\": true\r\n  }\r\n}\r\n```\r\n\r\n### Setup a  task\r\nA user can manage tasks using the existing setup command `npm run setup`. I was working on the setup process to be as friendly as possible.\r\n\r\nYou can see the task setup menu structure [here](https://gist.github.com/esakal/b0556b3d0ade7a0ce352a30e73493e9a).\r\n\r\n## Changes in the repository\r\n\r\n### New dependencies\r\n- [colors](https://www.npmjs.com/package/colors) library was added to allow coloring feedback provided to the user while he/she setup a task. It is enriching his user experience.\r\n\r\n### Linting adjustments\r\n- **Ignoring no-underscore-dangle**: Since the setup process is quite complex, I split the code into multiple classes so it would be easier to read and maintain the code. The out-of-the-box rules of airbnb prevent using the convention _ to indicate a method/property should not be used as public api. I don't want to argue whether it is good or not (airbnb/javascript#1089 and airbnb/javascript#1024) but until ECMA classes will provide a decent support for private methods/properties I do think this is better then not distinguishing between private and public api. \r\n- **Ignoring class-methods-use-this**: This one is quite annoying because it prevent you from having a public api of a class which doesn't use other inner properties/methods of the class. It forces you setting that function as static which is very intrusive and limiting the programmer freewill.\r\n\r\n### Splitting individual scrape code\r\nA task is basically a group of individual scrapers with predefined scraping options. So basically we want to run the individual scraper multiple times when executing a task.\r\nTo keep DRY principle I needed to split the original [scrape-individual.js](https://github.com/eshaham/israeli-ynab-updater/blob/master/src/scrape/scrape-individual.js) file into two files. The first file handles the actual scraping and is used both by the individual scraper and the task scraper. The second file is the entry point when the user wants to scrape individual scraper and is used to get the relevant parameters from the user.\r\n\r\n### Extracting the report  generation \r\nA task scraper support two types of output, a single report that combine all the scrapped accounts together and for backward compatible it also allow creating multiple reports, one per each account. \r\nFor the same reason as explained above to keep the DRY principle I extracted the report generation into a separated file.\r\n\r\nThat's it, all the remaining files are there mostly to setup and scrape a task.\r\n\r\n@eshaham Please review. Thanks!\r\n\r\nCloses #28\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/eshaham/israeli-ynab-updater/32)\n<!-- Reviewable:end -->\n","created_at":"2018-03-27T06:03:26Z","updated_at":"2018-04-10T20:15:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"afff2414976581225260748720391940751c1a3e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/pulls/32/commits","review_comments_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/pulls/32/comments","review_comment_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/issues/32/comments","statuses_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/statuses/90f9be4970a495a7eb6becdd5cd576adcb788a24","head":{"label":"esakal:tasks","ref":"tasks","sha":"90f9be4970a495a7eb6becdd5cd576adcb788a24","user":{"login":"esakal","id":4751797,"avatar_url":"https://avatars3.githubusercontent.com/u/4751797?v=4","gravatar_id":"","url":"https://api.github.com/users/esakal","html_url":"https://github.com/esakal","followers_url":"https://api.github.com/users/esakal/followers","following_url":"https://api.github.com/users/esakal/following{/other_user}","gists_url":"https://api.github.com/users/esakal/gists{/gist_id}","starred_url":"https://api.github.com/users/esakal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esakal/subscriptions","organizations_url":"https://api.github.com/users/esakal/orgs","repos_url":"https://api.github.com/users/esakal/repos","events_url":"https://api.github.com/users/esakal/events{/privacy}","received_events_url":"https://api.github.com/users/esakal/received_events","type":"User","site_admin":false},"repo":{"id":123090259,"name":"israeli-ynab-updater","full_name":"esakal/israeli-ynab-updater","owner":{"login":"esakal","id":4751797,"avatar_url":"https://avatars3.githubusercontent.com/u/4751797?v=4","gravatar_id":"","url":"https://api.github.com/users/esakal","html_url":"https://github.com/esakal","followers_url":"https://api.github.com/users/esakal/followers","following_url":"https://api.github.com/users/esakal/following{/other_user}","gists_url":"https://api.github.com/users/esakal/gists{/gist_id}","starred_url":"https://api.github.com/users/esakal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esakal/subscriptions","organizations_url":"https://api.github.com/users/esakal/orgs","repos_url":"https://api.github.com/users/esakal/repos","events_url":"https://api.github.com/users/esakal/events{/privacy}","received_events_url":"https://api.github.com/users/esakal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/esakal/israeli-ynab-updater","description":"A tool for updating YNAB using israeli-bank-scrapers","fork":true,"url":"https://api.github.com/repos/esakal/israeli-ynab-updater","forks_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/forks","keys_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/teams","hooks_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/hooks","issue_events_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/issues/events{/number}","events_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/events","assignees_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/assignees{/user}","branches_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/branches{/branch}","tags_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/tags","blobs_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/git/refs{/sha}","trees_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/statuses/{sha}","languages_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/languages","stargazers_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/stargazers","contributors_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/contributors","subscribers_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/subscribers","subscription_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/subscription","commits_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/commits{/sha}","git_commits_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/git/commits{/sha}","comments_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/comments{/number}","issue_comment_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/issues/comments{/number}","contents_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/contents/{+path}","compare_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/merges","archive_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/downloads","issues_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/issues{/number}","pulls_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/pulls{/number}","milestones_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/milestones{/number}","notifications_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/labels{/name}","releases_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/releases{/id}","deployments_url":"https://api.github.com/repos/esakal/israeli-ynab-updater/deployments","created_at":"2018-02-27T07:27:02Z","updated_at":"2018-03-19T07:23:47Z","pushed_at":"2018-04-09T14:33:26Z","git_url":"git://github.com/esakal/israeli-ynab-updater.git","ssh_url":"git@github.com:esakal/israeli-ynab-updater.git","clone_url":"https://github.com/esakal/israeli-ynab-updater.git","svn_url":"https://github.com/esakal/israeli-ynab-updater","homepage":null,"size":210,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"eshaham:master","ref":"master","sha":"2a0c82f7c936d6f8423fe2f8a2f9a938bb23e1c2","user":{"login":"eshaham","id":7040645,"avatar_url":"https://avatars0.githubusercontent.com/u/7040645?v=4","gravatar_id":"","url":"https://api.github.com/users/eshaham","html_url":"https://github.com/eshaham","followers_url":"https://api.github.com/users/eshaham/followers","following_url":"https://api.github.com/users/eshaham/following{/other_user}","gists_url":"https://api.github.com/users/eshaham/gists{/gist_id}","starred_url":"https://api.github.com/users/eshaham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eshaham/subscriptions","organizations_url":"https://api.github.com/users/eshaham/orgs","repos_url":"https://api.github.com/users/eshaham/repos","events_url":"https://api.github.com/users/eshaham/events{/privacy}","received_events_url":"https://api.github.com/users/eshaham/received_events","type":"User","site_admin":false},"repo":{"id":107838522,"name":"israeli-ynab-updater","full_name":"eshaham/israeli-ynab-updater","owner":{"login":"eshaham","id":7040645,"avatar_url":"https://avatars0.githubusercontent.com/u/7040645?v=4","gravatar_id":"","url":"https://api.github.com/users/eshaham","html_url":"https://github.com/eshaham","followers_url":"https://api.github.com/users/eshaham/followers","following_url":"https://api.github.com/users/eshaham/following{/other_user}","gists_url":"https://api.github.com/users/eshaham/gists{/gist_id}","starred_url":"https://api.github.com/users/eshaham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eshaham/subscriptions","organizations_url":"https://api.github.com/users/eshaham/orgs","repos_url":"https://api.github.com/users/eshaham/repos","events_url":"https://api.github.com/users/eshaham/events{/privacy}","received_events_url":"https://api.github.com/users/eshaham/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eshaham/israeli-ynab-updater","description":"A tool for updating YNAB using israeli-bank-scrapers","fork":false,"url":"https://api.github.com/repos/eshaham/israeli-ynab-updater","forks_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/forks","keys_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/teams","hooks_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/hooks","issue_events_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/issues/events{/number}","events_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/events","assignees_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/assignees{/user}","branches_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/branches{/branch}","tags_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/tags","blobs_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/git/refs{/sha}","trees_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/statuses/{sha}","languages_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/languages","stargazers_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/stargazers","contributors_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/contributors","subscribers_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/subscribers","subscription_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/subscription","commits_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/commits{/sha}","git_commits_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/git/commits{/sha}","comments_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/comments{/number}","issue_comment_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/issues/comments{/number}","contents_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/contents/{+path}","compare_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/merges","archive_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/downloads","issues_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/issues{/number}","pulls_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/pulls{/number}","milestones_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/milestones{/number}","notifications_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/labels{/name}","releases_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/releases{/id}","deployments_url":"https://api.github.com/repos/eshaham/israeli-ynab-updater/deployments","created_at":"2017-10-22T04:55:55Z","updated_at":"2018-04-06T20:57:06Z","pushed_at":"2018-04-09T14:33:28Z","git_url":"git://github.com/eshaham/israeli-ynab-updater.git","ssh_url":"git@github.com:eshaham/israeli-ynab-updater.git","clone_url":"https://github.com/eshaham/israeli-ynab-updater.git","svn_url":"https://github.com/eshaham/israeli-ynab-updater","homepage":null,"size":140,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":4,"open_issues":7,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eshaham/israeli-ynab-updater/pulls/32"},"html":{"href":"https://github.com/eshaham/israeli-ynab-updater/pull/32"},"issue":{"href":"https://api.github.com/repos/eshaham/israeli-ynab-updater/issues/32"},"comments":{"href":"https://api.github.com/repos/eshaham/israeli-ynab-updater/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/eshaham/israeli-ynab-updater/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/eshaham/israeli-ynab-updater/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eshaham/israeli-ynab-updater/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/eshaham/israeli-ynab-updater/statuses/90f9be4970a495a7eb6becdd5cd576adcb788a24"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"eshaham"}}