cmd

package
v0.0.0-...-79227ad Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AMBER_EXT      = "amber"
	DATE_PREFIX    = "Date:"
	ELLIPSES       = "..."
	EMPTY          = ""
	GIT_DATE_FMT   = "Mon Jan 02 15:04:05 2006 -0700"
	HEAD1          = "h1"
	IMG            = "img"
	INDEX_TEMPLATE = "index.amber"
	INDEX_HTML     = "index.html"
	MARKDOWN       = "markdown"
	NEWLINE        = "\n"
	META_SRC       = "src"
	MD_EXT         = "md"
	MKD_EXT        = "mkd"
	P              = "p"
	PWD            = "."
	README         = "README.md"
	SPACE          = " "
	STATIC_CONF    = ".static"
)
View Source
const (
	SUMMARY_MAX_CHAR = 200
	DATE_INDEX       = 2
)
View Source
const (
	ERR_NO_TAG            = "Error: tag does not exist"
	ERR_NO_MARKDOWN_FILES = "Error: no markdown files found"
)
View Source
const (
	APP_ADDR = "0.0.0.0"
	APP_PORT = "8888"
)
View Source
const (
	ASSETS  = "/assets"
	CSS_DIR = "/css/"
	JS_DIR  = "/js/"
	FAVICON = "favicon.ico"
	INDEX   = "index"
)
View Source
const (
	APP_EXCLUDE = README
)
View Source
const (
	APP_INDEX = "meta.json"
)
View Source
const (
	APP_VERSION = "0.1"
)

Variables

This section is empty.

Functions

func Execute

func Execute() error

Types

type Article

type Article struct {
	ID        string         `json:"id"`
	Title     string         `json:"title"`
	Summary   string         `json:"summary"`
	Creation  string         `json:"creation"`
	Timestamp int64          `json:"timestamp"`
	Contents  string         `json:"contents"`
	Image     string         `json:"image"`
	Tags      map[string]int `json:"tags"`
}

type Articles

type Articles []Article

func (Articles) Len

func (a Articles) Len() int

func (Articles) Less

func (a Articles) Less(i, j int) bool

func (Articles) Swap

func (a Articles) Swap(i, j int)

type Conf

type Conf struct {
	Exclude []string `json:"exclude"`
}

type GitObject

type GitObject struct {
	Name      string `json:"name"`
	Creation  string `json:"creation"`
	Timestamp int64  `json:"timestamp"`
}

type Index

type Index struct {
	Content []Meta `json:"content"`
	Version string `json:"version"`
}

type Meta

type Meta struct {
	ID        string `json:"id"`
	Creation  string `json:"creation"`
	Timestamp int64  `json:"timestamp"`
	Image     string `json:"image"`
	Author    string `json:"author"`
}

type Metas

type Metas []Meta

func (Metas) Len

func (m Metas) Len() int

func (Metas) Less

func (m Metas) Less(i, j int) bool

func (Metas) Swap

func (m Metas) Swap(i, j int)

Jump to

Keyboard shortcuts

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