├── .gitignore ├── LICENSE ├── README.md ├── package-lock.json ├── package.json ├── resumify └── stub └── main.js.stub /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 18 | .grunt 19 | 20 | # node-waf configuration 21 | .lock-wscript 22 | 23 | # Compiled binary addons (http://nodejs.org/api/addons.html) 24 | build/Release 25 | 26 | # Dependency directory 27 | # https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git 28 | node_modules 29 | 30 | # Optional npm cache directory 31 | .npm 32 | 33 | # Optional REPL history 34 | .node_repl_history 35 | 36 | shot-* 37 | main.js 38 | *.pdf 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 ysugimoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # resumify 2 | 3 | Capture screenshot and make PDF on your HTML presentation. 4 | 5 | ## Requirements 6 | 7 | - `node.js`: main program ( recommend 4.2.x, at least 4.x ) 8 | - `electron`: Capturing screenshot ( this package has dependency installtion `electron-prebuilt` ) 9 | - `ImageMagick`: PDF creation ( install and set PATH ) 10 | 11 | ## Installation 12 | 13 | Use `npm` simply, we recommend global install: 14 | 15 | ``` 16 | $ npm install -g resumify 17 | ``` 18 | 19 | ## Usage 20 | 21 | ### 1. Local Presentation 22 | 23 | Change to directory to slide-HTML file existing, run the command: 24 | 25 | ``` 26 | $ cd /path/to/presentation/ 27 | $ resumify 28 | ``` 29 | 30 | `resumify` will auto detecting HTML file, and processing. 31 | 32 | ### 2. Remote Presentation 33 | 34 | If slide has remote server (e.g. AWS S3), supply URL with `-u` or `--url` option: 35 | 36 | ``` 37 | $ resumify -u http://example.com/path/to/presentation/index.html 38 | ``` 39 | 40 | Note that URL must be fully format ( including .html ). 41 | 42 | ## Options 43 | 44 | `resumify` has some options to manage processing: 45 | 46 | | option | description | default | 47 | |---------------|-----------------------------------------------------|-----------| 48 | | -t, --type | Slide control type. Can accepts `url` or `scroll`. | url | 49 | | -s, --size | Capture screen size with `[width]x[height]` format. | 1280x800 | 50 | | -s, --size | Capture screen size with `[width]x[height]` format. | 1280x800 | 51 | | --skip | Skip capturing slide number like `2,3,4,...` format | - | 52 | | -e, --end | End of slide number | 1 | 53 | | -u, --url | Remote slide URL | - | 54 | | -h, --help | Show help | - | 55 | | -v, --version | Show program version | - | 56 | | -o, --output | Determine output PDF filename | slide.pdf | 57 | 58 | ### Slide Type 59 | 60 | The new option of `-t, --type`, which is determine how slide is controlled. 61 | If type is `url`, slide will move by URL hash like `#1`, `#2`, ... 62 | Other type is `scroll`, slide will move by page scrolling. 63 | 64 | ## Author 65 | 66 | Yoshiaki Sugimoto 67 | 68 | ## License 69 | 70 | MIT 71 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "resumify", 3 | "version": "0.9.2", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@types/node": { 8 | "version": "8.10.39", 9 | "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.39.tgz", 10 | "integrity": "sha512-rE7fktr02J8ybFf6eysife+WF+L4sAHWzw09DgdCebEu+qDwMvv4zl6Bc+825ttGZP73kCKxa3dhJOoGJ8+5mA==" 11 | }, 12 | "ajv": { 13 | "version": "6.6.2", 14 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.2.tgz", 15 | "integrity": "sha512-FBHEW6Jf5TB9MGBgUUA9XHkTbjXYfAUjY43ACMfmdMRHniyoMHjHjzD50OK8LGDWQwp4rWEsIq5kEqq7rvIM1g==", 16 | "requires": { 17 | "fast-deep-equal": "^2.0.1", 18 | "fast-json-stable-stringify": "^2.0.0", 19 | "json-schema-traverse": "^0.4.1", 20 | "uri-js": "^4.2.2" 21 | } 22 | }, 23 | "ansi-regex": { 24 | "version": "2.1.1", 25 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", 26 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" 27 | }, 28 | "array-find-index": { 29 | "version": "1.0.2", 30 | "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", 31 | "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" 32 | }, 33 | "asn1": { 34 | "version": "0.2.4", 35 | "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", 36 | "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", 37 | "requires": { 38 | "safer-buffer": "~2.1.0" 39 | } 40 | }, 41 | "assert-plus": { 42 | "version": "1.0.0", 43 | "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", 44 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" 45 | }, 46 | "asynckit": { 47 | "version": "0.4.0", 48 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 49 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" 50 | }, 51 | "aws-sign2": { 52 | "version": "0.7.0", 53 | "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", 54 | "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" 55 | }, 56 | "aws4": { 57 | "version": "1.8.0", 58 | "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", 59 | "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" 60 | }, 61 | "bcrypt-pbkdf": { 62 | "version": "1.0.2", 63 | "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", 64 | "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", 65 | "requires": { 66 | "tweetnacl": "^0.14.3" 67 | } 68 | }, 69 | "buffer-from": { 70 | "version": "1.1.1", 71 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", 72 | "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" 73 | }, 74 | "builtin-modules": { 75 | "version": "1.1.1", 76 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", 77 | "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" 78 | }, 79 | "camelcase": { 80 | "version": "2.1.1", 81 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", 82 | "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" 83 | }, 84 | "camelcase-keys": { 85 | "version": "2.1.0", 86 | "resolved": "http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", 87 | "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", 88 | "requires": { 89 | "camelcase": "^2.0.0", 90 | "map-obj": "^1.0.0" 91 | } 92 | }, 93 | "caseless": { 94 | "version": "0.12.0", 95 | "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", 96 | "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" 97 | }, 98 | "code-point-at": { 99 | "version": "1.1.0", 100 | "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", 101 | "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" 102 | }, 103 | "combined-stream": { 104 | "version": "1.0.7", 105 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", 106 | "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", 107 | "requires": { 108 | "delayed-stream": "~1.0.0" 109 | } 110 | }, 111 | "concat-stream": { 112 | "version": "1.6.2", 113 | "resolved": "http://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", 114 | "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", 115 | "requires": { 116 | "buffer-from": "^1.0.0", 117 | "inherits": "^2.0.3", 118 | "readable-stream": "^2.2.2", 119 | "typedarray": "^0.0.6" 120 | }, 121 | "dependencies": { 122 | "isarray": { 123 | "version": "1.0.0", 124 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 125 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" 126 | }, 127 | "readable-stream": { 128 | "version": "2.3.6", 129 | "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", 130 | "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", 131 | "requires": { 132 | "core-util-is": "~1.0.0", 133 | "inherits": "~2.0.3", 134 | "isarray": "~1.0.0", 135 | "process-nextick-args": "~2.0.0", 136 | "safe-buffer": "~5.1.1", 137 | "string_decoder": "~1.1.1", 138 | "util-deprecate": "~1.0.1" 139 | } 140 | }, 141 | "string_decoder": { 142 | "version": "1.1.1", 143 | "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 144 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 145 | "requires": { 146 | "safe-buffer": "~5.1.0" 147 | } 148 | } 149 | } 150 | }, 151 | "core-util-is": { 152 | "version": "1.0.2", 153 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 154 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" 155 | }, 156 | "currently-unhandled": { 157 | "version": "0.4.1", 158 | "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", 159 | "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", 160 | "requires": { 161 | "array-find-index": "^1.0.1" 162 | } 163 | }, 164 | "dashdash": { 165 | "version": "1.14.1", 166 | "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", 167 | "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", 168 | "requires": { 169 | "assert-plus": "^1.0.0" 170 | } 171 | }, 172 | "debug": { 173 | "version": "3.2.6", 174 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", 175 | "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", 176 | "requires": { 177 | "ms": "^2.1.1" 178 | } 179 | }, 180 | "decamelize": { 181 | "version": "1.2.0", 182 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", 183 | "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" 184 | }, 185 | "deep-extend": { 186 | "version": "0.6.0", 187 | "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", 188 | "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" 189 | }, 190 | "delayed-stream": { 191 | "version": "1.0.0", 192 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 193 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" 194 | }, 195 | "ecc-jsbn": { 196 | "version": "0.1.2", 197 | "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", 198 | "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", 199 | "requires": { 200 | "jsbn": "~0.1.0", 201 | "safer-buffer": "^2.1.0" 202 | } 203 | }, 204 | "electron": { 205 | "version": "4.0.0", 206 | "resolved": "https://registry.npmjs.org/electron/-/electron-4.0.0.tgz", 207 | "integrity": "sha512-3XPG/3IXlvnT1oe1K6zEushoD0SKbP8xwdrL10EWGe6k2iOV4hSHqJ8vWnR8yZ7VbSXmBRfomEFDNAo/q/cwKw==", 208 | "requires": { 209 | "@types/node": "^8.0.24", 210 | "electron-download": "^4.1.0", 211 | "extract-zip": "^1.0.3" 212 | } 213 | }, 214 | "electron-download": { 215 | "version": "4.1.1", 216 | "resolved": "https://registry.npmjs.org/electron-download/-/electron-download-4.1.1.tgz", 217 | "integrity": "sha512-FjEWG9Jb/ppK/2zToP+U5dds114fM1ZOJqMAR4aXXL5CvyPE9fiqBK/9YcwC9poIFQTEJk/EM/zyRwziziRZrg==", 218 | "requires": { 219 | "debug": "^3.0.0", 220 | "env-paths": "^1.0.0", 221 | "fs-extra": "^4.0.1", 222 | "minimist": "^1.2.0", 223 | "nugget": "^2.0.1", 224 | "path-exists": "^3.0.0", 225 | "rc": "^1.2.1", 226 | "semver": "^5.4.1", 227 | "sumchecker": "^2.0.2" 228 | } 229 | }, 230 | "env-paths": { 231 | "version": "1.0.0", 232 | "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz", 233 | "integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA=" 234 | }, 235 | "error-ex": { 236 | "version": "1.3.2", 237 | "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", 238 | "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", 239 | "requires": { 240 | "is-arrayish": "^0.2.1" 241 | } 242 | }, 243 | "extend": { 244 | "version": "3.0.2", 245 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", 246 | "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" 247 | }, 248 | "extract-zip": { 249 | "version": "1.6.7", 250 | "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz", 251 | "integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=", 252 | "requires": { 253 | "concat-stream": "1.6.2", 254 | "debug": "2.6.9", 255 | "mkdirp": "0.5.1", 256 | "yauzl": "2.4.1" 257 | }, 258 | "dependencies": { 259 | "debug": { 260 | "version": "2.6.9", 261 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 262 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 263 | "requires": { 264 | "ms": "2.0.0" 265 | } 266 | }, 267 | "ms": { 268 | "version": "2.0.0", 269 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 270 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 271 | } 272 | } 273 | }, 274 | "extsprintf": { 275 | "version": "1.3.0", 276 | "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", 277 | "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" 278 | }, 279 | "fast-deep-equal": { 280 | "version": "2.0.1", 281 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", 282 | "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" 283 | }, 284 | "fast-json-stable-stringify": { 285 | "version": "2.0.0", 286 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", 287 | "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" 288 | }, 289 | "fd-slicer": { 290 | "version": "1.0.1", 291 | "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", 292 | "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", 293 | "requires": { 294 | "pend": "~1.2.0" 295 | } 296 | }, 297 | "find-up": { 298 | "version": "1.1.2", 299 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", 300 | "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", 301 | "requires": { 302 | "path-exists": "^2.0.0", 303 | "pinkie-promise": "^2.0.0" 304 | }, 305 | "dependencies": { 306 | "path-exists": { 307 | "version": "2.1.0", 308 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", 309 | "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", 310 | "requires": { 311 | "pinkie-promise": "^2.0.0" 312 | } 313 | } 314 | } 315 | }, 316 | "forever-agent": { 317 | "version": "0.6.1", 318 | "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", 319 | "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" 320 | }, 321 | "form-data": { 322 | "version": "2.3.3", 323 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", 324 | "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", 325 | "requires": { 326 | "asynckit": "^0.4.0", 327 | "combined-stream": "^1.0.6", 328 | "mime-types": "^2.1.12" 329 | } 330 | }, 331 | "fs-extra": { 332 | "version": "4.0.3", 333 | "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", 334 | "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", 335 | "requires": { 336 | "graceful-fs": "^4.1.2", 337 | "jsonfile": "^4.0.0", 338 | "universalify": "^0.1.0" 339 | } 340 | }, 341 | "get-stdin": { 342 | "version": "4.0.1", 343 | "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", 344 | "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=" 345 | }, 346 | "getpass": { 347 | "version": "0.1.7", 348 | "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", 349 | "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", 350 | "requires": { 351 | "assert-plus": "^1.0.0" 352 | } 353 | }, 354 | "graceful-fs": { 355 | "version": "4.1.15", 356 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", 357 | "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" 358 | }, 359 | "har-schema": { 360 | "version": "2.0.0", 361 | "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", 362 | "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" 363 | }, 364 | "har-validator": { 365 | "version": "5.1.3", 366 | "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", 367 | "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", 368 | "requires": { 369 | "ajv": "^6.5.5", 370 | "har-schema": "^2.0.0" 371 | } 372 | }, 373 | "hosted-git-info": { 374 | "version": "2.7.1", 375 | "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", 376 | "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==" 377 | }, 378 | "http-signature": { 379 | "version": "1.2.0", 380 | "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", 381 | "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", 382 | "requires": { 383 | "assert-plus": "^1.0.0", 384 | "jsprim": "^1.2.2", 385 | "sshpk": "^1.7.0" 386 | } 387 | }, 388 | "indent-string": { 389 | "version": "2.1.0", 390 | "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", 391 | "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", 392 | "requires": { 393 | "repeating": "^2.0.0" 394 | } 395 | }, 396 | "inherits": { 397 | "version": "2.0.3", 398 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 399 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 400 | }, 401 | "ini": { 402 | "version": "1.3.5", 403 | "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", 404 | "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" 405 | }, 406 | "is-arrayish": { 407 | "version": "0.2.1", 408 | "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", 409 | "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" 410 | }, 411 | "is-builtin-module": { 412 | "version": "1.0.0", 413 | "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", 414 | "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", 415 | "requires": { 416 | "builtin-modules": "^1.0.0" 417 | } 418 | }, 419 | "is-finite": { 420 | "version": "1.0.2", 421 | "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", 422 | "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", 423 | "requires": { 424 | "number-is-nan": "^1.0.0" 425 | } 426 | }, 427 | "is-fullwidth-code-point": { 428 | "version": "1.0.0", 429 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", 430 | "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", 431 | "requires": { 432 | "number-is-nan": "^1.0.0" 433 | } 434 | }, 435 | "is-typedarray": { 436 | "version": "1.0.0", 437 | "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", 438 | "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" 439 | }, 440 | "is-utf8": { 441 | "version": "0.2.1", 442 | "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", 443 | "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" 444 | }, 445 | "isarray": { 446 | "version": "0.0.1", 447 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", 448 | "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" 449 | }, 450 | "isstream": { 451 | "version": "0.1.2", 452 | "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", 453 | "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" 454 | }, 455 | "jsbn": { 456 | "version": "0.1.1", 457 | "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", 458 | "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" 459 | }, 460 | "json-schema": { 461 | "version": "0.2.3", 462 | "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", 463 | "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" 464 | }, 465 | "json-schema-traverse": { 466 | "version": "0.4.1", 467 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 468 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" 469 | }, 470 | "json-stringify-safe": { 471 | "version": "5.0.1", 472 | "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", 473 | "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" 474 | }, 475 | "jsonfile": { 476 | "version": "4.0.0", 477 | "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", 478 | "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", 479 | "requires": { 480 | "graceful-fs": "^4.1.6" 481 | } 482 | }, 483 | "jsprim": { 484 | "version": "1.4.1", 485 | "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", 486 | "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", 487 | "requires": { 488 | "assert-plus": "1.0.0", 489 | "extsprintf": "1.3.0", 490 | "json-schema": "0.2.3", 491 | "verror": "1.10.0" 492 | } 493 | }, 494 | "load-json-file": { 495 | "version": "1.1.0", 496 | "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", 497 | "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", 498 | "requires": { 499 | "graceful-fs": "^4.1.2", 500 | "parse-json": "^2.2.0", 501 | "pify": "^2.0.0", 502 | "pinkie-promise": "^2.0.0", 503 | "strip-bom": "^2.0.0" 504 | } 505 | }, 506 | "loud-rejection": { 507 | "version": "1.6.0", 508 | "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", 509 | "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", 510 | "requires": { 511 | "currently-unhandled": "^0.4.1", 512 | "signal-exit": "^3.0.0" 513 | } 514 | }, 515 | "map-obj": { 516 | "version": "1.0.1", 517 | "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", 518 | "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" 519 | }, 520 | "meow": { 521 | "version": "3.7.0", 522 | "resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz", 523 | "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", 524 | "requires": { 525 | "camelcase-keys": "^2.0.0", 526 | "decamelize": "^1.1.2", 527 | "loud-rejection": "^1.0.0", 528 | "map-obj": "^1.0.1", 529 | "minimist": "^1.1.3", 530 | "normalize-package-data": "^2.3.4", 531 | "object-assign": "^4.0.1", 532 | "read-pkg-up": "^1.0.1", 533 | "redent": "^1.0.0", 534 | "trim-newlines": "^1.0.0" 535 | } 536 | }, 537 | "mime-db": { 538 | "version": "1.37.0", 539 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", 540 | "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==" 541 | }, 542 | "mime-types": { 543 | "version": "2.1.21", 544 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", 545 | "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", 546 | "requires": { 547 | "mime-db": "~1.37.0" 548 | } 549 | }, 550 | "minimist": { 551 | "version": "1.2.0", 552 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", 553 | "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" 554 | }, 555 | "mkdirp": { 556 | "version": "0.5.1", 557 | "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", 558 | "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", 559 | "requires": { 560 | "minimist": "0.0.8" 561 | }, 562 | "dependencies": { 563 | "minimist": { 564 | "version": "0.0.8", 565 | "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", 566 | "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" 567 | } 568 | } 569 | }, 570 | "ms": { 571 | "version": "2.1.1", 572 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", 573 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" 574 | }, 575 | "normalize-package-data": { 576 | "version": "2.4.0", 577 | "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", 578 | "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", 579 | "requires": { 580 | "hosted-git-info": "^2.1.4", 581 | "is-builtin-module": "^1.0.0", 582 | "semver": "2 || 3 || 4 || 5", 583 | "validate-npm-package-license": "^3.0.1" 584 | } 585 | }, 586 | "nugget": { 587 | "version": "2.0.1", 588 | "resolved": "https://registry.npmjs.org/nugget/-/nugget-2.0.1.tgz", 589 | "integrity": "sha1-IBCVpIfhrTYIGzQy+jytpPjQcbA=", 590 | "requires": { 591 | "debug": "^2.1.3", 592 | "minimist": "^1.1.0", 593 | "pretty-bytes": "^1.0.2", 594 | "progress-stream": "^1.1.0", 595 | "request": "^2.45.0", 596 | "single-line-log": "^1.1.2", 597 | "throttleit": "0.0.2" 598 | }, 599 | "dependencies": { 600 | "debug": { 601 | "version": "2.6.9", 602 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 603 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 604 | "requires": { 605 | "ms": "2.0.0" 606 | } 607 | }, 608 | "ms": { 609 | "version": "2.0.0", 610 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 611 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 612 | } 613 | } 614 | }, 615 | "number-is-nan": { 616 | "version": "1.0.1", 617 | "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", 618 | "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" 619 | }, 620 | "oauth-sign": { 621 | "version": "0.9.0", 622 | "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", 623 | "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" 624 | }, 625 | "object-assign": { 626 | "version": "4.1.1", 627 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 628 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" 629 | }, 630 | "object-keys": { 631 | "version": "0.4.0", 632 | "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", 633 | "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=" 634 | }, 635 | "parse-json": { 636 | "version": "2.2.0", 637 | "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", 638 | "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", 639 | "requires": { 640 | "error-ex": "^1.2.0" 641 | } 642 | }, 643 | "path-exists": { 644 | "version": "3.0.0", 645 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", 646 | "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" 647 | }, 648 | "path-type": { 649 | "version": "1.1.0", 650 | "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", 651 | "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", 652 | "requires": { 653 | "graceful-fs": "^4.1.2", 654 | "pify": "^2.0.0", 655 | "pinkie-promise": "^2.0.0" 656 | } 657 | }, 658 | "pend": { 659 | "version": "1.2.0", 660 | "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", 661 | "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" 662 | }, 663 | "performance-now": { 664 | "version": "2.1.0", 665 | "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", 666 | "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" 667 | }, 668 | "pify": { 669 | "version": "2.3.0", 670 | "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", 671 | "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" 672 | }, 673 | "pinkie": { 674 | "version": "2.0.4", 675 | "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", 676 | "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" 677 | }, 678 | "pinkie-promise": { 679 | "version": "2.0.1", 680 | "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", 681 | "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", 682 | "requires": { 683 | "pinkie": "^2.0.0" 684 | } 685 | }, 686 | "pretty-bytes": { 687 | "version": "1.0.4", 688 | "resolved": "http://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", 689 | "integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=", 690 | "requires": { 691 | "get-stdin": "^4.0.1", 692 | "meow": "^3.1.0" 693 | } 694 | }, 695 | "process-nextick-args": { 696 | "version": "2.0.0", 697 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", 698 | "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" 699 | }, 700 | "progress-stream": { 701 | "version": "1.2.0", 702 | "resolved": "https://registry.npmjs.org/progress-stream/-/progress-stream-1.2.0.tgz", 703 | "integrity": "sha1-LNPP6jO6OonJwSHsM0er6asSX3c=", 704 | "requires": { 705 | "speedometer": "~0.1.2", 706 | "through2": "~0.2.3" 707 | } 708 | }, 709 | "psl": { 710 | "version": "1.1.31", 711 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", 712 | "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==" 713 | }, 714 | "punycode": { 715 | "version": "2.1.1", 716 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 717 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" 718 | }, 719 | "qs": { 720 | "version": "6.5.2", 721 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", 722 | "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" 723 | }, 724 | "rc": { 725 | "version": "1.2.8", 726 | "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", 727 | "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", 728 | "requires": { 729 | "deep-extend": "^0.6.0", 730 | "ini": "~1.3.0", 731 | "minimist": "^1.2.0", 732 | "strip-json-comments": "~2.0.1" 733 | } 734 | }, 735 | "read-pkg": { 736 | "version": "1.1.0", 737 | "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", 738 | "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", 739 | "requires": { 740 | "load-json-file": "^1.0.0", 741 | "normalize-package-data": "^2.3.2", 742 | "path-type": "^1.0.0" 743 | } 744 | }, 745 | "read-pkg-up": { 746 | "version": "1.0.1", 747 | "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", 748 | "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", 749 | "requires": { 750 | "find-up": "^1.0.0", 751 | "read-pkg": "^1.0.0" 752 | } 753 | }, 754 | "readable-stream": { 755 | "version": "1.1.14", 756 | "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", 757 | "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", 758 | "requires": { 759 | "core-util-is": "~1.0.0", 760 | "inherits": "~2.0.1", 761 | "isarray": "0.0.1", 762 | "string_decoder": "~0.10.x" 763 | } 764 | }, 765 | "redent": { 766 | "version": "1.0.0", 767 | "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", 768 | "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", 769 | "requires": { 770 | "indent-string": "^2.1.0", 771 | "strip-indent": "^1.0.1" 772 | } 773 | }, 774 | "repeating": { 775 | "version": "2.0.1", 776 | "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", 777 | "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", 778 | "requires": { 779 | "is-finite": "^1.0.0" 780 | } 781 | }, 782 | "request": { 783 | "version": "2.88.0", 784 | "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", 785 | "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", 786 | "requires": { 787 | "aws-sign2": "~0.7.0", 788 | "aws4": "^1.8.0", 789 | "caseless": "~0.12.0", 790 | "combined-stream": "~1.0.6", 791 | "extend": "~3.0.2", 792 | "forever-agent": "~0.6.1", 793 | "form-data": "~2.3.2", 794 | "har-validator": "~5.1.0", 795 | "http-signature": "~1.2.0", 796 | "is-typedarray": "~1.0.0", 797 | "isstream": "~0.1.2", 798 | "json-stringify-safe": "~5.0.1", 799 | "mime-types": "~2.1.19", 800 | "oauth-sign": "~0.9.0", 801 | "performance-now": "^2.1.0", 802 | "qs": "~6.5.2", 803 | "safe-buffer": "^5.1.2", 804 | "tough-cookie": "~2.4.3", 805 | "tunnel-agent": "^0.6.0", 806 | "uuid": "^3.3.2" 807 | } 808 | }, 809 | "safe-buffer": { 810 | "version": "5.1.2", 811 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 812 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 813 | }, 814 | "safer-buffer": { 815 | "version": "2.1.2", 816 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 817 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 818 | }, 819 | "semver": { 820 | "version": "5.6.0", 821 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", 822 | "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" 823 | }, 824 | "signal-exit": { 825 | "version": "3.0.2", 826 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", 827 | "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" 828 | }, 829 | "single-line-log": { 830 | "version": "1.1.2", 831 | "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-1.1.2.tgz", 832 | "integrity": "sha1-wvg/Jzo+GhbtsJlWYdoO1e8DM2Q=", 833 | "requires": { 834 | "string-width": "^1.0.1" 835 | } 836 | }, 837 | "spdx-correct": { 838 | "version": "3.1.0", 839 | "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", 840 | "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", 841 | "requires": { 842 | "spdx-expression-parse": "^3.0.0", 843 | "spdx-license-ids": "^3.0.0" 844 | } 845 | }, 846 | "spdx-exceptions": { 847 | "version": "2.2.0", 848 | "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", 849 | "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==" 850 | }, 851 | "spdx-expression-parse": { 852 | "version": "3.0.0", 853 | "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", 854 | "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", 855 | "requires": { 856 | "spdx-exceptions": "^2.1.0", 857 | "spdx-license-ids": "^3.0.0" 858 | } 859 | }, 860 | "spdx-license-ids": { 861 | "version": "3.0.3", 862 | "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", 863 | "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==" 864 | }, 865 | "speedometer": { 866 | "version": "0.1.4", 867 | "resolved": "https://registry.npmjs.org/speedometer/-/speedometer-0.1.4.tgz", 868 | "integrity": "sha1-mHbb0qFp0xFUAtSObqYynIgWpQ0=" 869 | }, 870 | "sshpk": { 871 | "version": "1.16.0", 872 | "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.0.tgz", 873 | "integrity": "sha512-Zhev35/y7hRMcID/upReIvRse+I9SVhyVre/KTJSJQWMz3C3+G+HpO7m1wK/yckEtujKZ7dS4hkVxAnmHaIGVQ==", 874 | "requires": { 875 | "asn1": "~0.2.3", 876 | "assert-plus": "^1.0.0", 877 | "bcrypt-pbkdf": "^1.0.0", 878 | "dashdash": "^1.12.0", 879 | "ecc-jsbn": "~0.1.1", 880 | "getpass": "^0.1.1", 881 | "jsbn": "~0.1.0", 882 | "safer-buffer": "^2.0.2", 883 | "tweetnacl": "~0.14.0" 884 | } 885 | }, 886 | "string-width": { 887 | "version": "1.0.2", 888 | "resolved": "http://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", 889 | "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", 890 | "requires": { 891 | "code-point-at": "^1.0.0", 892 | "is-fullwidth-code-point": "^1.0.0", 893 | "strip-ansi": "^3.0.0" 894 | } 895 | }, 896 | "string_decoder": { 897 | "version": "0.10.31", 898 | "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", 899 | "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" 900 | }, 901 | "strip-ansi": { 902 | "version": "3.0.1", 903 | "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", 904 | "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", 905 | "requires": { 906 | "ansi-regex": "^2.0.0" 907 | } 908 | }, 909 | "strip-bom": { 910 | "version": "2.0.0", 911 | "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", 912 | "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", 913 | "requires": { 914 | "is-utf8": "^0.2.0" 915 | } 916 | }, 917 | "strip-indent": { 918 | "version": "1.0.1", 919 | "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", 920 | "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", 921 | "requires": { 922 | "get-stdin": "^4.0.1" 923 | } 924 | }, 925 | "strip-json-comments": { 926 | "version": "2.0.1", 927 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", 928 | "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" 929 | }, 930 | "sumchecker": { 931 | "version": "2.0.2", 932 | "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-2.0.2.tgz", 933 | "integrity": "sha1-D0LBDl0F2l1C7qPlbDOZo31sWz4=", 934 | "requires": { 935 | "debug": "^2.2.0" 936 | }, 937 | "dependencies": { 938 | "debug": { 939 | "version": "2.6.9", 940 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 941 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 942 | "requires": { 943 | "ms": "2.0.0" 944 | } 945 | }, 946 | "ms": { 947 | "version": "2.0.0", 948 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 949 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 950 | } 951 | } 952 | }, 953 | "throttleit": { 954 | "version": "0.0.2", 955 | "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", 956 | "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=" 957 | }, 958 | "through2": { 959 | "version": "0.2.3", 960 | "resolved": "http://registry.npmjs.org/through2/-/through2-0.2.3.tgz", 961 | "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=", 962 | "requires": { 963 | "readable-stream": "~1.1.9", 964 | "xtend": "~2.1.1" 965 | } 966 | }, 967 | "tough-cookie": { 968 | "version": "2.4.3", 969 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", 970 | "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", 971 | "requires": { 972 | "psl": "^1.1.24", 973 | "punycode": "^1.4.1" 974 | }, 975 | "dependencies": { 976 | "punycode": { 977 | "version": "1.4.1", 978 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", 979 | "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" 980 | } 981 | } 982 | }, 983 | "trim-newlines": { 984 | "version": "1.0.0", 985 | "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", 986 | "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" 987 | }, 988 | "tunnel-agent": { 989 | "version": "0.6.0", 990 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", 991 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", 992 | "requires": { 993 | "safe-buffer": "^5.0.1" 994 | } 995 | }, 996 | "tweetnacl": { 997 | "version": "0.14.5", 998 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", 999 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" 1000 | }, 1001 | "typedarray": { 1002 | "version": "0.0.6", 1003 | "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", 1004 | "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" 1005 | }, 1006 | "universalify": { 1007 | "version": "0.1.2", 1008 | "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", 1009 | "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" 1010 | }, 1011 | "uri-js": { 1012 | "version": "4.2.2", 1013 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", 1014 | "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", 1015 | "requires": { 1016 | "punycode": "^2.1.0" 1017 | } 1018 | }, 1019 | "util-deprecate": { 1020 | "version": "1.0.2", 1021 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 1022 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" 1023 | }, 1024 | "uuid": { 1025 | "version": "3.3.2", 1026 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", 1027 | "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" 1028 | }, 1029 | "validate-npm-package-license": { 1030 | "version": "3.0.4", 1031 | "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", 1032 | "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", 1033 | "requires": { 1034 | "spdx-correct": "^3.0.0", 1035 | "spdx-expression-parse": "^3.0.0" 1036 | } 1037 | }, 1038 | "verror": { 1039 | "version": "1.10.0", 1040 | "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", 1041 | "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", 1042 | "requires": { 1043 | "assert-plus": "^1.0.0", 1044 | "core-util-is": "1.0.2", 1045 | "extsprintf": "^1.2.0" 1046 | } 1047 | }, 1048 | "xtend": { 1049 | "version": "2.1.2", 1050 | "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", 1051 | "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", 1052 | "requires": { 1053 | "object-keys": "~0.4.0" 1054 | } 1055 | }, 1056 | "yauzl": { 1057 | "version": "2.4.1", 1058 | "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", 1059 | "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=", 1060 | "requires": { 1061 | "fd-slicer": "~1.0.1" 1062 | } 1063 | } 1064 | } 1065 | } 1066 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "resumify", 3 | "version": "0.9.2", 4 | "description": "Capture screenshot and make PDF on your HTML presentation", 5 | "bin": "./resumify", 6 | "dependencies": { 7 | "electron": "^4.0.0", 8 | "minimist": "^1.2.0" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/ysugimoto/resumify.git" 13 | }, 14 | "keywords": [ 15 | "electron", 16 | "talkie" 17 | ], 18 | "author": "Yoshiaki Sugimoto", 19 | "license": "MIT", 20 | "bugs": { 21 | "url": "https://github.com/ysugimoto/resumify/issues" 22 | }, 23 | "homepage": "https://github.com/ysugimoto/resumify#readme" 24 | } 25 | -------------------------------------------------------------------------------- /resumify: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | "use strict"; 4 | 5 | const VERSION = "0.8.6"; 6 | const RED = "\u001b[31m"; 7 | const GREEN = "\u001b[32m"; 8 | const WHITE = "\u001b[37m"; 9 | const YELLOW = "\u001b[33m"; 10 | const RESET = "\u001b[0m"; 11 | 12 | class Logger { 13 | static error(message, direct) { 14 | Logger._write(RED, message, direct); 15 | } 16 | static info(message, direct) { 17 | Logger._write(WHITE, message, direct); 18 | } 19 | static warn(message, direct) { 20 | Logger._write(YELLOW, message, direct); 21 | } 22 | static ok(message, direct) { 23 | Logger._write(GREEN, message, direct); 24 | } 25 | static _write(color, message, direct) { 26 | if ( direct ) { 27 | process.stdout.write(color + message + RESET); 28 | } else { 29 | console.log(color + message + RESET); 30 | } 31 | } 32 | } 33 | 34 | function showUsage() { 35 | console.log("===================================================================="); 36 | console.log("resumify - Capture screenshot and make PDF on your HTML presentation"); 37 | console.log("===================================================================="); 38 | console.log("Usage:"); 39 | console.log(" resumify [options]"); 40 | console.log("Options:"); 41 | console.log(" -t, --type : Move slide type, can accepts 'url' or 'scroll'."); 42 | console.log(" -s, --size : Capture screen size, spcified [width]x[height] format."); 43 | console.log(" Default is 1280x800."); 44 | console.log(" --skip : Skip capture slide number, like 2,3,4,..."); 45 | console.log(" -e, --end : End of slide"); 46 | console.log(" -u, --url : Remote slide URL. If not supplied,"); 47 | console.log(" we detect html file (index.html, others...) automatically."); 48 | console.log(" -h, --help : Show this help"); 49 | console.log(" -v, --version: Show program version"); 50 | console.log(" -o, --output : Determine output filename. Default is \"slide.pdf\"."); 51 | } 52 | 53 | const minimist = require("minimist"); 54 | const args = minimist(process.argv.slice(2), { 55 | alias: { 56 | s: "size", 57 | e: "end", 58 | u: "url", 59 | h: "help", 60 | v: "version", 61 | o: "output", 62 | t: "type" 63 | } 64 | }); 65 | 66 | if ( args.help ) { 67 | showUsage(); 68 | process.exit(); 69 | } else if ( args.version ) { 70 | console.log("resumify v" + VERSION); 71 | process.exit(); 72 | } 73 | 74 | const rand = Date.now(); 75 | const path = require("path"); 76 | const electron = path.join(__dirname, "/node_modules/electron/cli.js"); 77 | const child = require("child_process"); 78 | const fs = require("fs"); 79 | const stub = fs.readFileSync(path.join(__dirname, "/stub/main.js.stub"), {encoding: "utf8"}); 80 | const size = (args.size || "1280x800").split("x"); 81 | const skips = (args.skip || "").toString().split(",").filter((s) => { return s.trim(); }); 82 | const end = args.end || 1; 83 | const outFile = args.output || "slide.pdf"; 84 | const slideType = args.type || "url"; 85 | const url = ((workingDir) => { 86 | // Check command-line parameter 87 | if ( args.url ) { 88 | Logger.info("Using remote URL: " + (args.url)); 89 | return args.url; 90 | } 91 | let indexFile; 92 | try { 93 | // detect index.html 94 | indexFile = path.join(workingDir, "/index.html"); 95 | fs.statSync(indexFile); 96 | Logger.info("Using local file: " + indexFile); 97 | return "file://" + indexFile; 98 | } catch ( e ) { 99 | // detect HTML file in working directory 100 | const fileList = fs.readdirSync(workingDir); 101 | let index = -1; 102 | 103 | while ( fileList[++index] ) { 104 | if ( path.extname(fileList[index]) === ".html" ) { 105 | indexFile = path.join(workingDir, fileList[index]); 106 | Logger.info("Using local file: " + indexFile); 107 | return "file://" + indexFile; 108 | } 109 | } 110 | return ""; 111 | } 112 | })(process.cwd()); 113 | 114 | // validate 115 | if ( /^[0-9]+x[0-9]+$/.test(size) ) { 116 | Logger.error("[ERROR] Invalid size format. Size format must be like '1280x800'."); 117 | process.exit(1); 118 | } 119 | if ( url === "" ) { 120 | Logger.error("[ERROR] Slide URL/file not found."); 121 | Logger.warn("If determine external URL, use '-u' or '--url' option."); 122 | Logger.warn("Or if use local HTML file, put HTML file in working directory."); 123 | process.exit(1); 124 | } 125 | if ( ! /\.pdf$/.test(outFile) ) { 126 | Logger.error("[ERROR] Output filename error. File extension must be \".pdf\"."); 127 | process.exit(1); 128 | } 129 | 130 | const shotDir = path.join(process.cwd(), "shot-" + rand); 131 | try { 132 | fs.statSync(shotDir); 133 | } catch ( e ) { 134 | fs.mkdirSync(shotDir, "0777"); 135 | } 136 | 137 | Logger.info("[resumify] Screenshot saving to " + shotDir + "."); 138 | 139 | fs.writeFileSync( 140 | path.join(__dirname, "/main.js"), 141 | stub.replace(/__WIDTH__/g, size[0]) 142 | .replace(/__HEIGHT__/g, size[1]) 143 | .replace(/__URL__/g, url) 144 | .replace(/__WORKINGDIR__/g, shotDir) 145 | .replace(/__SKIPS__/g, skips.join(",")) 146 | .replace(/__END__/g, end) 147 | .replace(/__SLIDE_TYPE__/g, slideType) 148 | ); 149 | 150 | Logger.info("Opening Slide: " + url); 151 | const proc = child.spawn("node", [electron, "./main.js"], {cwd: __dirname}); 152 | 153 | proc.stderr.on("data", (e) => { 154 | Logger.error("[ELECTRON STDERR] " + e.toString(), true); 155 | }); 156 | proc.stdout.on("data", (e) => { 157 | Logger.info("[ELECTRON STDOUT] " + e.toString(), true); 158 | }); 159 | proc.on("close", (code) => { 160 | if ( code ) { 161 | Logger.error("[ABORT] Process aborted by previous error."); 162 | process.exit(code); 163 | return; 164 | } 165 | Logger.info("Creating PDF to " + path.join(process.cwd(), outFile) + " ..."); 166 | 167 | // Create "ordered" screen-shot list 168 | let screenshots = []; 169 | for ( let i = 1; i <= end; ++i ) { 170 | if (skips.indexOf(i.toString()) !== -1) { 171 | continue; 172 | } 173 | screenshots.push(shotDir + "/shot" + i + ".png"); 174 | } 175 | screenshots.push(path.join(process.cwd(), outFile)); 176 | 177 | const pdf = child.spawn("convert", screenshots); 178 | pdf.stderr.on("data", (e) => { 179 | Logger.error("[IMAGEMAGICK STDERR] " + e.toString(), true); 180 | }); 181 | pdf.stdout.on("data", (e) => { 182 | Logger.info("[IMAGEMAGICK STDOUT]: " + e.toString(), true); 183 | }); 184 | pdf.on("close", () => { 185 | Logger.ok("PDF file created successfully!"); 186 | }); 187 | }); 188 | -------------------------------------------------------------------------------- /stub/main.js.stub: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | const electron = require("electron"); 4 | const app = electron.app; 5 | const BrowserWindow = electron.BrowserWindow; 6 | const fs = require("fs"); 7 | const path = require("path"); 8 | const WIDTH = __WIDTH__; 9 | const HEIGHT = __HEIGHT__; 10 | const URL = "__URL__"; 11 | const WORKINGDIR = "__WORKINGDIR__"; 12 | const SKIPS = [__SKIPS__]; 13 | const END = __END__; 14 | const SLIDE_TYPE = "__SLIDE_TYPE__"; 15 | 16 | app.on("window-all-closed", function() { 17 | if ( process.platform !== "darwin" ) { 18 | app.quit(); 19 | } 20 | }); 21 | 22 | let mainWindow; 23 | 24 | app.on("ready", function() { 25 | mainWindow = new BrowserWindow({ 26 | width: WIDTH, 27 | height: HEIGHT 28 | }); 29 | mainWindow.on("closed", function() { 30 | mainWindow = null; 31 | }); 32 | switch (SLIDE_TYPE) { 33 | case "url": 34 | openSlideTypeURL(1); 35 | break; 36 | case "scroll": 37 | openSlideTypeScroll(); 38 | break; 39 | default: 40 | console.log("Unexpected slide type: " + SLIDE_TYPE); 41 | app.quit(); 42 | } 43 | }); 44 | 45 | function openSlideTypeURL(pageNumber) { 46 | if ( SKIPS.indexOf(pageNumber) !== -1 ) { 47 | openSlideTypeURL(pageNumber + 1, false); 48 | return; 49 | } 50 | mainWindow.loadURL(URL + "#" + pageNumber); 51 | const webContents = mainWindow.webContents; 52 | webContents.executeJavaScript( 53 | "(function(c) { c && (c.style.display = 'none'); })(document.querySelector('.tk-pager, #control'));" 54 | ); 55 | setTimeout(function() { 56 | console.log("Taking screenshot " + pageNumber + " of " + END + "..."); 57 | mainWindow.capturePage({ 58 | x: 0, 59 | y: 0, 60 | width: WIDTH, 61 | height: HEIGHT 62 | }, function(image) { 63 | fs.writeFile(path.join(WORKINGDIR, "/shot" + pageNumber + ".png"), image.toPNG(), function(err) { 64 | if ( err ) { 65 | console.log("Failed to screen shot"); 66 | } else if ( pageNumber === END ) { 67 | console.log("Screenshot has taken!"); 68 | app.quit(); 69 | } else { 70 | openSlideTypeURL(pageNumber + 1); 71 | } 72 | }); 73 | }); 74 | }, 3000); 75 | } 76 | 77 | function openSlideTypeScroll() { 78 | mainWindow.loadURL(URL); 79 | const webContents = mainWindow.webContents; 80 | webContents.on('did-finish-load', () => { 81 | webContents.executeJavaScript( 82 | "(function(c) { c && (c.style.display = 'none'); })(document.querySelector('tk-pager'));" 83 | ).then(() => { 84 | const next = function(pageNumber) { 85 | webContents.executeJavaScript( 86 | "(function(e) { e.initEvent('keydown', true, true); e.keyCode = 39; document.dispatchEvent(e); })(document.createEvent('Event'));", 87 | true, 88 | ).then(result => { 89 | handler(pageNumber + 1); 90 | }); 91 | }; 92 | 93 | const handler = function(pageNumber) { 94 | if ( SKIPS.indexOf(pageNumber) !== -1 ) { 95 | setTimeout(function() { next(pageNumber); }, 1000); 96 | return; 97 | } 98 | console.log("Taking screenshot " + pageNumber + " of " + END + "..."); 99 | mainWindow.capturePage({ 100 | x: 0, 101 | y: 0, 102 | width: WIDTH, 103 | height: HEIGHT 104 | }, function(image) { 105 | fs.writeFile(path.join(WORKINGDIR, "/shot" + pageNumber + ".png"), image.toPng(), function(err) { 106 | if ( err ) { 107 | console.log("Failed to screen shot"); 108 | } else if ( pageNumber === END ) { 109 | console.log("Screenshot has taken!"); 110 | app.quit(); 111 | } else { 112 | setTimeout(function() { next(pageNumber); }, 1000); 113 | } 114 | }); 115 | }); 116 | }; 117 | handler(0); 118 | }); 119 | }); 120 | } 121 | --------------------------------------------------------------------------------