parser

package module
v0.0.0-...-8d166c6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

README

Run

$ go run ./cmd/parser-breakit/main.go

Command line arguments

Name Default Description
d 0 Recursion depth
p 1 Concurrency limit
v false Verbose logging
o - Output filename

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	URL         *url.URL
	PublishedAt time.Time
	Title       string
	Preamble    string
	Summary     *string
	Links       []*url.URL
	Depth       int64
}

Article is a parsed article.

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser parses articles from https://breakit.se

func New

func New(verbose bool) *Parser

New creates a new parser.

func (*Parser) Parse

func (p *Parser) Parse(ctx context.Context, depth int64, concurrency int64) ([]*Article, error)

Parse starts parsing.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL