movabletype

package module
Version: v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: MIT Imports: 6 Imported by: 9

README

movabletype

Package movabletype provides parsing "The Movable Type Import / Export Format".

Sample

package main

import (
	"fmt"
	"os"

	"github.com/catatsuy/movabletype"
)

func main() {
	entries, _ := movabletype.Parse(os.Stdin)

	for _, e := range entries {
		fmt.Println(e.Title)
	}
}

Documentation

Index

Constants

View Source
const (
	// If it is not inialized, AllowComments is -1
	DefaultAllowComments = -1

	// If it is not inialized, AllowPings is -1
	DefaultAllowPings = -1
)

Default

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Author   string
	Title    string
	Basename string
	Status   string

	// 0 or 1. If it is not inialized DefaultAllowComments.
	AllowComments int

	// 0 or 1. If it is not inialized DefaultAllowPings
	AllowPings int

	ConvertBreaks string

	Date time.Time

	PrimaryCategory string

	Category []string

	Body string

	ExtendedBody string

	Excerpt string
}

Movable Type Import Format

func NewEntry

func NewEntry() *Entry

NewMT creates MT.

func Parse

func Parse(r io.Reader) ([]*Entry, error)

Parse creates MT struct from io.Reader

Source Files

Jump to

Keyboard shortcuts

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