This is the news component of the Plutus platform.
- Install dependencies with
npm install
yarn cli news-scraper:article:scrape --url <url> [-h,--headful][-p,--prevent-close]
- to scrape an articleyarn cli news-scraper:recent-articles:scrape --news-site <news-site> [-u,--url <url>][-h,--headful][-p,--prevent-close]
- to scrape the recent articlesyarn cli news-scraper:archived-articles:scrape --news-site <news-site> [-h,--headful][-p,--prevent-close]
- to scrape the archived articlesyarn cli news-scraper:task-dispatcher:start
- to start the task dispatcheryarn cli news-scraper:task-worker:start [-i,--id <id>][--consumed-queues <queues>]
- to start the task worker
yarn typeorm:run-migrations
- to run database migrationsyarn typeorm:generate-migration src/Migrations/{MigrationName}
- to generate a new migrationyarn typeorm:drop-schema
- to run drop the database schema
docker build --tag plutus-news-scraper .
- to build the container- To run any common command, use
docker run -it plutus-news-scraper
instead ofyarn cli
, for example:docker run -it plutus-news-scraper news-scraper:recent-articles:scrape --news-site bbc
. Please note, that this will not work for commands that are not in thecli
script. For those, you'll need to dodocker run -it plutus-news-scraper bash
and then run the command inside the container.