hero.publishing #
fn cmd_publisher #
fn cmd_publisher(pre_func fn (Command) !) Command
path string //if location on filessytem, if exists, this has prio on git_url git_url string // location of where the hero scripts are git_pull bool // means when getting new repo will pull even when repo is already there git_pullreset bool // means we will force a pull and reset old content coderoot string //the location of coderoot if its another one
fn play #
fn play(mut plbook playbook.PlayBook) !
struct Book #
struct Book {
name string
title string
description string
path string
}
fn (Book) publish #
fn (book Book) publish(path string, params PublishParams) !
fn (Book) print #
fn (book Book) print()
struct NewBook #
struct NewBook {
name string
title string
description string
summary_path string
collections []string
}
struct PublishParams #
@[params]
struct PublishParams {
production bool
}
struct Publisher #
struct Publisher {
pub mut:
tree Tree
books map[string]Book
root_path string = os.join_path(os.home_dir(), 'hero/publisher')
}
fn (Publisher) collections_directory #
fn (p Publisher) collections_directory() Path
fn (Publisher) build_directory #
fn (p Publisher) build_directory() Path
fn (Publisher) publish_directory #
fn (p Publisher) publish_directory() Path
fn (Publisher) publish #
fn (p Publisher) publish(name string, params PublishParams) !
fn (Publisher) new_book #
fn (p Publisher) new_book(book NewBook) !
fn (Publisher) open #
fn (p Publisher) open(name string) !
fn (Publisher) export_tree #
fn (p Publisher) export_tree() !
fn (Publisher) list_books #
fn (p Publisher) list_books() ![]Book