Giter Club home page Giter Club logo

lrp-tool's Introduction

LRP-tool

Learning resources parser tool.

How to usage?

Global options

How to configure logger

For now have only to options that can be used for the logger configuration:

  1. Set logger level thought set the parameter lrpt --log-level=[panic|fatal|error|warn|info|debug|trace] ... or using APP_LOG_FORMATTER_JSON environment variable.
  2. Set logger formatter like JSON thought set the parameter lrpt --json ... or using APP_LOG_FORMATTER_JSON environment variable.

Parser

How to run parser

To run parser with a known configuration lrpt parser run

How to run parser and store parsing results to the Dummy database

To use the Dummy database as a storage engine needed to set up a running flag or environment.

  • flag example lrpt parser run --storage.dummy
  • environment example APP_STORAGE_DUMMY=true

How to run parser and store parsing results to the PostgreSQL database

To use the PostgreSQL database as a storage engine, a connection URL setup needed. This can be in two ways as usual. The first-way is adding a service running option that contains PostgreSQL connection DSN like the example below lrpt parser run --storage.postgresql=postgresql://postgres:password@localhost:5432/parser. The second-way is to set up the environment variable APP_STORAGE_POSTGRESQL_DSN that contains PostgreSQL connection DSN to the application running environment.

How to inspect a known configuration

To inspect a known configuration run tool with the next commandlrpt parser inspect.

How to import a configuration from xlsx file

To import all configuration files from ./business/categories to ./config/project run lrpt config import command.

Used libraries

  • github.com/urfave/cli/v2 - Console command framework
  • github.com/sirupsen/logrus - Power logger library
  • github.com/jszwec/csvutil - CSV marshal/unmarshal
  • github.com/gocolly/colly/v2 - Lightning Fast and Elegant Scraping Framework for Gophers
  • github.com/stretchr/testify - Framework for testing
  • github.com/jackc/pgx/v4 - PostgreSQL Driver and Toolkit
  • github.com/360EntSecGroup-Skylar/excelize/v2 - Excel processor

Writing with love in Golang!

lrp-tool's People

Contributors

igorrius avatar

Watchers

 avatar

lrp-tool's Issues

Make possibility to save parsed data to a storage

Why?
Because collected data should be saved to persistent storage.

What?
Implement the PostgreSQL storage module in the LRP-tool service.

How?

  • use one of the most popular production-ready PostgreSQL libraries to implement a storage module;
  • create flag (environment configuration to process a PostgreSQL connection DSN like a APP_STORAGE_POSTRGESQL_DSN);
  • modify application config that it adds new storage only when an appropriate DSN was set;
  • setup all needed environments, for instance, add new environment variables for a PostgreSQL connection DSN.

Proof of concept solution

Why?

Aggregate learning material from different places to one with a strict data structure.

What?

The first one step is to create a proof of concept solution.

How?

Create POC with the next modules: HTTP client, data source configuration, parser interface, and implementation for each data provider.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.