<!DOCTYPE HTML> <html lang="" > <head> <meta charset="UTF-8"> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <title>ai ยท 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="./" /> </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="../c1/"> <a href="../c1/"> part 1 </a> <ul class="articles"> <li class="chapter " data-level="1.2.1" data-path="../c1/1.html"> <a href="../c1/1.html"> quick start </a> </li> <li class="chapter " data-level="1.2.2" data-path="../c1/2.html"> <a href="../c1/2.html"> example </a> </li> </ul> </li> <li class="chapter " data-level="1.3" data-path="../c2/"> <a href="../c2/"> part 2 </a> <ul class="articles"> <li class="chapter " data-level="1.3.1" data-path="../c2/1.html"> <a href="../c2/1.html"> bluesky </a> </li> <li class="chapter " data-level="1.3.2" data-path="../c2/2.html"> <a href="../c2/2.html"> terminal </a> </li> <li class="chapter " data-level="1.3.3" data-path="../c2/3.html"> <a href="../c2/3.html"> shell </a> </li> <li class="chapter " data-level="1.3.4" data-path="../c2/4.html"> <a href="../c2/4.html"> rust </a> </li> </ul> </li> <li class="chapter " data-level="1.4" data-path="../c3/"> <a href="../c3/"> part 3 </a> <ul class="articles"> <li class="chapter " data-level="1.4.1" data-path="../c3/1.html"> <a href="../c3/1.html"> hello world </a> </li> <li class="chapter " data-level="1.4.2" data-path="../c3/2.html"> <a href="../c3/2.html"> seahorse </a> </li> <li class="chapter " data-level="1.4.3" data-path="../c3/3.html"> <a href="../c3/3.html"> reqwest </a> </li> </ul> </li> <li class="chapter " data-level="1.5" data-path="./"> <a href="./"> part 4 </a> <ul class="articles"> <li class="chapter active" data-level="1.5.1" data-path="0.html"> <a href="0.html"> ai </a> </li> <li class="chapter " data-level="1.5.2" data-path="1.html"> <a href="1.html"> config </a> </li> <li class="chapter " data-level="1.5.3" data-path="2.html"> <a href="2.html"> mention </a> </li> <li class="chapter " data-level="1.5.4" data-path="3.html"> <a href="3.html"> base64 </a> </li> </ul> </li> <li class="chapter " data-level="1.6" 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=".." >ai</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="ai">ai</h3> <p>This section is designed to be original with playful elements. Each of you can set it to whatever you like.</p> <p>First of all, the name of the command application. So far we have used <code>rust</code>. Because the program name created by <code>cargo init</code> is <code>rust</code>. This will automatically give you a folder name.</p> <p>Let's change this to <code>ai</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">"ai"</span> </code></pre> <p>If you set any name you like, please read the command name, etc. differently in the following explanations.</p> <pre><code class="lang-sh">$ cargo build $ ./target/debug/ai -h Name: ai Flags: -h, --help : Show <span class="hljs-built_in">help</span> Commands: y, yes : n, no : t, <span class="hljs-built_in">test</span> : b, bluesky : </code></pre> <h4 id="cleanup">cleanup</h4> <p>Next, let's reduce the number of command options that we don't need, although we don't want to leave any behind.</p> <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(c_list_records) .command( Command::new("bluesky") .alias("b") .action(c_list_records), ) ; app.run(args); } #[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),("limit", &"1"),("revert", &"true")]) .send() .await? .text() .await?; println!("{}", body); Ok(()) } fn c_list_records(_c: &Context) { list_records().unwrap(); } </code></pre> <h4 id="ascii">ascii</h4> <p>I will include the so-called <code>ascii art</code>.</p> <p>Generate it using <a href="https://github.com/TheZoraiz/ascii-image-converter" target="_blank">TheZoraiz/ascii-image-converter</a>.</p> <pre><code class="lang-sh">$ ascii-image-converter ai.png -H 50 </code></pre> <p>Change <code>.action(c_list_records)</code> to <code>.action(c_ascii_art)</code> in <code>src/main.rs</code>.</p> <div><p class="code-filename">src/main.rs</p></div> <pre><code class="lang-rust"><span class="hljs-comment">//.action(c_list_records)</span> .action(c_ascii_art) </code></pre> <p>Note that in rust, the <code>//</code> at the beginning of a sentence is a comment.</p> <p>Comments are not interpreted as code. Therefore, when you write a note, use this.</p> <div><p class="code-filename">src/main.rs</p></div> <pre><code class="lang-rust"><span class="hljs-comment">// This is the ASCII art of the eye</span> <span class="hljs-comment">// See the function "c_ascii_art" for the contents</span> .action(c_ascii_art) </code></pre> <p>Then, add the following code (function) to the last line of <code>src/main.rs</code>.</p> <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">c_ascii_art</span></span>(_c: &Context) { <span class="hljs-keyword">let</span> body = <span class="hljs-string">" ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠉⣁⠉⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠟⠛⠋⣉⣉⠡⠤⠤⠤⠤⠤⠤⠤⠤⠬⠤⣁⣉⡉⠛⠻⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢉⣤⡖⠚⣉⣡⣤⣦⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣴⣤⣤⠉⠑⣦⣌⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⣾⣿⣦⣄⣅⣌⣄⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣶⣾⣿⣿⣁⣘⡙⠻⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⢃⣤⣨⣿⡿⡿⠟⠟⠛⠻⠚⠛⠛⠛⠛⠛⠛⠋⡋⡋⠛⠛⠉⠉⠼⠿⠿⠿⠿⠿⠷⢶⢤⣈⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⢋⡡⠞⠛⣉⣉⣤⣤⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣶⣶⣶⣶⣶⣶⣶⣦⣦⣦⣦⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⢁⣀⣤⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠟⠛⠋⡉⣉⣉⣁⣨⣀⣅⣉⣉⢉⠛⠛⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠋⣁⡤⣴⣲⢯⢯⡯⣗⡯⣞⡾⣺⣺⢵⢯⢯⣟⢶⢦⣤⣀⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠉⣠⣔⡯⣗⡯⣗⡯⡯⣟⣞⣗⡯⣗⡯⣗⡯⡯⣟⣽⣺⢽⢽⣺⣳⢯⣟⡦⣌⡙⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠁⣠⣻⣺⣺⢽⣳⢯⣗⡯⡯⣗⡯⡾⣝⣗⡯⣗⡯⡯⣗⣗⡯⣟⣽⣺⣺⢽⣺⢽⣳⣻⢦⣈⠛⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⢠⣺⣳⢽⣺⣺⢽⣺⢽⣺⢽⣫⣗⡯⡯⣗⣗⡯⣗⡯⡯⣗⣗⡯⣗⣗⡯⡾⣽⣺⢽⡽⣾⣽⣺⢵⡀⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠁⣔⣟⣞⡾⣽⣺⣺⢽⣺⢽⣺⢽⣺⣺⢽⣫⣗⣗⡯⣗⡯⡯⣗⣗⡯⣗⣗⡯⡯⣗⡯⣟⣞⣗⡿⣾⣽⢽⢦⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⡮⣗⡯⡾⣝⡷⣽⣺⢽⣺⢽⣺⢽⣺⣺⢽⣺⣺⢵⢯⣗⡯⡯⣗⣗⡯⣗⣗⡯⡯⣗⡯⣗⣟⡾⣽⣻⣿⣯⣟⢷⡀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢀⡾⣝⣗⡯⡯⣗⡯⣗⡯⣟⡾⣽⣺⢽⣺⣺⢽⣺⣺⢽⢽⣺⢽⣫⣗⣗⡯⣗⣗⡯⡯⣗⡯⣗⡷⣻⣗⡷⣿⣟⣿⣽⣳⠈⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⣼⢽⣳⢗⡯⡯⣗⡯⣗⡯⣗⡯⣗⡯⠛⣞⡾⣽⣺⣺⢽⢽⣺⢽⣺⣺⢵⢯⣗⣗⡏⠙⣗⡯⣗⣯⢯⣷⢿⣽⣿⣿⡾⡽⣇⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⢸⣳⢽⣺⢽⢽⣫⣗⡯⣗⡯⣗⣯⡓⢡⡂⢵⢯⣗⡯⡾⣽⢽⣺⢽⣺⣺⢽⢽⣺⡞⢀⢇⠸⣽⣳⢽⣯⢿⣿⣿⣽⣷⣿⢯⢿⠀⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⣞⡾⣽⣺⢽⢽⣺⣺⢽⣳⢯⣗⠇⢠⣿⠆⢸⢽⣺⢽⢽⣳⣻⣺⢽⣺⣺⢽⢽⡺⠁⡬⣿⡀⢳⡽⡽⣾⡯⢿⣯⣿⣽⣿⣻⢽⡃⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠠⣗⡯⣗⡯⣟⣽⣺⣺⢽⣺⢽⡺⢀⣿⣿⢅⠈⣟⡾⣽⢽⣺⢵⢯⣻⣺⣺⢽⢽⠃⡰⣽⣿⡇⢸⡽⡽⣿⢝⣽⣿⣿⣺⣿⡯⣯⡇⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢸⣳⢯⣗⡯⣗⣗⡯⡾⣽⣺⢽⠂⣸⣿⣾⡕⡀⢗⡯⣗⣟⡾⡽⣽⣺⣳⢽⢽⠃⢰⣱⣿⣷⡇⢸⡯⣟⠟⠀⣿⡿⣞⣾⣻⣽⡳⡇⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢸⣺⢽⣺⢽⣳⢗⡯⡯⣗⡯⡏⢀⣿⢿⣾⣗⠆⠸⣽⡳⣗⡯⡯⣗⣗⡯⣯⠏⢠⢣⣿⣿⣾⡇⢸⢯⠏⣰⠀⣿⣻⣳⣳⣿⣺⢽⠅⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠸⣺⢽⣺⢽⣺⢽⢽⣫⢷⠉⡇⠰⣿⣿⣻⣽⣎⠀⢗⡯⡗⢙⣽⡳⣗⡯⡏⢀⣗⣿⣿⣷⣿⠂⣺⠋⣠⣿⠀⣿⣺⢵⣫⣿⣺⢽⠀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠈⣗⣟⡾⣽⣺⢽⢽⣺⠍⠀⡇⠘⣉⣤⣬⣈⣑⣅⠘⣽⠂⠘⣮⢯⣗⠏⢠⡟⣉⣡⠤⢤⠄⢠⠃⢴⡟⣯⠀⣗⡯⠟⡾⣗⡯⡇⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀⢸⣳⢯⣗⡯⣟⣽⡺⢀⠃⠀⠸⠋⢡⢡⡉⠻⣷⡄⠸⢀⡆⢹⣳⠃⣴⣿⣿⠋⣠⠐⡔⠀⠂⢳⡄⢰⣟⠀⠉⣠⣦⠘⣷⡻⠀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢡⡀⢯⣗⣗⡯⣗⣷⡃⠀⣼⠀⠀⠓⠀⠓⢽⠄⢹⣿⡄⢐⣧⠘⢁⣾⣿⣯⡯⢐⢌⠀⠁⣜⠆⢸⣿⡀⢟⠀⢨⣄⠙⡇⢹⠃⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣌⠣⡈⢾⢵⢯⣗⢷⡃⢰⣿⡧⠈⣟⡀⠀⡸⡅⢸⡿⣿⣦⣹⣶⣻⣿⣷⣿⣇⠨⣫⢀⢀⢎⠃⣼⡿⣇⡾⠀⡢⠘⣨⠇⠈⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⡐⠈⢫⣟⢾⢽⡂⢹⣿⣿⡄⠱⢕⢵⠝⢀⣾⣿⣿⣻⣿⣻⣿⣻⣾⣟⣿⣆⠑⡕⠗⣁⣴⣿⡿⣿⠃⠄⣾⣵⡟⠀⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠫⣟⡽⡃⢸⣿⣾⣿⡷⣾⣴⣻⡿⣯⣷⣿⣿⣻⣿⣽⣿⣟⣿⣻⣿⣟⣷⡿⣿⣽⣾⣿⡏⢠⠴⠟⠁⠄⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡈⢯⢧⠈⢿⣿⣾⣿⣿⣾⣿⢿⣿⣟⣿⣾⣿⣼⣿⣾⢿⣻⣿⣽⣿⣻⣿⣿⣻⣯⡿⠀⡄⡔⡔⠅⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠙⢆⠈⠻⣾⣿⣾⢿⣾⣿⣿⣽⠻⢷⣿⣻⣾⠿⠟⢿⣻⣽⣾⣿⢿⣾⡿⠋⡁⡜⠌⠈⣠⠪⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢸⡂⠀⣤⡈⠻⣾⣿⢿⣷⡿⣯⣷⣤⣤⣤⣤⣶⣾⣿⣿⢿⣻⠽⠛⢉⢠⠸⠈⡠⣰⠀⣿⡀⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢸⠀⢨⣗⡯⣖⡄⢈⠉⠓⠻⠿⢿⣟⣿⣻⣿⠽⠟⠞⠋⢉⢠⠀⡰⠑⢁⢰⠀⡯⣪⠀⣳⣇⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡗⠨⠀⣻⢮⡯⢺⠀⢜⠈⡊⢐⢶⢔⡤⡤⣤⢤⢖⣖⢷⠅⢸⠀⠐⢁⡴⡇⡘⢠⡫⡎⡇⢸⣺⡄⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⡯⣗⠇⡪⠀⡃⠠⡃⠨⣿⣷⣯⣿⣾⣽⣷⣯⣿⠂⠀⡠⠀⣻⣺⡇⠀⢸⡂⢝⢦⠐⣗⣧⠈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⣜⠀⡯⡿⠀⠆⢐⠁⢜⠌⢨⣿⣾⣿⣽⣯⣿⣷⣿⢿⡁⢌⠐⠀⣳⣳⡃⠀⡪⡇⢸⢕⠄⢳⢽⡆⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠁⡰⢱⠀⡯⡏⠨⠂⢀⡈⢈⡄⢸⣷⣿⣷⢿⣯⣷⣿⣾⣿⣆⠙⠅⠀⣞⣾⠀⢀⢯⡢⠘⣎⢇⠘⡽⣽⡀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⠀⠀⣰⡹⠀⢯⠇⢘⠀⠍⣴⣿⣤⣿⡿⣷⣿⢿⣻⣽⣷⣿⡿⣿⣷⡂⢀⣗⣿⠀⠰⠣⢯⡀⢗⡝⡄⠹⣳⢧⠈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⢁⠔⢁⠞⣈⣴⠀⣫⠃⡐⢀⢞⣿⡿⣾⣟⣿⣿⣽⣿⡿⣟⣿⣾⡿⣿⣽⡂⢐⣗⡗⢀⣶⣦⣦⣤⣄⣉⠘⠀⠹⡽⣆⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⡠⠃⡔⢁⣼⣿⡿⠀⢸⠀⡂⢸⢸⣿⡿⣟⣿⢿⣞⡿⣾⣿⢿⣟⣷⢿⣿⣷⠁⢰⢯⡇⢰⣿⣯⣿⣟⣿⡿⣿⣷⣤⣈⠛⢆⠘⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⢠⠊⡠⢊⣰⣿⣿⠟⣰⠀⢸⠀⠀⡎⣾⠿⠟⠛⣉⢉⠚⢮⢿⣾⢿⣝⠮⢋⣠⣈⠂⣸⢽⠀⢼⣟⣯⣷⣿⣟⣿⣿⣽⣿⣿⡷⡌⢣⡈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠁⡔⢁⡔⢡⣾⣿⣿⣧⡐⢿⠀⣞⠀⠀⣏⢦⡶⣞⣿⣽⣳⣳⣽⣿⢿⣻⣾⣴⣳⣷⣿⠀⣺⡝⠀⣽⣿⢿⣻⣽⣿⣽⣾⡿⣯⣿⣿⣿⡀⢳⡀⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⢀⠎⢠⠎⣠⣿⣿⣿⣿⣿⣿⣦⠀⡯⠀⠐⠧⠻⠛⠛⢋⢋⠋⠙⠛⠿⣿⢿⣷⡿⣿⣽⡿⠀⣷⠃⠀⣿⡿⣿⡿⣿⣽⣯⣷⣿⣿⡿⣿⣻⡇⢀⠹⣆⠘⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ "</span>; <span class="hljs-built_in">println!</span>(<span class="hljs-string">"{}"</span>, body); } </code></pre> <p>Done. Now when you run <code>ai</code>, you will see <a href="https://bsky.app/profile/did:plc:4hqjfn7m6n5hno3doamuhgef" target="_blank">ai</a>.</p> <pre><code class="lang-sh">$ cargo build $ ./target/debug/ai </code></pre> <p><img src="../img/ascii.png" alt></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="./" class="navigation navigation-prev " aria-label="Previous page: part 4"> <i class="fa fa-angle-left"></i> </a> <a href="1.html" class="navigation navigation-next " aria-label="Next page: config"> <i class="fa fa-angle-right"></i> </a> </div> <script> var gitbook = gitbook || []; gitbook.push(function() { gitbook.page.hasChanged({"page":{"title":"ai","level":"1.5.1","depth":2,"next":{"title":"config","level":"1.5.2","depth":2,"path":"c4/1.md","ref":"c4/1.md","articles":[]},"previous":{"title":"part 4","level":"1.5","depth":1,"path":"c4/README.md","ref":"c4/README.md","articles":[{"title":"ai","level":"1.5.1","depth":2,"path":"c4/0.md","ref":"c4/0.md","articles":[]},{"title":"config","level":"1.5.2","depth":2,"path":"c4/1.md","ref":"c4/1.md","articles":[]},{"title":"mention","level":"1.5.3","depth":2,"path":"c4/2.md","ref":"c4/2.md","articles":[]},{"title":"base64","level":"1.5.4","depth":2,"path":"c4/3.md","ref":"c4/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":"c4/0.md","mtime":"2023-07-31T07:03:19.152Z","type":"markdown"},"gitbook":{"version":"3.3.6","time":"2023-07-31T07:16:09.509Z"},"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>