chartgen

package module
v0.0.0-...-bae4694 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

README

chartgen

Code Climate Go Report Card

LT

データで見るAOSN読書会 (2016 合宿 LT)

https://go-talks.appspot.com/github.com/mikan/talks/aosn-lt-2016.slide

How it works

  1. Parse markdown table of the AOSN workshop activities.
  2. Generate JSON data.
  3. Push to Elasticsearch.

Usage

aosn

aosn generates summary description written by markdown.

./aosn -t 1-java8
aosn2es

aosn2es generates Elasticsearch (Kibana) datasets.

  • -h - Host of your Elasticsearch (default: localhost)
  • -p - Port of your Elasticsearch (default: 9200)
  • -t - Target file of the workshop record (e.g. 1-java8)

Short example:

./aosn2es -t 1-java8 

Complete example:

./aosn2es -h localhost -p 9200 -t 1-java8 

Author

mikan

License

Apache License 2.0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchEntry

func FetchEntry(key string) string

func FetchIndex

func FetchIndex() string

func ParseIndex

func ParseIndex(markdown string) []string

Types

type Entry

type Entry struct {
	Name  string
	Value int
}

type OrderedEntries

type OrderedEntries []Entry

func (OrderedEntries) Len

func (l OrderedEntries) Len() int

func (OrderedEntries) Less

func (l OrderedEntries) Less(i, j int) bool

func (OrderedEntries) Swap

func (l OrderedEntries) Swap(i, j int)

type Ranking

type Ranking struct {
	List  []Entry
	Max   int
	Min   int
	Total int
}

func AttendeeRanking

func AttendeeRanking(records []Record) Ranking

type Record

type Record struct {
	Num          int        `json:"num"`
	Workshop     Workshop   `json:"workshop"`
	Date         SimpleDate `json:"date"`
	Attends      []string   `json:"attends"`
	NotAttends   []string   `json:"not-attends"`
	AttendsTotal int        `json:"attends-total"`
	Begin        int        `json:"begin,omitempty"`
	End          int        `json:"end,omitempty"`
}

func ParseEntry

func ParseEntry(markdown string) []Record

type SimpleDate

type SimpleDate struct {
	time.Time
}

func (SimpleDate) MarshalJSON

func (d SimpleDate) MarshalJSON() ([]byte, error)

type Workshop

type Workshop struct {
	Title     string     `json:"title"`
	ISBN      string     `json:"isbn"`
	Pages     int        `json:"pages"`
	Publisher string     `json:"publisher"`
	Published SimpleDate `json:"published"`
}

Directories

Path Synopsis
cmd
aosn command
aosn2es command
aosn2lambda command

Jump to

Keyboard shortcuts

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