{"id":23881677,"url":"https://github.com/ikluft/alertgizmo","last_synced_at":"2025-02-23T00:42:55.096Z","repository":{"id":270190523,"uuid":"908852760","full_name":"ikluft/AlertGizmo","owner":"ikluft","description":"monitor space-related alerts online","archived":false,"fork":false,"pushed_at":"2025-02-19T07:24:40.000Z","size":133,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-19T08:26:39.737Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ikluft.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-27T06:03:51.000Z","updated_at":"2025-02-19T07:24:43.000Z","dependencies_parsed_at":"2024-12-29T08:22:03.624Z","dependency_job_id":"c509c0f7-d30f-4ef8-a6fe-9c7cca14179e","html_url":"https://github.com/ikluft/AlertGizmo","commit_stats":null,"previous_names":["ikluft/alertgizmo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikluft%2FAlertGizmo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikluft%2FAlertGizmo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikluft%2FAlertGizmo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikluft%2FAlertGizmo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ikluft","download_url":"https://codeload.github.com/ikluft/AlertGizmo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240254183,"owners_count":19772386,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-04T01:48:37.030Z","updated_at":"2025-02-23T00:42:55.088Z","avatar_url":"https://github.com/ikluft.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"AlertGizmo\n----------\n\nAlertGizmo is a set of Perl modules which monitor for space-related events and generate summary pages. The Perl implementation may later be used as a prototype for other language implementations.\n\nIt originated as scripts I wrote to monitor space-related alerts online. The common code among the scripts was pulled together into the AlertGizmo module. These can be run manually or from crontabs. (see example below)\n\n## Subclasses\n\nThe subclasses of AlertGizmo which handle the details of specific topics of space alert data are as follows:\n\n* AlertGizmo::Apod: monitor for NASA Astronomy Picture of the Day (APOD) feed (work in progress)\n* AlertGizmo::Neo: monitor for NASA JPL Near-Earth Object (NEO) close approach data\n* AlertGizmo::Swpc: monitor for NOAA Space Weather Prediction Center (SWPC) alerts, including aurora\n\n## Directory structure\n\n- bin (script directory)\n  - *[pull-nasa-neo.pl](bin/pull-nasa-neo.pl)* reads NASA JPL data on Near Earth Object (NEO) asteroid close approaches to Earth, within 2 lunar distances (LD) and makes a table of upcoming events and recent ones within 15 days.\n     - language: Perl5🧅\n     - dependencies: AlertGizmo::Neo, [Template Toolkit](http://www.template-toolkit.org/)\n     - example template text: [close-approaches.tt](close-approaches.tt)\n  - *[pull-swpc-alerts.pl](bin/pull-swpc-alerts.pl)* reads NOAA Space Weather Prediction Center (SWPC) alerts for solar flares and aurora\n     - language: Perl5🧅\n     - dependencies: AlertGizmo::Swpc, [Template Toolkit](http://www.template-toolkit.org/)\n     - example template text: [noaa-swpc-alerts.tt](noaa-swpc-alerts.tt)\n  - *[pull-nasa-apod.pl](bin/pull-nasa-apod.pl)* reads NASA Astronomy Picture of the Day (APOD) feed (work in progress)\n     - language: Perl5🧅\n     - dependencies: AlertGizmo::Apod, [Template Toolkit](http://www.template-toolkit.org/)\n     - example template text: [nasa-apod-alerts.tt](nasa-apod-alerts.tt)\n- lib (library directory)\n  - AlertGizmo.pm - base class for AlertGizmo feed monitors\n  - AlertGizmo/Config.pm - configuration data for AlertGizmo classes\n  - AlertGizmo/Apod.pm - AlertGizmo monitor for NASA Astronomy Picture of the Day (APOD) feed (work in progress)\n  - AlertGizmo/Neo.pm - AlertGizmo monitor for NASA JPL Near-Earth Object (NEO) close approach data\n  - AlertGizmo/Swpc.pm - AlertGizmo monitor for NOAA Space Weather Prediction Center (SWPC) alerts, including aurora\n\n## Installation\n\n### Installation from CPAN\n\nThis section will be filled in after AlertGizmo is uploaded to CPAN.\n\n### Installation from source code\n\nThe source code repository is at [https://github.com/ikluft/AlertGizmo](https://github.com/ikluft/AlertGizmo).\n\nFor a development environment, make sure Perl is installed. Check first if binary packages are available for your OS \u0026 platform. More information can be found at [https://metacpan.org/dist/perl/view/INSTALL](https://metacpan.org/dist/perl/view/INSTALL).\n\nThen install App::cpanminus (cpanm), Dist::Zilla (dzil) and Perl::Critic (perlcritic).\n\nOn Debian-based Linux systems they can be installed with this command as root:\n\n    apt update\n    apt install cpanminus libdist-zilla-perl libperl-critic-perl\n\nOn RPM-based Linux systems (Fedora, Red Hat and CentOS derivatives) as root:\n\n    dnf install --refresh perl-App-cpanminus perl-Dist-Zilla perl-Perl-Critic\n\nOn Alpine Linux systems and containers:\n\n    apk update \u0026\u0026 apk upgrade\n    apk add make git perl perl-utils perl-alien-build perl-class-tiny perl-config-tiny perl-date-manip perl-datetime perl-datetime-locale perl-datetime-timezone perl-dbd-csv perl-dbd-sqlite perl-dbi perl-http-date perl-ipc-run perl-list-moreutils perl-list-someutils perl-log-dispatch perl-log-log4perl perl-module-build perl-moose perl-moosex-types perl-namespace-autoclean perl-net-ssleay perl-params-validate perl-perlio-utf8_strict perl-pod-parser perl-readonly perl-term-readkey perl-test-leaktrace perl-test-pod perl-test-warn perl-text-template perl-type-tiny perl-xml-dom perl-yaml\n    cpan -T App::cpanminus Dist::Zilla Perl::Critic \u003c/dev/null\n\nOn operating systems which don't provide binary packages of App::cpanminus, Dist::Zilla or Perl::Critic, install them from CPAN with this command:\n\n    cpan -T App::cpanminus Dist::Zilla Perl::Critic \u003c/dev/null\n\n### Set up AlertGizmo\n\nDownload AlertGizmo source code with the git command:\n\n    git clone https://github.com/ikluft/AlertGizmo.git\n\nRun these Dist::Zilla commands to set up the environment for build, test and install:\n\n    # note: if/when more language implementations begin, a step would be added to change into a subdirectory for Perl\n    dzil authordeps --missing | cpanm --notest\n    dzil listdeps --missing | cpanm --notest\n    dzil build\n    dzil test\n    dzil install\n\nPrior to submitting pull requests for consideration for inclusion in the package, additional tests can be performed with the author and/or release options:\n\n    dzil test --author\n    dzil test --release\n\n## Running from a crontab\n\nTo run AlertGizmo from a crontab, first use 'crontab -l' to determine if you have one set up, and that the crontab command is installed. (If it isn't installed, Linux packages such as [cronie](https://github.com/cronie-crond/cronie) can perform [modern cron](https://en.wikipedia.org/wiki/Cron#Modern_versions) functions. If on a small embedded Linux system, [BusyBox](https://en.wikipedia.org/wiki/BusyBox) or [Toybox](https://en.wikipedia.org/wiki/Toybox) also provide a crontab command.)\n\nWhen run in normal mode, the scripts pull new data from the network. When run in test mode with the --test flag on the command line, they use saved data from prior network accesses but do not make a new network access.\n\nIf you have a crontab already, preserve its contents by saving it to a file we'll call 'my-crontab' with this command:\n\n    crontab -l \u003e my-crontab\n\nOtherwise create the 'my-crontab' file empty from scratch with a text editor.\n\nAdd these lines to the 'my-crontab' file, replacing \"path/to/script\" with your path where these scripts are installed and using your local time zone instead of US/Pacific (the author's local time zone).\n\n    CRON_TZ=UTC\n\n    # access NASA JPL NEO API 8 times per day and just after midnight UTC\n    1 0 * * *       $HOME/path/to/script/pull-nasa-neo.pl --tz=\"US/Pacific\"\n    31~44 */3 * * * $HOME/path/to/script/pull-nasa-neo.pl --tz=\"US/Pacific\"\n\n    # access NOAA Space Weather Predition Center alerts every 2 hours\n    11~24 */2 * * * $HOME/path/to/script/pull-swpc-alerts.pl --tz=\"US/Pacific\"\n\nThen install the crontab by running:\n\n    crontab my-crontab\n\n## Ongoing experimentation\n\nThe SWPC alert script is derived from the NEO script. So they had common code. Before making more similar scripts, it was considered a good idea to make modules to combine their common features. That became AlertGizmo. Now the door is open to add more modules on that foundation.\n\nAn outage in Tom Taylor's Mastodon \"Low Flying Rocks\" bot led me to the conclusion I should expand these to be able to post on Mastodon. I was already inspired by [XKCD comic #2979 \"Sky Alarm\"](https://xkcd.com/2979/) to go in that direction.\n[![XKCD comic #2979 \"Sky Alarm\"](https://imgs.xkcd.com/comics/sky_alarm.png)](https://xkcd.com/2979/)\n\n## Current development plans\n\nCurrent plans include making a NASA APOD reader (in progress as Apod.pm), a table image generator as an alternative to HTML output, and a Mastodon client to post the images and summary text as periodic updates.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikluft%2Falertgizmo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fikluft%2Falertgizmo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikluft%2Falertgizmo/lists"}