Commit 0a14e24a authored by Ma_124's avatar Ma_124

md>html

parent 978e89d0
Pipeline #53335145 (#53) failed with stages
in 1 minute and 7 seconds
......@@ -47,8 +47,6 @@ func OFFByName(name string) (*OutputFileFormat, error) {
return nil, err
}
// TODO md>html
switch args[0] {
case "md:table":
if len(args) != 1 {
......@@ -60,6 +58,16 @@ func OFFByName(name string) (*OutputFileFormat, error) {
return nil, fmt.Errorf("%q: wrong number of arguments (usage: md:table+meta)", name)
}
return OFFMarkdown(), nil
case "md:table>html":
if len(args) != 1 {
return nil, fmt.Errorf("%q: wrong number of arguments (usage: md:table)", name)
}
return OFFSimpleMarkdownHtml(), nil
case "md:table+meta>html":
if len(args) != 1 {
return nil, fmt.Errorf("%q: wrong number of arguments (usage: md:table+meta)", name)
}
return OFFMarkdownHtml(), nil
case "tabsep":
if len(args) == 1 {
return OFFTabSep(NameUrlDescTabSepPattern), nil
......
......@@ -7,4 +7,4 @@ lists:
- file: "/dev/stdout"
format: "test:alpha"
- file: "outlist.html"
format: "html:table+meta"
format: "md:table+meta>html"
......@@ -110,9 +110,9 @@ func (m ghMeta) LastCommit() string {
func fetchGitHub(repo string, ctx *Ctx) Meta {
var data []byte
if ctx.fetchMetaGhRequests < ctx.ApisCfg.GitHubCfg.MaxRequests { // TODO fetchMetaGhRequests < MaxRequests
if ctx.fetchMetaGhRequests < ctx.ApisCfg.GitHubCfg.MaxRequests {
ctx.fetchMetaGhRequests++
resp, err := http.Get("https://api.github.com/repos/" + repo + "?access_token=" + ctx.ApisCfg.GitHubCfg.AccessToken) // TODO AccessToken
resp, err := http.Get("https://api.github.com/repos/" + repo + "?access_token=" + ctx.ApisCfg.GitHubCfg.AccessToken)
if err != nil {
panic(err)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment