@kspcommunity/craft-file-reader
v1.0.7
Published
[![GitHub stars](https://img.shields.io/github/stars/kspcommunity/Craft-File-Reader?style=social)](https://github.com/kspcommunity/Craft-File-Reader/stargazers) [![GitHub forks](https://img.shields.io/github/forks/kspcommunity/Craft-File-Reader?style=soc
Downloads
18
Readme
Craft File Reader
Welcome to Craft File Reader! This repository is part of the KSP Community organization on GitHub.
Overview
Craft File Reader is a tool for reading craft files used in the game Kerbal Space Program (KSP). It allows you to interact with craft files and extract useful information from them.
Installation
You can install Craft File Reader via npm:
npm install @kspcommunity/craft-file-reader
Usage
The processCraftFile
function provided by Craft File Reader allows you to analyze Craft files. Here's how you can use it:
Import the function into your Node.js script:
const processCraftFile = require('@kspcommunity/craft-file-reader');
Call the function with the path to the Craft file as an argument:
const craftFilePath = '/path/to/your/craft_file.craft'; const result = await processCraftFile(craftFilePath);
The
processCraftFile
function returns a Promise, so it's recommended to useawait
or.then()
to handle the result.Handle the result:
If successful, the function returns an object containing details about the craft and its parts. If any error occurs during the process, it returns
null
.if (result) { console.log('Craft Details:', result.craftDetails); console.log('Parts Details:', result.partsDetails); } else { console.error('Error processing the craft file.'); }
Interact with Mod Parts Data
Craft File Reader can be used to interact with the data provided by Mod Parts Lister. Use both tools together for enhanced functionality.
Acknowledgements
We would like to express our gratitude to Curseforge and Spacedock for their invaluable resources and support, without which this project would not have been possible.
Disclaimer
KSP Community is an independent entity and is not affiliated with Curseforge, Spacedock, or Intercept Games.
Additional Information
For more information about KSP Community, please visit our main website. Our Privacy Policy and Terms of Service are available on our website.
If you need further assistance or have any questions, feel free to reach out to us at [email protected].
Join our Discord server: https://discord.gg/YCZ5YhQQ8A