Skip to content

data.markdownparser.elements #

fn doc_new #

fn doc_new(args DocNewArgs) !Doc

fn is_list_item_start #

fn is_list_item_start(line string) bool

fn line_is_list #

fn line_is_list(line string) bool

fn parser_char_new_text #

fn parser_char_new_text(text string) ParserChar

fn txt_is_nr #

fn txt_is_nr(txt_ string) bool

enum Alignment #

enum Alignment as u8 {
	left
	center
	right
}

enum LinkState #

enum LinkState {
	init          // the original state (prob means already processed)
	linkprocessed // means we have found the original information
	ok
	missing
	error
}

enum LinkType #

enum LinkType {
	file
	image
	page
	unknown
	html
	data
	email
	anchor
	code
}

enum ListCat #

enum ListCat {
	bullet
	star
	nr
}

struct Action #

@[heap]
struct Action {
	DocBase
pub mut:
	action           playbook.Action
	action_processed bool
}

fn (Action) process #

fn (mut self Action) process() !int

we don't allow an action to make child processes

fn (Action) markdown #

fn (self Action) markdown() !string

fn (Action) html #

fn (self Action) html() !string

fn (Action) pug #

fn (self Action) pug() !string

struct ActionsGetArgs #

@[params]
struct ActionsGetArgs {
pub mut:
	actor string
	name  string
}

struct Codeblock #

@[heap]
struct Codeblock {
	DocBase
pub mut:
	category string
}

fn (Codeblock) process #

fn (mut self Codeblock) process() !int

fn (Codeblock) markdown #

fn (self Codeblock) markdown() !string

fn (Codeblock) html #

fn (self Codeblock) html() !string

fn (Codeblock) pug #

fn (self Codeblock) pug() !string

struct Comment #

@[heap]
struct Comment {
	DocBase
pub mut:
	replaceme  string
	singleline bool
}

fn (Comment) process #

fn (mut self Comment) process() !int

fn (Comment) markdown #

fn (self Comment) markdown() !string

fn (Comment) html #

fn (self Comment) html() !string

fn (Comment) pug #

fn (self Comment) pug() !string

struct Def #

@[heap]
struct Def {
	DocBase
pub mut:
	pagekey   string
	pagename  string
	nameshort string
}

fn (Def) process #

fn (mut self Def) process() !int

fn (Def) markdown #

fn (self Def) markdown() !string

fn (Def) html #

fn (self Def) html() !string

fn (Def) pug #

fn (self Def) pug() !string

struct Doc #

@[heap]
struct Doc {
	DocBase
pub mut:
	// gid smartid.GID
	pre             []HtmlSource
	linked_pages    []string // to know which collection:pages are needed to make this doc complete
	collection_name string
}

fn (Doc) pre_add #

fn (mut self Doc) pre_add(arg HtmlSource) string

add a css or script link to a document url: is source where the data comes from, can be CDN or local link path: can be relative or absolute path to the info bookname, if in memory in a book chaptername, if in memory in a book filename string, if in memory in a book cat, is .css or .script

fn (Doc) process #

fn (mut self Doc) process() !int

fn (Doc) pug #

fn (self Doc) pug() !string

pub fn (self Doc) html() string { return "" }

struct DocBase #

@[heap]
struct DocBase {
mut:
	parent_doc_ ?&Doc @[skip; str: skip]
pub mut:
	id        int
	content   string
	path      ?pathlib.Path
	processed bool
	// params    paramsparser.Params
	type_name string
	changed   bool
	children  []Element
	// trailing_lf bool = true // NO LONGER NEEDED !!!!
}

fn (DocBase) action_new #

fn (mut base DocBase) action_new(mut docparent ?Doc, content string) &Action

fn (DocBase) actionpointers #

fn (mut self DocBase) actionpointers(args ActionsGetArgs) []&Action

fn (DocBase) actions #

fn (self DocBase) actions(args ActionsGetArgs) []playbook.Action

get all actions from the children

fn (DocBase) children #

fn (self DocBase) children() []Element

fn (DocBase) children_recursive #

fn (self DocBase) children_recursive() []Element

fn (DocBase) codeblock_new #

fn (mut base DocBase) codeblock_new(mut docparent ?Doc, content string) &Codeblock

fn (DocBase) comment_new #

fn (mut base DocBase) comment_new(mut docparent ?Doc, content string) &Comment

fn (DocBase) content_set #

fn (mut self DocBase) content_set(element_id int, c string)

fn (DocBase) def_new #

fn (mut base DocBase) def_new(mut docparent ?Doc, content string) &Def

fn (DocBase) defpointers #

fn (mut self DocBase) defpointers() []&Def

fn (DocBase) delete_last #

fn (mut self DocBase) delete_last() !

fn (DocBase) empty_new #

fn (mut base DocBase) empty_new() &Empty

fn (DocBase) first #

fn (self DocBase) first() !Element

fn (DocBase) header_name #

fn (self DocBase) header_name() !string

fn (DocBase) header_new #

fn (mut base DocBase) header_new(mut docparent ?Doc, content string) &Header

fn (DocBase) html #

fn (self DocBase) html() !string

fn (DocBase) html_new #

fn (mut base DocBase) html_new(mut docparent ?Doc, content string) &Html

fn (DocBase) id_set #

fn (mut self DocBase) id_set(latestid_ int) int

fn (DocBase) last #

fn (self DocBase) last() !Element

fn (DocBase) list_item_new #

fn (mut base DocBase) list_item_new(mut docparent ?Doc, content string) &ListItem

fn (DocBase) list_new #

