Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Difference From v0.21.0 To trunk
2025-09-07
| ||
13:45 | Remove GitHub configuration ... (Leaf check-in: 0a1ff448aa user: t73fde tags: trunk) | |
2025-09-02
| ||
16:19 | Adapt to updated dependencies ... (check-in: cec69262f9 user: stern tags: trunk) | |
2025-04-26
| ||
15:13 | WebUI: move context link from info page to zettel page ... (check-in: 7ae5e31c4a user: stern tags: trunk) | |
2025-04-17
| ||
15:29 | Version 0.21.0 ... (check-in: 7220c2d479 user: stern tags: trunk, release, v0.21.0) | |
09:24 | Update to zsc, to fix a panic ... (check-in: b3283fc6d6 user: stern tags: trunk) | |
Deleted .github/dependabot.yml.
| - - - - - - - - - - - - |
|
Changes to VERSION.
| 1 | - + |
|
Changes to cmd/cmd_file.go.
︙ | |||
50 51 52 53 54 55 56 | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | - + - | encdr := encoder.Create( api.Encoder(enc), &encoder.CreateParameter{Lang: string(m.GetDefault(meta.KeyLang, meta.ValueLangEN))}) if encdr == nil { fmt.Fprintf(os.Stderr, "Unknown format %q\n", enc) return 2, nil } |
︙ |
Changes to cmd/cmd_run.go.
︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | + | "context" "flag" "net/http" "t73f.de/r/zsc/domain/meta" "zettelstore.de/z/internal/auth" "zettelstore.de/z/internal/auth/user" "zettelstore.de/z/internal/box" "zettelstore.de/z/internal/config" "zettelstore.de/z/internal/kernel" "zettelstore.de/z/internal/usecase" "zettelstore.de/z/internal/web/adapter/api" "zettelstore.de/z/internal/web/adapter/webui" "zettelstore.de/z/internal/web/server" |
︙ | |||
51 52 53 54 55 56 57 | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | - + - - + + - - - + + + - - - - + + + + - + - + + + - - - + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - + + + - + | kernel.Main.WaitForShutdown() return exitCode, err } func setupRouting(webSrv server.Server, boxManager box.Manager, authManager auth.Manager, rtConfig config.Config) { protectedBoxManager, authPolicy := authManager.BoxWithPolicy(boxManager, rtConfig) kern := kernel.Main |
Changes to cmd/command.go.
︙ | |||
11 12 13 14 15 16 17 18 19 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + - - | // SPDX-FileCopyrightText: 2020-present Detlef Stern //----------------------------------------------------------------------------- package cmd import ( "flag" "log/slog" "maps" "slices" |
︙ | |||
48 49 50 51 52 53 54 | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | - + | if cmd.Name == "" || cmd.Func == nil { panic("Required command values missing") } if _, ok := commands[cmd.Name]; ok { panic("Command already registered: " + cmd.Name) } cmd.flags = flag.NewFlagSet(cmd.Name, flag.ExitOnError) |
︙ |
Changes to cmd/main.go.
︙ | |||
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | + - + | // Package cmd provides the commands to call Zettelstore from the command line. package cmd import ( "crypto/sha256" "flag" "fmt" "log/slog" "net" "net/url" "os" "runtime/debug" "strconv" "strings" "time" "t73f.de/r/zsc/api" "t73f.de/r/zsc/domain/id" "t73f.de/r/zsc/domain/meta" "t73f.de/r/zsx/input" "zettelstore.de/z/internal/auth" "zettelstore.de/z/internal/auth/impl" "zettelstore.de/z/internal/box" "zettelstore.de/z/internal/box/compbox" "zettelstore.de/z/internal/box/manager" "zettelstore.de/z/internal/config" "zettelstore.de/z/internal/kernel" |
︙ | |||
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | + + + - - + + | keyBoxOneURI = kernel.BoxURIs + "1" keyDebug = "debug-mode" keyDefaultDirBoxType = "default-dir-box-type" keyInsecureCookie = "insecure-cookie" keyInsecureHTML = "insecure-html" keyListenAddr = "listen-addr" keyLogLevel = "log-level" keyLoopbackIdent = "loopback-ident" keyLoopbackZid = "loopback-zid" keyMaxRequestSize = "max-request-size" keyOwner = "owner" keyPersistentCookie = "persistent-cookie" keyReadOnly = "read-only-mode" keyRuntimeProfiling = "runtime-profiling" keySxNesting = "sx-max-nesting" keyTokenLifetimeHTML = "token-lifetime-html" keyTokenLifetimeAPI = "token-lifetime-api" keyURLPrefix = "url-prefix" keyVerbose = "verbose-mode" ) func setServiceConfig(cfg *meta.Meta) bool { debugMode := cfg.GetBool(keyDebug) |
︙ | |||
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | + + + + + - + - - + + | } err = setConfigValue( err, kernel.ConfigService, kernel.ConfigInsecureHTML, cfg.GetDefault(keyInsecureHTML, kernel.ConfigSecureHTML)) err = setConfigValue( err, kernel.WebService, kernel.WebListenAddress, cfg.GetDefault(keyListenAddr, "127.0.0.1:23123")) err = setConfigValue(err, kernel.WebService, kernel.WebLoopbackIdent, cfg.GetDefault(keyLoopbackIdent, "")) err = setConfigValue(err, kernel.WebService, kernel.WebLoopbackZid, cfg.GetDefault(keyLoopbackZid, "")) if val, found := cfg.Get(keyBaseURL); found { err = setConfigValue(err, kernel.WebService, kernel.WebBaseURL, val) } if val, found := cfg.Get(keyURLPrefix); found { err = setConfigValue(err, kernel.WebService, kernel.WebURLPrefix, val) } err = setConfigValue(err, kernel.WebService, kernel.WebSecureCookie, !cfg.GetBool(keyInsecureCookie)) err = setConfigValue(err, kernel.WebService, kernel.WebPersistentCookie, cfg.GetBool(keyPersistentCookie)) if val, found := cfg.Get(keyMaxRequestSize); found { err = setConfigValue(err, kernel.WebService, kernel.WebMaxRequestSize, val) } err = setConfigValue( err, kernel.WebService, kernel.WebTokenLifetimeAPI, cfg.GetDefault(keyTokenLifetimeAPI, "")) err = setConfigValue( err, kernel.WebService, kernel.WebTokenLifetimeHTML, cfg.GetDefault(keyTokenLifetimeHTML, "")) err = setConfigValue(err, kernel.WebService, kernel.WebProfiling, debugMode || cfg.GetBool(keyRuntimeProfiling)) if val, found := cfg.Get(keyAssetDir); found { err = setConfigValue(err, kernel.WebService, kernel.WebAssetDir, val) } if val, found := cfg.Get(keySxNesting); found { err = setConfigValue(err, kernel.WebService, kernel.WebSxMaxNesting, val) } return err == nil } func setConfigValue(err error, subsys kernel.Service, key string, val any) error { if err == nil { |
︙ | |||
293 294 295 296 297 298 299 | 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 | - + + + + | func(srv server.Server, plMgr box.Manager, authMgr auth.Manager, rtConfig config.Config) error { setupRouting(srv, plMgr, authMgr, rtConfig) return nil }, ) if command.Simple { |
︙ | |||
331 332 333 334 335 336 337 338 | 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | + - + - + + + + + + - + + + + | fullVersion := info.revision if info.dirty { fullVersion += "-dirty" } kernel.Main.Setup(progName, fullVersion, info.time) flag.Parse() if *cpuprofile != "" || *memprofile != "" { var err error if *cpuprofile != "" { |
︙ |
Changes to docs/development/20210916194900.zettel.
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | - + + + + | id: 20210916194900 title: Checklist for Release role: zettel syntax: zmk created: 20210916194900 |
︙ |
Changes to docs/manual/00001002000000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + - + | id: 00001002000000 title: Design goals for the Zettelstore role: manual tags: #design #goal #manual #zettelstore syntax: zmk created: 20210126175322 |
︙ | |||
35 36 37 38 39 40 41 | 35 36 37 38 39 40 41 42 43 | - + | ; Simple service : The purpose of Zettelstore is to safely store your zettel and to provide some initial relations between them. : External software can be written to deeply analyze your zettel and the structures they form. ; Security by default : Without any customization, Zettelstore provides its services in a safe and secure manner and does not expose you (or other users) to security risks. : If you know what you are doing, Zettelstore allows you to relax some security-related preferences. However, even in this case, the more secure way is chosen. |
Changes to docs/manual/00001003300000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - + - + | id: 00001003300000 title: Zettelstore installation for the intermediate user role: manual tags: #installation #manual #zettelstore syntax: zmk created: 20211125191727 |
Changes to docs/manual/00001003305000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | - + - + - + | id: 00001003305000 title: Enable Zettelstore to start automatically on Windows role: manual tags: #installation #manual #zettelstore syntax: zmk created: 20211125191727 |
︙ | |||
109 110 111 112 113 114 115 | 109 110 111 112 113 114 115 116 117 118 119 120 | - + | Under some circumstances, Windows asks for permission and you have to enter your password. As the last step, you could run the freshly created task manually. Open your browser, enter the appropriate URL and use your Zettelstore. In case of errors, the task will most likely stop immediately. Make sure that all data you have entered is valid. |
Changes to docs/manual/00001003315000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - + - - + + - + - + | id: 00001003315000 title: Enable Zettelstore to start automatically on Linux role: manual tags: #installation #manual #zettelstore syntax: zmk created: 20220114181521 |
︙ |
Changes to docs/manual/00001004010000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | id: 00001004010000 title: Zettelstore startup configuration role: manual tags: #configuration #manual #zettelstore syntax: zmk created: 20210126175322 |
︙ | |||
41 42 43 44 45 46 47 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | - + - | Note: [[''url-prefix''|#url-prefix]] must be the suffix of ''base-url'', otherwise the web service will not start. Default: ""http://127.0.0.1:23123/"". ; [!box-uri-x|''box-uri-X''], where __X__ is a number greater or equal to one : Specifies a [[box|00001004011200]] where zettel are stored. During startup, __X__ is incremented, starting with one, until no key is found. |
︙ | |||
91 92 93 94 95 96 97 98 99 100 101 102 103 104 | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | + + + + + + + + + + + + | Default: ""info"". Examples: ""error"" will produce just error messages (e.g. no ""info"" messages). ""error;web:debug"" will emit debugging messages for the web component of Zettelstore while still producing error messages for all other components. When you are familiar with operating the Zettelstore, you might set the level to ""error"" to receive fewer noisy messages from it. ; [!loopback-ident|''loopback-ident''], [!loopback-zid|''loopback-zid''] : These keys are effective only if [[authentication is enabled|00001010000000]]. They must specify the user ID and zettel ID of a [[user zettel|00001010040200]]. When these keys are set and an HTTP request originates from the loopback device, no further authentication is required. The loopback device typically uses the IP address ''127.0.0.1'' (IPv4) or ''::1'' (IPv6). This configuration allows client software running on the same computer as the Zettelstore to access it through its API or web user interface. However, this setup is not recommended if the Zettelstore is running on a computer shared with untrusted or unknown users. Default: (empty string)/00000000000000 ; [!max-request-size|''max-request-size''] : It limits the maximum byte size of a web request body to prevent clients from accidentally or maliciously sending a large request and wasting server resources. The minimum value is 1024. Default: 16777216 (16 MiB). ; [!owner|''owner''] : [[Identifier|00001006050000]] of a zettel that contains data about the owner of the Zettelstore. |
︙ | |||
113 114 115 116 117 118 119 | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | - + + + + + + + | Therefore, an authenticated user will be logged off. If ""true"", a persistent cookie is used. Its lifetime exceeds the lifetime of the authentication token by 30 seconds (see option ''token-lifetime-html''). Default: ""false"" ; [!read-only-mode|''read-only-mode''] |
︙ |
Changes to docs/manual/00001004011200.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | - + - + - - - + + + | id: 00001004011200 title: Zettelstore boxes role: manual tags: #configuration #manual #zettelstore syntax: zmk created: 20210126175322 |
Changes to docs/manual/00001004011400.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 | - + - + - - - - - + + + + + - + | id: 00001004011400 title: Configure file directory boxes role: manual tags: #configuration #manual #zettelstore syntax: zmk created: 20210126175322 |
︙ |
Changes to docs/manual/00001004011600.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - + - + - + - - + + - - + | id: 00001004011600 title: Configure memory boxes role: manual tags: #configuration #manual #zettelstore syntax: zmk created: 20220307112918 |
Changes to docs/manual/00001004020000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + - + | id: 00001004020000 title: Configure a running Zettelstore role: manual tags: #configuration #manual #zettelstore syntax: zmk created: 20210126175322 |
︙ | |||
49 50 51 52 53 54 55 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | - + - + - + - + | : Language to be used when displaying content. Default: ""en"". This value is used as a default value, if it is not set in a user's zettel or in a zettel. It is also used to specify the language for all non-zettel content, e.g. lists or search results. |
︙ |
Changes to docs/manual/00001004020200.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | - + - | id: 00001004020200 title: Runtime configuration data that may be user specific or zettel specific role: manual tags: #configuration #manual #zettelstore syntax: zmk created: 20221205155521 |
Changes to docs/manual/00001004050000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - + - + | id: 00001004050000 title: Command line parameters role: manual tags: #command #configuration #manual #zettelstore syntax: zmk created: 20210126175322 |
︙ |
Changes to docs/manual/00001004050400.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | - + - - + + - + - - + + | id: 00001004050400 title: The ''version'' sub-command role: manual tags: #command #configuration #manual #zettelstore syntax: zmk created: 20210126175322 |
Changes to docs/manual/00001004051000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - + - + - - + + - - | id: 00001004051000 title: The ''run'' sub-command role: manual tags: #command #configuration #manual #zettelstore syntax: zmk created: 20210126175322 |
︙ |
Changes to docs/manual/00001004051100.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - + - + - + - - - - + + + | id: 00001004051100 title: The ''run-simple'' sub-command role: manual tags: #command #configuration #manual #zettelstore syntax: zmk created: 20210126175322 |
︙ |
Changes to docs/manual/00001004059900.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - + - + | id: 00001004059900 title: Command line flags for profiling the application role: manual tags: #command #configuration #manual #zettelstore syntax: zmk created: 20211122170506 |
Changes to docs/manual/00001004101000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | id: 00001004101000 title: List of supported commands of the administrator console role: manual tags: #configuration #manual #zettelstore syntax: zmk created: 20210510141304 |
︙ | |||
48 49 50 51 52 53 54 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | - + | ``log-level NAME`` shows log level for the given service or for the kernel. ``log-level NAME VALUE`` sets the log level for the given service or for the kernel. ''VALUE'' is either the name of the log level or its numerical value. ; [!metrics|''metrics''] : Displays some values that reflect the inner workings of Zettelstore. |
︙ |
Changes to docs/manual/00001005000000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | - + - - - - + + + + | id: 00001005000000 title: Structure of Zettelstore role: manual tags: #design #manual #zettelstore syntax: zmk created: 20210126175322 |
︙ | |||
27 28 29 30 31 32 33 | 27 28 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 55 56 57 58 59 60 61 | - + - + | The directory has to be specified at [[startup time|00001004010000]]. Nested directories are not supported (yet). Every file in this directory that should be monitored by Zettelstore must have a file name that begins with 14 digits (0-9), the [[zettel identifier|00001006050000]]. If you create a new zettel via the [[web user interface|00001014000000]] or via the [[API|00001012053200]], the zettel identifier will be the timestamp of the current date and time (format is ''YYYYMMDDhhmmss''). This allows zettel to be sorted naturally by creation time. |
︙ | |||
79 80 81 82 83 84 85 | 79 80 81 82 83 84 85 86 87 88 89 | - - - - + + + + - - - | * [[List of predefined zettel|00001005090000]] === Boxes: alternative ways to store zettel As described above, a zettel may be stored either as a file inside a directory or within the Zettelstore software itself. Zettelstore allows other ways to store zettel by providing an abstraction called __box__.[^Formerly, zettel were stored physically in boxes, often made of wood.] |
Changes to docs/manual/00001005090000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | id: 00001005090000 title: List of predefined zettel role: manual tags: #manual #reference #zettelstore syntax: zmk created: 20210126175322 |
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | - + - + | | [[00000000000009]] | Zettelstore Log | Lists the last 8192 log messages | [[00000000000010]] | Zettelstore Memory | Some statistics about main memory usage | [[00000000000011]] | Zettelstore Sx Engine | Statistics about the [[Sx|https://t73f.de/r/sx]] engine, which interprets symbolic expressions | [[00000000000020]] | Zettelstore Box Manager | Contains some statistics about zettel boxes and the index process | [[00000000000090]] | Zettelstore Supported Metadata Keys | Contains all supported metadata keys, their [[types|00001006030000]], and more | [[00000000000092]] | Zettelstore Supported Parser | Lists all supported values for metadata [[syntax|00001006020000#syntax]] that are recognized by Zettelstore | [[00000000000096]] | Zettelstore Startup Configuration | Contains the effective values of the [[startup configuration|00001004010000]] |
︙ |
Changes to docs/manual/00001006010000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | - + - + | id: 00001006010000 title: Syntax of Metadata role: manual tags: #manual #syntax #zettelstore syntax: zmk created: 20210126175322 |
︙ |
Changes to docs/manual/00001006020000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | id: 00001006020000 title: Supported Metadata Keys role: manual tags: #manual #meta #reference #zettel #zettelstore syntax: zmk created: 20210126175322 |
︙ | |||
48 49 50 51 52 53 54 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | + - + + - + - - - - - - + + + | : A user-entered time stamp that document the point in time when the zettel should expire. When a zettel expires, Zettelstore does nothing. It is up to you to define required actions. ''expire'' is just a documentation. You could define a query and execute it regularly, for example [[query:expire? ORDER expire]]. Alternatively, a Zettelstore client software could define some actions when it detects expired zettel. ; [!folge|''folge''] : Is a property that contains identifiers of all zettel that reference this zettel via the [[''precursor''|#precursor]] value. |
︙ | |||
106 107 108 109 110 111 112 113 114 | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | + + - - - - - - | ; [!role|''role''] : Defines the role of the zettel. Can be used for selecting zettel. See [[supported zettel roles|00001006020100]]. If not given, it is ignored. ; [!sequel|''sequel''] : Is a property that contains identifier of all zettel that reference this zettel through the [[''prequel''|#prequel]] value. A __sequel zettel__ acts as a branching thought of the current zettel. ; [!subordinates|''subordinates''] : Is a property that contains identifier of all zettel that reference this zettel through the [[''superior''|#superior]] value. |
︙ |
Changes to docs/manual/00001006020400.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | id: 00001006020400 title: Supported values for metadata key ''read-only'' role: manual tags: #manual #meta #reference #zettel #zettelstore syntax: zmk created: 20210126175322 |
︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 31 32 33 34 | - + | If the metadata value is the same as an explicit [[user role|00001010070300]], users with that role (or a role with lower rights) are not allowed to modify the zettel. ; ""reader"" : Neither an unauthenticated user nor a user with role ""reader"" is allowed to modify the zettel. Users with role ""writer"" or the owner itself still can modify the zettel. ; ""writer"" |
Changes to docs/manual/00001006030000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - + + + | id: 00001006030000 title: Supported Key Types role: manual tags: #manual #meta #reference #zettel #zettelstore syntax: zmk created: 20210126175322 |
︙ |
Changes to docs/manual/00001006050000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | - + - + - + - + | id: 00001006050000 title: Zettel identifier role: manual tags: #design #manual #zettelstore syntax: zmk created: 20210126175322 |
Changes to docs/manual/00001006055000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - + - - + + - - + + + - + | id: 00001006055000 title: Reserved zettel identifier role: manual tags: #design #manual #zettelstore syntax: zmk created: 20210721105704 |
︙ |
Changes to docs/manual/00001007000000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | - + - + - + | id: 00001007000000 title: Zettelmarkup role: manual tags: #manual #zettelmarkup #zettelstore syntax: zmk created: 20210126175322 |
︙ |
Changes to docs/manual/00001007030000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | - + - + - - - - + + + + - + - + - + - + | id: 00001007030000 title: Zettelmarkup: Block-Structured Elements role: manual tags: #manual #zettelmarkup #zettelstore syntax: zmk created: 20210126175322 |
Changes to docs/manual/00001007031200.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | - + - - + + | id: 00001007031200 title: Zettelmarkup: Inline-Zettel Block role: manual tags: #manual #zettelmarkup #zettelstore syntax: zmk created: 20220201142439 |
︙ | |||
48 49 50 51 52 53 54 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | - - + + | :::example @@@html <h1>H1 Heading</h1> Alea iacta est @@@ ::: :::note |
︙ |
Changes to docs/manual/00001007040310.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | id: 00001007040310 title: Zettelmarkup: Links role: manual tags: #manual #zettelmarkup #zettelstore syntax: zmk created: 20210810155955 |
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | - + | A link specification starting with one slash character (""''/''"", U+002F), or one or two full stop characters (""''.''"", U+002E) followed by a slash character, will be interpreted as a local reference, called __hosted reference__. Such references will be interpreted relative to the web server hosting the Zettelstore. If a link specification begins with two slash characters (called __based reference__), it will be interpreted relative to the value of [[''url-prefix''|00001004010000#url-prefix]]. |
Changes to docs/manual/00001007040322.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + - + | id: 00001007040322 title: Zettelmarkup: Image Embedding role: manual tags: #manual #zettelmarkup #zettelstore syntax: zmk created: 20210811154251 |
︙ |
Changes to docs/manual/00001007050100.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | - + - + | id: 00001007050100 title: Zettelmarkup: Supported Attribute Values for Natural Languages role: manual tags: #manual #reference #zettelmarkup #zettelstore syntax: zmk created: 20210126175322 |
︙ |
Changes to docs/manual/00001007700000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | - + - - + + + - + | id: 00001007700000 title: Query Expression role: manual tags: #manual #search #zettelstore syntax: zmk created: 20220805150154 |
Changes to docs/manual/00001007720000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + + | id: 00001007720000 title: Query Directives role: manual tags: #manual #search #zettelstore syntax: zmk created: 20230707203135 |
Changes to docs/manual/00001007720300.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | - + + + + - + + + + + + - - - + + + + - - - - - - + + + + + | id: 00001007720300 title: Query: Context Directive role: manual tags: #manual #search #zettelstore syntax: zmk created: 20230707204706 |
︙ |
Added docs/manual/00001007720500.zettel.
|
Changes to docs/manual/00001007780000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - + - + + + + + + + + | id: 00001007780000 title: Formal syntax of query expressions role: manual tags: #manual #reference #search #zettelstore syntax: zmk created: 20220810144539 |
︙ |
Changes to docs/manual/00001007790000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + - + - + + | id: 00001007790000 title: Useful query expressions role: manual tags: #example #manual #search #zettelstore syntax: zmk created: 20220810144539 |
Changes to docs/manual/00001010000000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | id: 00001010000000 title: Security role: manual tags: #configuration #manual #security #zettelstore syntax: zmk created: 20210126175322 |
︙ | |||
61 62 63 64 65 66 67 | 61 62 63 64 65 66 67 68 | - + | But you can put a server in front of it, which is able to handle encryption. Most generic web server software allow this. To enforce encryption, [[authenticated sessions|00001010040700]] are marked as secure by default. If you still want to access the Zettelstore remotely without encryption, you must change the startup configuration. Otherwise, authentication will not work. |
Changes to docs/manual/00001010040100.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + + - + | id: 00001010040100 title: Enable authentication role: manual tags: #authentication #configuration #manual #security #zettelstore syntax: zmk created: 20210126175322 |
Changes to docs/manual/00001010070200.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - + - + - - + + | id: 00001010070200 title: Visibility rules for zettel role: manual tags: #authorization #configuration #manual #security #zettelstore syntax: zmk created: 20210126175322 |
︙ |
Changes to docs/manual/00001010090100.zettel.
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + - + - + | id: 00001010090100 |
︙ | |||
34 35 36 37 38 39 40 | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | - + | * [[Caddy|https://caddyserver.com/]]: see below for details. Other software is also possible. There exists software dedicated for this task of handling the encryption part. Some examples: * [[stunnel|https://www.stunnel.org/]] (""a proxy designed to add TLS encryption functionality to existing clients and servers without any changes in the programs' code."") |
︙ | |||
60 61 62 63 64 65 66 | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | - + + + + + + + + + + + + + + | root /var/www/html } route /manual/* { reverse_proxy localhost:23123 } } ``` |
Changes to docs/manual/00001012000000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | - + - + | id: 00001012000000 title: API role: manual tags: #api #manual #zettelstore syntax: zmk created: 20210126175322 |
︙ |
Changes to docs/manual/00001012050200.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - + - + - + | id: 00001012050200 title: API: Authenticate a client role: manual tags: #api #manual #zettelstore syntax: zmk created: 20210126175322 |
︙ |
Changes to docs/manual/00001012050600.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + - + - + | id: 00001012050600 title: API: Provide an access token role: manual tags: #api #manual #zettelstore syntax: zmk created: 20210126175322 |
Changes to docs/manual/00001012051400.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | id: 00001012051400 title: API: Query the list of all zettel role: manual tags: #api #manual #zettelstore syntax: zmk created: 20220912111111 |
︙ | |||
54 55 56 57 58 59 60 | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | - + - + - + | An implicit precondition is that the zettel must contain the given metadata key. For a metadata key like [[''title''|00001006020000#title]], which have a default value, this precondition should always be true. But the situation is different for a key like [[''url''|00001006020000#url]]. Both ``curl 'http://localhost:23123/z?q=url%3A'`` and ``curl 'http://localhost:23123/z?q=url%3A!'`` may result in an empty list. |
︙ | |||
108 109 110 111 112 113 114 | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | - + | __n__ must be a positive integer, ''MIN'' must be given in upper-case letters. ; ''MAXn'' (parameter) : Emit only those values with at most __n__ aggregated values. __n__ must be a positive integer, ''MAX'' must be given in upper-case letters. ; ''KEYS'' (aggregate) : Emit a list of all metadata keys, together with the number of zettel having the key. ; ''REDIRECT'' (aggregate) |
︙ |
Changes to docs/manual/00001012054200.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - + - - + + - + - + | id: 00001012054200 title: API: Update a zettel role: manual tags: #api #manual #zettelstore syntax: zmk created: 20210713150005 |
︙ | |||
33 34 35 36 37 38 39 | 33 34 35 36 37 38 39 40 | - + | ; ''400'' : Request was not valid. For example, the request body was not valid. ; ''403'' : You are not allowed to delete the given zettel. ; ''404'' : Zettel not found. |
Changes to docs/manual/00001012920000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + - + | id: 00001012920000 title: Endpoints used by the API role: manual tags: #api #manual #reference #zettelstore syntax: zmk created: 20210126175322 |
︙ |
Changes to docs/manual/00001012920525.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | id: 00001012920525 title: SHTML Encoding role: manual tags: #api #manual #reference #zettelstore syntax: zmk created: 20230316181044 |
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 | - - + + | A list may contain a possibly empty sequence of elements, i.e. lists and / or atoms. Before the last element of a list of at least two elements, a full stop character (""''.''"", U+002E) signal a pair as the last two elements. This allows a more space economic storage of data. An HTML tag like ``< a href="link">Text</a>`` is encoded in SHTML with a list, where the first element is a symbol named a the tag. The second element is an optional encoding of the tag's attributes. Further elements are either other tag encodings or a string. |
Changes to docs/manual/00001012921000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + - + | id: 00001012921000 title: API: Structure of an access token role: manual tags: #api #manual #reference #zettelstore syntax: zmk created: 20210126175322 |
︙ |
Changes to docs/manual/00001012921200.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | id: 00001012921200 title: API: Encoding of Zettel Access Rights role: manual tags: #api #manual #reference #zettelstore syntax: zmk created: 20220201173115 |
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 43 44 45 46 | - + | # The next right is the right to update a zettel (16 > 10, but 8 < 10). The new value of the rights value is now 2 (10-8). # The last right is the right to create a new zettel. The rights value is now zero, the algorithm ends. In practice, not every rights value will occur. A Zettelstore in [[read-only mode|00001010000000#read-only]] will always return the value 4. |
Changes to docs/manual/00001012930000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | - + - + | id: 00001012930000 title: Symbolic Expression role: manual tags: #manual #reference #zettelstore syntax: zmk created: 20230403145644 |
︙ |
Changes to docs/manual/00001012930500.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | id: 00001012930500 title: Syntax of Symbolic Expressions role: manual tags: #manual #reference #zettelstore syntax: zmk created: 20230403151127 |
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - + | v v v +-------+ +-------+ +-------+ | Elem1 | | Elem2 | | ElemN | +-------+ +-------+ +-------+ ~~~ ''V'' is a placeholder for a value, ''N'' is the reference to the next cell (also known as the rest / tail of the list). |
︙ |
Changes to docs/manual/00001017000000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 55 | - + - - - + + + - - - + + + - - - - + + + + | id: 00001017000000 title: Tips and Tricks role: manual tags: #manual #zettelstore syntax: zmk created: 20220803170112 |
︙ |
Changes to docs/manual/00001018000000.zettel.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - + - + + + + + | id: 00001018000000 title: Troubleshooting role: manual tags: #manual #zettelstore syntax: zmk created: 20211027105921 |
︙ |
Changes to go.mod.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | - + - - - + + + - - - - - - - + + + + + + + - + + + | module zettelstore.de/z |
Changes to go.sum.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + | github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= |
Changes to internal/auth/impl/impl.go.
︙ | |||
55 56 57 58 59 60 61 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - + - + | kernel.CoreGoArch, kernel.CoreVersion, } func calcSecret(extSecret string) []byte { h := fnv.New128() if extSecret != "" { |
︙ |
Changes to internal/auth/policy/box.go.
︙ | |||
17 18 19 20 21 22 23 24 25 26 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | + - | "context" "t73f.de/r/zsc/domain/id" "t73f.de/r/zsc/domain/id/idset" "t73f.de/r/zsc/domain/meta" "zettelstore.de/z/internal/auth" "zettelstore.de/z/internal/auth/user" "zettelstore.de/z/internal/box" "zettelstore.de/z/internal/config" "zettelstore.de/z/internal/query" |
︙ | |||
53 54 55 56 57 58 59 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | - + - + - + - + - + - + | } func (pp *polBox) CanCreateZettel(ctx context.Context) bool { return pp.box.CanCreateZettel(ctx) } func (pp *polBox) CreateZettel(ctx context.Context, zettel zettel.Zettel) (id.Zid, error) { |
︙ | |||
129 130 131 132 133 134 135 | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | - + - + - + | } func (pp *polBox) DeleteZettel(ctx context.Context, zid id.Zid) error { z, err := pp.box.GetZettel(ctx, zid) if err != nil { return err } |
Added internal/auth/user/user.go.
|
Changes to internal/box/box.go.
︙ | |||
237 238 239 240 241 242 243 | 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | - + - - - + | Enrich(ctx context.Context, m *meta.Meta, boxNumber int) } // NoEnrichContext will signal an enricher that nothing has to be done. // This is useful for an Indexer, but also for some box.Box calls, when // just the plain metadata is needed. func NoEnrichContext(ctx context.Context) context.Context { |
︙ |
Changes to internal/box/compbox/compbox.go.
︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | + - + - + | //----------------------------------------------------------------------------- // Package compbox provides zettel that have computed content. package compbox import ( "context" "log/slog" "net/url" "t73f.de/r/zsc/domain/id" "t73f.de/r/zsc/domain/meta" "zettelstore.de/z/internal/box" "zettelstore.de/z/internal/box/manager" "zettelstore.de/z/internal/kernel" |
︙ | |||
66 67 68 69 70 71 72 | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | - + - - + - + - + - + - + | id.ZidParser: {genParserM, genParserC}, id.ZidStartupConfiguration: {genConfigZettelM, genConfigZettelC}, } // Get returns the one program box. func getCompBox(boxNumber int, mf box.Enricher) *compBox { return &compBox{ |
︙ | |||
143 144 145 146 147 148 149 | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | - + - + | func (cb *compBox) DeleteZettel(_ context.Context, zid id.Zid) (err error) { if _, ok := myZettel[zid]; ok { err = box.ErrReadOnly } else { err = box.ErrZettelNotFound{Zid: zid} } |
︙ |
Changes to internal/box/compbox/log.go.
︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 16 17 18 19 20 21 22 23 24 25 26 27 28 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 | + - + + + | import ( "bytes" "context" "t73f.de/r/zsc/domain/id" "t73f.de/r/zsc/domain/meta" "zettelstore.de/z/internal/kernel" "zettelstore.de/z/internal/logging" ) func genLogM(zid id.Zid) *meta.Meta { m := getTitledMeta(zid, "Zettelstore Log") m.Set(meta.KeySyntax, meta.ValueSyntaxText) m.Set(meta.KeyModified, meta.Value(kernel.Main.GetLastLogTime().Local().Format(id.TimestampLayout))) return m } func genLogC(context.Context, *compBox) []byte { const tsFormat = "2006-01-02 15:04:05.999999" entries := kernel.Main.RetrieveLogEntries() var buf bytes.Buffer for _, entry := range entries { ts := entry.TS.Format(tsFormat) buf.WriteString(ts) for j := len(ts); j < len(tsFormat); j++ { buf.WriteByte('0') } buf.WriteByte(' ') |
Changes to internal/box/compbox/sx.go.
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | + + + - + + + + + | func genSxM(zid id.Zid) *meta.Meta { return getTitledMeta(zid, "Zettelstore Sx Engine") } func genSxC(context.Context, *compBox) []byte { var buf bytes.Buffer buf.WriteString("|=Name|=Value>\n") numSymbols := 0 for pkg := range sx.AllPackages() { if size := pkg.Size(); size > 0 { |
Changes to internal/box/constbox/base.sxn.
︙ | |||
8 9 10 11 12 13 14 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 55 56 57 58 59 60 61 62 | - + - - - - + + + + - - - + + + + - - + + - + - + - - - + + + - + - + - + - + - + - - - - + + + + - + | ;;; obligations under this license. ;;; ;;; SPDX-License-Identifier: EUPL-1.2 ;;; SPDX-FileCopyrightText: 2023-present Detlef Stern ;;;---------------------------------------------------------------------------- `(@@@@ |
Changes to internal/box/constbox/constbox.go.
︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | + - + - + - - + - + - + - + - + - + - + | // Package constbox puts zettel inside the executable. package constbox import ( "context" _ "embed" // Allow to embed file content "log/slog" "net/url" "t73f.de/r/zsc/domain/id" "t73f.de/r/zsc/domain/meta" "zettelstore.de/z/internal/box" "zettelstore.de/z/internal/box/manager" "zettelstore.de/z/internal/kernel" |
︙ | |||
153 154 155 156 157 158 159 | 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | - + - + - + - + - + - + - + - + | meta.KeyTitle: "Zettelstore Dependencies", meta.KeyRole: meta.ValueRoleConfiguration, meta.KeySyntax: meta.ValueSyntaxZmk, meta.KeyLang: meta.ValueLangEN, meta.KeyReadOnly: meta.ValueTrue, meta.KeyVisibility: meta.ValueVisibilityPublic, meta.KeyCreated: "20210504135842", |
︙ | |||
253 254 255 256 257 258 259 | 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | - + - - - - - - - - - - - - - + | zettel.NewContent(contentStartCodeSxn)}, id.ZidSxnBase: { constHeader{ meta.KeyTitle: "Zettelstore Sxn Base Code", meta.KeyRole: meta.ValueRoleConfiguration, meta.KeySyntax: meta.ValueSyntaxSxn, meta.KeyCreated: "20230619132800", |
︙ | |||
466 467 468 469 470 471 472 | 454 455 456 457 458 459 460 461 462 463 464 465 466 467 | - - - | //go:embed start.sxn var contentStartCodeSxn []byte //go:embed wuicode.sxn var contentBaseCodeSxn []byte |
︙ |
Changes to internal/box/constbox/delete.sxn.
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | - + - + - - + + - + | ;;; SPDX-FileCopyrightText: 2023-present Detlef Stern ;;;---------------------------------------------------------------------------- `(article (header (h1 "Delete Zettel " ,zid)) (p "Do you really want to delete this zettel?") ,@(if shadowed-box |
Changes to internal/box/constbox/dependencies.zettel.
︙ | |||
126 127 128 129 130 131 132 | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | - + + + | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` |
Changes to internal/box/constbox/form.sxn.
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 55 56 57 58 59 60 61 62 63 | - + - - + + - - + + - - + + - - + + - - + + - + - - + + - - - + + + | ;;; ;;; SPDX-License-Identifier: EUPL-1.2 ;;; SPDX-FileCopyrightText: 2023-present Detlef Stern ;;;---------------------------------------------------------------------------- `(article (header (h1 ,heading)) |
Changes to internal/box/constbox/info.sxn.
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | - - - - - - - + + + + + + + + + + + + - - + + | ;;; SPDX-License-Identifier: EUPL-1.2 ;;; SPDX-FileCopyrightText: 2023-present Detlef Stern ;;;---------------------------------------------------------------------------- `(article (header (h1 "Information for Zettel " ,zid) (p |
︙ |
Changes to internal/box/constbox/listzettel.sxn.
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - - + + - - + + - - + + - - + + - - + + - - + + - + - + - - - - + + + + | ;;; ;;; SPDX-License-Identifier: EUPL-1.2 ;;; SPDX-FileCopyrightText: 2023-present Detlef Stern ;;;---------------------------------------------------------------------------- `(article (header (h1 ,heading)) |
Changes to internal/box/constbox/login.sxn.
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | - - + + - - + + - - + + - + | ;;; ;;; SPDX-License-Identifier: EUPL-1.2 ;;; SPDX-FileCopyrightText: 2023-present Detlef Stern ;;;---------------------------------------------------------------------------- `(article (header (h1 "Login")) |
Deleted internal/box/constbox/prelude.sxn.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Changes to internal/box/constbox/wuicode.sxn.
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | - + + + + - + - + - + - + - + + + + + + + + - - + + - + - - - + + + - - - - - - + + + + - + - - + - + - + - - + - + - - + + - + - + | ;; wui-list-item returns the argument as a HTML list item. (defun wui-item (s) `(li ,s)) ;; wui-info-meta-table-row takes a pair and translates it into a HTML table row ;; with two columns. (defun wui-info-meta-table-row (p) |
Changes to internal/box/constbox/zettel.sxn.
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 | - - + + - - - - + + + + + + - + + - - - - + + + + - + + + + - - - - - + + + + + + + | ;;; SPDX-License-Identifier: EUPL-1.2 ;;; SPDX-FileCopyrightText: 2023-present Detlef Stern ;;;---------------------------------------------------------------------------- `(article (header (h1 ,heading) |
Changes to internal/box/dirbox/dirbox.go.
︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 55 56 57 58 59 60 61 62 | + - + - + - + - + - + | // Package dirbox provides a directory-based zettel box. package dirbox import ( "context" "errors" "log/slog" "net/url" "os" "path/filepath" "sync" "t73f.de/r/zsc/domain/id" "t73f.de/r/zsc/domain/meta" "zettelstore.de/z/internal/box" "zettelstore.de/z/internal/box/manager" "zettelstore.de/z/internal/box/notify" "zettelstore.de/z/internal/kernel" |
︙ | |||
88 89 90 91 92 93 94 | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | - + - + - + | const ( _ notifyTypeSpec = iota dirNotifyAny dirNotifySimple dirNotifyFS ) |
︙ | |||
153 154 155 156 157 158 159 | 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | - + - + - + - + - + - + - + | func (dp *dirBox) Start(context.Context) error { dp.mxCmds.Lock() defer dp.mxCmds.Unlock() dp.fCmds = make([]chan fileCmd, 0, dp.fSrvs) for i := range dp.fSrvs { cc := make(chan fileCmd) |
︙ | |||
242 243 244 245 246 247 248 | 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | - + - + - + - + - + | dp.updateEntryFromMetaContent(&entry, meta, zettel.Content) err = dp.srvSetZettel(ctx, &entry, zettel) if err == nil { err = dp.dirSrv.UpdateDirEntry(&entry) } dp.notifyChanged(meta.Zid, box.OnZettel) |
︙ | |||
310 311 312 313 314 315 316 | 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | - - + + + + + - + | } entry := dp.dirSrv.GetDirEntry(zid) if !entry.IsValid() { // Existing zettel, but new in this box. entry = ¬ify.DirEntry{Zid: zid} } dp.updateEntryFromMetaContent(entry, meta, zettel.Content) |
︙ | |||
348 349 350 351 352 353 354 | 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 | - + - + | if err != nil { return nil } err = dp.srvDeleteZettel(ctx, entry, zid) if err == nil { dp.notifyChanged(zid, box.OnDelete) } |
Changes to internal/box/dirbox/service.go.
︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 55 56 | + + - - + - + - + - + | package dirbox import ( "context" "fmt" "io" "log/slog" "os" "path/filepath" "time" "t73f.de/r/zero/oso" "t73f.de/r/zsc/domain/id" "t73f.de/r/zsc/domain/meta" "t73f.de/r/zsx/input" "zettelstore.de/z/internal/box/filebox" "zettelstore.de/z/internal/box/notify" "zettelstore.de/z/internal/kernel" |
︙ | |||
205 206 207 208 209 210 211 | 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | - + - + + + - + + - + - - + - - - - - + - + + - + - - + - - - - - + - + - + - - - + - - + - - - - + - - - - + - + - | } else { contentPath := filepath.Join(dirPath, contentName) if entry.HasMetaInContent() { err = writeZettelFile(contentPath, m, content) cmd.rc <- err return } |
︙ | |||
360 361 362 363 364 365 366 | 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | - - - - - - - - - - - - + + - - + - - - - - - - + + + + + + + + + - - - - + - - - - - + | entry.Zid, entry.ContentExt, entry.MetaName != "", entry.UselessFiles, ) } |
Changes to internal/box/filebox/filebox.go.
︙ | |||
32 33 34 35 36 37 38 | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | - + - | manager.Register("file", func(u *url.URL, cdata *manager.ConnectData) (box.ManagedBox, error) { path := getFilepathFromURL(u) ext := strings.ToLower(filepath.Ext(path)) if ext != ".zip" { return nil, errors.New("unknown extension '" + ext + "' in box URL: " + u.String()) } return &zipBox{ |
︙ |
Changes to internal/box/filebox/zipbox.go.
︙ | |||
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | + - + - + | package filebox import ( "archive/zip" "context" "fmt" "io" "log/slog" "strings" "t73f.de/r/zsc/domain/id" "t73f.de/r/zsc/domain/meta" "t73f.de/r/zsx/input" "zettelstore.de/z/internal/box" "zettelstore.de/z/internal/box/notify" |
︙ | |||
66 67 68 69 70 71 72 | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | - - - + + + + + - + - + | } func (zb *zipBox) Start(context.Context) error { reader, err := zip.OpenReader(zb.name) if err != nil { return err } |
︙ | |||
130 131 132 133 134 135 136 | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | - + - + - - + - + - + - + | if err != nil { return zettel.Zettel{}, err } } } CleanupMeta(m, zid, entry.ContentExt, inMeta, entry.UselessFiles) |
︙ | |||
222 223 224 225 226 227 228 | 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | + - - + + + + + | } func readZipFileContent(reader *zip.ReadCloser, name string) ([]byte, error) { f, err := reader.Open(name) if err != nil { return nil, err } data, err := io.ReadAll(f) |
Changes to internal/box/manager/box.go.
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | + | "strings" "t73f.de/r/zsc/domain/id" "t73f.de/r/zsc/domain/id/idset" "t73f.de/r/zsc/domain/meta" "zettelstore.de/z/internal/box" "zettelstore.de/z/internal/logging" "zettelstore.de/z/internal/query" "zettelstore.de/z/internal/zettel" ) // Conatains all box.Box related functions // Location returns some information where the box is located. |
︙ | |||
55 56 57 58 59 60 61 | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | - + - + | return box.CanCreateZettel(ctx) } return false } // CreateZettel creates a new zettel. func (mgr *Manager) CreateZettel(ctx context.Context, ztl zettel.Zettel) (id.Zid, error) { |
︙ | |||
97 98 99 100 101 102 103 | 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | - + - + | } } return zettel.Zettel{}, box.ErrZettelNotFound{Zid: zid} } // GetAllZettel retrieves a specific zettel from all managed boxes. func (mgr *Manager) GetAllZettel(ctx context.Context, zid id.Zid) ([]zettel.Zettel, error) { |
︙ | |||
141 142 143 144 145 146 147 | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | - + - + - - + - - + - + - + - + - + - + - + | return nil, err } } return result, nil } func (mgr *Manager) hasZettel(ctx context.Context, zid id.Zid) bool { |
︙ | |||
275 276 277 278 279 280 281 | 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 | - + | } } return false } // DeleteZettel removes the zettel from the box. func (mgr *Manager) DeleteZettel(ctx context.Context, zid id.Zid) error { |
︙ |
Changes to internal/box/manager/collect.go.
︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | + - | //----------------------------------------------------------------------------- package manager import ( "strings" zerostrings "t73f.de/r/zero/strings" "t73f.de/r/zsc/domain/id" "t73f.de/r/zsc/domain/id/idset" "zettelstore.de/z/internal/ast" "zettelstore.de/z/internal/box/manager/store" |
︙ | |||
57 58 59 60 61 62 63 | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - + | case *ast.LiteralNode: data.addText(string(n.Content)) } return data } func (data *collectData) addText(s string) { |
︙ |
Changes to internal/box/manager/indexer.go.
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | - + - - - + + + - - + + - - - - + + - - - - + + - - - - + + - - | // SPDX-FileCopyrightText: 2021-present Detlef Stern //----------------------------------------------------------------------------- package manager import ( "context" |
︙ | |||
100 101 102 103 104 105 106 | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | - + - + - + - + | func (mgr *Manager) idxWorkService(ctx context.Context) { var start time.Time for { switch action, zid, lastReload := mgr.idxAr.Dequeue(); action { case arNothing: return case arReload: |
︙ | |||
201 202 203 204 205 206 207 | 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | - + | idxCollectMetaValue(cData.words, string(val)) } } } } func idxCollectMetaValue(stWords store.WordSet, value string) { |
︙ |
Changes to internal/box/manager/manager.go.
︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | + - + | // Package manager coordinates the various boxes and indexes of a Zettelstore. package manager import ( "context" "io" "log/slog" "net/url" "sync" "time" "t73f.de/r/zero/set" "t73f.de/r/zsc/domain/id" "t73f.de/r/zsc/domain/meta" "zettelstore.de/z/internal/auth" "zettelstore.de/z/internal/box" "zettelstore.de/z/internal/box/manager/mapstore" "zettelstore.de/z/internal/box/manager/store" "zettelstore.de/z/internal/config" "zettelstore.de/z/internal/kernel" |
︙ | |||
80 81 82 83 84 85 86 | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | - + - - - - + + + + | panic(scheme) } registry[scheme] = create } // Manager is a coordinating box. type Manager struct { |
︙ | |||
128 129 130 131 132 133 134 | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | - + - + - - - - + + + + | descrs := meta.GetSortedKeyDescriptions() propertyKeys := set.New[string]() for _, kd := range descrs { if kd.IsProperty() { propertyKeys.Add(kd.Name) } } |
︙ | |||
200 201 202 203 204 205 206 | 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | - + - + - + | for { select { case ci, ok := <-mgr.infos: if ok { now := time.Now() if len(cache) > 1 && tsLastEvent.Add(10*time.Second).Before(now) { // Cache contains entries and is definitely outdated |
︙ | |||
257 258 259 260 261 262 263 | 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | - + | case box.OnReload: mgr.idxAr.Reset() case box.OnZettel: mgr.idxAr.EnqueueZettel(zid) case box.OnDelete: mgr.idxAr.EnqueueZettel(zid) default: |
︙ | |||
321 322 323 324 325 326 327 | 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | - + - + | func (mgr *Manager) waitBoxesAreStarted() { const waitTime = 10 * time.Millisecond const waitLoop = int(1 * time.Second / waitTime) for i := 1; !mgr.allBoxesStarted(); i++ { if i%waitLoop == 0 { if time.Duration(i)*waitTime > time.Minute { |
︙ | |||
358 359 360 361 362 363 364 | 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 | - + - + - + | } } mgr.setState(box.StartStateStopped) } // Refresh internal box data. func (mgr *Manager) Refresh(ctx context.Context) error { |
︙ |
Changes to internal/box/manager/mapstore/mapstore.go.
︙ | |||
579 580 581 582 583 584 585 | 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 | - + - + - + - + - + - + - - + + - + - - + + - + - + - + - + - - + + | ms.mxStats.Unlock() } func (ms *mapStore) Dump(w io.Writer) { ms.mx.RLock() defer ms.mx.RUnlock() |
Changes to internal/box/membox/membox.go.
︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 55 | + - + - + - - + | //----------------------------------------------------------------------------- // Package membox stores zettel volatile in main memory. package membox import ( "context" "log/slog" "net/url" "sync" "t73f.de/r/zsc/domain/id" "zettelstore.de/z/internal/box" "zettelstore.de/z/internal/box/manager" "zettelstore.de/z/internal/kernel" |
︙ | |||
75 76 77 78 79 80 81 | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | - + | } func (mb *memBox) Start(context.Context) error { mb.mx.Lock() mb.zettel = make(map[id.Zid]zettel.Zettel) mb.curBytes = 0 mb.mx.Unlock() |
︙ | |||
114 115 116 117 118 119 120 | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | - + - + - + - + | meta.Zid = zid zettel.Meta = meta mb.zettel[zid] = zettel mb.curBytes = newBytes mb.mx.Unlock() mb.notifyChanged(zid, box.OnZettel) |
︙ | |||
199 200 201 202 203 204 205 | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | - + | } zettel.Meta = m mb.zettel[m.Zid] = zettel mb.curBytes = newBytes mb.mx.Unlock() mb.notifyChanged(m.Zid, box.OnZettel) |
︙ | |||
221 222 223 224 225 226 227 | 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 | - + - + | mb.mx.Unlock() return box.ErrZettelNotFound{Zid: zid} } delete(mb.zettel, zid) mb.curBytes -= oldZettel.ByteSize() mb.mx.Unlock() mb.notifyChanged(zid, box.OnDelete) |
Changes to internal/box/notify/directory.go.
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - + - + | // SPDX-FileCopyrightText: 2020-present Detlef Stern //----------------------------------------------------------------------------- package notify import ( "errors" |
︙ | |||
52 53 54 55 56 57 58 | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | - + - + - + | DsMissing // Directory is missing DsStopping // Service is shut down ) // DirService specifies a directory service for file based zettel. type DirService struct { box box.ManagedBox |
︙ | |||
107 108 109 110 111 112 113 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | - + | ds.state = DsStopping ds.mx.Unlock() ds.notifier.Close() } func (ds *DirService) logMissingEntry(action string) error { err := ErrNoDirectory |
︙ | |||
217 218 219 220 221 222 223 | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | - - + - - + - + - + - + | } } func (ds *DirService) handleEvent(ev Event, newEntries entrySet) (entrySet, bool) { ds.mx.RLock() state := ds.state ds.mx.RUnlock() |
︙ | |||
344 345 346 347 348 349 350 | 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 | - + - + | zid := seekZid(name) if zid == id.Invalid { return id.Invalid } entry := fetchdirEntry(entries, zid) dupName1, dupName2 := ds.updateEntry(entry, name) if dupName1 != "" { |
︙ | |||
412 413 414 415 416 417 418 | 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 | - + | loop: for _, prevName := range uselessFiles { for _, newName := range entry.UselessFiles { if prevName == newName { continue loop } } |
︙ | |||
573 574 575 576 577 578 579 | 571 572 573 574 575 576 577 578 579 580 581 | - + | return newLen < oldLen } return newExt < oldExt } func (ds *DirService) notifyChange(zid id.Zid, reason box.UpdateReason) { if notify := ds.infos; notify != nil { |
Changes to internal/box/notify/fsdir.go.
︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | + + - + - + - + - + - + - - - - - + + + - - - - + + + + - + - + | // SPDX-License-Identifier: EUPL-1.2 // SPDX-FileCopyrightText: 2021-present Detlef Stern //----------------------------------------------------------------------------- package notify import ( "log/slog" "os" "path/filepath" "strings" "github.com/fsnotify/fsnotify" |
︙ | |||
86 87 88 89 90 91 92 | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | - + - + - - + + - + - + - + - + - - + + - + - + - + - - + + - + - + + - + - + - + - + - + - + - + | } func (fsdn *fsdirNotifier) Refresh() { fsdn.refresh <- struct{}{} } func (fsdn *fsdirNotifier) eventLoop() { |
Changes to internal/box/notify/helper.go.
︙ | |||
11 12 13 14 15 16 17 18 19 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | + - + | // SPDX-FileCopyrightText: 2021-present Detlef Stern //----------------------------------------------------------------------------- package notify import ( "archive/zip" "log/slog" "os" |
︙ | |||
53 54 55 56 57 58 59 | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | - + - + - + - + | func newZipPathFetcher(zipPath string) EntryFetcher { return &zipPathFetcher{zipPath} } func (zpf *zipPathFetcher) Fetch() ([]string, error) { reader, err := zip.OpenReader(zpf.zipPath) if err != nil { return nil, err } |
︙ |
Changes to internal/box/notify/simpledir.go.
︙ | |||
10 11 12 13 14 15 16 17 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | + - - - + - + - + - + - + - + - + | // SPDX-License-Identifier: EUPL-1.2 // SPDX-FileCopyrightText: 2021-present Detlef Stern //----------------------------------------------------------------------------- package notify import ( "log/slog" "path/filepath" |
Changes to internal/config/config.go.
︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - | KeyFooterZettel = "footer-zettel" KeyHomeZettel = "home-zettel" KeyListsMenuZettel = "lists-menu-zettel" KeyShowBackLinks = "show-back-links" KeyShowFolgeLinks = "show-folge-links" KeyShowSequelLinks = "show-sequel-links" KeyShowSubordinateLinks = "show-subordinate-links" |
︙ |
Changes to internal/encoder/encoder.go.
︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - + - + - + | "zettelstore.de/z/internal/ast" ) // Encoder is an interface that allows to encode different parts of a zettel. type Encoder interface { // WriteZettel encodes a whole zettel and writes it to the Writer. |
︙ |
Changes to internal/encoder/encoder_blob_test.go.
︙ | |||
41 42 43 44 45 46 47 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | - + | 0x55, 0x00, 0x00, 0x00, 0x0a, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9c, 0x63, 0x62, 0x00, 0x00, 0x00, 0x06, 0x00, 0x03, 0x36, 0x37, 0x7c, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, }, expect: expectMap{ encoderHTML: `<p><img alt="Minimal PNG" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAACklEQVR4nGNiAAAABgADNjd8qAAAAABJRU5ErkJggg=="></p>`, encoderSz: `(BLOCK (BLOB () ((TEXT "Minimal PNG")) "png" "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAACklEQVR4nGNiAAAABgADNjd8qAAAAABJRU5ErkJggg=="))`, |
︙ |
Changes to internal/encoder/encoder_block_test.go.
︙ | |||
65 66 67 68 69 70 71 | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | - + | { descr: "Simple Heading", zmk: `=== Top Job`, expect: expectMap{ encoderHTML: "<h2 id=\"top-job\">Top Job</h2>", encoderMD: "# Top Job", encoderSz: `(BLOCK (HEADING 1 () "top-job" "top-job" (TEXT "Top Job")))`, |
︙ | |||
125 126 127 128 129 130 131 | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | - + | { descr: "Thematic break with attribute", zmk: `---{lang="zmk"}`, expect: expectMap{ encoderHTML: `<hr lang="zmk">`, encoderMD: "---", encoderSz: `(BLOCK (THEMATIC (("lang" . "zmk"))))`, |
︙ | |||
257 258 259 260 261 262 263 | 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | - + - + | { descr: "Simple Verbatim Eval", zmk: "~~~\nHello\nWorld\n~~~", expect: expectMap{ encoderHTML: "<pre><code class=\"zs-eval\">Hello\nWorld</code></pre>", encoderMD: "", encoderSz: `(BLOCK (VERBATIM-EVAL () "Hello\nWorld"))`, |
︙ | |||
332 333 334 335 336 337 338 | 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 | - + - + - + - + | |%--+---+---+ |<c1|c2|:c3| |f1|f2|=f3`, expect: expectMap{ encoderHTML: `<table><thead><tr><th class="right">h1</th><th>h2</th><th class="center">h3</th></tr></thead><tbody><tr><td class="left">c1</td><td>c2</td><td class="center">c3</td></tr><tr><td class="right">f1</td><td>f2</td><td class="center">=f3</td></tr></tbody></table>`, encoderMD: "", encoderSz: `(BLOCK (TABLE ((CELL ((align . "right")) (TEXT "h1")) (CELL () (TEXT "h2")) (CELL ((align . "center")) (TEXT "h3"))) ((CELL ((align . "left")) (TEXT "c1")) (CELL () (TEXT "c2")) (CELL ((align . "center")) (TEXT "c3"))) ((CELL ((align . "right")) (TEXT "f1")) (CELL () (TEXT "f2")) (CELL ((align . "center")) (TEXT "=f3")))))`, |
︙ |
Changes to internal/encoder/encoder_inline_test.go.
︙ | |||
161 162 163 164 165 166 167 | 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | - + | { descr: "Quotes formatting (german)", zmk: `""quotes""{lang=de}`, expect: expectMap{ encoderHTML: `<p><span lang="de">„quotes“</span></p>`, encoderMD: "„quotes“", encoderSz: `(BLOCK (PARA (FORMAT-QUOTE (("lang" . "de")) (TEXT "quotes"))))`, |
︙ | |||
185 186 187 188 189 190 191 | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | - + | { descr: "Empty quotes (unknown)", zmk: `""""{lang=unknown}`, expect: expectMap{ encoderHTML: `<p><span lang="unknown">""</span></p>`, encoderMD: """", encoderSz: `(BLOCK (PARA (FORMAT-QUOTE (("lang" . "unknown")))))`, |
︙ | |||
305 306 307 308 309 310 311 | 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | - + - + | { descr: "Math formatting", zmk: `$$\TeX$$`, expect: expectMap{ encoderHTML: `<p><code class="zs-math">\TeX</code></p>`, encoderMD: "\\TeX", encoderSz: `(BLOCK (PARA (LITERAL-MATH () "\\TeX")))`, |
︙ | |||
397 398 399 400 401 402 403 | 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 | - + - + - + - + | encoderZmk: useZmk, }, }, { descr: "Comment after text and with -->", zmk: `Text%%{-} comment --> end`, expect: expectMap{ |
︙ | |||
472 473 474 475 476 477 478 | 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 | - + - + - + - + - + - + - + - + - + - + - + - + - + - + | { descr: "Dummy Link", zmk: `[[abc]]`, expect: expectMap{ encoderHTML: `<p><a href="abc">abc</a></p>`, encoderMD: "[abc](abc)", encoderSz: `(BLOCK (PARA (LINK () (HOSTED "abc"))))`, |
︙ |
Changes to internal/encoder/encoder_test.go.
︙ | |||
113 114 115 116 117 118 119 | 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | - + | prefix += "\nMode: " + mode(isInline) t.Errorf("%s\n\nExpected: %q\nGot: %q", prefix, exp, got) } } func encode(e encoder.Encoder, bs ast.BlockSlice) (string, error) { var sb strings.Builder |
︙ |
Changes to internal/encoder/htmlenc.go.
︙ | |||
32 33 34 35 36 37 38 | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | - + - + - + - + - + - + | tx SzTransformer th *shtml.Evaluator lang string textEnc TextEncoder } // WriteZettel encodes a full zettel as HTML5. |
︙ | |||
92 93 94 95 96 97 98 | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | - + - + - + - + - - + - + - - - + | ) gen := sxhtml.NewGenerator().SetNewline() return gen.WriteHTML(w, doc) } // WriteMeta encodes meta data as HTML5. |
Changes to internal/encoder/mdenc.go.
︙ | |||
27 28 29 30 31 32 33 | 27 28 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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | - + - + - + - - + - + - - + - + - | // mdEncoder contains all data needed for encoding. type mdEncoder struct { lang string } // WriteZettel writes the encoded zettel to the writer. |
︙ | |||
153 154 155 156 157 158 159 | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | - + - + | return } v.writeSpaces(4) lcm1 := lc - 1 for i := 0; i < lc; i++ { b := vn.Content[i] if b != '\n' && b != '\r' { |
︙ | |||
221 222 223 224 225 226 227 | 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | - + - + - + - + - + | func (v *mdVisitor) writeNestedList(ln *ast.NestedListNode, enum string) { v.listInfo = append(v.listInfo, len(enum)) regIndent := 4*len(v.listInfo) - 4 paraIndent := regIndent + len(enum) for i, item := range ln.Items { if i > 0 { |
︙ | |||
292 293 294 295 296 297 298 | 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 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | - + - + - + - + - + - + - + | v.writeReference(ln.Ref, ln.Inlines) } func (v *mdVisitor) visitEmbedRef(en *ast.EmbedRefNode) { v.pushAttributes(en.Attrs) defer v.popAttributes() |
︙ | |||
363 364 365 366 367 368 369 | 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 | - - - + + + - + - + | } v.b.WriteString(rightQ) } func (v *mdVisitor) visitLiteral(ln *ast.LiteralNode) { switch ln.Kind { case ast.LiteralCode, ast.LiteralInput, ast.LiteralOutput: |
Changes to internal/encoder/shtmlenc.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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - + - + - + + - + - + - + - + + - + - + - + + | type shtmlEncoder struct { tx SzTransformer th *shtml.Evaluator lang string } // WriteZettel writes the encoded zettel to the writer. |
Changes to internal/encoder/szenc.go.
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - + - + + - - + + + - - + + + | // szEncoder contains all data needed for encoding. type szEncoder struct { trans SzTransformer } // WriteZettel writes the encoded zettel to the writer. |
Changes to internal/encoder/textenc.go.
︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | - + - + - + - - + - + - + - - + - - + - + - - + - + - | "zettelstore.de/z/internal/ast" ) // TextEncoder encodes just the text and ignores any formatting. type TextEncoder struct{} // WriteZettel writes metadata and content. |
︙ | |||
100 101 102 103 104 105 106 | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | - + | return nil case *ast.VerbatimNode: v.visitVerbatim(n) return nil case *ast.RegionNode: v.visitBlockSlice(&n.Blocks) if len(n.Inlines) > 0 { |
︙ | |||
122 123 124 125 126 127 128 | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | - + - + - + - + - - + + - - + - + | case *ast.BLOBNode: return nil case *ast.TextNode: v.visitText(n.Text) return nil case *ast.BreakNode: if n.Hard { |
︙ | |||
219 220 221 222 223 224 225 | 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | - + - + | } func (v *textVisitor) visitText(s string) { spaceFound := false for _, ch := range s { if input.IsSpace(ch) { if !spaceFound { |
Changes to internal/encoder/write.go.
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | - - + + - - + - - - - - + - - - + + - + - + - - - - + - - + - + + + + + + + + + + + + + + + - + | import ( "encoding/base64" "io" ) // encWriter is a specialized writer for encoding zettel. type encWriter struct { |
Changes to internal/encoder/zmkenc.go.
︙ | |||
27 28 29 30 31 32 33 | 27 28 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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | - + - + - + - - + - + - - + - + - | "zettelstore.de/z/internal/ast" ) // zmkEncoder contains all data needed for encoding. type zmkEncoder struct{} // WriteZettel writes the encoded zettel to the writer. |
︙ | |||
118 119 120 121 122 123 124 | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | - + - + - + | case *ast.EmbedBLOBNode: v.visitEmbedBLOB(n) case *ast.CiteNode: v.visitCite(n) case *ast.FootnoteNode: v.b.WriteString("[^") ast.Walk(v, &n.Inlines) |
︙ | |||
170 171 172 173 174 175 176 | 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | - - - + + + - + - + - + | if vn.Kind == ast.VerbatimHTML { attrs = syntaxToHTML(attrs) } // TODO: scan cn.Lines to find embedded kind[0]s at beginning v.b.WriteString(kind) v.visitAttributes(attrs) |
︙ | |||
220 221 222 223 224 225 226 | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | - + - - + + - + - + - + | ast.NestedListQuote: '>', } func (v *zmkVisitor) visitNestedList(ln *ast.NestedListNode) { v.prefix = append(v.prefix, mapNestedListKind[ln.Kind]) for i, item := range ln.Items { if i > 0 { |
︙ | |||
275 276 277 278 279 280 281 | 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | - + - + | ast.AlignCenter: ":", ast.AlignRight: ">", } func (v *zmkVisitor) visitTable(tn *ast.TableNode) { if header := tn.Header; len(header) > 0 { v.writeTableHeader(header, tn.Align) |
︙ | |||
301 302 303 304 305 306 307 | 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 | - + - + - + | v.b.WriteString(alignCode[colAlign]) } } } func (v *zmkVisitor) writeTableRow(row ast.TableRow, align []ast.Alignment) { for pos, cell := range row { |
︙ | |||
354 355 356 357 358 359 360 | 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + | v.b.WriteString(tn.Text[last:]) } func (v *zmkVisitor) visitBreak(bn *ast.BreakNode) { if bn.Hard { v.b.WriteString("\\\n") } else { |
︙ |
Changes to internal/evaluator/evaluator.go.
︙ | |||
65 66 67 68 69 70 71 | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | - + | if vn, isVerbatim := bs[0].(*ast.VerbatimNode); isVerbatim && vn.Kind == ast.VerbatimCode { if classAttr, hasClass := vn.Attrs.Get(""); hasClass && classAttr == meta.ValueSyntaxSxn { rd := sxreader.MakeReader(bytes.NewReader(vn.Content)) if objs, err := rd.ReadAll(); err == nil { result := make(ast.BlockSlice, len(objs)) for i, obj := range objs { var buf bytes.Buffer |
︙ |
Changes to internal/kernel/auth.go.
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | + - - + + | // SPDX-FileCopyrightText: 2021-present Detlef Stern //----------------------------------------------------------------------------- package kernel import ( "errors" "log/slog" "sync" "t73f.de/r/zsc/domain/id" "zettelstore.de/z/internal/auth" |
︙ | |||
62 63 64 65 66 67 68 | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | - + + + - + - + - + | } as.next = interfaceMap{ AuthOwner: id.Invalid, AuthReadonly: false, } } |
Changes to internal/kernel/box.go.
︙ | |||
14 15 16 17 18 19 20 21 22 23 24 25 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | + - - + + | package kernel import ( "context" "errors" "fmt" "io" "log/slog" "net/url" "strconv" "sync" "zettelstore.de/z/internal/box" |
︙ | |||
65 66 67 68 69 70 71 | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | - + + + - + - + - + - + | }, } ps.next = interfaceMap{ BoxDefaultDirType: BoxDirTypeNotify, } } |
︙ |
Changes to internal/kernel/cfg.go.
︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | + - - - - + + + + | package kernel import ( "context" "errors" "fmt" "log/slog" "strconv" "strings" "sync" "t73f.de/r/zsc/domain/id" "t73f.de/r/zsc/domain/meta" |
︙ | |||
48 49 50 51 52 53 54 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | - + + | keySiteName = "site-name" keyYAMLHeader = "yaml-header" keyZettelFileSyntax = "zettel-file-syntax" ) var errUnknownVisibility = errors.New("unknown visibility") |
︙ | |||
83 84 85 86 87 88 89 | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | - + - - + - + - + + + - + - + - + + - + - + + + + - + - + + - + - + + + + - + | return config.ZettelmarkupHTML, nil } return config.NoHTML, nil }), true, }, meta.KeyLang: {"Language", parseString, true}, |
︙ | |||
277 278 279 280 281 282 283 | 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | - + | } // GetSiteName returns the current value of the "site-name" key. func (cs *configService) GetSiteName() string { return cs.GetCurConfig(keySiteName).(string) } // GetMaxTransclusions return the maximum number of indirect transclusions. func (cs *configService) GetMaxTransclusions() int { |
︙ |
Changes to internal/kernel/cmd.go.
︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | + + - - + + | //----------------------------------------------------------------------------- package kernel import ( "fmt" "io" "log/slog" "maps" "os" "runtime/metrics" "slices" "strconv" "strings" zerostrings "t73f.de/r/zero/strings" |
︙ | |||
58 59 60 61 62 63 64 | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | - + - - + + - + | sess.println("Unknown command:", cmd, strings.Join(args, " ")) sess.println("-- Enter 'help' go get a list of valid commands.") return true } func (sess *cmdSession) println(args ...string) { if len(args) > 0 { |
︙ | |||
94 95 96 97 98 99 100 | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | - + - + - + - + | func (sess *cmdSession) calcMaxLen(table [][]string) []int { maxLen := make([]int, 0) for _, row := range table { for colno, column := range row { if colno >= len(maxLen) { maxLen = append(maxLen, 0) } |
︙ | |||
286 287 288 289 290 291 292 | 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | - + | srvD, found := getService(sess, args[0]) if !found { return true } key := args[1] newValue := strings.Join(args[2:], " ") if err := srvD.srv.SetConfig(key, newValue); err == nil { |
︙ | |||
362 363 364 365 366 367 368 | 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 | - + - + - - + + - + - - - - - - - - - - + + + + + + - - - + + - - - - - + + + + + + - - + + + - - + + | return true } func cmdLogLevel(sess *cmdSession, _ string, args []string) bool { kern := sess.kern if len(args) == 0 { // Write log levels |
︙ | |||
436 437 438 439 440 441 442 | 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 | - + - + | } else { fileName = args[1] } kern := sess.kern if err := kern.doStartProfiling(profileName, fileName); err != nil { sess.println("Error:", err.Error()) } else { |
︙ | |||
499 500 501 502 503 504 505 | 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 | - - + + + + | func cmdDumpIndex(sess *cmdSession, _ string, _ []string) bool { sess.kern.dumpIndex(sess.w) return true } func cmdRefresh(sess *cmdSession, _ string, _ []string) bool { kern := sess.kern |
︙ |
Changes to internal/kernel/config.go.
︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | + - + - - - - - - + + + + + + - + | //----------------------------------------------------------------------------- package kernel import ( "errors" "fmt" "log/slog" "maps" "slices" "strconv" "strings" "sync" "t73f.de/r/zsc/domain/id" |
︙ | |||
203 204 205 206 207 208 209 | 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | - - - - + + - - - - - - - + + - - - - - - - | func (cfg *srvConfig) SwitchNextToCur() { cfg.mxConfig.Lock() defer cfg.mxConfig.Unlock() cfg.cur = cfg.next.Clone() } |
Changes to internal/kernel/core.go.
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 | + + - - - - + + | // SPDX-FileCopyrightText: 2021-present Detlef Stern //----------------------------------------------------------------------------- package kernel import ( "fmt" "log/slog" "maps" "net" "os" "runtime" "slices" "sync" "time" "t73f.de/r/zero/strings" "t73f.de/r/zsc/domain/id" |
︙ | |||
89 90 91 92 93 94 95 | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | - + + + | CoreVerbose: false, } if hn, err := os.Hostname(); err == nil { cs.next[CoreHostname] = hn } } |
︙ | |||
139 140 141 142 143 144 145 | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | - + | } return append( []string{ fmt.Sprintf("Count: %d", ri.count), fmt.Sprintf("Time: %v", ri.ts), fmt.Sprintf("Reason: %v", ri.info), }, |
Changes to internal/kernel/kernel.go.
︙ | |||
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | + - + + + - + - - - - + + + - + - - - + + + + - + - + - - + + + - - - - - - - + + + + + + + - + + + + - - - + + + | // Package kernel provides the main kernel service. package kernel import ( "errors" "fmt" "io" "log/slog" "net" "net/url" "os" "os/signal" "runtime" "runtime/debug" "runtime/pprof" "strconv" "strings" "sync" "syscall" "time" "t73f.de/r/zsc/domain/id" "zettelstore.de/z/internal/auth" "zettelstore.de/z/internal/box" "zettelstore.de/z/internal/config" |
︙ | |||
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | + + + - + - + + | ) // Constants for web service keys. const ( WebAssetDir = "asset-dir" WebBaseURL = "base-url" WebListenAddress = "listen" WebLoopbackIdent = "loopback-ident" WebLoopbackZid = "loopback-zid" WebPersistentCookie = "persistent" WebProfiling = "profiling" WebMaxRequestSize = "max-request-size" WebSecureCookie = "secure" WebSxMaxNesting = "sx-max-nesting" WebTokenLifetimeAPI = "api-lifetime" WebTokenLifetimeHTML = "html-lifetime" WebURLPrefix = "prefix" ) // KeyDescrValue is a triple of config data. type KeyDescrValue struct{ Key, Descr, Value string } // KeyValue is a pair of key and value. type KeyValue struct{ Key, Value string } |
︙ | |||
244 245 246 247 248 249 250 | 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 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 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | - - + + - - - + + + - + - + - + - + - + - + - + - - - + + + - + - + - + - + - + - - + + + - + + - - - + + + - - - + + + - + - + | webServer server.Server, boxManager box.Manager, authManager auth.Manager, rtConfig config.Config, ) error const ( |
︙ | |||
399 400 401 402 403 404 405 | 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 | - + - + - + | } } return vals } // RetrieveLogEntries returns all buffered log entries. func (kern *Kernel) RetrieveLogEntries() []LogEntry { |
︙ | |||
437 438 439 440 441 442 443 | 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 | - + - - + - + - | return errProfileInWork } if profileName == ProfileCPU { f, err := os.Create(fileName) if err != nil { return err } |
︙ | |||
522 523 524 525 526 527 528 | 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 | - + | if srvD, ok := kern.srvs[srvnum]; ok { return srvD.srv.GetStatistics() } return nil } // GetLogger returns a logger for the given service. |
︙ | |||
608 609 610 611 612 613 614 | 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 | - + - + + + + + + + | } // dumpIndex writes some data about the internal index into a writer. func (kern *Kernel) dumpIndex(w io.Writer) { kern.box.dumpIndex(w) } type service interface { // Initialize the data for the service. |
︙ | |||
669 670 671 672 673 674 675 | 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 | - - + + + + + + + - - - - - - + + + + + + | // --- The kernel as a service ------------------------------------------- type kernelService struct { kernel *Kernel } |
Changes to internal/kernel/log.go.
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | + + - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - + + - - + + + + - + + - + | // SPDX-License-Identifier: EUPL-1.2 // SPDX-FileCopyrightText: 2021-present Detlef Stern //----------------------------------------------------------------------------- package kernel import ( "bytes" "context" |
︙ | |||
106 107 108 109 110 111 112 | 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | - + | b[bp] = byte('0' + i - q*10) i = q } *buf = append(*buf, b[:wid]...) } type logEntry struct { |
︙ | |||
150 151 152 153 154 155 156 | 221 222 223 224 225 226 227 228 229 230 | - + + | return klw.lastLog } func copyE2E(result *LogEntry, origin *logEntry) { result.Level = origin.level result.TS = origin.ts result.Prefix = origin.prefix |
Added internal/kernel/log_test.go.
|
Changes to internal/kernel/server.go.
︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | + + - + - + - + - + - + - + | //----------------------------------------------------------------------------- package kernel import ( "bufio" "net" "zettelstore.de/z/internal/logging" ) func startLineServer(kern *Kernel, listenAddr string) error { ln, err := net.Listen("tcp", listenAddr) if err != nil { |
Changes to internal/kernel/web.go.
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | + + + - + - + + | // SPDX-FileCopyrightText: 2021-present Detlef Stern //----------------------------------------------------------------------------- package kernel import ( "errors" "log/slog" "net" "net/netip" "net/url" "os" "path/filepath" "strconv" "strings" "sync" "time" "t73f.de/r/zsc/domain/id" |
︙ | |||
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | + + + | ap, err := netip.ParseAddrPort(val) if err != nil { return "", err } return ap.String(), nil }, true}, WebLoopbackIdent: {"Loopback user ident", ws.noFrozen(parseString), true}, WebLoopbackZid: {"Loopback user zettel identifier", ws.noFrozen(parseInvalidZid), true}, WebMaxRequestSize: {"Max Request Size", parseInt64, true}, WebPersistentCookie: {"Persistent cookie", parseBool, true}, WebProfiling: {"Runtime profiling", parseBool, true}, WebSecureCookie: {"Secure cookie", parseBool, true}, WebSxMaxNesting: {"Max nesting of Sx calls", parseInt, true}, WebTokenLifetimeAPI: { "Token lifetime API", makeDurationParser(10*time.Minute, 0, 1*time.Hour), true, }, WebTokenLifetimeHTML: { "Token lifetime HTML", |
︙ | |||
103 104 105 106 107 108 109 110 111 112 | 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | + + + - + | true, }, } ws.next = interfaceMap{ WebAssetDir: "", WebBaseURL: "http://127.0.0.1:23123/", WebListenAddress: "127.0.0.1:23123", WebLoopbackIdent: "", WebLoopbackZid: id.Invalid, WebMaxRequestSize: int64(16 * 1024 * 1024), WebPersistentCookie: false, WebProfiling: false, WebSecureCookie: true, |
︙ | |||
131 132 133 134 135 136 137 | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | - + + + + + - - + - + + + - + - + - + - - - - - - + + + + + + - + | } return defDur, nil } } var errWrongBasePrefix = errors.New(WebURLPrefix + " does not match " + WebBaseURL) |
Deleted internal/logger/logger.go.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Deleted internal/logger/logger_test.go.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Deleted internal/logger/message.go.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Added internal/logging/logging.go.