DELETED .deepsource.toml Index: .deepsource.toml ================================================================== --- .deepsource.toml +++ .deepsource.toml @@ -1,8 +0,0 @@ -version = 1 - -[[analyzers]] -name = "go" -enabled = true - - [analyzers.meta] - import_root = "github.com/zettelstore/client" Index: api/const.go ================================================================== --- api/const.go +++ api/const.go @@ -123,11 +123,10 @@ ValueSyntaxHTML = "html" ValueSyntaxMarkdown = "markdown" ValueSyntaxMD = "md" ValueSyntaxMustache = "mustache" ValueSyntaxNone = "none" - ValueSyntaxPikchr = "pikchr" ValueSyntaxSVG = "svg" ValueSyntaxText = "text" ValueSyntaxZmk = "zmk" ValueUserRoleCreator = "creator" ValueUserRoleOwner = "owner" @@ -151,11 +150,11 @@ ) // Values for HTTP query parameter. const ( QueryKeyCommand = "cmd" - QueryKeyDepth = "depth" + QueryKeyCost = "cost" QueryKeyDir = "dir" QueryKeyEncoding = "enc" QueryKeyLimit = "limit" QueryKeyPart = "part" QueryKeyPhrase = "phrase" @@ -169,18 +168,20 @@ ) // Supported encoding values. const ( EncodingHTML = "html" + EncodingMD = "md" EncodingSexpr = "sexpr" EncodingText = "text" EncodingZJSON = "zjson" EncodingZMK = "zmk" ) var mapEncodingEnum = map[string]EncodingEnum{ EncodingHTML: EncoderHTML, + EncodingMD: EncoderMD, EncodingSexpr: EncoderSexpr, EncodingText: EncoderText, EncodingZJSON: EncoderZJSON, EncodingZMK: EncoderZmk, } @@ -205,10 +206,11 @@ // Values for EncoderEnum const ( EncoderUnknown EncodingEnum = iota EncoderHTML + EncoderMD EncoderSexpr EncoderText EncoderZJSON EncoderZmk ) Index: client/client.go ================================================================== --- client/client.go +++ client/client.go @@ -477,22 +477,22 @@ ) // GetZettelContext returns metadata of the given zettel and, more important, // metadata of zettel that for the context of the first zettel. func (c *Client) GetZettelContext( - ctx context.Context, zid api.ZettelID, dir ContextDirection, depth, limit int) ( + ctx context.Context, zid api.ZettelID, dir ContextDirection, cost, limit int) ( *api.ZidMetaRelatedList, error, ) { ub := c.newURLBuilder('x').SetZid(zid) switch dir { case DirBackward: ub.AppendKVQuery(api.QueryKeyDir, api.DirBackward) case DirForward: ub.AppendKVQuery(api.QueryKeyDir, api.DirForward) } - if depth > 0 { - ub.AppendKVQuery(api.QueryKeyDepth, strconv.Itoa(depth)) + if cost > 0 { + ub.AppendKVQuery(api.QueryKeyCost, strconv.Itoa(cost)) } if limit > 0 { ub.AppendKVQuery(api.QueryKeyLimit, strconv.Itoa(limit)) } resp, err := c.buildAndExecuteRequest(ctx, http.MethodGet, ub, nil, nil) Index: www/changes.wiki ================================================================== --- www/changes.wiki +++ www/changes.wiki @@ -1,7 +1,12 @@