Skip to content

Latest commit

 

History

118 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nong.Cli.Net

Pure .NET CLI toolkit for scientific document generation, inspection, charts, OCR, semantic search, and package slicing.
Zero JavaScript. Modular architecture: one light router (17MB) plus 6 external dotnet tools. 179 commands.

NuGet License .NET 8.0 179 commands Chinese


Quick Install

dotnet tool install --global Angri450.Nong.Cli
nong commands --json

The main nong package is a light router (17MB with ONNX Runtime native) plus pure .NET built-in modules. Heavy groups are split into independent dotnet tools and are routed by the same user commands: nong chart ..., nong diagram ..., nong pdf ..., nong pptx ..., nong ocr ..., and imaging paths under nong word images. No Node.js, Docker, Python, Graphviz, or Mermaid runtime is required for core local features.

For local OCR, install the default PP-OCRv6 ONNX model once:

nong ocr install-model pp-ocrv6-medium --json

PP-OCRv6 ONNX models (det+rec) are downloaded from ModelScope and run through ONNX Runtime. No PaddleInference, no native runtime packages needed. Microsoft.ML.OnnxRuntime is shared between embedding search and OCR — a single inference engine.

For semantic search, ensure an embedding model is in .nong/models/jina-v5-nano/:

git clone --depth 1 https://modelscope.cn/onnx-community/jina-embeddings-v5-omni-nano-ONNX.git .nong/models/jina-v5-nano
mv .nong/models/jina-v5-nano/onnx/text_model_q4f16.onnx .nong/models/jina-v5-nano/model.onnx
mv .nong/models/jina-v5-nano/onnx/text_model_q4f16.onnx_data .nong/models/jina-v5-nano/
nong search "your query"

The CLI targets net8.0 and the packaged tool opts into major-version roll-forward, so current .NET 9/10 runtimes can run it.


Architecture (v12.1.0, 332 commands, 24 csproj, 22 projects)

Project Dependency Map

                    ┌─────────────┐
                    │ NongCli     │ (main CLI, 332 commands)
                    └──┬──────────┘
         ┌─────────────┼─────────────┬──────────┐
    ┌────▼───┐   ┌────▼───┐   ┌─────▼────┐     │
    │ Docx   │   │ Excel  │   │ Inspect  │  ...│
    │ Pptx   │   │ Pdf    │   │ Genre    │     │
    │ Chart  │   │Diagram │   │ Bioicons │     │
    │ Imaging│   │ OCR    │   │Lit/Aminer│     │
    └──┬──┬──┘   └──┬──┬──┘   └────┬─────┘     │
       │  │         │  │           │           │
    ┌──▼──▼──┐  ┌──▼──▼──┐   ┌───▼────┐      │
    │ThirdParty│ │Pandoc  │   │  Data  │      │
    │(shared) │ │(AST)   │   │(nong.db)│     │
    └─────────┘ └────────┘   └────────┘      │
                                             │
    ┌────────────────────────────────────────▼──┐
    │  外圈 dotnet tools (独立进程,首次用自动装)  │
    │  chart · diagram · pdf · pptx · ocr · imaging│
    └─────────────────────────────────────────────┘

Command Group → Toolkit.Net Skill

CLI GroupCommandsSkillNotes
word (+ add)125wordDocument engine: create, dissect, format, fill, convert, to-pdf
aminer44aminerAMiner scholar/paper/patent/org API
excel28excelXLSX create, chart, formula evaluate, pivot
inspect (+ genre)28inspectPaper diagnosis & template discovery
lit21literatureLiterature search, cache, export
pdf14pdfPDF dissect, create, form-fields, compress
chart12chartANOVA, Duncan MRT, bar/line/pie/scatter
ocr12ocrLocal ONNX OCR, cloud PaddleOCR, analyze-image
pptx9pptxPPTX create, edit-slide, remove-slide
skill8skill-graderSkill validate, scan, inventory, package
slice8sliceNongPandoc package inspect
nongcli (+ search)7nongcliWorkspace init, embedding model, semantic search
metaso5metasoMetaso AI search, reader, chat
diagram4diagramFlowchart, network, tree
icons3iconsBioicons scientific icon search
export2exportEPUB, LaTeX, HTML, ODF export
markdown2markdownGFM ↔ NongMark bidirectional
Infrastructure (no Skill)
commands1—Command manifest export
manifest-generate1—Manifest source generator

Key metrics

MetricValue
All first-party + tool <Version>12.1.0 (24 csproj unified)
Tests216/216 PASS, 0 skip, 0 fail
NuGet packages18 published to nuget.org
Toolkit.Net skills17 skills (plugin v2.0)

nong ocr local scan.png --ingest --json

Literature DSL retrieval

nong lit parse --query "SU=('腐植酸'+'腐殖酸')*('稀土'+'微肥')" --json
nong lit plan --query "SU=('腐植酸'+'腐殖酸')*('稀土'+'微肥')" --sources openalex,crossref,unpaywall --json
nong lit search --query "SU=('采前'+'采前处理')*('保鲜'+'贮藏')*('果实'+'果品')" --ingest -o refs.json --json

JSON Output Schema

{
  "status": "ok" | "error",
  "command": "word read",
  "summary": "...",
  "data": {},
  "issues": [],
  "artifacts": { "docx": "out.docx" },
  "metrics": {},
  "errors": [],
  "meta": { "durationMs": 42, "version": "12.1.0" }
}

Error codes E001 through E009 cover file-not-found, unsupported format, missing argument, internal error, dependency missing, validation failed, read failed, write failed, and not implemented.


Requirements

  • .NET SDK 8.0 or later for development; installed tools can roll forward to current major runtimes.
  • Windows is the validated native-rendering path for current Chart, Diagram, and Imaging tool packages.
  • ONNX Runtime native DLL is bundled per-platform (17MB nupkg). No separate runtime install needed.
  • No JavaScript, npm, Python, pip, Graphviz, or Mermaid runtime is required for core local workflows.

Developer Workflows

做什么命令
同步全仓版本号./sync-version.sh 12.2.0 — 24 csproj + CliVersion + UserAgent + README
架构全景图nong-packages.html — 包依赖树、vendor 目录、运行时共享架构
同步 skills 到 Toolkit.Netcp -r skills/* ../Nong.Toolkit.Net/(不含 sync-version.sh)
清理编译产物find . -name bin -o -name obj | xargs rm -rf
打包推送 NuGetdotnet pack 各项目 → dotnet nuget push

License

Apache-2.0. See LICENSE for details.


Chinese Documentation

See README.zh-CN.md.

About

Pure .NET scientific document toolkit — Excel, charts, diagrams, Word, PowerPoint, and OCR. Zero JavaScript. One merged foundation DLL

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages