util

package
v0.0.0-...-674209f Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WX_APP_ID     = "wx7b08badc6e04e495"
	WX_APP_SECRET = "cb7221fd9dad241e15d9bb9928f034a8"
)
View Source
const DingApiUrl = "https://oapi.dingtalk.com/robot/send?access_token=e28e8b2efdd05a9954f888ab16b2e059706628f85590e269cae996eae7fbbf8f"

Variables

View Source
var RedisClient *redis.Client

Functions

func DingLog

func DingLog(content, title string) error

func FetchMaoyanApi

func FetchMaoyanApi() error

func FetchMusic163Api

func FetchMusic163Api() error

func LsArchivesMdFiles

func LsArchivesMdFiles(dir string) (map[string][]string, error)

func ParseEmailContent

func ParseEmailContent(logs []string) (error, string)

func ParseMaoyanMarkdown

func ParseMaoyanMarkdown() error

func ParseMarkdownHacknews

func ParseMarkdownHacknews() error

func ParseReadmeMarkdown

func ParseReadmeMarkdown() error

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 Translate

func Translate()

func TranslateCh2En

func TranslateCh2En(text string) string

func TranslateEn2Ch

func TranslateEn2Ch(text string) string

Types

type AutoGeneratedMovie

type AutoGeneratedMovie struct {
	Coming   []interface{} `json:"coming"`
	MovieIds []int         `json:"movieIds"`
	Stid     string        `json:"stid"`
	Stids    []struct {
		MovieID int    `json:"movieId"`
		Stid    string `json:"stid"`
	} `json:"stids"`
	Total     int     `json:"total"`
	MovieList []Movie `json:"movieList"`
}

type Cmd

type Cmd struct {
	Name string
	Args []string
}

type Movie

type Movie struct {
	ID              int     `json:"id"`
	HaspromotionTag bool    `json:"haspromotionTag"`
	Img             string  `json:"img"`
	Version         string  `json:"version"`
	Nm              string  `json:"nm"`
	PreShow         bool    `json:"preShow"`
	Sc              float64 `json:"sc"`
	GlobalReleased  bool    `json:"globalReleased"`
	Wish            int     `json:"wish"`
	Star            string  `json:"star"`
	Rt              string  `json:"rt"`
	ShowInfo        string  `json:"showInfo"`
	Showst          int     `json:"showst"`
	Wishst          int     `json:"wishst"`
	NmEn            string  `json:"nmEn"`
}

func FetchMaoyanRedisData

func FetchMaoyanRedisData() ([]Movie, error)

type NewsItem

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

Jump to

Keyboard shortcuts

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