parser

package
v1.0.1-0...-6123b81 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package parser implements functions to parse the text of Spectator articles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArticleAttributes

func ArticleAttributes(text string) (map[string]interface{}, []string)

ArticleAttributes finds the articles of an article for posting. It returns attributes.

func Contributors

func Contributors(byline string) (contributors [][]string)

Contributors finds the contributors in a byline. It returns the contributors.

func MissingAttributes

func MissingAttributes(attrs map[string]interface{}) []string

MissingAttributes warns the user if not all attributes of an article were found.

func Outquotes

func Outquotes(lines []string, start, end int) (outquotes []string)

Outquotes looks for outquotes in an array of lines between two indices. We search through an entire area of content because outquotes are often put on multiple lines. We loop forwards to get all outquotes. It returns the outquotes as a string slice.

Types

This section is empty.

Directories

Path Synopsis
Package patterns provides regular expressions and pattern-matching utils.
Package patterns provides regular expressions and pattern-matching utils.

Jump to

Keyboard shortcuts

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