Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A document generate #3054

Open
CppCXY opened this issue Jan 25, 2025 · 11 comments
Open

A document generate #3054

CppCXY opened this issue Jan 25, 2025 · 11 comments

Comments

@CppCXY
Copy link
Collaborator

CppCXY commented Jan 25, 2025

see: https://github.com/CppCXY/emmylua-analyzer-rust/actions/runs/12963074050

I wrote a simple documentation generation tool, see the link above, feel free to give it a try.
I haven't released it yet because I need to go home from work. I will complete the related work later.

@CppCXY
Copy link
Collaborator Author

CppCXY commented Jan 25, 2025

after generate, you can use mkdocs-material, you will get:

Image

Image

@rhys-vdw
Copy link

rhys-vdw commented Feb 2, 2025

Oh, I would love this tool!

I just tried this on https://github.com/beyond-all-reason/recoil-lua-library and got no output

C:\Users\rhysv\Downloads\emmylua_doc_cli-win32-x64>git clone https://github.com/beyond-all-reason/recoil-lua-library.git

Cloning into 'recoil-lua-library'...
remote: Enumerating objects: 302, done.
remote: Counting objects: 100% (302/302), done.
remote: Compressing objects: 100% (136/136), done.
remote: Total 302 (delta 239), reused 223 (delta 165), pack-reused 0 (from 0)
Receiving objects: 100% (302/302), 101.12 KiB | 3.06 MiB/s, done.
Resolving deltas: 100% (239/239), done.

C:\Users\rhysv\Downloads\emmylua_doc_cli-win32-x64>emmylua_doc_cli.exe --input recoil-lua-library/library --output out2
collect_files from: ["recoil-lua-library/library"] match_pattern: ["**/*.lua"] exclude: []
load files from workspace count: 57
loaded file: "recoil-lua-library/library\\generated\\LuaArchive.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaAtlasTextures.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaBitOps.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaConstCMD.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaConstCMDTYPE.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaConstCOB.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaConstEngine.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaConstGame.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaConstGL.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaConstPlatform.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaFBOs.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaFeatureDefs.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaFonts.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaGaia.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaHandle.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaHandleSynced.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaInputReceiver.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaInterCall.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaIntro.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaIO.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaMaterial.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaMathExtra.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaMemPool.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaMenu.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaMetalMap.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaObjectRendering.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaOpenGL.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaOpenGLUtils.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaParser.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaPathFinder.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaRBOs.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaRules.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaRulesParams.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaScream.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaShaders.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaSyncedCtrl.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaSyncedMoveCtrl.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaSyncedRead.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaSyncedTable.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaTableExtra.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaTextures.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaTracyExtra.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaUI.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaUICommand.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaUnitDefs.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaUnsyncedCtrl.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaUnsyncedRead.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaUtils.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaVAO.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaVAOImpl.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaVBO.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaVBOImpl.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaVFS.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaVFSDownload.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaWeaponDefs.lua"
loaded file: "recoil-lua-library/library\\generated\\LuaZip.lua"
loaded file: "recoil-lua-library/library\\Types.lua"
Creating types directory: "out2\\docs\\types"
Creating modules directory: "out2\\docs\\modules"

See output.zip

I also tried with the latest crate from master with the same results:

cargo install --git https://github.com/CppCXY/emmylua-analyzer-rust.git emmylua_doc_cli

@CppCXY
Copy link
Collaborator Author

CppCXY commented Feb 2, 2025

please try absolutely path

@rhys-vdw
Copy link

rhys-vdw commented Feb 2, 2025

please try absolutely path

I'm getting the exact same behaviour with absolute path:

C:\Users\rhysv\Downloads\emmylua_doc_cli-win32-x64\recoil-lua-library\library>emmylua_doc_cli --input C:\Users\rhysv\Downloads\emmylua_doc_cli-win32-x64\recoil-lua-library\library --output out5
collect_files from: ["C:\\Users\\rhysv\\Downloads\\emmylua_doc_cli-win32-x64\\recoil-lua-library\\library"] match_pattern: ["**/*.lua"] exclude: []
load files from workspace count: 57
loaded file: "C:\\Users\\rhysv\\Downloads\\emmylua_doc_cli-win32-x64\\recoil-lua-library\\library\\generated\\LuaArchive.lua"
loaded file: "C:\\Users\\rhysv\\Downloads\\emmylua_doc_cli-win32-x64\\recoil-lua-library\\library\\generated\\LuaAtlasTextures.lua"
loaded file: "C:\\Users\\rhysv\\Downloads\\emmylua_doc_cli-win32-x64\\recoil-lua-library\\library\\generated\\LuaBitOps.lua"
loaded file: "C:\\Users\\rhysv\\Downloads\\emmylua_doc_cli-win32-x64\\recoil-lua-library\\library\\generated\\LuaConstCMD.lua"
...

The only difference is that the "loaded file" logs include the full path.

@CppCXY
Copy link
Collaborator Author

CppCXY commented Feb 2, 2025

please report to the project repo,I'll take a look when I have time.

@CppCXY
Copy link
Collaborator Author

CppCXY commented Feb 2, 2025

It work well, on my local machine

Image

Image

@CppCXY
Copy link
Collaborator Author

CppCXY commented Feb 2, 2025

the web
Image

@CppCXY
Copy link
Collaborator Author

CppCXY commented Feb 2, 2025

I see, you didn’t place the resources alongside the CLI tool, and they contain basic type definitions and template files.

@rhys-vdw
Copy link

rhys-vdw commented Feb 2, 2025

I see, you didn’t place the resources alongside the CLI tool, and they contain basic type definitions and template files.

I don't understand. Can you explain what I need to do to get it to work? Which resources?

@CppCXY
Copy link
Collaborator Author

CppCXY commented Feb 2, 2025

I see, you didn’t place the resources alongside the CLI tool, and they contain basic type definitions and template files.

I don't understand. Can you explain what I need to do to get it to work? Which resources?

in my project's resources dir

@rhys-vdw
Copy link

rhys-vdw commented Feb 3, 2025

Thanks, I opened the above issue in your repo. I will try to integrate these docs into our website soon. ❤

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants