1
0

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:
2025-07-18 13:04:46 +09:00
parent 8f27cbb77b
commit 980e9c1259
954 changed files with 39885 additions and 1 deletions

View File

@@ -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>&#x307E;&#x305A;&#x3001;rust&#x3067;&#x30D7;&#x30ED;&#x30B0;&#x30E9;&#x30E0;&#x306E;&#x96DB;&#x5F62;&#x3092;&#x4F5C;&#x308A;&#x307E;&#x3059;&#x3002;</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">.
&#x251C;&#x2500;&#x2500; Cargo.toml
&#x2514;&#x2500;&#x2500; src
&#x2514;&#x2500;&#x2500; main.rs
</code></pre>
<p>&#x3053;&#x308C;&#x3089;&#x306E;&#x30D5;&#x30A1;&#x30A4;&#x30EB;&#x306F;&#x81EA;&#x5206;&#x3067;&#x4F5C;&#x6210;&#x3057;&#x3066;&#x3082;&#x3044;&#x3044;&#x3057;&#x3001;<code>init</code>&#x3067;&#x4F5C;&#x6210;&#x3057;&#x3066;&#x3082;&#x3044;&#x3044;&#x3067;&#x3059;&#x3002;</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">&quot;rust&quot;</span>
<span class="hljs-attr">version</span> = <span class="hljs-string">&quot;0.1.0&quot;</span>
<span class="hljs-attr">edition</span> = <span class="hljs-string">&quot;2021&quot;</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">&quot;Hello, world!&quot;</span>);
}
</code></pre>
<p>&#x3061;&#x306A;&#x307F;&#x306B;&#x3001;&#x30B3;&#x30F3;&#x30D4;&#x30E5;&#x30FC;&#x30BF;&#x4E0A;&#x3067;&#x306F;&#x30C7;&#x30A3;&#x30EC;&#x30AF;&#x30C8;&#x30EA;&#x3082;&#x30D5;&#x30A1;&#x30A4;&#x30EB;&#x306A;&#x306E;&#x3067;&#x3059;&#x3002;&#x3053;&#x306E;&#x8A71;&#x306F;&#x9762;&#x5012;&#x306A;&#x306E;&#x3067;&#x7701;&#x7565;&#x3057;&#x307E;&#x3059;&#x3002;</p>
<h4 id="editor">editor</h4>
<p>&#x6B21;&#x306B;&#x30D7;&#x30ED;&#x30B0;&#x30E9;&#x30E0;&#x306E;&#x4E2D;&#x8EAB;&#x3092;&#x78BA;&#x8A8D;&#x3057;&#x3066;&#x307F;&#x307E;&#x3059;&#x3002;</p>
<p>&#x78BA;&#x8A8D;&#x3059;&#x308B;&#x306B;&#x306F;&#x3001;editor(&#x30A8;&#x30C7;&#x30A3;&#x30BF;)&#x3092;&#x4F7F;&#x7528;&#x3057;&#x307E;&#x3059;&#x3002;&#x79C1;&#x306F;<code>vim</code>&#x3092;&#x4F7F;&#x3044;&#x307E;&#x3059;&#x304C;&#x3001;<a href="https://visualstudio.microsoft.com" target="_blank">visual studio</a>&#x304C;&#x30AA;&#x30B9;&#x30B9;&#x30E1;&#x304B;&#x306A;&#x3002;</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">&quot;Hello, world!&quot;</span>);
}
</code></pre>
<p>&#x3053;&#x308C;&#x306F;<code>hello world!</code>&#x3068;&#x3044;&#x3046;&#x6587;&#x5B57;&#x5217;&#x3092;&#x51FA;&#x529B;&#x3059;&#x308B;&#x30D7;&#x30ED;&#x30B0;&#x30E9;&#x30E0;&#x3067;&#x3059;&#x3002;</p>
<h4 id="build">build</h4>
<p>&#x3053;&#x306E;src&#x3092;<code>build</code>&#x3057;&#x3066;<code>binary</code>&#x3001;&#x3064;&#x307E;&#x308A;&#x3001;&#x30A2;&#x30D7;&#x30EA;&#x672C;&#x4F53;&#x306B;&#x5909;&#x63DB;&#x3059;&#x308B;&#x3053;&#x3068;&#x3067;&#x3001;&#x305D;&#x306E;&#x30D1;&#x30BD;&#x30B3;&#x30F3;&#x3067;&#x5B9F;&#x884C;&#x3067;&#x304D;&#x308B;&#x3088;&#x3046;&#x306B;&#x306A;&#x308A;&#x307E;&#x3059;&#x3002;</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
&#x2514;&#x2500;&#x2500; debug
&#x251C;&#x2500;&#x2500; rust &#x2190; &#x3053;&#x306E;&#x30D5;&#x30A1;&#x30A4;&#x30EB;&#x304C;binary
&#x2514;&#x2500;&#x2500; rust.d
</code></pre>
<p>rust&#x306F;&#x30EF;&#x30F3;&#x30D0;&#x30A4;&#x30CA;&#x30EA;&#x3068;&#x8A00;&#x3063;&#x3066;&#x3001;&#x30B3;&#x30F3;&#x30D1;&#x30A4;&#x30EB;&#x7D50;&#x679C;&#x304C;&#x5358;&#x4E00;&#x30D5;&#x30A1;&#x30A4;&#x30EB;&#x306A;&#x306E;&#x3067;&#x3001;&#x975E;&#x5E38;&#x306B;&#x826F;&#x3044;&#x8A00;&#x8A9E;&#x3067;&#x3059;&#x3002;</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>

