<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>QR Code on kenji.blog</title><link>http://kenji.blog/en/tags/qr-code/</link><description>Recent content in QR Code on kenji.blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>kenjinote</copyright><lastBuildDate>Tue, 16 Apr 2024 00:42:27 +0900</lastBuildDate><atom:link href="http://kenji.blog/en/tags/qr-code/index.xml" rel="self" type="application/rss+xml"/><item><title>Generate QR code with curl</title><link>http://kenji.blog/en/p/curl%E3%81%A7qr%E3%82%B3%E3%83%BC%E3%83%89%E7%94%9F%E6%88%90/</link><pubDate>Tue, 16 Apr 2024 00:42:27 +0900</pubDate><guid>http://kenji.blog/en/p/curl%E3%81%A7qr%E3%82%B3%E3%83%BC%E3%83%89%E7%94%9F%E6%88%90/</guid><description>&lt;img src="http://kenji.blog/p/curl%E3%81%A7qr%E3%82%B3%E3%83%BC%E3%83%89%E7%94%9F%E6%88%90/img.png" alt="Featured image of post Generate QR code with curl" />&lt;h2 id="generate-qr-code-with-curl">Generate QR code with curl
&lt;/h2>&lt;p>Note: The method introduced below generates the QR code on the server side and returns it, so logs might be kept. Please be careful when converting confidential information such as personal information into a QR code.&lt;/p>
&lt;h3 id="method-1">Method 1
&lt;/h3>&lt;p>This is a method to generate a QR code in the command prompt.
&lt;code>qrenco.de&lt;/code> returns a text-based response.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">curl qrenco.de/kenji.blog
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;ul>
&lt;li>Output result&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;span class="lnt">13
&lt;/span>&lt;span class="lnt">14
&lt;/span>&lt;span class="lnt">15
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">█████████████████████████████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">█████████████████████████████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████ ▄▄▄▄▄ █ ▄ ▄ █ ▄▄▄▄▄ ████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████ █ █ █ ▀▀▀██ █ █ ████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████ █▄▄▄█ █▀▀█▀▄█ █▄▄▄█ ████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████▄▄▄▄▄▄▄█▄▀ ▀ █▄▄▄▄▄▄▄████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████▄ █▀▄ ▄▀█▄▀ ▀██▄▀ ▄████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████▀▀▀█ ▄▄ ▄█▄█▀█▀▄██ ▀████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████▄▄▄██▄▄█ █▀█ ▄██▀▀█ █████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████ ▄▄▄▄▄ █▀█ ▀ ▄▀▄▄▄ ▀████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████ █ █ █▄▄ ▄▀▄▀▄ ██ ▀████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████ █▄▄▄█ █▀▀█ ▀▄▄▄ ▄▄██████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">████▄▄▄▄▄▄▄█▄▄███▄▄█▄███▄████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">█████████████████████████████
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">█████████████████████████████
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;h4 id="reference">Reference
&lt;/h4>&lt;ul>
&lt;li>&lt;a class="link" href="https://qrenco.de/" target="_blank" rel="noopener"
>qrenco.de&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="method-2">Method 2
&lt;/h3>&lt;p>&lt;code>api.qrserver.com&lt;/code> returns an image.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">curl -o qr.png &amp;#34;https://api.qrserver.com/v1/create-qr-code/?size=150x150&amp;amp;data=HelloWorld&amp;#34;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;ul>
&lt;li>Output result
&lt;img src="http://kenji.blog/p/curl%E3%81%A7qr%E3%82%B3%E3%83%BC%E3%83%89%E7%94%9F%E6%88%90/qr.png"
width="250"
height="250"
srcset="http://kenji.blog/p/curl%E3%81%A7qr%E3%82%B3%E3%83%BC%E3%83%89%E7%94%9F%E6%88%90/qr_hud34111b99823e39dfc62f9ba667fd5f9_390_480x0_resize_box_3.png 480w, http://kenji.blog/p/curl%E3%81%A7qr%E3%82%B3%E3%83%BC%E3%83%89%E7%94%9F%E6%88%90/qr_hud34111b99823e39dfc62f9ba667fd5f9_390_1024x0_resize_box_3.png 1024w"
loading="lazy"
class="gallery-image"
data-flex-grow="100"
data-flex-basis="240px"
>&lt;/li>
&lt;/ul>
&lt;h4 id="reference-1">Reference
&lt;/h4>&lt;ul>
&lt;li>&lt;a class="link" href="https://goqr.me/api/doc/create-qr-code/" target="_blank" rel="noopener"
>QR Code Generator&lt;/a>&lt;/li>
&lt;/ul></description></item></channel></rss>