Documentation
¶
Index ¶
- Variables
- func BuildFilename(title string, dir string, id string) string
- func CheckError(err error)
- func DescribeImg(img string, lang string) (string, error)
- func DisplayOnScreen(exportedPages []Page)
- func ExtractTextFromPDF(pdfPath string) (string, error)
- func GetImgList(content *goquery.Document, ispath string, scheme string, domain string) ([]string, error)
- func InitLogger(verbose bool) error
- func RemoveAccents(s string) string
- func RemoveSpecialChars(s string) string
- func ReplaceAllMultipleChars(s string) string
- func WriteMarkdownToFile(markdown, outputPath string) error
- type Metadata
- type Page
Constants ¶
This section is empty.
Variables ¶
View Source
var Insecure bool
Functions ¶
func BuildFilename ¶
BuildFilename build md filename clean from special characters
func DescribeImg ¶
DescribeImg describe an image with Ollama API
func DisplayOnScreen ¶
func DisplayOnScreen(exportedPages []Page)
DisplayOnScreen display pages on screen as text table
func ExtractTextFromPDF ¶
ExtractTextFromPDF extract text from a PDF. @todo: rewrite with https://github.com/ledongthuc/pdf lib. The current lib is not maintained anymore.
func GetImgList ¶
func GetImgList(content *goquery.Document, ispath string, scheme string, domain string) ([]string, error)
GetImgList get all images from a web page and return a list of image url
func InitLogger ¶
func RemoveSpecialChars ¶
func ReplaceAllMultipleChars ¶
ReplaceAllMultipleChars replace all multiple consecutive characters by a single character for example "aa---bb__cc==dd" becomes "a-b_c=d"
func WriteMarkdownToFile ¶
WriteMarkdownToFile writes markdown content to a file.
Types ¶
type Metadata ¶
type Metadata struct {
Title string `json:"title"`
Doc_id string `json:"doc_id"`
Description string `json:"description"`
Site_url string `json:"site_url"`
Authors []string `json:"authors"`
Creation_date string `json:"creation_date"`
Last_update_date string `json:"last_update_date"`
Visibility string `json:"visibility"`
Tags []string `json:"tags"`
PageId string `json:"page_id"`
}
func BuildFileMetadata ¶
func BuildFileMetadata(docpath string, url string, prefix string, meta Metadata, complement Metadata) (string, Metadata)
BuildFileMetadata build metadata for a docs or pdf file.
Click to show internal directories.
Click to hide internal directories.