View File

@@ -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>&#x6B21;&#x306B;<a href="https://github.com/ksk001100/seahorse" target="_blank">ksk001100/seahorse</a>&#x3068;&#x3044;&#x3046;framework(&#x30D5;&#x30EC;&#x30FC;&#x30E0;&#x30EF;&#x30FC;&#x30AF;)&#x3092;&#x5C0E;&#x5165;&#x3057;&#x307E;&#x3059;&#x3002;</p>
<p>&#x3053;&#x306E;&#x30D5;&#x30EC;&#x30FC;&#x30E0;&#x30EF;&#x30FC;&#x30AF;&#x306F;cli(command line interface)&#x3092;&#x66F8;&#x304F;&#x305F;&#x3081;&#x306E;&#x3082;&#x306E;&#x3067;&#x3059;&#x3002;</p>
<p>cli&#x306F;&#x3001;&#x7C21;&#x5358;&#x306B;&#x8A00;&#x3046;&#x3068;&#x3001;&#x3053;&#x308C;&#x307E;&#x3067;&#x5B9F;&#x884C;&#x3057;&#x3066;&#x304D;&#x305F;<code>which</code>&#x3084;<code>curl</code>&#x3068;&#x540C;&#x3058;&#x30B3;&#x30DE;&#x30F3;&#x30C9;&#x306E;&#x3053;&#x3068;&#x3067;&#x3059;&#x3002;&#x4ECA;&#x304B;&#x3089;&#x81EA;&#x5206;&#x306E;&#x30B3;&#x30DE;&#x30F3;&#x30C9;&#x3092;&#x4F5C;&#x6210;&#x3057;&#x307E;&#x3059;&#x3002;</p>
<p>&#x96E3;&#x3057;&#x305D;&#x3046;&#x3068;&#x601D;&#x308F;&#x308C;&#x308B;&#x65B9;&#x304C;&#x3044;&#x308B;&#x304B;&#x3082;&#x3057;&#x308C;&#x307E;&#x305B;&#x3093;&#x304C;&#x3001;<code>seahorse</code>&#x3068;&#x3044;&#x3046;&#x7D20;&#x6674;&#x3089;&#x3057;&#x3044;framework&#x3092;&#x4F7F;&#x3048;&#x3070;&#x7C21;&#x5358;&#x3067;&#x3059;&#x3002;</p>
<p>&#x307E;&#x305A;&#x306F;<code>seahorse</code>&#x3092;&#x30A4;&#x30F3;&#x30B9;&#x30C8;&#x30FC;&#x30EB;&#x3059;&#x308B;&#x308F;&#x3051;&#x3067;&#x3059;&#x304C;&#x3001;rust&#x3067;library(&#x30E9;&#x30A4;&#x30D6;&#x30E9;&#x30EA;)&#x3092;&#x30A4;&#x30F3;&#x30B9;&#x30C8;&#x30FC;&#x30EB;&#x3059;&#x308B;&#x306B;&#x306F;&#x3001;<code>Cargo.toml</code>&#x306B;package name&#x3092;&#x66F8;&#x304D;&#x307E;&#x3059;&#x3002;&#x3053;&#x308C;&#x3067;build&#x3059;&#x308B;&#x969B;&#x306B;&#x81EA;&#x52D5;&#x3067;&#x30A4;&#x30F3;&#x30B9;&#x30C8;&#x30FC;&#x30EB;&#x3055;&#x308C;&#x307E;&#x3059;&#x3002;</p>
<p>&#x306A;&#x304A;&#x3001;library&#x306F;<code>lib</code>&#x3068;&#x7565;&#x3055;&#x308C;&#x308B;&#x3053;&#x3068;&#x304C;&#x3042;&#x308A;&#x307E;&#x3059;&#x3002;</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">&quot;rust&quot;</span>
<span class="hljs-attr">version</span> = <span class="hljs-string">&quot;0.1.0&quot;</span>
<span class="hljs-attr">edition</span> = <span class="hljs-string">&quot;2021&quot;</span>
<span class="hljs-section">
[dependencies]</span>
<span class="hljs-attr">seahorse</span> = <span class="hljs-string">&quot;*&quot;</span>
</code></pre>
<p>&#x305D;&#x3057;&#x3066;&#x3001;<code>seahorse</code>&#x3092;&#x4F7F;&#x3046;&#x672C;&#x4F53;&#x30B3;&#x30FC;&#x30C9;&#x3092;&#x66F8;&#x3044;&#x3066;&#x3044;&#x304D;&#x307E;&#x3059;&#x3002;</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>&lt;<span class="hljs-built_in">String</span>&gt; = env::args().collect();
<span class="hljs-keyword">let</span> app = App::new(<span class="hljs-built_in">env!</span>(<span class="hljs-string">&quot;CARGO_PKG_NAME&quot;</span>))
.action(s)
;
app.run(args);
}
<span class="hljs-function"><span class="hljs-keyword">fn</span> <span class="hljs-title">s</span></span>(_c: &amp;Context) {
<span class="hljs-built_in">println!</span>(<span class="hljs-string">&quot;Hello, world!&quot;</span>);
}
</code></pre>
<p>&#x5185;&#x5BB9;&#x306F;&#x3068;&#x3066;&#x3082;&#x30B7;&#x30F3;&#x30D7;&#x30EB;&#x3002;&#x30B3;&#x30DE;&#x30F3;&#x30C9;&#x3092;&#x5B9F;&#x884C;&#x3059;&#x308B;&#x3068;<code>Hello, world!</code>&#x304C;&#x51FA;&#x529B;&#x3055;&#x308C;&#x307E;&#x3059;&#x3002;</p>
<pre><code class="lang-sh">$ cargo build
$ ./target/debug/rust
Hello, world!
</code></pre>
<p>&#x4ECA;&#x307E;&#x3067;&#x3068;&#x4F55;&#x304C;&#x9055;&#x3046;&#x306E;&#x304B;&#x3068;&#x8A00;&#x3046;&#x3068;&#x3001;&#x4F8B;&#x3048;&#x3070;&#x3001;<code>help</code>&#x30AA;&#x30D7;&#x30B7;&#x30E7;&#x30F3;&#x304C;&#x81EA;&#x52D5;&#x3067;&#x3064;&#x3044;&#x3066;&#x3044;&#x307E;&#x3059;&#x3002;</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>&#x306E;&#x51C4;&#x3055;&#x3092;&#x7406;&#x89E3;&#x3057;&#x3066;&#x3082;&#x3089;&#x3046;&#x305F;&#x3081;&#x3001;&#x8AAD;&#x8005;&#x81EA;&#x8EAB;&#x306B;&#x5FDC;&#x7528;&#x3092;&#x8003;&#x3048;&#x3066;&#x3082;&#x3089;&#x3044;&#x307E;&#x3057;&#x3087;&#x3046;&#x3002;</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>&lt;<span class="hljs-built_in">String</span>&gt; = env::args().collect();
<span class="hljs-keyword">let</span> app = App::new(<span class="hljs-built_in">env!</span>(<span class="hljs-string">&quot;CARGO_PKG_NAME&quot;</span>))
.action(s)
.command(
Command::new(<span class="hljs-string">&quot;yes&quot;</span>)
.alias(<span class="hljs-string">&quot;y&quot;</span>)
.action(y),
)
.command(
Command::new(<span class="hljs-string">&quot;no&quot;</span>)
.alias(<span class="hljs-string">&quot;n&quot;</span>)
.action(n),
)
;
app.run(args);
}
<span class="hljs-function"><span class="hljs-keyword">fn</span> <span class="hljs-title">s</span></span>(_c: &amp;Context) {
<span class="hljs-built_in">println!</span>(<span class="hljs-string">&quot;Hello, world!&quot;</span>);
}
<span class="hljs-function"><span class="hljs-keyword">fn</span> <span class="hljs-title">y</span></span>(_c: &amp;Context) {
<span class="hljs-built_in">println!</span>(<span class="hljs-string">&quot;yes&quot;</span>);
}
<span class="hljs-function"><span class="hljs-keyword">fn</span> <span class="hljs-title">n</span></span>(_c: &amp;Context) {
<span class="hljs-built_in">println!</span>(<span class="hljs-string">&quot;no&quot;</span>);
}
</code></pre>
<p>&#x3053;&#x308C;&#x3092;&#x66F8;&#x3044;&#x3066;&#x3001;&#x4F5C;&#x6210;&#x3057;&#x305F;&#x30B3;&#x30DE;&#x30F3;&#x30C9;&#x3092;&#x5B9F;&#x884C;&#x3057;&#x3066;&#x307F;&#x3066;&#x304F;&#x3060;&#x3055;&#x3044;&#x3002;</p>
<pre><code class="lang-sh">$ ./target/debug/rust
$ ./target/debug/rust y
$ ./target/debug/rust n
</code></pre>
<p>&#x30B3;&#x30FC;&#x30C9;&#x306E;&#x5DEE;&#x5206;&#x3001;&#x8981;&#x70B9;&#x306F;&#x4EE5;&#x4E0B;&#x306B;&#x306A;&#x308A;&#x307E;&#x3059;&#x3002;</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(&quot;yes&quot;)
.alias(&quot;y&quot;)
.action(y),
)
fn y(_c: &amp;Context) {
println!(&quot;yes&quot;);
}
</code></pre>
</p>
<p>&#x3053;&#x308C;&#x3089;&#x306E;&#x5024;&#x3092;&#x66F8;&#x304D;&#x63DB;&#x3048;&#x305F;&#x308A;&#x3001;&#x8FFD;&#x52A0;&#x3057;&#x305F;&#x308A;&#x3057;&#x3066;&#x3001;&#x81EA;&#x7531;&#x306B;&#x30B3;&#x30DE;&#x30F3;&#x30C9;&#x3092;&#x4F5C;&#x3063;&#x3066;&#x307F;&#x3066;&#x304F;&#x3060;&#x3055;&#x3044;&#x3002;</p>
<p>&#x3053;&#x3053;&#x3067;&#x3001;<code>Command::new</code>&#x3067;&#x6307;&#x5B9A;&#x3057;&#x305F;&#x5024;&#x306F;&#x30AA;&#x30D7;&#x30B7;&#x30E7;&#x30F3;&#x540D;&#x3092;&#x610F;&#x5473;&#x3057;&#x307E;&#x3059;&#x3002;</p>
<p>&#x3053;&#x306E;&#x5834;&#x5408;&#x306F;<code>rust yes</code>&#x304C;&#x3053;&#x306E;&#x30B3;&#x30DE;&#x30F3;&#x30C9;&#x306E;&#x767A;&#x884C;&#x3067;&#x3059;&#x3002;</p>
<p><code>alias(&quot;y&quot;)</code>&#x3067;&#x7701;&#x7565;&#x3092;&#x6307;&#x5B9A;&#x3059;&#x308B;&#x3053;&#x3068;&#x304C;&#x3067;&#x304D;&#x307E;&#x3059;&#x3002;&#x3053;&#x306E;&#x5834;&#x5408;&#x306F;<code>rust y</code>&#x306B;&#x306A;&#x308A;&#x307E;&#x3059;&#x3002;</p>
<p><code>action(y)</code>&#x306F;&#x95A2;&#x6570;&#x306E;<code>fn y</code>&#x3092;&#x6307;&#x5B9A;&#x3057;&#x3066;&#x304A;&#x308A;&#x3001;&#x305D;&#x306E;&#x4E2D;&#x8EAB;&#x304C;&#x5B9F;&#x884C;&#x3055;&#x308C;&#x307E;&#x3059;&#x3002;<code>action</code>&#x306B;&#x30B3;&#x30DE;&#x30F3;&#x30C9;&#x672C;&#x4F53;&#x306E;&#x51E6;&#x7406;&#x3092;&#x66F8;&#x304F;&#x3053;&#x3068;&#x306B;&#x306A;&#x308A;&#x307E;&#x3059;&#x3002;</p>
<p>&#x3061;&#x306A;&#x307F;&#x306B;&#x3001;<code>action</code>&#x306F;&#x5FC5;&#x305A;&#x3057;&#x3082;&#x95A2;&#x6570;&#x3092;&#x4F7F;&#x3046;&#x5FC5;&#x8981;&#x306F;&#x3042;&#x308A;&#x307E;&#x305B;&#x3093;&#x3002;</p>
<p>&#x4F8B;&#x3048;&#x3070;&#x3001;&#x4EE5;&#x4E0B;&#x306E;&#x30B3;&#x30FC;&#x30C9;&#x3092;&#x6240;&#x5B9A;&#x306E;&#x5834;&#x6240;&#x306B;&#x8FFD;&#x52A0;&#x3057;&#x3066;&#x307F;&#x3066;&#x304F;&#x3060;&#x3055;&#x3044;&#x3002;&#x30B3;&#x30DE;&#x30F3;&#x30C9;&#x306F;<code>rust t</code>&#x307E;&#x305F;&#x306F;<code>rust t foo</code>&#x3067;&#x3059;&#x3002;</p>
<div><p class="code-filename">src/main.rs</p></div>
<pre><code class="lang-rust">.command(
Command::new(<span class="hljs-string">&quot;test&quot;</span>)
.alias(<span class="hljs-string">&quot;t&quot;</span>)
.action(|c| <span class="hljs-built_in">println!</span>(<span class="hljs-string">&quot;Hello, {:?}&quot;</span>, c.args)),
)
</code></pre>
<pre><code class="lang-sh">$ ./target/debug/rust t bluesky
Hello, [<span class="hljs-string">&quot;bluesky&quot;</span>]
</code></pre>
<h4 id="cli">cli</h4>
<ul>
<li>CLI</li>
</ul>
<p><code>cli</code>&#x306F;&#x69D8;&#x3005;&#x306A;&#x610F;&#x5473;&#x3092;&#x6301;&#x3061;&#x307E;&#x3059;&#x3002;&#x4E0A;&#x8A18;&#x306E;&#x3088;&#x3046;&#x306A;cli tool&#x306E;&#x3053;&#x3068;&#x3092;&#x6307;&#x3059;&#x3053;&#x3068;&#x3082;&#x3042;&#x308C;&#x3070;&#x3001;terminal&#x64CD;&#x4F5C;&#x5168;&#x822C;&#x3092;&#x6307;&#x3059;&#x3053;&#x3068;&#x3082;&#x3042;&#x308A;&#x307E;&#x3059;&#x3002;</p>
<h4 id="cui&#x3068;gui">cui&#x3068;gui</h4>
<ul>
<li>CUI, GUI</li>
</ul>
<p>cui&#x3068;gui&#x3068;&#x3044;&#x3046;&#x3082;&#x306E;&#x304C;&#x3042;&#x308A;&#x307E;&#x3059;&#x3002;&#x4ECA;&#x4F7F;&#x3063;&#x3066;&#x3044;&#x308B;&#x306E;&#x306F;<code>cui</code>&#x3067;&#x3059;&#x3002;</p>
<p><code>cli</code>&#x3082;&#x307B;&#x307C;&#x540C;&#x3058;&#x3088;&#x3046;&#x306A;&#x610F;&#x5473;&#x3067;&#x4F7F;&#x7528;&#x3055;&#x308C;&#x3066;&#x3044;&#x307E;&#x3059;&#x3002;</p>
<p>cui&#x306F;terminal&#x64CD;&#x4F5C;&#x3092;&#x610F;&#x5473;&#x3057;&#x3001;gui&#x306F;&#x30B0;&#x30E9;&#x30D5;&#x30A3;&#x30AB;&#x30EB;&#x306A;os&#x4E0A;&#x306E;&#x64CD;&#x4F5C;&#x3092;&#x610F;&#x5473;&#x3057;&#x307E;&#x3059;&#x3002;</p>
<p>c-ui&#x3068;&#x5206;&#x3051;&#x3089;&#x308C;&#x3001;ui&#x306F;&#x5358;&#x306A;&#x308B;ui&#x3067;&#x3059;&#x3002;user interface&#x306E;&#x7565;&#x3002;</p>
<p>windows&#x3084;mac&#x306A;&#x3069;&#x4E00;&#x822C;&#x7684;&#x306A;os&#x306F;&#x3001;&#x3059;&#x3079;&#x3066;gui&#x64CD;&#x4F5C;&#x304C;&#x57FA;&#x672C;&#x3067;&#x3059;&#x3002;</p>
<h4 id="author">author</h4>
<p><a href="https://github.com/ksk001100/seahorse" target="_blank">seahorse</a>&#x306E;&#x4F5C;&#x8005;&#x306F;<a href="https://twitter.com/ksk001100" target="_blank">ksk</a>&#x3055;&#x3093;&#x3067;&#x3059;&#x3002;</p>
<p>&#x7D20;&#x6674;&#x3089;&#x3057;&#x3044;framework&#x3092;&#x4F5C;&#x3063;&#x3066;&#x304F;&#x308C;&#x3066;&#x3042;&#x308A;&#x304C;&#x3068;&#x3046;&#x3002;</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>

