Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Difference From v0.5 To v0.6.0
2022-08-12
| ||
11:25 | Remove constants to work with URL query parameter based search; update API to use search expressions ... (check-in: 0e4cf52fe7 user: stern tags: trunk) | |
2022-08-11
| ||
16:58 | Version 0.6.0 ... (check-in: 7ef11c70e3 user: stern tags: release, trunk, v0.6.0) | |
08:53 | Typo ... (check-in: 6f9ea3ec0b user: stern tags: trunk) | |
2022-07-29
| ||
13:59 | Add missing changelog ... (check-in: 4550111b76 user: stern tags: trunk) | |
13:59 | Version 0.5 ... (check-in: 7877ee63ca user: stern tags: release, trunk, v0.5) | |
2022-07-19
| ||
17:50 | Remove code to encode HTML or Text via ZJSON ... (check-in: 3613da8bc5 user: stern tags: trunk) | |
Changes to api/api.go.
︙ | |||
95 96 97 98 99 100 101 102 103 104 105 106 107 108 | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | + | Content string `json:"content"` Rights ZettelRights `json:"rights"` } // ZettelListJSON contains data for a zettel list. type ZettelListJSON struct { Query string `json:"query"` Human string `json:"human"` List []ZidMetaJSON `json:"list"` } // MapMeta maps metadata keys to list of metadata. type MapMeta map[string][]ZettelID // MapListJSON specifies the map of metadata key to list of metadata that contains the key. |
︙ |
Changes to api/urlbuilder.go.
︙ | |||
84 85 86 87 88 89 90 91 92 93 94 95 96 97 | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | + + + + + + + | // AppendQuery adds a new query parameter func (ub *URLBuilder) AppendQuery(key, value string) *URLBuilder { ub.rawLocal = "" ub.query = append(ub.query, urlQuery{key, value}) return ub } // AppendSearch adds a new search func (ub *URLBuilder) AppendSearch(value string) *URLBuilder { ub.rawLocal = "" ub.query = append(ub.query, urlQuery{QueryKeySearch, value}) return ub } // ClearQuery removes all query parameters. func (ub *URLBuilder) ClearQuery() *URLBuilder { ub.rawLocal = "" ub.query = nil ub.fragment = "" return ub |
︙ |
Changes to client/client.go.
︙ | |||
284 285 286 287 288 289 290 | 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | - + - + - + - + - + | if len(lines[len(lines)-1]) == 0 { lines = lines[:len(lines)-1] } return lines, nil } // ListZettelJSON returns a list of zettel. |
︙ |
Changes to go.mod.
1 2 | 1 2 3 4 5 | - + | module zettelstore.de/c |
Changes to html/html.go.
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | - + - - - + - - - - - | var ( htmlEscapes = []string{`&`, htmlAmp, `<`, htmlLt, `>`, htmlGt, `"`, htmlQuot, "\000", htmlNull, } |
︙ |
Changes to html/html_test.go.
︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - - - - - - - - - - - - - - - - - - - - | {"", ""}, {"<", "<"}, } for _, tc := range testcases { var buf bytes.Buffer _, err := html.Escape(&buf, tc.in) if err != nil { |
︙ |
Changes to html/sencoder.go.
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | + | package html import ( "bytes" "fmt" "io" "log" "net/url" "strconv" "codeberg.org/t73fde/sxpf" "zettelstore.de/c/api" "zettelstore.de/c/attrs" "zettelstore.de/c/sexpr" "zettelstore.de/c/text" |
︙ | |||
131 132 133 134 135 136 137 | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | - + - + | // WriteEscape encodes a string so that it cannot interfere with other HTML code. func (env *EncEnvironment) WriteEscaped(s string) { if env.err == nil { _, env.err = Escape(env.w, s) } } |
︙ | |||
496 497 498 499 500 501 502 503 504 505 506 507 508 509 | 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 | + + + + + + | {sexpr.SymLinkBroken, 2, func(env *EncEnvironment, args *sxpf.Pair) { if a, refValue, ok := PrepareLink(env, args); ok { WriteLink(env, args, a.AddClass("broken"), refValue, "") } }}, {sexpr.SymLinkHosted, 2, func(env *EncEnvironment, args *sxpf.Pair) { WriteHRefLink(env, args) }}, {sexpr.SymLinkBased, 2, func(env *EncEnvironment, args *sxpf.Pair) { WriteHRefLink(env, args) }}, {sexpr.SymLinkSearch, 2, func(env *EncEnvironment, args *sxpf.Pair) { if a, refValue, ok := PrepareLink(env, args); ok { query := "?" + api.QueryKeySearch + "=" + url.QueryEscape(refValue) WriteLink(env, args, a.Set("href", query), refValue, "") } }}, {sexpr.SymLinkExternal, 2, func(env *EncEnvironment, args *sxpf.Pair) { if a, refValue, ok := PrepareLink(env, args); ok { WriteLink(env, args, a.Set("href", refValue).AddClass("external"), refValue, "") } }}, {sexpr.SymEmbed, 3, func(env *EncEnvironment, args *sxpf.Pair) { argRef := args.GetTail() |
︙ | |||
560 561 562 563 564 565 566 | 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 | - + | `<sup id="fnref:`, un, `"><a class="zs-noteref" href="#fn:`, un, `" role="doc-noteref">`, n, `</a></sup>`) } }}, {sexpr.SymFormatDelete, 1, makeFormatFn("del")}, {sexpr.SymFormatEmph, 1, makeFormatFn("em")}, {sexpr.SymFormatInsert, 1, makeFormatFn("ins")}, |
︙ | |||
645 646 647 648 649 650 651 | 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 | - + | } env.WriteEndTag(tag) } func (env *EncEnvironment) writeVerbatim(args *sxpf.Pair, a attrs.Attributes) { env.WriteString("<pre>") env.WriteStartTag("code", a) |
︙ | |||
720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 | 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 | + + + + + + + + + + + + + + + + - + | a = a.Remove("").AddClass(val) } env.WriteStartTag(tag, a) sxpf.EvalSequence(env, args.GetTail()) env.WriteEndTag(tag) } } func writeQuote(env *EncEnvironment, args *sxpf.Pair) { const langAttr = "lang" a := env.GetAttributes(args) lang, hasLang := a.Get(langAttr) if hasLang { a = a.Remove(langAttr) env.WriteStartTag("span", attrs.Attributes{}.Set(langAttr, lang)) } env.WriteStartTag("q", a) sxpf.EvalSequence(env, args.GetTail()) env.WriteEndTag("q") if hasLang { env.WriteEndTag("span") } } func (env *EncEnvironment) writeLiteral(args *sxpf.Pair, a attrs.Attributes, tag string) { if a == nil { a = env.GetAttributes(args) } oldVisible := env.visibleSpace if a.HasDefault() { env.visibleSpace = true a = a.RemoveDefault() } env.WriteStartTag(tag, a) |
Changes to sexpr/const.go.
︙ | |||
40 41 42 43 44 45 46 47 48 49 50 51 52 53 | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | + | SymLinkInvalid = Smk.MakeSymbol("LINK-INVALID") SymLinkZettel = Smk.MakeSymbol("LINK-ZETTEL") SymLinkSelf = Smk.MakeSymbol("LINK-SELF") SymLinkFound = Smk.MakeSymbol("LINK-FOUND") SymLinkBroken = Smk.MakeSymbol("LINK-BROKEN") SymLinkHosted = Smk.MakeSymbol("LINK-HOSTED") SymLinkBased = Smk.MakeSymbol("LINK-BASED") SymLinkSearch = Smk.MakeSymbol("LINK-SEARCH") SymLinkExternal = Smk.MakeSymbol("LINK-EXTERNAL") SymListOrdered = Smk.MakeSymbol("ORDERED") SymListUnordered = Smk.MakeSymbol("UNORDERED") SymListQuote = Smk.MakeSymbol("QUOTATION") SymLiteralProg = Smk.MakeSymbol("LITERAL-CODE") SymLiteralComment = Smk.MakeSymbol("LITERAL-COMMENT") SymLiteralHTML = Smk.MakeSymbol("LITERAL-HTML") |
︙ | |||
81 82 83 84 85 86 87 88 89 90 91 92 93 94 | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | + | SymRefStateInvalid = Smk.MakeSymbol("INVALID") SymRefStateZettel = Smk.MakeSymbol("ZETTEL") SymRefStateSelf = Smk.MakeSymbol("SELF") SymRefStateFound = Smk.MakeSymbol("FOUND") SymRefStateBroken = Smk.MakeSymbol("BROKEN") SymRefStateHosted = Smk.MakeSymbol("HOSTED") SymRefStateBased = Smk.MakeSymbol("BASED") SymRefStateSearch = Smk.MakeSymbol("SEARCH") SymRefStateExternal = Smk.MakeSymbol("EXTERNAL") ) // Symbols for metadata types var ( SymTypeCredential = Smk.MakeSymbol("CREDENTIAL") SymTypeEmpty = Smk.MakeSymbol("EMPTY-STRING") |
︙ |
Added www/changes.wiki.
|
Changes to www/index.wiki.
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 | - - - - - - + + + + + + | <title>Home</title> This repository contains Go client software to access [https://zettelstore.de|Zettelstore] via its API. |
Changes to zjson/const.go.
︙ | |||
82 83 84 85 86 87 88 89 90 91 92 93 94 95 | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | + | const ( RefStateBased = "based" RefStateBroken = "broken" RefStateExternal = "external" RefStateFound = "found" RefStateHosted = "local" RefStateInvalid = "invalid" RefStateSearch = "search" RefStateSelf = "self" RefStateZettel = "zettel" ) // Values for table cell alignment const ( AlignDefault = "" |
︙ |