imageboards

package
v0.0.0-...-60717b8 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BoxThread func(*tui.Box, int, string, int)
View Source
var GetAttachments func(string, int, int) ([]File, error)
View Source
var GetThreadIDs func(string) []int
View Source
var ShowSpoilers bool = false
View Source
var TorPort string = ""

Functions

func ArisuchanBoxThread

func ArisuchanBoxThread(vbox *tui.Box, id int, board string, boxLength int)

func ArisuchanGetThreadIDs

func ArisuchanGetThreadIDs(board string) []int

func ArisuchanMarkFormatting

func ArisuchanMarkFormatting(text string) string

func DownloadFile

func DownloadFile(filepath string, url string, location string) error

func EightChanBoxThread

func EightChanBoxThread(vbox *tui.Box, id int, board string, boxLength int)

func EightChanGetThreadIDs

func EightChanGetThreadIDs(board string) []int

func EightChanMarkFormatting

func EightChanMarkFormatting(text string) string

func EndchanBoxThread

func EndchanBoxThread(vbox *tui.Box, id int, board string, boxLength int)

func EndchanGetThreadIDs

func EndchanGetThreadIDs(board string) []int

func EndchanMarkFormatting

func EndchanMarkFormatting(text string) string

func GetText

func GetText(sauceurl string) io.Reader

func LainchanBoxThread

func LainchanBoxThread(vbox *tui.Box, id int, board string, boxLength int)

func LainchanGetThreadIDs

func LainchanGetThreadIDs(board string) []int

func LainchanMarkFormatting

func LainchanMarkFormatting(text string) string

Types

type ArisuchanThread

type ArisuchanThread struct {
	Posts []struct {
		No            int    `json:"no"`
		Sub           string `json:"sub,omitempty"`
		Com           string `json:"com"`
		Name          string `json:"name"`
		Capcode       string `json:"capcode,omitempty"`
		Time          int    `json:"time"`
		OmittedPosts  int    `json:"omitted_posts,omitempty"`
		OmittedImages int    `json:"omitted_images,omitempty"`
		Sticky        int    `json:"sticky"`
		Locked        int    `json:"locked"`
		Cyclical      string `json:"cyclical"`
		LastModified  int    `json:"last_modified"`
		TnH           int    `json:"tn_h,omitempty"`
		TnW           int    `json:"tn_w,omitempty"`
		H             int    `json:"h,omitempty"`
		W             int    `json:"w,omitempty"`
		Fsize         int    `json:"fsize,omitempty"`
		Filename      string `json:"filename,omitempty"`
		Ext           string `json:"ext,omitempty"`
		Tim           string `json:"tim,omitempty"`
		Md5           string `json:"md5,omitempty"`
		Resto         int    `json:"resto"`
		ExtraFiles    []struct {
			TnH      int    `json:"tn_h"`
			TnW      int    `json:"tn_w"`
			H        int    `json:"h"`
			W        int    `json:"w"`
			Fsize    int    `json:"fsize"`
			Filename string `json:"filename"`
			Ext      string `json:"ext"`
			Tim      string `json:"tim"`
			Md5      string `json:"md5"`
		} `json:"extra_files,omitempty"`
		Email string `json:"email,omitempty"`
	} `json:"posts"`
}

type EightChanThread

type EightChanThread struct {
	Posts []struct {
		No            int    `json:"no"`
		Sub           string `json:"sub"`
		Com           string `json:"com"`
		Trip          string `json:"trip"`
		Name          string `json:"name"`
		Time          int64  `json:"time"`
		OmittedPosts  int    `json:"omitted_posts"`
		OmittedImages int    `json:"omitted_images"`
		Sticky        int    `json:"sticky"`
		Locked        int    `json:"locked"`
		Cyclical      string `json:"cyclical"`
		LastModified  int    `json:"last_modified"`
		TnH           int    `json:"tn_h"`
		TnW           int    `json:"tn_w"`
		H             int    `json:"h"`
		W             int    `json:"w"`
		Fsize         int    `json:"fsize"`
		Filename      string `json:"filename"`
		Ext           string `json:"ext"`
		Tim           string `json:"tim"`
		Md5           string `json:"md5"`
		Resto         int    `json:"resto"`
		Email         string `json:"email"`
		ExtraFiles    []struct {
			TnH      int    `json:"tn_h"`
			TnW      int    `json:"tn_w"`
			H        int    `json:"h"`
			W        int    `json:"w"`
			Fsize    int    `json:"fsize"`
			Filename string `json:"filename"`
			Ext      string `json:"ext"`
			Tim      string `json:"tim"`
			Md5      string `json:"md5"`
		} `json:"extra_files,omitempty"`
	} `json:"posts"`
}

