{"_id":"@amanvir_/himawari","name":"@amanvir_/himawari","dist-tags":{"latest":"2.0.1"},"versions":{"2.0.1":{"name":"@amanvir_/himawari","description":"Download real-time images of Earth from the Himawari-8 satellite","version":"2.0.1","author":{"name":"Amanvir Parhar"},"bin":{"himawari":"bin/cli.js"},"dependencies":{"async":"^3.2.3","cliclopts":"^1.1.1","deep-extend":"^0.6.0","gm":"^1.21.1","minimist":"^1.2.0","moment":"^2.11.2","request":"^2.69.0","tmp":"^0.2.1"},"devDependencies":{"assert":"^2.0.0","jshint":"^2.9.1","mocha":"^9.2.2","nock":"^13.2.4"},"homepage":"https://github.com/amanvirparhar/himawari#readme","license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/amanvirparhar/himawari.git"},"scripts":{"deploy":"git push -f origin master:gh-pages","hint":"jshint index.js bin/cli.js","test":"mocha tests/test.js"},"_id":"@amanvir_/himawari@2.0.1","gitHead":"030223003c3a4041e0e1faea558a22e414f6a7aa","bugs":{"url":"https://github.com/amanvirparhar/himawari/issues"},"_nodeVersion":"21.6.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-mozGbYFe5ikkk5BlpZNc5xcyfn4RttFs/tdIjrsumoIjxOwe0BAScziKNoKeyggQkTsYkz583ZZCVnVEzUStkg==","shasum":"5e0b58ff39568e66c71f5f04041310f6331c26c5","tarball":"https://registry.npmjs.org/@amanvir_/himawari/-/himawari-2.0.1.tgz","fileCount":8,"unpackedSize":20162,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBmg9UfFca0NagHqOFYcCwboXd/oznOoE9oI4vxJPizEAiEA+khAuf92WpgmHeOYo8zEQHl2Bd431SW+wMTidORFfV4="}]},"_npmUser":{"name":"amanvir_","email":"amanvirparhar@gmail.com"},"directories":{},"maintainers":[{"name":"amanvir_","email":"amanvirparhar@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/himawari_2.0.1_1708152765282_0.7373242925804389"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-17T06:52:45.181Z","2.0.1":"2024-02-17T06:52:45.494Z","modified":"2024-02-17T06:52:46.013Z"},"maintainers":[{"name":"amanvir_","email":"amanvirparhar@gmail.com"}],"description":"Download real-time images of Earth from the Himawari-8 satellite","homepage":"https://github.com/amanvirparhar/himawari#readme","repository":{"type":"git","url":"git+https://github.com/amanvirparhar/himawari.git"},"author":{"name":"Amanvir Parhar"},"bugs":{"url":"https://github.com/amanvirparhar/himawari/issues"},"license":"MIT","readme":"## Note ⚠️\n\n**This is a maintained fork of [jakiestfu/himawari.js](https://github.com/jakiestfu/himawari.js) published under a different namespace (`npm i @ungoldman/himawari`).**\n\nThe original module (unmaintained since 2016) is broken due to a URL change from the satellite imagery provider.\n\nSee [jakiestfu/himawari.js#29](https://github.com/jakiestfu/himawari.js/issues/29) for more info.\n\n---\n\n<a href=\"http://jakiestfu.github.io/himawari.js/demo/\">\n  <img src=\"http://i.imgur.com/MUefuXm.png\">\n</a>\n\n> Download real-time images of Earth from the Himawari-8 satellite\n\n[![npm][npm-image]][npm-url]\n\n[npm-image]: https://img.shields.io/npm/v/@ungoldman/himawari.svg\n[npm-url]: https://www.npmjs.com/package/@ungoldman/himawari\n\n[Himawari 8](http://himawari8.nict.go.jp/) is a [geostationary](https://en.wikipedia.org/wiki/Geostationary_orbit) weather satellite deployed by the [Japan Meteorological Agency](http://www.jma.go.jp/jma/indexe.html). It takes photographs of Earth every 10 minutes.\n\n* [Getting Started](#getting-started)\n* [Usage](#usage)\n* [Command Line Interface](#command-line-interface)\n* [Acknowledgements](#acknowledgements)\n* [Example Images](#example-images)\n* [Example Scripts](#example-scripts)\n* [Licensing](#licensing)\n\n## Getting Started\n\n```sh\nbrew install imagemagick\nbrew install graphicsmagick\nnpm i @ungoldman/himawari\n```\n\nIf you would like to generate videos, `ffmpeg` is also required.\n```sh\nbrew install ffmpeg\n```\n\n## Usage\n```javascript\nvar himawari = require('@ungoldman/himawari')\n\nhimawari({\n\n  /**\n   * The zoom level of the image. Can be 1-5 for non-infrared, and 1-3 for infrared (default: 1)\n   * Each zoom level requires more images to be downloaded and therefore stitched\n   * together. Higher zoom yields a higher resolution image.\n   * @type {Number}\n   */\n  zoom: 1,\n\n  /**\n   * The time of the picture desired. If you want to get the latest image, use 'latest'\n   * @type {String|Date}\n   */\n  date: 'latest', // Or new Date() or a date string\n\n  /**\n   * Turns on logging\n   * @type {Boolean}\n   */\n  debug: false,\n\n  /**\n   * If set to true, an image on the infrared light spectrum will be generated. Please note that\n   * infrared only supports zooms up to 3\n   * @type {Boolean}\n   */\n  infrared: false,\n\n  /**\n   * The location to save the resulting image\n   * @type {String}\n   */\n  outfile: '/path/to/output/earth.jpg',\n\n  /**\n   * Set to true to parallelize tile downloads. Can be CPU intensive but decreases time to download images.\n   * @type {Boolean}\n   */\n  parallel: false,\n\n  /**\n   * Skip empty images from being saved\n   * @type {Boolean}\n   */\n  skipEmpty: true,\n\n  /**\n   * The max duration in milliseconds before requests for images and data times out\n   * @type {Number}\n   */\n  timeout: 30000,\n\n  /**\n   * If true, only prints the URLs of the images that would have been downloaded\n   * @type {Boolean}\n   */\n  urls: false,\n\n  /**\n   * A success callback if the image downloads successfully\n   * @type {Function}\n   */\n  success: function () { process.exit() },\n\n  /**\n   * A callback if the image cannot be downloaded or saved\n   * @type {Function}\n   * @param  {Object} err An error object or information surrounding the issue\n   */\n  error: function (err) { console.log(err) },\n\n  /**\n   * A callback that is fired every time a tile has been downloaded.\n   * @param  {Object} info Information about the download such as filepath, part, and total images\n   */\n  chunk: function (info) {\n    console.log(info.outfile + ': ' + info.part + '/' + info.total)\n  }\n})\n\n```\n\n## Command Line Interface\n\nThere is also a command-line interface available if you install it with `-g`.\n\n```sh\nnpm i -g himawari\n```\n\nThis installs a program called `himawari` that can be used like so:\n\n```sh\nUsage: himawari [options]\n    --zoom, -z            The zoom level of the image. Can be 1-5. (Default: `1`)\n    --date, -d            The time of the picture desired. If you want to get the latest image, use 'latest'. (Default: `\"latest\"`)\n    --debug, -l           Turns on logging. (Default: `false`)\n    --outfile, -o         The location to save the resulting image. (Default: `\"himawari-{date}.jpg\"` in current directory)\n    --parallel, -p        Parallelize downloads for increased speeds (can be CPU intensive)\n    --skipempty, -s       Skip saving images that contain no useful information (i.e. \"No Image\") (Default: `true`)\n    --timeout, -t         The max duration in milliseconds before requests for images and data times out (Default: `30000`)\n    --urls, -u            Only print the URLs of the images that would have been downloaded (Default: `false`)\n    --infrared, -i        Capture picture on the infrared spectrum (Default: `false`)\n    --version, -v         Prints the version of the package\n    --help, -h            Show help\n```\n\n## Acknowledgements\n* [Japan Meteorological Agency](http://www.jma.go.jp/)\n* [NICT](http://www.nict.go.jp/)\n* [Michael Pote](https://github.com/MichaelPote) created a [Powershell Script](https://gist.github.com/MichaelPote/92fa6e65eacf26219022) that inspired this library.\n\n## Example Images\n<img src=\"http://i.imgur.com/kJcfCoN.jpg\">\n<img src=\"http://i.imgur.com/376ZTvB.jpg\" width=\"50%\"><img src=\"http://i.imgur.com/XnAAjzy.jpg\" width=\"50%\">\n\n## Example Scripts\nThere are two example files that showcase how Himawari.js can be used. The first, `basic.js`, is to simply be executed and will download the latest image of earth and save it to your Desktop.\n\nThe second, `video.js`, will get a particular date (one where it starts off all black), and will decrement 10 minutes from that date until it has been 24 hours. The resulting images will be saved to a directory, and then piped to `ffmpeg` which will stitch the images together in a lovely video for you to oogle over.\n\n## Licensing\nMIT\n","readmeFilename":"README.md"}