尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Lua gadgets for Nitrogen XML Editor
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
Gadgets are small Lua scripts in Nitrogen's Gadgets menu. Put a .lua
file in the gadgets folder next to nitrogenxml.exe, and it shows up in
the menu. Folders become submenus.
n picks a tab: -1 is the one to the left. Lua 5.4 with its full standard
library.
run can call anything on the machine, even Claude:
These come with Nitrogen, and an update overwrites them. Keep your own
gadgets in a folder of your own.檢視完整 README ↗Gadgets are small Lua scripts in Nitrogen's Gadgets menu. Put a .lua
file in the gadgets folder next to nitrogenxml.exe, and it shows up in
the menu. Folders become submenus.
nitrogen.message("Hello World!")
nitrogen.text([n]) -- the whole text of the active tab
nitrogen.set_text(s) -- replace it (one undo step; does not save)
nitrogen.open_text(s [, name]) -- show s in a new tab (name: untitled.xml)
nitrogen.message(s) -- one dialog
nitrogen.file_name([n]) -- path of the active tab, or nil when unsaved
nitrogen.project() -- the project tree as XML, or nil when none
nitrogen.run(exe, args, stdin) -- returns stdout, stderr, exit code
nitrogen.temp_file(s [, ext]) -- writes s to a temp file (ext: .tmp), returns its path
nitrogen.dir() -- the folder nitrogenxml.exe is in
n picks a tab: -1 is the one to the left. In project(), every <dir>
and <file> has its name, and the root also has the project folder in
path.
Lua 5.4 with its full standard library.
run can call anything on the machine, even Claude:
local out, err, code = nitrogen.run("claude",
{ "-p", "Add an XSD annotation to every element." }, nitrogen.text())
if code == 0 then nitrogen.open_text(out, "answer.xml") end
These come with Nitrogen, and an update overwrites them. Keep your own gadgets in a folder of your own.
| File | What it does |
|---|---|
csv2xml.lua | CSV to XML |
json2xml.lua | JSON, JSON Lines or NDJSON to XML |
md2pdf.lua | Markdown to PDF, with pandoc and typst |
skelrng.lua | RELAX NG skeleton |
skelsch.lua | Schematron skeleton |
skelxml.lua | XML skeleton |
skelxsd.lua | XSD skeleton |
skelxslt1.lua | XSLT 1.0 skeleton |
charcount.lua | Counts characters, bytes and lines |
encrypt.lua | Encrypts the tab, after its first line, with the first line as the passphrase (repeating-key XOR, as hex) |
decrypt.lua | Decrypts it back, with the passphrase on the first line |
diff.lua | Compares the tab to its left with the active tab, as a unified diff |
encoding.lua | Guesses the encoding of the saved file |
lineends.lua | Counts CRLF, LF and CR in the saved file |
projectxml.lua | Opens the project tree as XML |
transform.lua | Applies the XSLT to the XML in the tab to its left, with xsltproc |
validatedtd.lua | DTD validation, with xmllint |
validaterng.lua | RELAX NG validation (.rng, not .rnc), with xmllint |
validatesch.lua | Schematron validation, with xsltproc and the ISO Schematron XSLT files in an sch folder next to nitrogenxml.exe |
validatexsd.lua | XSD validation, with xmllint |
viewsvg.lua | Opens the SVG in the tab with the default viewer |
viewx3d.lua | Opens the X3D in the tab with Castle Model Viewer |
xmlprettify.lua | Indents XML, with xmllint |