2

Mac 下 终端也能生成二维码了

 1 year ago
source link: https://droidyue.com/blog/2022/05/30/generate-qrcode-in-terminal-on-mac-or-linux/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Mac 下 终端也能生成二维码了

May 30th, 2022

有些时候,我们需要将链接或者文本转换成 二维码,通常这时候我们会使用网上的在线服务进行处理,其实我们还可以做到更加简单,使用终端即可生成二维码。

这里,我们需要借助 Mac 下 homebrew 的一个库来实现,这个库的名字叫做 qrencode。下面就是关于 这个库的安装,封装,以及使用。

brew install qrencode
qrencode  -t ANSIUTF8 https://droidyue.com

执行上面的语句,就能马上看到一个二维码在终端生成了。

保存成脚本(qrCodeGenerate.sh)

#!/bin/bash
qrencode  -t ANSIUTF8 $1
qrCodeGenerate.sh https://droidyue.com

保存成脚本,让我们后续使用起来更加的简单与快捷。

qrencode 文档

droidyue_gzh_green_png.png

低价正版软件,限时优惠,Office 365,Typora等海量优惠

Posted by androidyue May 30th, 2022Bash, Linux, Mac, Shell, Terminal

« Flutter/Dart release 模式下屏蔽 debugPrint 与 print 输出 给「荔」一夏 618 正版软件大促,秒杀 + 折扣 + 满减一起来袭! »


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK