Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 3.88 KB

README.md

File metadata and controls

45 lines (33 loc) · 3.88 KB

PAGASA Parser Web

Screenshot of the interface PAGASA Parser Web combines all PAGASA Parser formatters together with @pagasa-parser/source-pdf to automatically scrape the PAGASA website for bulletins. This means you can run the PAGASA Parser anytime, anywhere, with all bulletins currently available and format them to your heart's content.

You can find a live version of this website at pagasa.chlod.net. If you wish to run your own version of PAGASA Parser Web, it is also available as a Docker image (available at port 80). Screenshot of the landing page

Hosting for pagasa.chlod.net is provided by Chlod Alejandro. If you'd like to help alleviate server costs, please consider sponsoring this project.

Usage

Running PAGASA Parser standalone requires Java to run the PDF parser in @pagasa-parser/source-pdf (Tabula). Aside from this, you'll need Node.js. This project has been tested on both Node v14 and v16. You'll need to build both the backend and frontend first before use. The default port for the web server is 12464.

Docker

The Docker container contains everything needed to run PAGASA Parser and also exposes the web server at port 80. To get started easily, run the following command in your preferred shell. This will run the PAGASA Parser on port 12464.

docker run -d --name pagasa-parser-web -p 12464:80 chlod/pagasa-parser-web:latest

The following environment variables are available for customization of the instance.

  • PORT – The internal port of the server
  • PPW_OWNER – The owner of the instance. This is used in the user agent when making outbound requests.

Development

Before starting, install all dependencies on the root project, /frontend, and /backend.

npm install # This install dependencies on all three.

After installing dependencies, run the dev npm script on the root repository to start a development session.

npm run dev

Port 12464 will be used for the web server (which will not run the web interface if not compiled) and port 12465 will be used for the Webpack Development Server. Since the Webpack Development Server is set up to automatically proxy all non-interface connections to port 12464, you only need to access port 12465 to begin working on both frontend and backend.

Frontend changes are applied immediately (instantaneously for CSS) by Webpack. Changes to the web server will restart the web server.

If at any point you wish to delete build artifacts, use the clean script.

License

Unlike other PAGASA Parser libraries and repositories, this repository is licensed under the GNU Affero General Public License v3.0. This means that any changes that are either published or made available over a network must be under the GNU AGPL v3.0 license as well. The rationale for using this license stems from its primary purpose: it is a project which processes Public Domain information for the sake of disaster preparedness and management. Since it is a project made for public benefit, it is only fair that this project is licensed under the AGPL to ensure the mutual benefit of all users.

Data generated by PAGASA Parser Web are faithful recreations of data under the public domain (PAGASA Tropical Cyclone Bulletins) and are therefore part of the public domain as well. You may use the data in whatever application or project you want. Attribution of this project is not required, but is appreciated by the developers.

Warning

Please avoid misusing the interface in a way that may cause the servers of PAGASA to be under load. Respect the usual web crawling guidelines. You may be rate-limited or blocked entirely from access if you overuse the server resources.