Commit Graph

9 Commits

Author SHA1 Message Date
Viktor Söderqvist
72f2a8743c
Minor fix in module API doc script (#494)
The script extracts the comments and prototypes from module.c and does
some pre-processing, e.g. converts URLs to markdown links. The URL
regexp didn't account for '#', '?' (and a few more chars) so an URL like
`https://example.com/#section` was converted to markdown as

    [https://example.com/](https://example.com/)#section

With this change, it's instead correctly converted to

    [https://example.com/#section](https://example.com/#section)

Additional change: Removes an unused metadata field.

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
2024-05-14 01:12:30 +02:00
Viktor Söderqvist
472c1ca26b
Update links in module API docs (generated from module.c) (#433)
These are used in the docs and on the website.

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
2024-05-04 00:14:56 +02:00
Viktor Söderqvist
6e05d0fcb1
Update script to generate Valkey Module API docs (#406)
The output of this script becomes the contents of
`topics/module-api-ref.md` in the `valkey-doc` repo. (Updating it is a
manual process.)

The script uses git tags to find the version that first added an API
function. To preserve the history from old Redis OSS versions, for which
we don't keep git tags, a mapping is stored in a file.

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
2024-04-30 18:24:18 +02:00
Viktor Söderqvist
02acb8fd3a
Module API docs corrections (#10890)
* Fix typo `RedisModule_CreatString` -> `RedisModule_CreateString` (multiple occurrences)
* Make the markdown gen script change all `RM_` to `RedisModule_` even in code examples, etc.
2022-06-21 17:00:24 +03:00
Steve Lorello
9e40b076dd
Module api doc generator, fixing issue with negative lookback terminating at "." (#10832)
There is a little regex that wraps up all the free-floating functions in the doc-block
e.g. malloc() with backticks.
in case of `redis.call()`, it used to wrap just `call()` in backticks.
2022-06-08 15:30:04 +03:00
Viktor Söderqvist
ced710fc83
Module API doc script: Mark unreleased API functions (#10674)
* Module API doc script: Mark unreleased API functions

* fix broken quotes in generate-module-api-doc.rb

Co-authored-by: Oran Agra <oran@redislabs.com>
2022-05-03 10:34:18 +03:00
Itamar Haber
6c65345edb
Injects Hugo FrontMatter to module-api.md (#10658) 2022-04-28 08:16:20 +03:00
Oran Agra
c42b163332
fix file permissions for scripts in utils folder (#10241)
make sure the scripts are executable
2022-02-05 18:40:09 +02:00
Viktor Söderqvist
f4ecc799c8
Add 'Available since' to module API function docs (#10229)
The script which generates the markdown docs from module.c is updated to include
the version in which each module API function was introduced.

The script uses git tags to find this information. If git is not available or if we're not in
a git repo, the 'since' is silently skipped.

The line `**Available since:** (version)` is added after the function prototype

Rename to utils/generate-module-api-doc.rb
2022-02-03 10:25:37 +02:00