Convert public directory from submodule to normal directory
- Remove public from git submodule tracking - Add all public directory contents as regular files - Fixes GitHub Actions error: "No url found for submodule path 'public' in .gitmodules" 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,619 @@
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="" >
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>hello world · hello world! bluesky</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="description" content="">
|
||||
<meta name="generator" content="@gitbook-ng/gitbook 3.3.6">
|
||||
<meta name="author" content="syui">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/style.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-codeblock-filename/block.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<meta name="HandheldFriendly" content="true"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
|
||||
<link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
|
||||
|
||||
|
||||
<link rel="next" href="2.html" />
|
||||
|
||||
|
||||
<link rel="prev" href="./" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="book">
|
||||
<div class="book-summary">
|
||||
|
||||
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search" />
|
||||
</div>
|
||||
|
||||
|
||||
<nav role="navigation">
|
||||
|
||||
|
||||
|
||||
<ul class="summary">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.1" data-path="../">
|
||||
|
||||
<a href="../">
|
||||
|
||||
|
||||
hello world! bluesky
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.2" data-path="../card/">
|
||||
|
||||
<a href="../card/">
|
||||
|
||||
|
||||
card
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.3" data-path="../c1/">
|
||||
|
||||
<a href="../c1/">
|
||||
|
||||
|
||||
part 1
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.3.1" data-path="../c1/1.html">
|
||||
|
||||
<a href="../c1/1.html">
|
||||
|
||||
|
||||
quick start
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.3.2" data-path="../c1/2.html">
|
||||
|
||||
<a href="../c1/2.html">
|
||||
|
||||
|
||||
example
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4" data-path="../c2/">
|
||||
|
||||
<a href="../c2/">
|
||||
|
||||
|
||||
part 2
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.4.1" data-path="../c2/1.html">
|
||||
|
||||
<a href="../c2/1.html">
|
||||
|
||||
|
||||
bluesky
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4.2" data-path="../c2/2.html">
|
||||
|
||||
<a href="../c2/2.html">
|
||||
|
||||
|
||||
terminal
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4.3" data-path="../c2/3.html">
|
||||
|
||||
<a href="../c2/3.html">
|
||||
|
||||
|
||||
shell
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4.4" data-path="../c2/4.html">
|
||||
|
||||
<a href="../c2/4.html">
|
||||
|
||||
|
||||
rust
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.5" data-path="./">
|
||||
|
||||
<a href="./">
|
||||
|
||||
|
||||
part 3
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter active" data-level="1.5.1" data-path="1.html">
|
||||
|
||||
<a href="1.html">
|
||||
|
||||
|
||||
hello world
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.5.2" data-path="2.html">
|
||||
|
||||
<a href="2.html">
|
||||
|
||||
|
||||
seahorse
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.5.3" data-path="3.html">
|
||||
|
||||
<a href="3.html">
|
||||
|
||||
|
||||
reqwest
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6" data-path="../c4/">
|
||||
|
||||
<a href="../c4/">
|
||||
|
||||
|
||||
part 4
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.6.1" data-path="../c4/0.html">
|
||||
|
||||
<a href="../c4/0.html">
|
||||
|
||||
|
||||
ai
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6.2" data-path="../c4/1.html">
|
||||
|
||||
<a href="../c4/1.html">
|
||||
|
||||
|
||||
config
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6.3" data-path="../c4/2.html">
|
||||
|
||||
<a href="../c4/2.html">
|
||||
|
||||
|
||||
mention
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6.4" data-path="../c4/3.html">
|
||||
|
||||
<a href="../c4/3.html">
|
||||
|
||||
|
||||
base64
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.7" data-path="../c5/">
|
||||
|
||||
<a href="../c5/">
|
||||
|
||||
|
||||
part 5
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.7.1" data-path="../c5/1.html">
|
||||
|
||||
<a href="../c5/1.html">
|
||||
|
||||
|
||||
notify
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.7.2" data-path="../c5/2.html">
|
||||
|
||||
<a href="../c5/2.html">
|
||||
|
||||
|
||||
timeline
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.7.3" data-path="../c5/3.html">
|
||||
|
||||
<a href="../c5/3.html">
|
||||
|
||||
|
||||
refresh
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.8" data-path="../end/">
|
||||
|
||||
<a href="../end/">
|
||||
|
||||
|
||||
end
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="book-body">
|
||||
|
||||
<div class="body-inner">
|
||||
|
||||
|
||||
|
||||
<div class="book-header" role="navigation">
|
||||
|
||||
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-circle-o-notch fa-spin"></i>
|
||||
<a href=".." >hello world</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-wrapper" tabindex="-1" role="main">
|
||||
<div class="page-inner">
|
||||
|
||||
<div id="book-search-results">
|
||||
<div class="search-noresults">
|
||||
|
||||
<section class="normal markdown-section">
|
||||
|
||||
<h3 id="init">init</h3>
|
||||
<p>まず、rustでプログラムの雛形を作ります。</p>
|
||||
<pre><code class="lang-sh">mkdir -p ~/rust
|
||||
<span class="hljs-built_in">cd</span> ~/rust
|
||||
cargo init
|
||||
</code></pre>
|
||||
<pre><code class="lang-sh">.
|
||||
├── Cargo.toml
|
||||
└── src
|
||||
└── main.rs
|
||||
</code></pre>
|
||||
<p>これらのファイルは自分で作成してもいいし、<code>init</code>で作成してもいいです。</p>
|
||||
<div><p class="code-filename">Cargo.toml</p></div>
|
||||
<pre><code class="lang-toml"><span class="hljs-section">[package]</span>
|
||||
<span class="hljs-attr">name</span> = <span class="hljs-string">"rust"</span>
|
||||
<span class="hljs-attr">version</span> = <span class="hljs-string">"0.1.0"</span>
|
||||
<span class="hljs-attr">edition</span> = <span class="hljs-string">"2021"</span>
|
||||
|
||||
<span class="hljs-comment"># See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html</span>
|
||||
<span class="hljs-section">
|
||||
[dependencies]</span>
|
||||
</code></pre>
|
||||
<div><p class="code-filename">src/main.rs</p></div>
|
||||
<pre><code class="lang-rust"><span class="hljs-function"><span class="hljs-keyword">fn</span> <span class="hljs-title">main</span></span>() {
|
||||
<span class="hljs-built_in">println!</span>(<span class="hljs-string">"Hello, world!"</span>);
|
||||
}
|
||||
</code></pre>
|
||||
<p>ちなみに、コンピュータ上ではディレクトリもファイルなのです。この話は面倒なので省略します。</p>
|
||||
<h4 id="editor">editor</h4>
|
||||
<p>次にプログラムの中身を確認してみます。</p>
|
||||
<p>確認するには、editor(エディタ)を使用します。私は<code>vim</code>を使いますが、<a href="https://visualstudio.microsoft.com" target="_blank">visual studio</a>がオススメかな。</p>
|
||||
<pre><code class="lang-sh">brew install vim
|
||||
vim src/main.rs
|
||||
</code></pre>
|
||||
<div><p class="code-filename">src/main.rs</p></div>
|
||||
<pre><code class="lang-rust"><span class="hljs-function"><span class="hljs-keyword">fn</span> <span class="hljs-title">main</span></span>() {
|
||||
<span class="hljs-built_in">println!</span>(<span class="hljs-string">"Hello, world!"</span>);
|
||||
}
|
||||
</code></pre>
|
||||
<p>これは<code>hello world!</code>という文字列を出力するプログラムです。</p>
|
||||
<h4 id="build">build</h4>
|
||||
<p>このsrcを<code>build</code>して<code>binary</code>、つまり、アプリ本体に変換することで、そのパソコンで実行できるようになります。</p>
|
||||
<pre><code class="lang-sh">cargo build
|
||||
</code></pre>
|
||||
<div><p class="code-filename">target/debug/rust</p></div>
|
||||
<pre><code class="lang-sh">target
|
||||
└── debug
|
||||
├── rust ← このファイルがbinary
|
||||
└── rust.d
|
||||
</code></pre>
|
||||
<p>rustはワンバイナリと言って、コンパイル結果が単一ファイルなので、非常に良い言語です。</p>
|
||||
<pre><code class="lang-sh">$ ./target/debug/rust
|
||||
Hello, world!
|
||||
</code></pre>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="search-results">
|
||||
<div class="has-results">
|
||||
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
|
||||
</div>
|
||||
<div class="no-results">
|
||||
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a href="./" class="navigation navigation-prev " aria-label="Previous page: part 3">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
|
||||
|
||||
<a href="2.html" class="navigation navigation-next " aria-label="Next page: seahorse">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"hello world","level":"1.5.1","depth":2,"next":{"title":"seahorse","level":"1.5.2","depth":2,"path":"c3/2.md","ref":"c3/2.md","articles":[]},"previous":{"title":"part 3","level":"1.5","depth":1,"path":"c3/README.md","ref":"c3/README.md","articles":[{"title":"hello world","level":"1.5.1","depth":2,"path":"c3/1.md","ref":"c3/1.md","articles":[]},{"title":"seahorse","level":"1.5.2","depth":2,"path":"c3/2.md","ref":"c3/2.md","articles":[]},{"title":"reqwest","level":"1.5.3","depth":2,"path":"c3/3.md","ref":"c3/3.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["-sharing","codeblock-filename","mermaid-gb3","diff"],"root":"./","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"codeblock-filename":{},"mermaid-gb3":{},"diff":{"type":"markdown","method":"diffChars","options":{}},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"syui","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"hello world! bluesky","gitbook":"*","description":"This is a bluesky ai-card example, and first rust"},"file":{"path":"c3/1.md","mtime":"2023-07-24T10:43:41.702Z","type":"markdown"},"gitbook":{"version":"3.3.6","time":"2023-09-16T08:55:27.618Z"},"basePath":"..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook.js"></script>
|
||||
<script src="../gitbook/theme.js"></script>
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-mermaid-gb3/book/plugin.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-search/search.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.min.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -0,0 +1,707 @@
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="" >
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>seahorse · hello world! bluesky</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="description" content="">
|
||||
<meta name="generator" content="@gitbook-ng/gitbook 3.3.6">
|
||||
<meta name="author" content="syui">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/style.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-codeblock-filename/block.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<meta name="HandheldFriendly" content="true"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
|
||||
<link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
|
||||
|
||||
|
||||
<link rel="next" href="3.html" />
|
||||
|
||||
|
||||
<link rel="prev" href="1.html" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="book">
|
||||
<div class="book-summary">
|
||||
|
||||
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search" />
|
||||
</div>
|
||||
|
||||
|
||||
<nav role="navigation">
|
||||
|
||||
|
||||
|
||||
<ul class="summary">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.1" data-path="../">
|
||||
|
||||
<a href="../">
|
||||
|
||||
|
||||
hello world! bluesky
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.2" data-path="../card/">
|
||||
|
||||
<a href="../card/">
|
||||
|
||||
|
||||
card
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.3" data-path="../c1/">
|
||||
|
||||
<a href="../c1/">
|
||||
|
||||
|
||||
part 1
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.3.1" data-path="../c1/1.html">
|
||||
|
||||
<a href="../c1/1.html">
|
||||
|
||||
|
||||
quick start
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.3.2" data-path="../c1/2.html">
|
||||
|
||||
<a href="../c1/2.html">
|
||||
|
||||
|
||||
example
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4" data-path="../c2/">
|
||||
|
||||
<a href="../c2/">
|
||||
|
||||
|
||||
part 2
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.4.1" data-path="../c2/1.html">
|
||||
|
||||
<a href="../c2/1.html">
|
||||
|
||||
|
||||
bluesky
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4.2" data-path="../c2/2.html">
|
||||
|
||||
<a href="../c2/2.html">
|
||||
|
||||
|
||||
terminal
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4.3" data-path="../c2/3.html">
|
||||
|
||||
<a href="../c2/3.html">
|
||||
|
||||
|
||||
shell
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4.4" data-path="../c2/4.html">
|
||||
|
||||
<a href="../c2/4.html">
|
||||
|
||||
|
||||
rust
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.5" data-path="./">
|
||||
|
||||
<a href="./">
|
||||
|
||||
|
||||
part 3
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.5.1" data-path="1.html">
|
||||
|
||||
<a href="1.html">
|
||||
|
||||
|
||||
hello world
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter active" data-level="1.5.2" data-path="2.html">
|
||||
|
||||
<a href="2.html">
|
||||
|
||||
|
||||
seahorse
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.5.3" data-path="3.html">
|
||||
|
||||
<a href="3.html">
|
||||
|
||||
|
||||
reqwest
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6" data-path="../c4/">
|
||||
|
||||
<a href="../c4/">
|
||||
|
||||
|
||||
part 4
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.6.1" data-path="../c4/0.html">
|
||||
|
||||
<a href="../c4/0.html">
|
||||
|
||||
|
||||
ai
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6.2" data-path="../c4/1.html">
|
||||
|
||||
<a href="../c4/1.html">
|
||||
|
||||
|
||||
config
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6.3" data-path="../c4/2.html">
|
||||
|
||||
<a href="../c4/2.html">
|
||||
|
||||
|
||||
mention
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6.4" data-path="../c4/3.html">
|
||||
|
||||
<a href="../c4/3.html">
|
||||
|
||||
|
||||
base64
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.7" data-path="../c5/">
|
||||
|
||||
<a href="../c5/">
|
||||
|
||||
|
||||
part 5
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.7.1" data-path="../c5/1.html">
|
||||
|
||||
<a href="../c5/1.html">
|
||||
|
||||
|
||||
notify
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.7.2" data-path="../c5/2.html">
|
||||
|
||||
<a href="../c5/2.html">
|
||||
|
||||
|
||||
timeline
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.7.3" data-path="../c5/3.html">
|
||||
|
||||
<a href="../c5/3.html">
|
||||
|
||||
|
||||
refresh
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.8" data-path="../end/">
|
||||
|
||||
<a href="../end/">
|
||||
|
||||
|
||||
end
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="book-body">
|
||||
|
||||
<div class="body-inner">
|
||||
|
||||
|
||||
|
||||
<div class="book-header" role="navigation">
|
||||
|
||||
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-circle-o-notch fa-spin"></i>
|
||||
<a href=".." >seahorse</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-wrapper" tabindex="-1" role="main">
|
||||
<div class="page-inner">
|
||||
|
||||
<div id="book-search-results">
|
||||
<div class="search-noresults">
|
||||
|
||||
<section class="normal markdown-section">
|
||||
|
||||
<h3 id="seahorse">seahorse</h3>
|
||||
<p>次に<a href="https://github.com/ksk001100/seahorse" target="_blank">ksk001100/seahorse</a>というframework(フレームワーク)を導入します。</p>
|
||||
<p>このフレームワークはcli(command line interface)を書くためのものです。</p>
|
||||
<p>cliは、簡単に言うと、これまで実行してきた<code>which</code>や<code>curl</code>と同じコマンドのことです。今から自分のコマンドを作成します。</p>
|
||||
<p>難しそうと思われる方がいるかもしれませんが、<code>seahorse</code>という素晴らしいframeworkを使えば簡単です。</p>
|
||||
<p>まずは<code>seahorse</code>をインストールするわけですが、rustでlibrary(ライブラリ)をインストールするには、<code>Cargo.toml</code>にpackage nameを書きます。これでbuildする際に自動でインストールされます。</p>
|
||||
<p>なお、libraryは<code>lib</code>と略されることがあります。</p>
|
||||
<div><p class="code-filename">Cargo.toml</p></div>
|
||||
<pre><code class="lang-toml"><span class="hljs-section">[package]</span>
|
||||
<span class="hljs-attr">name</span> = <span class="hljs-string">"rust"</span>
|
||||
<span class="hljs-attr">version</span> = <span class="hljs-string">"0.1.0"</span>
|
||||
<span class="hljs-attr">edition</span> = <span class="hljs-string">"2021"</span>
|
||||
<span class="hljs-section">
|
||||
[dependencies]</span>
|
||||
<span class="hljs-attr">seahorse</span> = <span class="hljs-string">"*"</span>
|
||||
</code></pre>
|
||||
<p>そして、<code>seahorse</code>を使う本体コードを書いていきます。</p>
|
||||
<div><p class="code-filename">src/main.rs</p></div>
|
||||
<pre><code class="lang-rust"><span class="hljs-keyword">use</span> seahorse::{App, Context};
|
||||
<span class="hljs-keyword">use</span> std::env;
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">fn</span> <span class="hljs-title">main</span></span>() {
|
||||
<span class="hljs-keyword">let</span> args: <span class="hljs-built_in">Vec</span><<span class="hljs-built_in">String</span>> = env::args().collect();
|
||||
<span class="hljs-keyword">let</span> app = App::new(<span class="hljs-built_in">env!</span>(<span class="hljs-string">"CARGO_PKG_NAME"</span>))
|
||||
.action(s)
|
||||
|
||||
;
|
||||
app.run(args);
|
||||
}
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">fn</span> <span class="hljs-title">s</span></span>(_c: &Context) {
|
||||
<span class="hljs-built_in">println!</span>(<span class="hljs-string">"Hello, world!"</span>);
|
||||
}
|
||||
</code></pre>
|
||||
<p>内容はとてもシンプル。コマンドを実行すると<code>Hello, world!</code>が出力されます。</p>
|
||||
<pre><code class="lang-sh">$ cargo build
|
||||
$ ./target/debug/rust
|
||||
Hello, world!
|
||||
</code></pre>
|
||||
<p>今までと何が違うのかと言うと、例えば、<code>help</code>オプションが自動でついています。</p>
|
||||
<pre><code class="lang-sh">$ ./target/debug/rust -h
|
||||
|
||||
Name:
|
||||
rust
|
||||
Flags:
|
||||
-h, --help : Show <span class="hljs-built_in">help</span>
|
||||
</code></pre>
|
||||
<p><code>seahorse</code>の凄さを理解してもらうため、読者自身に応用を考えてもらいましょう。</p>
|
||||
<div><p class="code-filename">src/main.rs</p></div>
|
||||
<pre><code class="lang-rust"><span class="hljs-keyword">use</span> seahorse::{App, Context, Command};
|
||||
<span class="hljs-keyword">use</span> std::env;
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">fn</span> <span class="hljs-title">main</span></span>() {
|
||||
<span class="hljs-keyword">let</span> args: <span class="hljs-built_in">Vec</span><<span class="hljs-built_in">String</span>> = env::args().collect();
|
||||
<span class="hljs-keyword">let</span> app = App::new(<span class="hljs-built_in">env!</span>(<span class="hljs-string">"CARGO_PKG_NAME"</span>))
|
||||
.action(s)
|
||||
|
||||
.command(
|
||||
Command::new(<span class="hljs-string">"yes"</span>)
|
||||
.alias(<span class="hljs-string">"y"</span>)
|
||||
.action(y),
|
||||
)
|
||||
.command(
|
||||
Command::new(<span class="hljs-string">"no"</span>)
|
||||
.alias(<span class="hljs-string">"n"</span>)
|
||||
.action(n),
|
||||
)
|
||||
|
||||
;
|
||||
app.run(args);
|
||||
}
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">fn</span> <span class="hljs-title">s</span></span>(_c: &Context) {
|
||||
<span class="hljs-built_in">println!</span>(<span class="hljs-string">"Hello, world!"</span>);
|
||||
}
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">fn</span> <span class="hljs-title">y</span></span>(_c: &Context) {
|
||||
<span class="hljs-built_in">println!</span>(<span class="hljs-string">"yes"</span>);
|
||||
}
|
||||
|
||||
<span class="hljs-function"><span class="hljs-keyword">fn</span> <span class="hljs-title">n</span></span>(_c: &Context) {
|
||||
<span class="hljs-built_in">println!</span>(<span class="hljs-string">"no"</span>);
|
||||
}
|
||||
</code></pre>
|
||||
<p>これを書いて、作成したコマンドを実行してみてください。</p>
|
||||
<pre><code class="lang-sh">$ ./target/debug/rust
|
||||
|
||||
$ ./target/debug/rust y
|
||||
|
||||
$ ./target/debug/rust n
|
||||
</code></pre>
|
||||
<p>コードの差分、要点は以下になります。</p>
|
||||
<p><pre><code class="lang-diff"> use seahorse::{App, Context
|
||||
<span class="hljs-addition">+ , Command</span>
|
||||
};
|
||||
|
||||
<span class="hljs-addition">+ </span>
|
||||
.command(
|
||||
Command::new("yes")
|
||||
.alias("y")
|
||||
.action(y),
|
||||
)
|
||||
|
||||
fn y(_c: &Context) {
|
||||
println!("yes");
|
||||
}
|
||||
</code></pre>
|
||||
</p>
|
||||
<p>これらの値を書き換えたり、追加したりして、自由にコマンドを作ってみてください。</p>
|
||||
<p>ここで、<code>Command::new</code>で指定した値はオプション名を意味します。</p>
|
||||
<p>この場合は<code>rust yes</code>がこのコマンドの発行です。</p>
|
||||
<p><code>alias("y")</code>で省略を指定することができます。この場合は<code>rust y</code>になります。</p>
|
||||
<p><code>action(y)</code>は関数の<code>fn y</code>を指定しており、その中身が実行されます。<code>action</code>にコマンド本体の処理を書くことになります。</p>
|
||||
<p>ちなみに、<code>action</code>は必ずしも関数を使う必要はありません。</p>
|
||||
<p>例えば、以下のコードを所定の場所に追加してみてください。コマンドは<code>rust t</code>または<code>rust t foo</code>です。</p>
|
||||
<div><p class="code-filename">src/main.rs</p></div>
|
||||
<pre><code class="lang-rust">.command(
|
||||
Command::new(<span class="hljs-string">"test"</span>)
|
||||
.alias(<span class="hljs-string">"t"</span>)
|
||||
.action(|c| <span class="hljs-built_in">println!</span>(<span class="hljs-string">"Hello, {:?}"</span>, c.args)),
|
||||
)
|
||||
</code></pre>
|
||||
<pre><code class="lang-sh">$ ./target/debug/rust t bluesky
|
||||
Hello, [<span class="hljs-string">"bluesky"</span>]
|
||||
</code></pre>
|
||||
<h4 id="cli">cli</h4>
|
||||
<ul>
|
||||
<li>CLI</li>
|
||||
</ul>
|
||||
<p><code>cli</code>は様々な意味を持ちます。上記のようなcli toolのことを指すこともあれば、terminal操作全般を指すこともあります。</p>
|
||||
<h4 id="cuiとgui">cuiとgui</h4>
|
||||
<ul>
|
||||
<li>CUI, GUI</li>
|
||||
</ul>
|
||||
<p>cuiとguiというものがあります。今使っているのは<code>cui</code>です。</p>
|
||||
<p><code>cli</code>もほぼ同じような意味で使用されています。</p>
|
||||
<p>cuiはterminal操作を意味し、guiはグラフィカルなos上の操作を意味します。</p>
|
||||
<p>c-uiと分けられ、uiは単なるuiです。user interfaceの略。</p>
|
||||
<p>windowsやmacなど一般的なosは、すべてgui操作が基本です。</p>
|
||||
<h4 id="author">author</h4>
|
||||
<p><a href="https://github.com/ksk001100/seahorse" target="_blank">seahorse</a>の作者は<a href="https://twitter.com/ksk001100" target="_blank">ksk</a>さんです。</p>
|
||||
<p>素晴らしいframeworkを作ってくれてありがとう。</p>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="search-results">
|
||||
<div class="has-results">
|
||||
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
|
||||
</div>
|
||||
<div class="no-results">
|
||||
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a href="1.html" class="navigation navigation-prev " aria-label="Previous page: hello world">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
|
||||
|
||||
<a href="3.html" class="navigation navigation-next " aria-label="Next page: reqwest">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"seahorse","level":"1.5.2","depth":2,"next":{"title":"reqwest","level":"1.5.3","depth":2,"path":"c3/3.md","ref":"c3/3.md","articles":[]},"previous":{"title":"hello world","level":"1.5.1","depth":2,"path":"c3/1.md","ref":"c3/1.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-sharing","codeblock-filename","mermaid-gb3","diff"],"root":"./","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"codeblock-filename":{},"mermaid-gb3":{},"diff":{"type":"markdown","method":"diffChars","options":{}},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"syui","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"hello world! bluesky","gitbook":"*","description":"This is a bluesky ai-card example, and first rust"},"file":{"path":"c3/2.md","mtime":"2023-07-29T07:18:40.194Z","type":"markdown"},"gitbook":{"version":"3.3.6","time":"2023-09-16T08:55:27.618Z"},"basePath":"..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook.js"></script>
|
||||
<script src="../gitbook/theme.js"></script>
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-mermaid-gb3/book/plugin.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-search/search.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.min.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -0,0 +1,694 @@
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="" >
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>reqwest · hello world! bluesky</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="description" content="">
|
||||
<meta name="generator" content="@gitbook-ng/gitbook 3.3.6">
|
||||
<meta name="author" content="syui">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/style.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-codeblock-filename/block.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<meta name="HandheldFriendly" content="true"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
|
||||
<link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
|
||||
|
||||
|
||||
<link rel="next" href="../c4/" />
|
||||
|
||||
|
||||
<link rel="prev" href="2.html" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="book">
|
||||
<div class="book-summary">
|
||||
|
||||
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search" />
|
||||
</div>
|
||||
|
||||
|
||||
<nav role="navigation">
|
||||
|
||||
|
||||
|
||||
<ul class="summary">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.1" data-path="../">
|
||||
|
||||
<a href="../">
|
||||
|
||||
|
||||
hello world! bluesky
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.2" data-path="../card/">
|
||||
|
||||
<a href="../card/">
|
||||
|
||||
|
||||
card
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.3" data-path="../c1/">
|
||||
|
||||
<a href="../c1/">
|
||||
|
||||
|
||||
part 1
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.3.1" data-path="../c1/1.html">
|
||||
|
||||
<a href="../c1/1.html">
|
||||
|
||||
|
||||
quick start
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.3.2" data-path="../c1/2.html">
|
||||
|
||||
<a href="../c1/2.html">
|
||||
|
||||
|
||||
example
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4" data-path="../c2/">
|
||||
|
||||
<a href="../c2/">
|
||||
|
||||
|
||||
part 2
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.4.1" data-path="../c2/1.html">
|
||||
|
||||
<a href="../c2/1.html">
|
||||
|
||||
|
||||
bluesky
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4.2" data-path="../c2/2.html">
|
||||
|
||||
<a href="../c2/2.html">
|
||||
|
||||
|
||||
terminal
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4.3" data-path="../c2/3.html">
|
||||
|
||||
<a href="../c2/3.html">
|
||||
|
||||
|
||||
shell
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4.4" data-path="../c2/4.html">
|
||||
|
||||
<a href="../c2/4.html">
|
||||
|
||||
|
||||
rust
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.5" data-path="./">
|
||||
|
||||
<a href="./">
|
||||
|
||||
|
||||
part 3
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.5.1" data-path="1.html">
|
||||
|
||||
<a href="1.html">
|
||||
|
||||
|
||||
hello world
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.5.2" data-path="2.html">
|
||||
|
||||
<a href="2.html">
|
||||
|
||||
|
||||
seahorse
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter active" data-level="1.5.3" data-path="3.html">
|
||||
|
||||
<a href="3.html">
|
||||
|
||||
|
||||
reqwest
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6" data-path="../c4/">
|
||||
|
||||
<a href="../c4/">
|
||||
|
||||
|
||||
part 4
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.6.1" data-path="../c4/0.html">
|
||||
|
||||
<a href="../c4/0.html">
|
||||
|
||||
|
||||
ai
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6.2" data-path="../c4/1.html">
|
||||
|
||||
<a href="../c4/1.html">
|
||||
|
||||
|
||||
config
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6.3" data-path="../c4/2.html">
|
||||
|
||||
<a href="../c4/2.html">
|
||||
|
||||
|
||||
mention
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6.4" data-path="../c4/3.html">
|
||||
|
||||
<a href="../c4/3.html">
|
||||
|
||||
|
||||
base64
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.7" data-path="../c5/">
|
||||
|
||||
<a href="../c5/">
|
||||
|
||||
|
||||
part 5
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.7.1" data-path="../c5/1.html">
|
||||
|
||||
<a href="../c5/1.html">
|
||||
|
||||
|
||||
notify
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.7.2" data-path="../c5/2.html">
|
||||
|
||||
<a href="../c5/2.html">
|
||||
|
||||
|
||||
timeline
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.7.3" data-path="../c5/3.html">
|
||||
|
||||
<a href="../c5/3.html">
|
||||
|
||||
|
||||
refresh
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.8" data-path="../end/">
|
||||
|
||||
<a href="../end/">
|
||||
|
||||
|
||||
end
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="book-body">
|
||||
|
||||
<div class="body-inner">
|
||||
|
||||
|
||||
|
||||
<div class="book-header" role="navigation">
|
||||
|
||||
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-circle-o-notch fa-spin"></i>
|
||||
<a href=".." >reqwest</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-wrapper" tabindex="-1" role="main">
|
||||
<div class="page-inner">
|
||||
|
||||
<div id="book-search-results">
|
||||
<div class="search-noresults">
|
||||
|
||||
<section class="normal markdown-section">
|
||||
|
||||
<h3 id="reqwest">reqwest</h3>
|
||||
<p>rustの<a href="https://github.com/seanmonstar/reqwest" target="_blank">seanmonstar/reqwest</a>を解説する前に、以下のコマンドを実行してみてください。</p>
|
||||
<pre><code class="lang-sh">$ curl <span class="hljs-_">-s</span>L <span class="hljs-string">"https://bsky.social/xrpc/com.atproto.repo.listRecords?repo=support.bsky.team&collection=app.bsky.feed.post"</span>
|
||||
</code></pre>
|
||||
<p>これは<a href="https://bsky.app/profile/did:plc:oc6vwdlmk2kqyida5i74d3p5" target="_blank">support.bsky.social</a>のtimelineを取得するapiを叩いています。</p>
|
||||
<p><code>reqwest</code>は主にapiを叩くためのrustのlibだという理解で構いません。</p>
|
||||
<p>では、実際にコードを書いてみます。</p>
|
||||
<div><p class="code-filename">Cargo.toml</p></div>
|
||||
<pre><code class="lang-toml"><span class="hljs-section">[package]</span>
|
||||
<span class="hljs-attr">name</span> = <span class="hljs-string">"rust"</span>
|
||||
<span class="hljs-attr">version</span> = <span class="hljs-string">"0.1.0"</span>
|
||||
<span class="hljs-attr">edition</span> = <span class="hljs-string">"2021"</span>
|
||||
<span class="hljs-section">
|
||||
[dependencies]</span>
|
||||
<span class="hljs-attr">seahorse</span> = <span class="hljs-string">"*"</span>
|
||||
<span class="hljs-attr">reqwest</span> = <span class="hljs-string">"*"</span>
|
||||
<span class="hljs-attr">tokio</span> = { version = <span class="hljs-string">"1"</span>, features = [<span class="hljs-string">"full"</span>] }
|
||||
</code></pre>
|
||||
<pre><code class="lang-src/main.rs">use seahorse::{App, Context, Command};
|
||||
use std::env;
|
||||
|
||||
fn main() {
|
||||
let args: Vec<String> = env::args().collect();
|
||||
let app = App::new(env!("CARGO_PKG_NAME"))
|
||||
.action(s)
|
||||
.command(
|
||||
Command::new("yes")
|
||||
.alias("y")
|
||||
.action(y),
|
||||
)
|
||||
.command(
|
||||
Command::new("no")
|
||||
.alias("n")
|
||||
.action(n),
|
||||
)
|
||||
.command(
|
||||
Command::new("test")
|
||||
.alias("t")
|
||||
.action(|c| println!("Hello, {:?}", c.args)),
|
||||
)
|
||||
.command(
|
||||
Command::new("bluesky")
|
||||
.alias("b")
|
||||
.action(c_list_records),
|
||||
)
|
||||
|
||||
;
|
||||
app.run(args);
|
||||
}
|
||||
|
||||
fn s(_c: &Context) {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
|
||||
fn y(_c: &Context) {
|
||||
println!("yes");
|
||||
}
|
||||
|
||||
fn n(_c: &Context) {
|
||||
println!("no");
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn list_records() -> reqwest::Result<()> {
|
||||
let client = reqwest::Client::new();
|
||||
let handle= "support.bsky.team";
|
||||
let col = "app.bsky.feed.post";
|
||||
let body = client.get("https://bsky.social/xrpc/com.atproto.repo.listRecords")
|
||||
.query(&[("repo", &handle),("collection", &col)])
|
||||
.send()
|
||||
.await?
|
||||
.text()
|
||||
.await?;
|
||||
println!("{}", body);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn c_list_records(_c: &Context) {
|
||||
list_records().unwrap();
|
||||
}
|
||||
</code></pre>
|
||||
<p>これを<code>cargo build</code>していつものようにコマンドを実行します。</p>
|
||||
<pre><code class="lang-sh">$ ./target/debug/rust b
|
||||
</code></pre>
|
||||
<p>以降は<code>example</code>、つまり無駄なコマンドオプションを削除したコードを記述します。</p>
|
||||
<p>コードの要点は以下の通り。</p>
|
||||
<pre><code class="lang-src/main.rs">.command(
|
||||
Command::new("bluesky")
|
||||
.alias("b")
|
||||
.action(c_list_records),
|
||||
)
|
||||
|
||||
#[tokio::main]
|
||||
async fn list_records() -> reqwest::Result<()> {
|
||||
let client = reqwest::Client::new();
|
||||
let handle= "support.bsky.team";
|
||||
let col = "app.bsky.feed.post";
|
||||
let body = client.get("https://bsky.social/xrpc/com.atproto.repo.listRecords")
|
||||
.query(&[("repo", &handle),("collection", &col)])
|
||||
.send()
|
||||
.await?
|
||||
.text()
|
||||
.await?;
|
||||
println!("{}", body);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn c_list_records(_c: &Context) {
|
||||
list_records().unwrap();
|
||||
}
|
||||
</code></pre>
|
||||
<h4 id="query">query</h4>
|
||||
<p><code>query</code>の追加をしてみます。これで出力が1行になり、古い順になります。</p>
|
||||
<div><p class="code-filename">src/main.rs</p></div>
|
||||
<pre><code class="lang-rust">async <span class="hljs-function"><span class="hljs-keyword">fn</span> <span class="hljs-title">list_records</span></span>() -> reqwest::<span class="hljs-built_in">Result</span><()> {
|
||||
<span class="hljs-keyword">let</span> client = reqwest::Client::new();
|
||||
<span class="hljs-keyword">let</span> handle= <span class="hljs-string">"support.bsky.team"</span>;
|
||||
<span class="hljs-keyword">let</span> col = <span class="hljs-string">"app.bsky.feed.post"</span>;
|
||||
<span class="hljs-keyword">let</span> body = client.get(<span class="hljs-string">"https://bsky.social/xrpc/com.atproto.repo.listRecords"</span>)
|
||||
<span class="hljs-comment">//.query(&[("repo", &handle),("collection", &col)])</span>
|
||||
.query(&[(<span class="hljs-string">"repo"</span>, &handle),(<span class="hljs-string">"collection"</span>, &col),(<span class="hljs-string">"limit"</span>, &<span class="hljs-string">"1"</span>),(<span class="hljs-string">"revert"</span>, &<span class="hljs-string">"true"</span>)])
|
||||
.send()
|
||||
.await?
|
||||
.text()
|
||||
.await?;
|
||||
<span class="hljs-built_in">println!</span>(<span class="hljs-string">"{}"</span>, body);
|
||||
<span class="hljs-literal">Ok</span>(())
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="search-results">
|
||||
<div class="has-results">
|
||||
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
|
||||
</div>
|
||||
<div class="no-results">
|
||||
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a href="2.html" class="navigation navigation-prev " aria-label="Previous page: seahorse">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
|
||||
|
||||
<a href="../c4/" class="navigation navigation-next " aria-label="Next page: part 4">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"reqwest","level":"1.5.3","depth":2,"next":{"title":"part 4","level":"1.6","depth":1,"path":"c4/README.md","ref":"c4/README.md","articles":[{"title":"ai","level":"1.6.1","depth":2,"path":"c4/0.md","ref":"c4/0.md","articles":[]},{"title":"config","level":"1.6.2","depth":2,"path":"c4/1.md","ref":"c4/1.md","articles":[]},{"title":"mention","level":"1.6.3","depth":2,"path":"c4/2.md","ref":"c4/2.md","articles":[]},{"title":"base64","level":"1.6.4","depth":2,"path":"c4/3.md","ref":"c4/3.md","articles":[]}]},"previous":{"title":"seahorse","level":"1.5.2","depth":2,"path":"c3/2.md","ref":"c3/2.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-sharing","codeblock-filename","mermaid-gb3","diff"],"root":"./","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"codeblock-filename":{},"mermaid-gb3":{},"diff":{"type":"markdown","method":"diffChars","options":{}},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"syui","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"hello world! bluesky","gitbook":"*","description":"This is a bluesky ai-card example, and first rust"},"file":{"path":"c3/3.md","mtime":"2023-07-28T13:56:09.079Z","type":"markdown"},"gitbook":{"version":"3.3.6","time":"2023-09-16T08:55:27.618Z"},"basePath":"..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook.js"></script>
|
||||
<script src="../gitbook/theme.js"></script>
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-mermaid-gb3/book/plugin.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-search/search.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.min.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -0,0 +1,567 @@
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="" >
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>part 3 · hello world! bluesky</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="description" content="">
|
||||
<meta name="generator" content="@gitbook-ng/gitbook 3.3.6">
|
||||
<meta name="author" content="syui">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/style.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-codeblock-filename/block.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<meta name="HandheldFriendly" content="true"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
|
||||
<link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
|
||||
|
||||
|
||||
<link rel="next" href="1.html" />
|
||||
|
||||
|
||||
<link rel="prev" href="../c2/4.html" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="book">
|
||||
<div class="book-summary">
|
||||
|
||||
|
||||
<div id="book-search-input" role="search">
|
||||
<input type="text" placeholder="Type to search" />
|
||||
</div>
|
||||
|
||||
|
||||
<nav role="navigation">
|
||||
|
||||
|
||||
|
||||
<ul class="summary">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.1" data-path="../">
|
||||
|
||||
<a href="../">
|
||||
|
||||
|
||||
hello world! bluesky
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.2" data-path="../card/">
|
||||
|
||||
<a href="../card/">
|
||||
|
||||
|
||||
card
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.3" data-path="../c1/">
|
||||
|
||||
<a href="../c1/">
|
||||
|
||||
|
||||
part 1
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.3.1" data-path="../c1/1.html">
|
||||
|
||||
<a href="../c1/1.html">
|
||||
|
||||
|
||||
quick start
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.3.2" data-path="../c1/2.html">
|
||||
|
||||
<a href="../c1/2.html">
|
||||
|
||||
|
||||
example
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4" data-path="../c2/">
|
||||
|
||||
<a href="../c2/">
|
||||
|
||||
|
||||
part 2
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.4.1" data-path="../c2/1.html">
|
||||
|
||||
<a href="../c2/1.html">
|
||||
|
||||
|
||||
bluesky
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4.2" data-path="../c2/2.html">
|
||||
|
||||
<a href="../c2/2.html">
|
||||
|
||||
|
||||
terminal
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4.3" data-path="../c2/3.html">
|
||||
|
||||
<a href="../c2/3.html">
|
||||
|
||||
|
||||
shell
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.4.4" data-path="../c2/4.html">
|
||||
|
||||
<a href="../c2/4.html">
|
||||
|
||||
|
||||
rust
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter active" data-level="1.5" data-path="./">
|
||||
|
||||
<a href="./">
|
||||
|
||||
|
||||
part 3
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.5.1" data-path="1.html">
|
||||
|
||||
<a href="1.html">
|
||||
|
||||
|
||||
hello world
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.5.2" data-path="2.html">
|
||||
|
||||
<a href="2.html">
|
||||
|
||||
|
||||
seahorse
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.5.3" data-path="3.html">
|
||||
|
||||
<a href="3.html">
|
||||
|
||||
|
||||
reqwest
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6" data-path="../c4/">
|
||||
|
||||
<a href="../c4/">
|
||||
|
||||
|
||||
part 4
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.6.1" data-path="../c4/0.html">
|
||||
|
||||
<a href="../c4/0.html">
|
||||
|
||||
|
||||
ai
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6.2" data-path="../c4/1.html">
|
||||
|
||||
<a href="../c4/1.html">
|
||||
|
||||
|
||||
config
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6.3" data-path="../c4/2.html">
|
||||
|
||||
<a href="../c4/2.html">
|
||||
|
||||
|
||||
mention
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.6.4" data-path="../c4/3.html">
|
||||
|
||||
<a href="../c4/3.html">
|
||||
|
||||
|
||||
base64
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.7" data-path="../c5/">
|
||||
|
||||
<a href="../c5/">
|
||||
|
||||
|
||||
part 5
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="1.7.1" data-path="../c5/1.html">
|
||||
|
||||
<a href="../c5/1.html">
|
||||
|
||||
|
||||
notify
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.7.2" data-path="../c5/2.html">
|
||||
|
||||
<a href="../c5/2.html">
|
||||
|
||||
|
||||
timeline
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.7.3" data-path="../c5/3.html">
|
||||
|
||||
<a href="../c5/3.html">
|
||||
|
||||
|
||||
refresh
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="1.8" data-path="../end/">
|
||||
|
||||
<a href="../end/">
|
||||
|
||||
|
||||
end
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="book-body">
|
||||
|
||||
<div class="body-inner">
|
||||
|
||||
|
||||
|
||||
<div class="book-header" role="navigation">
|
||||
|
||||
|
||||
<!-- Title -->
|
||||
<h1>
|
||||
<i class="fa fa-circle-o-notch fa-spin"></i>
|
||||
<a href=".." >part 3</a>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-wrapper" tabindex="-1" role="main">
|
||||
<div class="page-inner">
|
||||
|
||||
<div id="book-search-results">
|
||||
<div class="search-noresults">
|
||||
|
||||
<section class="normal markdown-section">
|
||||
|
||||
<h2 id="part-3">part 3</h2>
|
||||
<p>この章では、<code>rust</code>で具体的なコードを書いて、プログラムを動かします。</p>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<div class="search-results">
|
||||
<div class="has-results">
|
||||
|
||||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||||
<ul class="search-results-list"></ul>
|
||||
|
||||
</div>
|
||||
<div class="no-results">
|
||||
|
||||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a href="../c2/4.html" class="navigation navigation-prev " aria-label="Previous page: rust">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
|
||||
|
||||
<a href="1.html" class="navigation navigation-next " aria-label="Next page: hello world">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"part 3","level":"1.5","depth":1,"next":{"title":"hello world","level":"1.5.1","depth":2,"path":"c3/1.md","ref":"c3/1.md","articles":[]},"previous":{"title":"rust","level":"1.4.4","depth":2,"path":"c2/4.md","ref":"c2/4.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-sharing","codeblock-filename","mermaid-gb3","diff"],"root":"./","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"codeblock-filename":{},"mermaid-gb3":{},"diff":{"type":"markdown","method":"diffChars","options":{}},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"syui","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"hello world! bluesky","gitbook":"*","description":"This is a bluesky ai-card example, and first rust"},"file":{"path":"c3/README.md","mtime":"2023-07-21T10:09:09.077Z","type":"markdown"},"gitbook":{"version":"3.3.6","time":"2023-09-16T08:55:27.618Z"},"basePath":"..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook.js"></script>
|
||||
<script src="../gitbook/theme.js"></script>
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-mermaid-gb3/book/plugin.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-search/search.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="../gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.min.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user