Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateHTML(input string, output string, name string)
- func GetNameAndExt(basename string) (string, string)
- func ParseMarkdown(fileBytes []byte) []byte
- func ParseText(fileString string) (string, string)
- func PrintHelp()
- func ProcessConfig(config string)
- func ProcessInput(input string, output string)
- type File
Constants ¶
View Source
const ( InputHelpMessage string = "Path to a .txt / .md file OR a folder containing .txt / .md files to be turned into HTML" OutputHelpMessage string = "Optional. Additionaly changes the output path of generated HTML" HelpHelpMessage string = "Display detailed help message" VersionHelpMessage string = "Display installed version of SSGo" ConfigHelpMessage string = "Path to a .json file containing SSGo configuration options" )
Help message configuration
View Source
const DefaultOutput string = "dist"
Default output directory name (relative or absolute)
Variables ¶
View Source
var AcceptedInputFileTypes = map[string]bool{ ".txt": true, ".md": true, }
Hashset for easier lookup
Functions ¶
func GenerateHTML ¶
Takes path to .txt file as an input, reads it, and creates name.html in output folder
func GetNameAndExt ¶
Returns split name and extension of a filename
func ParseMarkdown ¶
func ProcessConfig ¶
func ProcessConfig(config string)
Takes path to .json file, reads it, and calls ProcessInput using contained options
func ProcessInput ¶
Takes input path, validates single .txt file OR folder and checks all files in the folder
Types ¶
Click to show internal directories.
Click to hide internal directories.