feat: add merge_all_wren utility, strutil demo, and 7 new API manual pages
Add WrenFileReader class in apps/merge_all_wren.wren for recursive .wren file discovery and content printing. Introduce example/strutil_demo.wren demonstrating case conversion, hex encoding, SHA256 hashing, string repetition, padding, HTML/JSON escaping, and URL encoding/decoding. Create manual/api pages for argparse, dataset, html, markdown, uuid, wdantic, and web modules. Update manual/api/index.html sidebar and module count from 21 to 28, adding links and cards for the new modules.
This commit is contained in:
Vendored
+31
@@ -0,0 +1,31 @@
|
||||
import "io" for File, Directory
|
||||
|
||||
class WrenFileReader {
|
||||
static listWrenFiles(dir) {
|
||||
var files = []
|
||||
var entries = Directory.list(dir)
|
||||
for (entry in entries) {
|
||||
var fullPath = "%(dir)/%(entry)"
|
||||
if (Directory.exists(fullPath)) {
|
||||
files.addAll(listWrenFiles(fullPath))
|
||||
} else if (entry.endsWith(".wren")) {
|
||||
files.add(fullPath)
|
||||
}
|
||||
}
|
||||
return files
|
||||
}
|
||||
|
||||
static readFiles(files) {
|
||||
for (file in files) {
|
||||
System.print("--- %(file) ---")
|
||||
System.print(File.read(file))
|
||||
}
|
||||
}
|
||||
|
||||
static main() {
|
||||
var wrenFiles = listWrenFiles(".")
|
||||
readFiles(wrenFiles)
|
||||
}
|
||||
}
|
||||
|
||||
WrenFileReader.main()
|
||||
Reference in New Issue
Block a user