fn (mut base DocBase) list_new(mut docparent ?Doc, content string) !&List

fn (DocBase) markdown #

fn (self DocBase) markdown() !string

the markdown which represents how it created the element

fn (DocBase) paragraph_new #

fn (mut base DocBase) paragraph_new(mut docparent ?Doc, content string) &Paragraph

fn (DocBase) process #

fn (mut self DocBase) process() !int

fn (DocBase) process_children #

fn (mut self DocBase) process_children() !int

fn (DocBase) pug #

fn (self DocBase) pug() !string

example see https://github.com/RelaxedJS/ReLaXed-examples/blob/master/examples/letter/letter.pug is to generate pdf's

fn (DocBase) table_new #

fn (mut base DocBase) table_new(mut docparent ?Doc, content string) &Table

fn (DocBase) text_new #

fn (mut base DocBase) text_new(mut docparent ?Doc, content string) &Text

fn (DocBase) treeview #

fn (self DocBase) treeview() string

struct DocNewArgs #

@[params]
struct DocNewArgs {
pub mut:
	pre             []HtmlSource
	content         string
	collection_name string
}

struct Empty #

@[heap]
struct Empty {
pub mut:
	id        int
	content   string
	processed bool
	type_name string
	changed   bool
	// trailing_lf bool
	children []Element
}

NOT USED FOR NOW

fn (Empty) process #

fn (mut self Empty) process() !int

fn (Empty) markdown #

fn (self Empty) markdown() !string

fn (Empty) pug #

fn (self Empty) pug() !string

fn (Empty) html #

fn (self Empty) html() !string

fn (Empty) treeview_ #

fn (self Empty) treeview_(prefix string, mut out []string)

fn (Empty) children_recursive #

fn (self Empty) children_recursive() []Element

fn (Empty) children_recursive_ #

fn (self Empty) children_recursive_(mut e []Element)

fn (Empty) content_set #

fn (self Empty) content_set(i int, b string)

fn (Empty) id_set #

fn (self Empty) id_set(i int) int

fn (Empty) actionpointers #

fn (self Empty) actionpointers(args ActionsGetArgs) []&Action

fn (Empty) defpointers #

fn (self Empty) defpointers() []&Def

fn (Empty) header_name #

fn (self Empty) header_name() !string

fn (Empty) actions #

fn (self Empty) actions(args ActionsGetArgs) []playbook.Action

fn (Header) process #

fn (mut self Header) process() !int

fn (Header) markdown #

fn (self Header) markdown() !string

fn (Header) html #

fn (self Header) html() !string

fn (Header) pug #

fn (self Header) pug() !string

struct Html #

@[heap]
struct Html {
	DocBase
pub mut:
	replaceme string
}

fn (Html) process #

fn (mut self Html) process() !int

fn (Html) markdown #

fn (self Html) markdown() !string

fn (Html) pug #

fn (self Html) pug() !string

fn (Html) html #

fn (self Html) html() !string

struct HtmlSource #

@[param]
struct HtmlSource {
pub mut:
	url         string
	path        string
	bookname    string
	chaptername string
	filename    string
	cat         HtmlSourceCat
}

fn (Link) process #

fn (mut self Link) process() !int

fn (Link) markdown #

fn (self Link) markdown() !string

fn (Link) html #

fn (self Link) html() !string

fn (Link) pug #

fn (self Link) pug() !string

fn (Link) pathfull #

fn (mut link Link) pathfull() string

return path of the filename in the site

fn (Link) name_fix_no_underscore_no_ext #

fn (mut link Link) name_fix_no_underscore_no_ext() string

return the name of the link

struct List #

@[heap]
struct List {
	DocBase
pub mut:
	cat            ListCat
	interlinespace int // nr of lines in between
}

fn (List) process #

fn (mut self List) process() !int

fn (List) add_list_item #

fn (mut self List) add_list_item(line string) !&ListItem

fn (List) markdown #

fn (self List) markdown() !string

fn (List) pug #

fn (self List) pug() !string

fn (List) html #

fn (self List) html() !string

struct ListItem #

@[heap]
struct ListItem {
	DocBase
pub mut:
	depth  int
	indent int
	order  ?int
}

fn (ListItem) process #

fn (mut self ListItem) process() !int

fn (ListItem) markdown #

fn (self ListItem) markdown() !string

fn (ListItem) pug #

fn (self ListItem) pug() !string

fn (ListItem) html #

fn (self ListItem) html() !string

struct Paragraph #

@[heap]
struct Paragraph {
	DocBase
}

import freeflowuniverse.crystallib.ui.console

fn (Paragraph) pug #

fn (self Paragraph) pug() !string

struct Row #

struct Row {
pub mut:
	cells []&Paragraph
}

struct Table #

@[heap]
struct Table {
	DocBase
pub mut:
	num_columns int
	alignments  []Alignment
	header      []&Paragraph
	rows        []Row
}

fn (Table) process #

fn (mut self Table) process() !int

fn (Table) header_markdown #

fn (self Table) header_markdown() !string

fn (Table) markdown #

fn (self Table) markdown() !string

fn (Table) pug #

fn (self Table) pug() !string

fn (Table) html #

fn (self Table) html() !string

fn (Table) parse #

fn (mut self Table) parse() !

get all relevant info out of table

struct Text #

@[heap]
struct Text {
	DocBase // pub mut:
	// 	replaceme string
}

fn (Text) process #

fn (mut self Text) process() !int

fn (Text) markdown #

fn (self Text) markdown() !string

fn (Text) pug #

fn (self Text) pug() !string

fn (Text) html #

fn (self Text) html() !string