# orangejuice-cli

> 描述：使用命令行工具将字符串（链接）转化成二维码

Latest version **1.0.0** (published 2022-01-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install orangejuice-cli
pnpm add orangejuice-cli
yarn add orangejuice-cli
bun add orangejuice-cli
```

Provides the command `orangejuice-cli`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-01-07 |
| First published | 2022-01-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | orange245 |

## Links

- npm: https://www.npmjs.com/package/orangejuice-cli
- npm.io page: https://npm.io/package/orangejuice-cli

## Dependencies (4)

- [cac](https://npm.io/package/cac.md) ^6.7.12
- [qrcode](https://npm.io/package/qrcode.md) ^1.5.0
- [commander](https://npm.io/package/commander.md) ^8.3.0
- [base64-min](https://npm.io/package/base64-min.md) ^2.0.0

## Recent versions

- 1.0.0 (latest) — 2022-01-07

## README

## 二维码生成工具
描述：使用命令行工具将字符串（链接）转化成二维码

### 使用方法
qr-cli --help  查看指令/命令

qr-cli generate 参数（字符串） // 生成二维码 可选保存二维码


### 目录结构
--qr-cli
    --bin
        --cli.js
    --node_modules
    --src
        --main.js
        --...
    --package.json
    --README.md

### 需求分析
##### 1.创建工具
过程看文章 ： "  "
##### 2.添加命令
- 使用cac -- 添加依赖  npm i cac
- 引用cac -- const cli = require('cac')()
- 添加命令 -- cli.command('generate') 
##### 3.获取参数
- cli.action()=>{require(path.resolve(__dirname, "generate"))(...process.argv.slice(3))}
- process.argv -- 获取参数
##### 4.生成二维码和显示
- 引用QECode -- npm i qrcode
- 显示 -- QRCode.toString()
##### 5.保存二维码
- 引用base64-min -- npm i base64-min
- 生成base64编码 -- QRCode.toDataURL()
- 保存 -- base64.decodeToFile()


### 设计思路
不太会写

---
_Source: https://npm.io/package/orangejuice-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
