robot

package
v0.0.0-...-f93c847 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2019 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RedisClient *redis.Client

Functions

func ParsemarkdownHacknews

func ParsemarkdownHacknews() error

func PostSinaHeadline

func PostSinaHeadline(title, content, cover, summary, text string)

func RunCmds

func RunCmds(cmds []Cmd) (logs []string, err error)

func SendMsgToEmail

func SendMsgToEmail(subject, msg string) error

func SpiderHackNews

func SpiderHackNews() error

func SpiderHackShows

func SpiderHackShows() error

func SpiderRedditProgramming

func SpiderRedditProgramming() error

func TranslateCh2En

func TranslateCh2En(text string) string

func TranslateEn2Ch

func TranslateEn2Ch(text string) string

Types

type Cmd

type Cmd struct {
	Name string
	Args []string
}

type NewsItem

type NewsItem struct {
	TitleZh string `json:"titleZh"`
	TitleEn string `json:"titleEn"`
	Url     string `json:"url"`
	Date    string `json:"date"`
}

type SlackHook

type SlackHook struct {
	Url   string
	Name  string
	Level logrus.Level
}

func (*SlackHook) Fire

func (h *SlackHook) Fire(e *logrus.Entry) error

func (*SlackHook) Levels

func (h *SlackHook) Levels() []logrus.Level

Jump to

Keyboard shortcuts

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