type File

type File struct {
	Name   string
	URL    string
	Mime   string
	Width  int
	Height int
}

func ArisuchanGetFiles

func ArisuchanGetFiles(board string, thread_id int, post_id int) ([]File, error)

func EightChanGetFiles

func EightChanGetFiles(board string, thread_id int, post_id int) ([]File, error)

func EndchanGetFiles

func EndchanGetFiles(board string, thread_id int, post_id int) ([]File, error)

func LainchanGetFiles

func LainchanGetFiles(board string, thread_id int, post_id int) ([]File, error)

type Imageboard

type Imageboard struct {
	Name     string
	URL      string
	OnionURL string
}
var ArisuchanInfo Imageboard = Imageboard{Name: "Arisuchan", URL: "http://arisuchan.jp", OnionURL: ""}
var EightChanInfo Imageboard = Imageboard{Name: "8chan", URL: "http://8ch.net", OnionURL: "http://oxwugzccvk3dk6tj.onion"}
var EndchanInfo Imageboard = Imageboard{Name: "Endchan", URL: "http://endchan.xyz", OnionURL: "http://s6424n4x4bsmqs27.onion"}
var LainchanInfo Imageboard = Imageboard{Name: "Lainchan", URL: "http://lainchan.org", OnionURL: ""}

type LainchanThread

type LainchanThread struct {
	Posts []struct {
		No            int    `json:"no"`
		Sub           string `json:"sub"`
		Com           string `json:"com"`
		Trip          string `json:"trip"`
		Name          string `json:"name"`
		Time          int64  `json:"time"`
		Capcode       string `json:"capcode,omit_empty"`
		OmittedPosts  int    `json:"omitted_posts"`
		OmittedImages int    `json:"omitted_images"`
		Sticky        int    `json:"sticky"`
		Locked        int    `json:"locked"`
		Cyclical      string `json:"cyclical"`
		LastModified  int    `json:"last_modified"`
		TnH           int    `json:"tn_h"`
		TnW           int    `json:"tn_w"`
		H             int    `json:"h"`
		W             int    `json:"w"`
		Fsize         int    `json:"fsize"`
		Filename      string `json:"filename"`
		Ext           string `json:"ext"`
		Tim           string `json:"tim"`
		Md5           string `json:"md5"`
		Resto         int    `json:"resto"`
		Email         string `json:"email"`
		ExtraFiles    []struct {
			TnH      int    `json:"tn_h"`
			TnW      int    `json:"tn_w"`
			H        int    `json:"h"`
			W        int    `json:"w"`
			Fsize    int    `json:"fsize"`
			Filename string `json:"filename"`
			Ext      string `json:"ext"`
			Tim      string `json:"tim"`
			Md5      string `json:"md5"`
		} `json:"extra_files,omitempty"`
	} `json:"posts"`
}

type Thread

type Thread struct {
	SignedRole null.String `json:"signedRole"`
	ID         null.String `json:"id"`
	Name       string      `json:"name"`
	Email      null.String `json:"email"`
	BoardURI   string      `json:"boardUri"`
	ThreadID   int         `json:"threadId"`
	Subject    null.String `json:"subject"`
	Markdown   string      `json:"markdown"`
	Message    string      `json:"message"`
	Creation   time.Time   `json:"creation"`
	Locked     bool        `json:"locked"`
	Pinned     bool        `json:"pinned"`
	Cyclic     bool        `json:"cyclic"`
	AutoSage   bool        `json:"autoSage"`
	Files      []struct {
		OriginalName string `json:"originalName"`
		Path         string `json:"path"`
		Thumb        string `json:"thumb"`
		Mime         string `json:"mime"`
		Size         int    `json:"size"`
		Width        int    `json:"width"`
		Height       int    `json:"height"`
	} `json:"files"`
	Posts []struct {
		Name       string      `json:"name"`
		SignedRole null.String `json:"signedRole"`
		Email      null.String `json:"email"`
		ID         null.String `json:"id"`
		Subject    null.String `json:"subject"`
		Markdown   string      `json:"markdown"`
		Message    string      `json:"message"`
		Creation   time.Time   `json:"creation"`
		Files      []struct {
			OriginalName string `json:"originalName"`
			Path         string `json:"path"`
			Thumb        string `json:"thumb"`
			Mime         string `json:"mime"`
			Size         int    `json:"size"`
			Width        int    `json:"width"`
			Height       int    `json:"height"`
		} `json:"files"`
		PostID int `json:"postId"`
	} `json:"posts"`
	FlagData []struct {
		ID   string `json:"_id"`
		Name string `json:"name"`
	} `json:"flagData"`
}

Jump to

Keyboard shortcuts

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