Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gkjohnson/generate-cspice-js-wrapper-functions
Script for generating CSpice wrapper functions based on CSpice source comments.
https://github.com/gkjohnson/generate-cspice-js-wrapper-functions
code-generation cspice javascript nodejs spice
Last synced: 29 days ago
JSON representation
Script for generating CSpice wrapper functions based on CSpice source comments.
- Host: GitHub
- URL: https://github.com/gkjohnson/generate-cspice-js-wrapper-functions
- Owner: gkjohnson
- Created: 2020-08-31T01:06:32.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-04T23:48:25.000Z (about 4 years ago)
- Last Synced: 2024-10-18T21:58:26.151Z (3 months ago)
- Topics: code-generation, cspice, javascript, nodejs, spice
- Language: JavaScript
- Homepage:
- Size: 246 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# generate-cspice-js-wrapper-functions
Script for generating CSpice wrapper functions based on CSpice source comments. Scrapes the comments and code in the `cspice/src/cspice` directory to extract function names, arguments, and types in order to generate js functions to wrap Emscripten CSpice.js output.Built as a proof of concept for [Timecraftjs](https://github.com/NASA-AMMOS/timecraftjs).
## How to run
Command line arguments
```sh
node src/index.js
```Example
```sh
node src/index.js ../cspice/src/cspice ./output/
```## TODO
- [x] Generate wrapped js function calls based on scraped data.
- [x] Add comment next to ccall arguments listing parameter names
- [ ] Include comments in code scraping.
- [ ] Generate JSDoc comments for the functions.
- [ ] Add tests, validate signatures.
- [ ] Docs and comment code.
- [ ] Make code for determining input / output arguments from comments more robust.
- [x] Remove the `_c` suffix on the functions.
- [x] Convert arguments map output to just an array.
- [x] Write out list of unconverted functions.