View File

@@ -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&#x306E;<a href="https://github.com/seanmonstar/reqwest" target="_blank">seanmonstar/reqwest</a>&#x3092;&#x89E3;&#x8AAC;&#x3059;&#x308B;&#x524D;&#x306B;&#x3001;&#x4EE5;&#x4E0B;&#x306E;&#x30B3;&#x30DE;&#x30F3;&#x30C9;&#x3092;&#x5B9F;&#x884C;&#x3057;&#x3066;&#x307F;&#x3066;&#x304F;&#x3060;&#x3055;&#x3044;&#x3002;</p>
<pre><code class="lang-sh">$ curl <span class="hljs-_">-s</span>L <span class="hljs-string">&quot;https://bsky.social/xrpc/com.atproto.repo.listRecords?repo=support.bsky.team&amp;collection=app.bsky.feed.post&quot;</span>
</code></pre>
<p>&#x3053;&#x308C;&#x306F;<a href="https://bsky.app/profile/did:plc:oc6vwdlmk2kqyida5i74d3p5" target="_blank">support.bsky.social</a>&#x306E;timeline&#x3092;&#x53D6;&#x5F97;&#x3059;&#x308B;api&#x3092;&#x53E9;&#x3044;&#x3066;&#x3044;&#x307E;&#x3059;&#x3002;</p>
<p><code>reqwest</code>&#x306F;&#x4E3B;&#x306B;api&#x3092;&#x53E9;&#x304F;&#x305F;&#x3081;&#x306E;rust&#x306E;lib&#x3060;&#x3068;&#x3044;&#x3046;&#x7406;&#x89E3;&#x3067;&#x69CB;&#x3044;&#x307E;&#x305B;&#x3093;&#x3002;</p>
<p>&#x3067;&#x306F;&#x3001;&#x5B9F;&#x969B;&#x306B;&#x30B3;&#x30FC;&#x30C9;&#x3092;&#x66F8;&#x3044;&#x3066;&#x307F;&#x307E;&#x3059;&#x3002;</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">&quot;rust&quot;</span>
<span class="hljs-attr">version</span> = <span class="hljs-string">&quot;0.1.0&quot;</span>
<span class="hljs-attr">edition</span> = <span class="hljs-string">&quot;2021&quot;</span>
<span class="hljs-section">
[dependencies]</span>
<span class="hljs-attr">seahorse</span> = <span class="hljs-string">&quot;*&quot;</span>
<span class="hljs-attr">reqwest</span> = <span class="hljs-string">&quot;*&quot;</span>
<span class="hljs-attr">tokio</span> = { version = <span class="hljs-string">&quot;1&quot;</span>, features = [<span class="hljs-string">&quot;full&quot;</span>] }
</code></pre>
<pre><code class="lang-src/main.rs">use seahorse::{App, Context, Command};
use std::env;
fn main() {
let args: Vec&lt;String&gt; = env::args().collect();
let app = App::new(env!(&quot;CARGO_PKG_NAME&quot;))
.action(s)
.command(
Command::new(&quot;yes&quot;)
.alias(&quot;y&quot;)
.action(y),
)
.command(
Command::new(&quot;no&quot;)
.alias(&quot;n&quot;)
.action(n),
)
.command(
Command::new(&quot;test&quot;)
.alias(&quot;t&quot;)
.action(|c| println!(&quot;Hello, {:?}&quot;, c.args)),
)
.command(
Command::new(&quot;bluesky&quot;)
.alias(&quot;b&quot;)
.action(c_list_records),
)
;
app.run(args);
}
fn s(_c: &amp;Context) {
println!(&quot;Hello, world!&quot;);
}
fn y(_c: &amp;Context) {
println!(&quot;yes&quot;);
}
fn n(_c: &amp;Context) {
println!(&quot;no&quot;);
}
#[tokio::main]
async fn list_records() -&gt; reqwest::Result&lt;()&gt; {
let client = reqwest::Client::new();
let handle= &quot;support.bsky.team&quot;;
let col = &quot;app.bsky.feed.post&quot;;
let body = client.get(&quot;https://bsky.social/xrpc/com.atproto.repo.listRecords&quot;)
.query(&amp;[(&quot;repo&quot;, &amp;handle),(&quot;collection&quot;, &amp;col)])
.send()
.await?
.text()
.await?;
println!(&quot;{}&quot;, body);
Ok(())
}
fn c_list_records(_c: &amp;Context) {
list_records().unwrap();
}
</code></pre>
<p>&#x3053;&#x308C;&#x3092;<code>cargo build</code>&#x3057;&#x3066;&#x3044;&#x3064;&#x3082;&#x306E;&#x3088;&#x3046;&#x306B;&#x30B3;&#x30DE;&#x30F3;&#x30C9;&#x3092;&#x5B9F;&#x884C;&#x3057;&#x307E;&#x3059;&#x3002;</p>
<pre><code class="lang-sh">$ ./target/debug/rust b
</code></pre>
<p>&#x4EE5;&#x964D;&#x306F;<code>example</code>&#x3001;&#x3064;&#x307E;&#x308A;&#x7121;&#x99C4;&#x306A;&#x30B3;&#x30DE;&#x30F3;&#x30C9;&#x30AA;&#x30D7;&#x30B7;&#x30E7;&#x30F3;&#x3092;&#x524A;&#x9664;&#x3057;&#x305F;&#x30B3;&#x30FC;&#x30C9;&#x3092;&#x8A18;&#x8FF0;&#x3057;&#x307E;&#x3059;&#x3002;</p>
<p>&#x30B3;&#x30FC;&#x30C9;&#x306E;&#x8981;&#x70B9;&#x306F;&#x4EE5;&#x4E0B;&#x306E;&#x901A;&#x308A;&#x3002;</p>
<pre><code class="lang-src/main.rs">.command(
Command::new(&quot;bluesky&quot;)
.alias(&quot;b&quot;)
.action(c_list_records),
)
#[tokio::main]
async fn list_records() -&gt; reqwest::Result&lt;()&gt; {
let client = reqwest::Client::new();
let handle= &quot;support.bsky.team&quot;;
let col = &quot;app.bsky.feed.post&quot;;
let body = client.get(&quot;https://bsky.social/xrpc/com.atproto.repo.listRecords&quot;)
.query(&amp;[(&quot;repo&quot;, &amp;handle),(&quot;collection&quot;, &amp;col)])
.send()
.await?
.text()
.await?;
println!(&quot;{}&quot;, body);
Ok(())
}
fn c_list_records(_c: &amp;Context) {
list_records().unwrap();
}
</code></pre>
<h4 id="query">query</h4>
<p><code>query</code>&#x306E;&#x8FFD;&#x52A0;&#x3092;&#x3057;&#x3066;&#x307F;&#x307E;&#x3059;&#x3002;&#x3053;&#x308C;&#x3067;&#x51FA;&#x529B;&#x304C;1&#x884C;&#x306B;&#x306A;&#x308A;&#x3001;&#x53E4;&#x3044;&#x9806;&#x306B;&#x306A;&#x308A;&#x307E;&#x3059;&#x3002;</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>() -&gt; reqwest::<span class="hljs-built_in">Result</span>&lt;()&gt; {
<span class="hljs-keyword">let</span> client = reqwest::Client::new();
<span class="hljs-keyword">let</span> handle= <span class="hljs-string">&quot;support.bsky.team&quot;</span>;
<span class="hljs-keyword">let</span> col = <span class="hljs-string">&quot;app.bsky.feed.post&quot;</span>;
<span class="hljs-keyword">let</span> body = client.get(<span class="hljs-string">&quot;https://bsky.social/xrpc/com.atproto.repo.listRecords&quot;</span>)
<span class="hljs-comment">//.query(&amp;[(&quot;repo&quot;, &amp;handle),(&quot;collection&quot;, &amp;col)])</span>
.query(&amp;[(<span class="hljs-string">&quot;repo&quot;</span>, &amp;handle),(<span class="hljs-string">&quot;collection&quot;</span>, &amp;col),(<span class="hljs-string">&quot;limit&quot;</span>, &amp;<span class="hljs-string">&quot;1&quot;</span>),(<span class="hljs-string">&quot;revert&quot;</span>, &amp;<span class="hljs-string">&quot;true&quot;</span>)])
.send()
.await?
.text()
.await?;
<span class="hljs-built_in">println!</span>(<span class="hljs-string">&quot;{}&quot;</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>

View File

@@ -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>&#x3053;&#x306E;&#x7AE0;&#x3067;&#x306F;&#x3001;<code>rust</code>&#x3067;&#x5177;&#x4F53;&#x7684;&#x306A;&#x30B3;&#x30FC;&#x30C9;&#x3092;&#x66F8;&#x3044;&#x3066;&#x3001;&#x30D7;&#x30ED;&#x30B0;&#x30E9;&#x30E0;&#x3092;&#x52D5;&#x304B;&#x3057;&#x307E;&#x3059;&#x3002;</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>