{"action":"created","comment":{"url":"https://api.github.com/repos/oliver-moran/jimp/pulls/comments/40769738","id":40769738,"diff_hunk":"@@ -0,0 +1,20 @@\n+#!/usr/bin/env node\n+\n+var program = require('commander');\n+var resize = require('./resize');\n+\n+program\n+\t.version('0.0.1')\n+\t.description('Image manipulation in JavaScript.');\n+\n+program\n+\t.command('resize <image> <sizes...>')\n+\t.alias('r')\n+\t.description('Resize an image')\n+\t.option('-c --crop', 'Hard crop an image to the specified sizes')\n+\t.option('-f --fill', 'Image will be stretched to specified sizes')\n+\t.option('-o --out-file <name>', 'Name of the output file. Size strings will be appended to this file name')\n+\t.option('-d --out-dir <dir>', 'Path to the output directory')","path":"cli/index.js","position":17,"original_position":17,"commit_id":"04398dc2dbe189bfb439f21df8ebe2aed8e7b18c","original_commit_id":"04398dc2dbe189bfb439f21df8ebe2aed8e7b18c","user":{"login":"Maximilianos","id":2260302,"avatar_url":"https://avatars.githubusercontent.com/u/2260302?v=3","gravatar_id":"","url":"https://api.github.com/users/Maximilianos","html_url":"https://github.com/Maximilianos","followers_url":"https://api.github.com/users/Maximilianos/followers","following_url":"https://api.github.com/users/Maximilianos/following{/other_user}","gists_url":"https://api.github.com/users/Maximilianos/gists{/gist_id}","starred_url":"https://api.github.com/users/Maximilianos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maximilianos/subscriptions","organizations_url":"https://api.github.com/users/Maximilianos/orgs","repos_url":"https://api.github.com/users/Maximilianos/repos","events_url":"https://api.github.com/users/Maximilianos/events{/privacy}","received_events_url":"https://api.github.com/users/Maximilianos/received_events","type":"User","site_admin":false},"body":"Note: I haven't implemented the `--out-dir` flag yet, but the idea is that you would give `jimp` an entire directory of images and it would go through resizing all of them as per the resize instructions and then it would spit them out into the `--out-dir` directory.","created_at":"2015-09-30T08:33:02Z","updated_at":"2015-09-30T08:33:02Z","html_url":"https://github.com/oliver-moran/jimp/pull/41#discussion_r40769738","pull_request_url":"https://api.github.com/repos/oliver-moran/jimp/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/oliver-moran/jimp/pulls/comments/40769738"},"html":{"href":"https://github.com/oliver-moran/jimp/pull/41#discussion_r40769738"},"pull_request":{"href":"https://api.github.com/repos/oliver-moran/jimp/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/oliver-moran/jimp/pulls/41","id":46373444,"html_url":"https://github.com/oliver-moran/jimp/pull/41","diff_url":"https://github.com/oliver-moran/jimp/pull/41.diff","patch_url":"https://github.com/oliver-moran/jimp/pull/41.patch","issue_url":"https://api.github.com/repos/oliver-moran/jimp/issues/41","number":41,"state":"open","locked":false,"title":"Cli api","user":{"login":"Maximilianos","id":2260302,"avatar_url":"https://avatars.githubusercontent.com/u/2260302?v=3","gravatar_id":"","url":"https://api.github.com/users/Maximilianos","html_url":"https://github.com/Maximilianos","followers_url":"https://api.github.com/users/Maximilianos/followers","following_url":"https://api.github.com/users/Maximilianos/following{/other_user}","gists_url":"https://api.github.com/users/Maximilianos/gists{/gist_id}","starred_url":"https://api.github.com/users/Maximilianos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maximilianos/subscriptions","organizations_url":"https://api.github.com/users/Maximilianos/orgs","repos_url":"https://api.github.com/users/Maximilianos/repos","events_url":"https://api.github.com/users/Maximilianos/events{/privacy}","received_events_url":"https://api.github.com/users/Maximilianos/received_events","type":"User","site_admin":false},"body":"Reference: #38\r\n\r\nAdded necessary scaffold for the Jimp command line api. I am using [commander.js](https://github.com/tj/commander.js) to manage the command line commands and their options.\r\n\r\nAdded basics for one task to do what was described in the issue ( #38 ):\r\n\r\n```\r\njimp resize test/lenna.jpg 400x200 300 --crop --out-file test/lenna\r\n```\r\n\r\nshould create two images using the `Jimp.prototype.cover` method, in the `test` directory:\r\n- lenna-400x200.jpg\r\n- lenna-300x300.jpg\r\n\r\nAlready added additional options for specifying the resize type for each image size, eg:\r\n```\r\njimp r test/lenna.jpg fl400x200 cr300 cn200x500 --o len\r\n```\r\nwill create, in the root directory:\r\n- len-400x200.jpg (using the `resize` method)\r\n- len-300x300.jpg (using the `cover` method)\r\n- len-200x500.jpg (using the `contain` method)\r\n\r\n*Developing:* run `npm link` in the Jimp root folder, then you can run `jimp ...` from anywhere in your system to test.\r\n\r\nI am still working on this and if merged should be merged into a separate branch until we stabilize the api. Let me know what you think!","created_at":"2015-09-30T08:26:08Z","updated_at":"2015-09-30T08:33:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bad74f344962b0b1ec4dd1f59e3865c04d75d810","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/oliver-moran/jimp/pulls/41/commits","review_comments_url":"https://api.github.com/repos/oliver-moran/jimp/pulls/41/comments","review_comment_url":"https://api.github.com/repos/oliver-moran/jimp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oliver-moran/jimp/issues/41/comments","statuses_url":"https://api.github.com/repos/oliver-moran/jimp/statuses/04398dc2dbe189bfb439f21df8ebe2aed8e7b18c","head":{"label":"Maximilianos:feature-cli","ref":"feature-cli","sha":"04398dc2dbe189bfb439f21df8ebe2aed8e7b18c","user":{"login":"Maximilianos","id":2260302,"avatar_url":"https://avatars.githubusercontent.com/u/2260302?v=3","gravatar_id":"","url":"https://api.github.com/users/Maximilianos","html_url":"https://github.com/Maximilianos","followers_url":"https://api.github.com/users/Maximilianos/followers","following_url":"https://api.github.com/users/Maximilianos/following{/other_user}","gists_url":"https://api.github.com/users/Maximilianos/gists{/gist_id}","starred_url":"https://api.github.com/users/Maximilianos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maximilianos/subscriptions","organizations_url":"https://api.github.com/users/Maximilianos/orgs","repos_url":"https://api.github.com/users/Maximilianos/repos","events_url":"https://api.github.com/users/Maximilianos/events{/privacy}","received_events_url":"https://api.github.com/users/Maximilianos/received_events","type":"User","site_admin":false},"repo":{"id":43320445,"name":"jimp","full_name":"Maximilianos/jimp","owner":{"login":"Maximilianos","id":2260302,"avatar_url":"https://avatars.githubusercontent.com/u/2260302?v=3","gravatar_id":"","url":"https://api.github.com/users/Maximilianos","html_url":"https://github.com/Maximilianos","followers_url":"https://api.github.com/users/Maximilianos/followers","following_url":"https://api.github.com/users/Maximilianos/following{/other_user}","gists_url":"https://api.github.com/users/Maximilianos/gists{/gist_id}","starred_url":"https://api.github.com/users/Maximilianos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maximilianos/subscriptions","organizations_url":"https://api.github.com/users/Maximilianos/orgs","repos_url":"https://api.github.com/users/Maximilianos/repos","events_url":"https://api.github.com/users/Maximilianos/events{/privacy}","received_events_url":"https://api.github.com/users/Maximilianos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Maximilianos/jimp","description":"An image processing library written entirely in JavaScript for Node, with zero external or native dependencies.","fork":true,"url":"https://api.github.com/repos/Maximilianos/jimp","forks_url":"https://api.github.com/repos/Maximilianos/jimp/forks","keys_url":"https://api.github.com/repos/Maximilianos/jimp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Maximilianos/jimp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Maximilianos/jimp/teams","hooks_url":"https://api.github.com/repos/Maximilianos/jimp/hooks","issue_events_url":"https://api.github.com/repos/Maximilianos/jimp/issues/events{/number}","events_url":"https://api.github.com/repos/Maximilianos/jimp/events","assignees_url":"https://api.github.com/repos/Maximilianos/jimp/assignees{/user}","branches_url":"https://api.github.com/repos/Maximilianos/jimp/branches{/branch}","tags_url":"https://api.github.com/repos/Maximilianos/jimp/tags","blobs_url":"https://api.github.com/repos/Maximilianos/jimp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Maximilianos/jimp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Maximilianos/jimp/git/refs{/sha}","trees_url":"https://api.github.com/repos/Maximilianos/jimp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Maximilianos/jimp/statuses/{sha}","languages_url":"https://api.github.com/repos/Maximilianos/jimp/languages","stargazers_url":"https://api.github.com/repos/Maximilianos/jimp/stargazers","contributors_url":"https://api.github.com/repos/Maximilianos/jimp/contributors","subscribers_url":"https://api.github.com/repos/Maximilianos/jimp/subscribers","subscription_url":"https://api.github.com/repos/Maximilianos/jimp/subscription","commits_url":"https://api.github.com/repos/Maximilianos/jimp/commits{/sha}","git_commits_url":"https://api.github.com/repos/Maximilianos/jimp/git/commits{/sha}","comments_url":"https://api.github.com/repos/Maximilianos/jimp/comments{/number}","issue_comment_url":"https://api.github.com/repos/Maximilianos/jimp/issues/comments{/number}","contents_url":"https://api.github.com/repos/Maximilianos/jimp/contents/{+path}","compare_url":"https://api.github.com/repos/Maximilianos/jimp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Maximilianos/jimp/merges","archive_url":"https://api.github.com/repos/Maximilianos/jimp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Maximilianos/jimp/downloads","issues_url":"https://api.github.com/repos/Maximilianos/jimp/issues{/number}","pulls_url":"https://api.github.com/repos/Maximilianos/jimp/pulls{/number}","milestones_url":"https://api.github.com/repos/Maximilianos/jimp/milestones{/number}","notifications_url":"https://api.github.com/repos/Maximilianos/jimp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Maximilianos/jimp/labels{/name}","releases_url":"https://api.github.com/repos/Maximilianos/jimp/releases{/id}","created_at":"2015-09-28T18:56:42Z","updated_at":"2015-09-28T18:56:42Z","pushed_at":"2015-09-30T08:29:04Z","git_url":"git://github.com/Maximilianos/jimp.git","ssh_url":"git@github.com:Maximilianos/jimp.git","clone_url":"https://github.com/Maximilianos/jimp.git","svn_url":"https://github.com/Maximilianos/jimp","homepage":null,"size":1184,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"oliver-moran:master","ref":"master","sha":"ae6b29f2442bc214ac11a56963e6df5c0ba3166c","user":{"login":"oliver-moran","id":414918,"avatar_url":"https://avatars.githubusercontent.com/u/414918?v=3","gravatar_id":"","url":"https://api.github.com/users/oliver-moran","html_url":"https://github.com/oliver-moran","followers_url":"https://api.github.com/users/oliver-moran/followers","following_url":"https://api.github.com/users/oliver-moran/following{/other_user}","gists_url":"https://api.github.com/users/oliver-moran/gists{/gist_id}","starred_url":"https://api.github.com/users/oliver-moran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliver-moran/subscriptions","organizations_url":"https://api.github.com/users/oliver-moran/orgs","repos_url":"https://api.github.com/users/oliver-moran/repos","events_url":"https://api.github.com/users/oliver-moran/events{/privacy}","received_events_url":"https://api.github.com/users/oliver-moran/received_events","type":"User","site_admin":false},"repo":{"id":24008065,"name":"jimp","full_name":"oliver-moran/jimp","owner":{"login":"oliver-moran","id":414918,"avatar_url":"https://avatars.githubusercontent.com/u/414918?v=3","gravatar_id":"","url":"https://api.github.com/users/oliver-moran","html_url":"https://github.com/oliver-moran","followers_url":"https://api.github.com/users/oliver-moran/followers","following_url":"https://api.github.com/users/oliver-moran/following{/other_user}","gists_url":"https://api.github.com/users/oliver-moran/gists{/gist_id}","starred_url":"https://api.github.com/users/oliver-moran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliver-moran/subscriptions","organizations_url":"https://api.github.com/users/oliver-moran/orgs","repos_url":"https://api.github.com/users/oliver-moran/repos","events_url":"https://api.github.com/users/oliver-moran/events{/privacy}","received_events_url":"https://api.github.com/users/oliver-moran/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oliver-moran/jimp","description":"An image processing library written entirely in JavaScript for Node, with zero external or native dependencies.","fork":false,"url":"https://api.github.com/repos/oliver-moran/jimp","forks_url":"https://api.github.com/repos/oliver-moran/jimp/forks","keys_url":"https://api.github.com/repos/oliver-moran/jimp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oliver-moran/jimp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oliver-moran/jimp/teams","hooks_url":"https://api.github.com/repos/oliver-moran/jimp/hooks","issue_events_url":"https://api.github.com/repos/oliver-moran/jimp/issues/events{/number}","events_url":"https://api.github.com/repos/oliver-moran/jimp/events","assignees_url":"https://api.github.com/repos/oliver-moran/jimp/assignees{/user}","branches_url":"https://api.github.com/repos/oliver-moran/jimp/branches{/branch}","tags_url":"https://api.github.com/repos/oliver-moran/jimp/tags","blobs_url":"https://api.github.com/repos/oliver-moran/jimp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oliver-moran/jimp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oliver-moran/jimp/git/refs{/sha}","trees_url":"https://api.github.com/repos/oliver-moran/jimp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oliver-moran/jimp/statuses/{sha}","languages_url":"https://api.github.com/repos/oliver-moran/jimp/languages","stargazers_url":"https://api.github.com/repos/oliver-moran/jimp/stargazers","contributors_url":"https://api.github.com/repos/oliver-moran/jimp/contributors","subscribers_url":"https://api.github.com/repos/oliver-moran/jimp/subscribers","subscription_url":"https://api.github.com/repos/oliver-moran/jimp/subscription","commits_url":"https://api.github.com/repos/oliver-moran/jimp/commits{/sha}","git_commits_url":"https://api.github.com/repos/oliver-moran/jimp/git/commits{/sha}","comments_url":"https://api.github.com/repos/oliver-moran/jimp/comments{/number}","issue_comment_url":"https://api.github.com/repos/oliver-moran/jimp/issues/comments{/number}","contents_url":"https://api.github.com/repos/oliver-moran/jimp/contents/{+path}","compare_url":"https://api.github.com/repos/oliver-moran/jimp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oliver-moran/jimp/merges","archive_url":"https://api.github.com/repos/oliver-moran/jimp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oliver-moran/jimp/downloads","issues_url":"https://api.github.com/repos/oliver-moran/jimp/issues{/number}","pulls_url":"https://api.github.com/repos/oliver-moran/jimp/pulls{/number}","milestones_url":"https://api.github.com/repos/oliver-moran/jimp/milestones{/number}","notifications_url":"https://api.github.com/repos/oliver-moran/jimp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oliver-moran/jimp/labels{/name}","releases_url":"https://api.github.com/repos/oliver-moran/jimp/releases{/id}","created_at":"2014-09-13T22:53:45Z","updated_at":"2015-09-30T08:23:34Z","pushed_at":"2015-09-30T08:29:04Z","git_url":"git://github.com/oliver-moran/jimp.git","ssh_url":"git@github.com:oliver-moran/jimp.git","clone_url":"https://github.com/oliver-moran/jimp.git","svn_url":"https://github.com/oliver-moran/jimp","homepage":null,"size":1184,"stargazers_count":521,"watchers_count":521,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":6,"forks":28,"open_issues":6,"watchers":521,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/oliver-moran/jimp/pulls/41"},"html":{"href":"https://github.com/oliver-moran/jimp/pull/41"},"issue":{"href":"https://api.github.com/repos/oliver-moran/jimp/issues/41"},"comments":{"href":"https://api.github.com/repos/oliver-moran/jimp/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/oliver-moran/jimp/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/oliver-moran/jimp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oliver-moran/jimp/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/oliver-moran/jimp/statuses/04398dc2dbe189bfb439f21df8ebe2aed8e7b18c"}}}}