# node-random-questions
**Repository Path**: xavi-C/node-random-questions
## Basic Information
- **Project Name**: node-random-questions
- **Description**: 基于node、excel的随机抽取题目生成试卷
- **Primary Language**: NodeJS
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 1
- **Created**: 2024-04-10
- **Last Updated**: 2024-04-10
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
Welcome to generated test questions 👋
> 根据 excel 随机抽取一套试题,输出word文件,技术栈:node + node-xlsx + officegen + pkg。使用pkg将项目打包生成可执行程序。
### 🏠 [Homepage](https://gitee.com/Yiiven/node-random-questions)
## Install
1. 安装node.js最新版,网址链接:[官网](https://nodejs.org/zh-cn/)
2. 在当前目录下,打开命令行执行, `npm i`
## 运行
方法一:
1. 在当前目录下,打开命令行执行, `npm run dev`
方法二:
1. 双击执行 `start.bat`
方法三:
1. 在当前目录下,打开命令行执行, `npm run build` 生成 `随机生成试卷.exe`
2. 双击执行 `随机生成试卷.exe`
## 配置文件
配置文件为 'config.json'
- showSource: 是否列出题目来源,true/false
- ratio: 题库中 专业题数目 / 通用题数目。
例子:
为0.4 则 专业题占40%, 通用题占60%。
为0 则 全部为通用题。
为1 则 全部为专业题。
- singleChoice: 单选题个数
- multipleChoice: 不定项选择题个数
- booleanQuestion: 判断题个数
## Author
👤 **hecun**
* Website: https://www.yiiven.cn
* Gitee: [@yiiven](https://gitee.com/yiven)
* Github: [@yiiven](https://github.com/yiiven)
## 🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://gitee.com/Yiiven/node-random-questions/issues).
## Show your support
Give a ⭐️ if this project helped you!
## 📝 License
Copyright © 2021 [yiiven](https://gitee.com/Yiiven/node-random-questions).
This project is [yiiven](https://gitee.com/Yiiven/node-random-questions/blob/master/LICENSE) licensed.