Documentation
¶
Index ¶
- Constants
- func ExtractQuestion(file string) []string
- func GenerateMD(qs []string) (rt string)
- func GenerateMDTable(res [][]string)
- func ReplaceUnorderedListWithTask(str string) string
- type Dir
- func (d *Dir) AddFile(name string, questions []string)
- func (d *Dir) AddFiles(files []File)
- func (d *Dir) Exclude(names []string) *Dir
- func (d *Dir) GetFile(name string) *File
- func (d *Dir) GetFileNum() int
- func (d *Dir) GetFiles() []File
- func (d *Dir) GetQuestionNum() int
- func (d *Dir) GetQuestionNumByFile(name string) int
- func (d *Dir) GetQuestionNumByFileReg(reg string) int
- func (d *Dir) GetQuestionNumByFileRegEx(reg string) int
- func (d *Dir) GetQuestionNumByFileRegExs(regs []string) int
- func (d *Dir) GetQuestionNumByFiles(names []string) int
- func (d *Dir) GetQuestions() (qs []string)
- func (d *Dir) GetTableData() (data [][]string)
- func (d *Dir) Xz() *Dir
- type File
Constants ¶
View Source
const ( RegDetails = `<details>[\s\S]*?</details>` RegUnorderedList = `(?m)^-\s(.*)` RegMD = `*.md` MarkMD = `.md` MarkDel = "~~" MarkURL = "http" MarkQuestionEN = "?" MarkQuestionCN = "?" )
Variables ¶
This section is empty.
Functions ¶
func ReplaceUnorderedListWithTask ¶
ReplaceUnorderedListWithTask 将无序列表替换为任务列表
Types ¶
type Dir ¶
func (*Dir) GetFileNum ¶
func (*Dir) GetQuestionNumByFile ¶
GetQuestionNumByFile 获取指定文件的题目数量
func (*Dir) GetQuestionNumByFileReg ¶
GetQuestionNumByFileReg 获取指定文件的题目数量
func (*Dir) GetQuestionNumByFileRegEx ¶
func (*Dir) GetQuestionNumByFileRegExs ¶
func (*Dir) GetQuestionNumByFiles ¶
GetQuestionNumByFiles 获取指定文件的题目数量
func (*Dir) GetTableData ¶
GetTableData 组装tablewriter需要的数据
type File ¶
func (*File) ConvertToMarkdown ¶
func (*File) GetQuestions ¶
func (*File) GetTableData ¶
GetTableData 组装tablewriter需要的数据
Click to show internal directories.
Click to hide internal directories.