<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
      <title>Ant Lab</title>
      <link>https://www.ant-lab.tw</link>
      <description>A space to record things I explore</description>
      <generator>Zola</generator>
      <language>en</language>
      <atom:link href="https://www.ant-lab.tw/rss.xml" rel="self" type="application/rss+xml"/>
      <lastBuildDate>Thu, 19 Mar 2026 00:00:00 +0000</lastBuildDate>
      <item>
          <title>Taming Configuration Complexity in Rust</title>
          <pubDate>Thu, 19 Mar 2026 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://www.ant-lab.tw/blog/2026-03-19/</link>
          <guid>https://www.ant-lab.tw/blog/2026-03-19/</guid>
          <description xml:base="https://www.ant-lab.tw/blog/2026-03-19/">&lt;p&gt;As a Rust system grows, configuration quietly becomes one of the biggest threats to maintainability — not through any single bad decision, but through accumulation.&lt;/p&gt;
&lt;h2 id=&quot;the-option-t-trap&quot;&gt;The &lt;code&gt;Option&amp;lt;T&amp;gt;&lt;/code&gt; Trap&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-option-t-trap&quot; aria-label=&quot;Anchor link for: the-option-t-trap&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;It starts innocently. A field isn&#39;t always required, so someone reaches for &lt;code&gt;Option&amp;lt;T&amp;gt;&lt;/code&gt;. Fair enough. But as the codebase expands, more optional fields appear, and suddenly the code is littered with &lt;code&gt;.unwrap()&lt;/code&gt;, &lt;code&gt;.unwrap_or_default()&lt;/code&gt;, &lt;code&gt;if let Some(...)&lt;/code&gt;, and &lt;code&gt;match&lt;/code&gt; arms that only exist to handle the absent case. Every new optional field doesn&#39;t just add a field — it adds branching logic throughout the codebase.&lt;/p&gt;
&lt;p&gt;More branches mean more test cases needed to reach the same coverage. More test cases mean longer CI runs. The complexity compounds quietly, and by the time it&#39;s noticed, it&#39;s woven into dozens of modules.&lt;/p&gt;
&lt;h2 id=&quot;config-fragmentation-across-crates&quot;&gt;Config Fragmentation Across Crates&lt;a class=&quot;zola-anchor&quot; href=&quot;#config-fragmentation-across-crates&quot; aria-label=&quot;Anchor link for: config-fragmentation-across-crates&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The second problem emerges at scale. As a product integrates more systems and handles more scenarios, configuration naturally wants to live closer to where it&#39;s used — so it fragments across crates. Each crate ends up with its own constants, default values, and builder functions. On top of that, the final config is assembled at runtime from multiple sources: config files, environment variables, feature flags, deployment overlays.&lt;/p&gt;
&lt;p&gt;The result is a system where it&#39;s genuinely hard to answer: &lt;em&gt;what is the effective configuration when this service starts?&lt;/em&gt; The deserialization logic and the patching logic become entangled, and switching a parser crate (say, from &lt;code&gt;toml&lt;/code&gt; to &lt;code&gt;serde_json&lt;/code&gt;) ripples through everything.&lt;/p&gt;
&lt;h2 id=&quot;a-better-approach-decoupling-patch-from-deserialization&quot;&gt;A Better Approach: Decoupling Patch from Deserialization&lt;a class=&quot;zola-anchor&quot; href=&quot;#a-better-approach-decoupling-patch-from-deserialization&quot; aria-label=&quot;Anchor link for: a-better-approach-decoupling-patch-from-deserialization&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The core insight is that &lt;em&gt;patching&lt;/em&gt; (layering overrides from files, env vars, defaults) and &lt;em&gt;deserializing&lt;/em&gt; (parsing a format into a struct) are two distinct concerns that most approaches conflate. Keeping them separate means you can swap your parser without touching your override logic, and manage your defaults in one place without scattering &lt;code&gt;Option&lt;/code&gt; unwrapping across the call sites.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https://github.com/yanganto/struct-patch&quot;&gt;Struct Patch&lt;/a&gt; is an open source project that takes this approach. It gives you a structured way to define configuration with layered patching, while staying decoupled from any specific parser crate — so you can keep using &lt;code&gt;serde&lt;/code&gt; with whatever format fits your project.&lt;/p&gt;
&lt;h2 id=&quot;see-it-in-practice&quot;&gt;See It in Practice&lt;a class=&quot;zola-anchor&quot; href=&quot;#see-it-in-practice&quot; aria-label=&quot;Anchor link for: see-it-in-practice&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I put together a demo project to show how this plays out in a realistic setup:&lt;/p&gt;
&lt;p&gt;👉 &lt;a rel=&quot;external&quot; href=&quot;https://github.com/yanganto/ConfigTemplate&quot;&gt;github.com/yanganto/ConfigTemplate&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you&#39;re hitting either of the problems above — optional field sprawl or fragmented multi-crate config — it&#39;s worth a look. The pattern scales well and the diff from a typical config setup is smaller than you might expect.&lt;/p&gt;
</description>
      </item>
      <item>
          <title>Configurable Keybindings</title>
          <pubDate>Wed, 24 Dec 2025 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://www.ant-lab.tw/blog/2025-12-24/</link>
          <guid>https://www.ant-lab.tw/blog/2025-12-24/</guid>
          <description xml:base="https://www.ant-lab.tw/blog/2025-12-24/">&lt;h1 id=&quot;recipe-configurable-keybindings-in-ratatui-apps&quot;&gt;Recipe: Configurable Keybindings in Ratatui Apps&lt;a class=&quot;zola-anchor&quot; href=&quot;#recipe-configurable-keybindings-in-ratatui-apps&quot; aria-label=&quot;Anchor link for: recipe-configurable-keybindings-in-ratatui-apps&quot;&gt;🔗&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;This recipe explores how to add customizable, user-driven keybindings to your Ratatui application.
It covers common approaches for managing keybindings, supporting user configuration, and maintaining
backward compatibility as your application evolves. We provide a design pattern here, concrete
implementations using the &lt;a rel=&quot;external&quot; href=&quot;https://github.com/yanganto/crossterm-keybind&quot;&gt;&lt;code&gt;crossterm-keybind&lt;/code&gt;&lt;/a&gt; or
&lt;a rel=&quot;external&quot; href=&quot;https://github.com/rhysd/keybinds-rs&quot;&gt;&lt;code&gt;keybind-rs&lt;/code&gt;&lt;/a&gt; are presented as examples, and also a general
migration guide for an existing tui project.&lt;/p&gt;
&lt;h2 id=&quot;problem-motivation&quot;&gt;Problem &amp;amp; motivation&lt;a class=&quot;zola-anchor&quot; href=&quot;#problem-motivation&quot; aria-label=&quot;Anchor link for: problem-motivation&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;With growing userbases, developers of Terminal UI (TUI) apps often get requests for alternative
keybinding schemes (like vim-style bindings or personalized shortcuts). Manually supporting such
requests quickly becomes a maintenance burden, and as your app evolves, users expect their custom
keybinds to remain compatible across updates.&lt;/p&gt;
&lt;h2 id=&quot;core-idea-separating-input-from-intent&quot;&gt;Core idea: separating input from intent&lt;a class=&quot;zola-anchor&quot; href=&quot;#core-idea-separating-input-from-intent&quot; aria-label=&quot;Anchor link for: core-idea-separating-input-from-intent&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;There may be more possible ways to solve this problem, and most problems can be solved by an
intermediate abstraction layer. Configurable keybindings are one such problem that benefits from
this approach. The abstraction layer could be a module, a struct/enum with a set of functions, or a
combination of these.&lt;/p&gt;
&lt;p&gt;Within this abstraction, other functions/handlers are not directly comparing the raw key events,
which are the user&#39;s key strikes. They just pass the raw event to the abstraction layer, and then
the layer, based on the user&#39;s key strikes, executes the corresponding functions or returns back an
&lt;em&gt;event token&lt;/em&gt; to let other functions know how to handle it.&lt;/p&gt;
&lt;p&gt;As you can imagine, one of the functions in the abstraction layer will read the user&#39;s key strikes,
and read a config file on disk like the following, then find out the user&#39;s meaning.&lt;/p&gt;
&lt;p&gt;However, user inputs are fragile and hard to trust, and frequently checking the config file on disk
is not efficient. So we normally need another function in the abstraction layer to read the file
from disk and deserialize it into memory. This way we can normalize and report possible malformed
user input at first, while the previous function performs comparison in memory in an efficient way.&lt;/p&gt;
&lt;h2 id=&quot;minimal-abstraction-no-crates&quot;&gt;Minimal abstraction (no crates)&lt;a class=&quot;zola-anchor&quot; href=&quot;#minimal-abstraction-no-crates&quot; aria-label=&quot;Anchor link for: minimal-abstraction-no-crates&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;First, a user provide a file input to the program know keybinds are using for different intention.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;keybind.txt&lt;/em&gt; - this file is possible in anykind of format or ordering, here is just an example&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #ABB2BF; background-color: #282C34;&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Control+c -&amp;gt; Close the app&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Following is a simple pseudo code to use a simple str for the &lt;em&gt;event token&lt;/em&gt;, and read from the
keybind.txt provided by user.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #ABB2BF; background-color: #282C34;&quot; &gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7F848E;font-style: italic;&quot;&gt;// keybind.rs&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C678DD;&quot;&gt;use&lt;/span&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt; std&lt;/span&gt;&lt;span&gt;::&lt;/span&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt;fs&lt;/span&gt;&lt;span&gt;::read_to_string;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C678DD;&quot;&gt;fn&lt;/span&gt;&lt;span style=&quot;color: #61AFEF;&quot;&gt; known_from_user_strikes&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: #E06C75;&quot;&gt;key&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt; crossterm&lt;/span&gt;&lt;span&gt;::&lt;/span&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt;KeyEvent&lt;/span&gt;&lt;span&gt;) -&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt; String&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C678DD;&quot;&gt;  for&lt;/span&gt;&lt;span style=&quot;color: #E06C75;&quot;&gt; line&lt;/span&gt;&lt;span style=&quot;color: #C678DD;&quot;&gt; in&lt;/span&gt;&lt;span style=&quot;color: #61AFEF;&quot;&gt; read_to_string&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: #98C379;&quot;&gt;&amp;quot;keybind.txt&amp;quot;&lt;/span&gt;&lt;span&gt;).&lt;/span&gt;&lt;span style=&quot;color: #61AFEF;&quot;&gt;unwrap&lt;/span&gt;&lt;span&gt;().&lt;/span&gt;&lt;span style=&quot;color: #61AFEF;&quot;&gt;lines&lt;/span&gt;&lt;span&gt;() {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C678DD;&quot;&gt;    if let&lt;/span&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt; Some&lt;/span&gt;&lt;span&gt;((&lt;/span&gt;&lt;span style=&quot;color: #E06C75;&quot;&gt;user_keybind_input&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: #E06C75;&quot;&gt; user_intention&lt;/span&gt;&lt;span&gt;))&lt;/span&gt;&lt;span style=&quot;color: #56B6C2;&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color: #E06C75;&quot;&gt; line&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span style=&quot;color: #61AFEF;&quot;&gt;split_once&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: #98C379;&quot;&gt;&amp;quot; -&amp;gt; &amp;quot;&lt;/span&gt;&lt;span&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7F848E;font-style: italic;&quot;&gt;      // comparing the keyevent with user input by pseudo function keybind_match&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C678DD;&quot;&gt;      if&lt;/span&gt;&lt;span style=&quot;color: #61AFEF;&quot;&gt; keybind_match&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: #E06C75;&quot;&gt;key&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: #E06C75;&quot;&gt; user_keybind_input&lt;/span&gt;&lt;span&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C678DD;&quot;&gt;        return&lt;/span&gt;&lt;span style=&quot;color: #E06C75;&quot;&gt; user_intention&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span style=&quot;color: #61AFEF;&quot;&gt;to_string&lt;/span&gt;&lt;span&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #98C379;&quot;&gt;  &amp;quot;nothing to do&amp;quot;&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span style=&quot;color: #61AFEF;&quot;&gt;to_string&lt;/span&gt;&lt;span&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With a file-based input, users can easily use different key bindings for different actions. As we
mentioned befored, preloading the config file can report error earlier and in a better efficient
way. Following are a simple pseudo code for loading the config, and we can a simple str for the
&lt;em&gt;event token&lt;/em&gt;.&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #ABB2BF; background-color: #282C34;&quot; &gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7F848E;font-style: italic;&quot;&gt;// keybind.rs&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C678DD;&quot;&gt;use&lt;/span&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt; std&lt;/span&gt;&lt;span&gt;::&lt;/span&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt;fs&lt;/span&gt;&lt;span&gt;::read_to_string;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C678DD;&quot;&gt;fn&lt;/span&gt;&lt;span style=&quot;color: #61AFEF;&quot;&gt; load_from_user_config&lt;/span&gt;&lt;span&gt;() -&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt; Result&lt;/span&gt;&lt;span&gt;&amp;lt;(), ()&amp;gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C678DD;&quot;&gt;  for&lt;/span&gt;&lt;span style=&quot;color: #E06C75;&quot;&gt; line&lt;/span&gt;&lt;span style=&quot;color: #C678DD;&quot;&gt; in&lt;/span&gt;&lt;span style=&quot;color: #61AFEF;&quot;&gt; read_to_string&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: #98C379;&quot;&gt;&amp;quot;keybind.txt&amp;quot;&lt;/span&gt;&lt;span&gt;).&lt;/span&gt;&lt;span style=&quot;color: #61AFEF;&quot;&gt;unwrap&lt;/span&gt;&lt;span&gt;().&lt;/span&gt;&lt;span style=&quot;color: #61AFEF;&quot;&gt;lines&lt;/span&gt;&lt;span&gt;() {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C678DD;&quot;&gt;    let&lt;/span&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt; Some&lt;/span&gt;&lt;span&gt;((&lt;/span&gt;&lt;span style=&quot;color: #E06C75;&quot;&gt;user_keybind_input&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: #E06C75;&quot;&gt; user_intention&lt;/span&gt;&lt;span&gt;))&lt;/span&gt;&lt;span style=&quot;color: #56B6C2;&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color: #E06C75;&quot;&gt; line&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span style=&quot;color: #61AFEF;&quot;&gt;split_once&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span style=&quot;color: #98C379;&quot;&gt;&amp;quot; -&amp;gt; &amp;quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span style=&quot;color: #C678DD;&quot;&gt; else&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7F848E;font-style: italic;&quot;&gt;      // Error handle&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7F848E;font-style: italic;&quot;&gt;    // Normalize users&amp;#39; input and save into memory, and also handle more possible errors&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt;  Ok&lt;/span&gt;&lt;span&gt;(())&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With good handling of user input parsing, error handling, and event comparison in these two
functions (one for config parsing and one for event matching), you can complete a configurable
keybindings feature for a TUI app in a 0-dependency way. However, keybinding issues involve more
than just these concerns, so we encourage you to read more and develop the best solution for your
needs.&lt;/p&gt;
&lt;h2 id=&quot;design-choices-and-constraints&quot;&gt;Design choices and constraints&lt;a class=&quot;zola-anchor&quot; href=&quot;#design-choices-and-constraints&quot; aria-label=&quot;Anchor link for: design-choices-and-constraints&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The following examples use an approach that defines all keybindings in &lt;em&gt;a single enum&lt;/em&gt;, in which the
&lt;em&gt;event tokens&lt;/em&gt; from the previous section are the enum variants. We are not saying that using an enum
is always the best practice, and some
&lt;a rel=&quot;external&quot; href=&quot;https://github.com/ratatui/ratatui/discussions/627&quot;&gt;discussion&lt;/a&gt; about using a struct as the &lt;em&gt;event
token&lt;/em&gt;. Here are some concrete implementations with more detail solutions for you to solve
keybind-related problems ahead.&lt;/p&gt;
&lt;h2 id=&quot;concrete-implementations-crates-as-examples&quot;&gt;Concrete implementations (crates as examples)&lt;a class=&quot;zola-anchor&quot; href=&quot;#concrete-implementations-crates-as-examples&quot; aria-label=&quot;Anchor link for: concrete-implementations-crates-as-examples&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;crossterm-keybind&quot;&gt;Crossterm-keybind&lt;a class=&quot;zola-anchor&quot; href=&quot;#crossterm-keybind&quot; aria-label=&quot;Anchor link for: crossterm-keybind&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #ABB2BF; background-color: #282C34;&quot; &gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C678DD;&quot;&gt;use&lt;/span&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt; crossterm_keybind&lt;/span&gt;&lt;span&gt;::&lt;/span&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt;KeyBind&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[derive(&lt;/span&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt;KeyBind&lt;/span&gt;&lt;span&gt;)]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C678DD;&quot;&gt;pub enum&lt;/span&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt; KeyEvent&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7F848E;font-style: italic;&quot;&gt;    /// Close the application&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    #[keybindings[&lt;/span&gt;&lt;span style=&quot;color: #98C379;&quot;&gt;&amp;quot;Control+c&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: #98C379;&quot;&gt; &amp;quot;Q&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: #98C379;&quot;&gt; &amp;quot;q&amp;quot;&lt;/span&gt;&lt;span&gt;]]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt;    Quit&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #7F848E;font-style: italic;&quot;&gt;    /// Toggle to open/close a widget showing all the commands&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    #[keybindings[&lt;/span&gt;&lt;span style=&quot;color: #98C379;&quot;&gt;&amp;quot;h&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span style=&quot;color: #98C379;&quot;&gt; &amp;quot;F1&amp;quot;&lt;/span&gt;&lt;span&gt;]]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt;    ShowHelp&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And following methods are implemented.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Initialize and read user&#39;s config
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;KeyEvent::init_and_load(Some(PathBuf::from(&quot;/The/path/to/keyconfig.toml&quot;)))?&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Know the user&#39;s intention
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;KeyBindEvent::Quit.match_any(&amp;amp;key)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;for event in KeyBindEvent::dispatch(&amp;amp;key) {...}&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Provide default configure with documentation
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;KeyBindEvent::toml_example()&lt;/code&gt; will return the content of the example.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;KeyBindEvent::to_toml_example(path)&lt;/code&gt; will write the example into a file.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Provide hint for current keybind
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Quit.key_bindings_display()&lt;/code&gt; to print current keybind in chars.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;keybind-rs&quot;&gt;Keybind-rs&lt;a class=&quot;zola-anchor&quot; href=&quot;#keybind-rs&quot; aria-label=&quot;Anchor link for: keybind-rs&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #ABB2BF; background-color: #282C34;&quot; &gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[derive(&lt;/span&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt;Deserialize&lt;/span&gt;&lt;span&gt;)]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C678DD;&quot;&gt;enum&lt;/span&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt; Action&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt;    Exit&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt;    End&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[derive(&lt;/span&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt;Deserialize&lt;/span&gt;&lt;span&gt;)]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C678DD;&quot;&gt;struct&lt;/span&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt; Config&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #E06C75;&quot;&gt;    keyboard&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt; Keybinds&lt;/span&gt;&lt;span&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #E5C07B;&quot;&gt;Action&lt;/span&gt;&lt;span&gt;&amp;gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And following methods are implemented. &lt;code&gt;if let Some(action) = keybinds.dispatch(&amp;amp;event) {...}&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&quot;summary&quot;&gt;Summary&lt;a class=&quot;zola-anchor&quot; href=&quot;#summary&quot; aria-label=&quot;Anchor link for: summary&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;With these approaches, the benefits of configurable keybinding and additional features provided by
third party crates are listed in the following, making it easier for you to find your solution:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;User Customization:&lt;/strong&gt; Let users adapt the app to their muscle memory and workflows.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multiple Shortcuts:&lt;/strong&gt; Map several key combos to a single action.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Better User Experience:&lt;/strong&gt; Power users and international users can adjust keyboard layouts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Backward Compatibility(crossterm-keybind):&lt;/strong&gt; It can always be compatible with legacy configs, if
we only make additions to the Enum.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Maintainability(crossterm-keybind):&lt;/strong&gt; It is easy to keep a keybind config with document updated
with the code.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Better Developer Experience(crossterm-keybind):&lt;/strong&gt; Easy to setup default keybindings.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flexible Keybindings(crossterm-keybind):&lt;/strong&gt; It is possible to trigger multiple enum variants from
one keybinding.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Keybind Hint(crossterm-keybind):&lt;/strong&gt; easier to know what the current keybind is.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Embedded Config(keybind-rs):&lt;/strong&gt; Keyboard can be part of the main config.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Customizable Deserialization(keybind-rs):&lt;/strong&gt; Customizable deserializer for the config.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Emacs-style(keybind-rs):&lt;/strong&gt; Using Emacs style keybinds and map multiple key strikes to an event.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are some constraints with these approaches you need to know ahead of time:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Always use the enum for new key bindings; do not directly handle keycode in functions.&lt;/li&gt;
&lt;li&gt;Using macros will slightly increase compile time, but this is not easy to detect with modern
computers.&lt;/li&gt;
&lt;li&gt;Only make additions to the enum to keep keybind config backward compatibility (crossterm-keybind).&lt;/li&gt;
&lt;li&gt;One keybind can only trigger one enum variant (keybind-rs).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;crossterm-keybind&lt;/code&gt; is a crate opened to used with features with less codding, and it&#39;s still
possible to use &lt;code&gt;crossterm-keybind-core&lt;/code&gt; alone to achieve a different approach. On the other hand,
&lt;code&gt;keybind-rs&lt;/code&gt; is a lightweight intended crate.&lt;/p&gt;
&lt;h2 id=&quot;migration-guide&quot;&gt;Migration guide&lt;a class=&quot;zola-anchor&quot; href=&quot;#migration-guide&quot; aria-label=&quot;Anchor link for: migration-guide&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You do not need to worry that the application will break if some keybinds are not migrated into the
enum. The following guide helps you complete the migration without issues.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a keybind enum first, and initialize it at the start of main
&lt;ul&gt;
&lt;li&gt;You can use different naming for the enum to avoid confusion, for example &lt;code&gt;AppEvent&lt;/code&gt;, not
&lt;code&gt;KeyEvent&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;(manual) Add &lt;code&gt;fn load_from_user_config()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;(crossterm-keybind) Use &lt;code&gt;AppEvent::init_and_load(None)?&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;(keybind-rs) Add deserializer for your config&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Gradually move crossterm::KeyEvent into the &lt;code&gt;match_any&lt;/code&gt; (crossterm-keybind) or &lt;code&gt;dispatch&lt;/code&gt; of the
enum, or manually create a &lt;code&gt;fn known_from_user_strikes(key: crossterm::KeyEvent)&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;Normally the condition will change from &lt;code&gt;match&lt;/code&gt; arms to &lt;code&gt;if&lt;/code&gt; arms in this step&lt;/li&gt;
&lt;li&gt;A simple search for &lt;code&gt;KeyCode&lt;/code&gt;, &lt;code&gt;KeyModifiers&lt;/code&gt; is good enough rather than searching for
&lt;code&gt;KeyEvent&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Make sure &lt;code&gt;crossterm::KeyCode&lt;/code&gt; or &lt;code&gt;crossterm::KeyModifiers&lt;/code&gt; are not being used directly in your
project&lt;/li&gt;
&lt;li&gt;Verify that &lt;code&gt;KeyCode&lt;/code&gt; and &lt;code&gt;KeyModifiers&lt;/code&gt; are managed through the KeyBind enum&lt;/li&gt;
&lt;li&gt;Allow users to customize the keybind
&lt;ul&gt;
&lt;li&gt;(manual, keybind-rs) Manually provide example for keybind&lt;/li&gt;
&lt;li&gt;(crossterm-keybind) Save the key config to disk with
&lt;code&gt;AppEvent::to_toml_example(&quot;keybind.toml&quot;)&lt;/code&gt;, and use &lt;code&gt;AppEvent::init_and_load(&quot;keybind.toml&quot;)?&lt;/code&gt;
to load the customized config&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;(Optional) Provide keybind hint in UI
&lt;ul&gt;
&lt;li&gt;(crossterm-keybind) Using &lt;code&gt;Quit.key_bindings_display()&lt;/code&gt; to print current keybind in chars in ui.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;optional-templates-references&quot;&gt;Optional templates &amp;amp; references&lt;a class=&quot;zola-anchor&quot; href=&quot;#optional-templates-references&quot; aria-label=&quot;Anchor link for: optional-templates-references&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you want a ready-made starting point that applies these ideas, here&#39;s a template that puts it all
together.&lt;/p&gt;
&lt;h3 id=&quot;option-1-using-github-template-for-crossterm-keybind&quot;&gt;Option 1. Using GitHub Template for crossterm-keybind&lt;a class=&quot;zola-anchor&quot; href=&quot;#option-1-using-github-template-for-crossterm-keybind&quot; aria-label=&quot;Anchor link for: option-1-using-github-template-for-crossterm-keybind&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Click the top-left green &lt;code&gt;Use this template&lt;/code&gt; button of
&lt;a rel=&quot;external&quot; href=&quot;https://github.com/yanganto/ratatui-keybind-template&quot;&gt;ratatui-keybind-template&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;or clone it &lt;code&gt;git clone https://github.com/yanganto/ratatui-keybind-template.git&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&quot;option-2-check-examples-from-keybind-rs&quot;&gt;Option 2. Check examples from keybind-rs&lt;a class=&quot;zola-anchor&quot; href=&quot;#option-2-check-examples-from-keybind-rs&quot; aria-label=&quot;Anchor link for: option-2-check-examples-from-keybind-rs&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Follow &lt;a rel=&quot;external&quot; href=&quot;https://github.com/rhysd/keybinds-rs/blob/main/examples&quot;&gt;examples&lt;/a&gt; from keybind-rs.&lt;/p&gt;
&lt;h3 id=&quot;references&quot;&gt;References&lt;a class=&quot;zola-anchor&quot; href=&quot;#references&quot; aria-label=&quot;Anchor link for: references&quot;&gt;🔗&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://github.com/yanganto/ratatui-keybind-template&quot;&gt;ratatui-keybind-template&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://github.com/yanganto/crossterm-keybind&quot;&gt;crossterm-keybind crate&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://github.com/rhysd/keybinds-rs&quot;&gt;keybind-rs crate&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://github.com/ratatui/templates/pull/124&quot;&gt;Pull request discussion/background&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https://github.com/ratatui/ratatui-website/pull/1008&quot;&gt;Pull request discussion/ratatui-website&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With this approach, you can let contributors and users maintain their own keyboard preferences,
reducing maintenance burden and increasing adoption of your Ratatui-based apps.&lt;/p&gt;
</description>
      </item>
      <item>
          <title>Again, but no worry</title>
          <pubDate>Mon, 04 Sep 2023 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://www.ant-lab.tw/blog/2023-09-04/</link>
          <guid>https://www.ant-lab.tw/blog/2023-09-04/</guid>
          <description xml:base="https://www.ant-lab.tw/blog/2023-09-04/">&lt;p&gt;Just need to time to seek my role again!&lt;/p&gt;
</description>
      </item>
      <item>
          <title>Ĝi estas Esperanta Enira metodo</title>
          <pubDate>Fri, 06 Dec 2019 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://www.ant-lab.tw/blog/2019-12-06/</link>
          <guid>https://www.ant-lab.tw/blog/2019-12-06/</guid>
          <description xml:base="https://www.ant-lab.tw/blog/2019-12-06/">&lt;p&gt;The title is &lt;code&gt;It is an Eperanto input method&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;These days, I am interested in Esperanto.
I know this may not really help to communicate with the world at this moment.
However, it is really idealism with a great heart.
I appreciate this idea and start my trip to &lt;a rel=&quot;external&quot; href=&quot;https://lernu.net/&quot;&gt;lernu!&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Besides,  I made an Esperanto keyboard for my favorite input method, &lt;a rel=&quot;external&quot; href=&quot;https://github.com/hime-ime/hime&quot;&gt;HIME&lt;/a&gt;.
Here is the &lt;a rel=&quot;external&quot; href=&quot;https://github.com/hime-ime/hime/pull/587&quot;&gt;PR&lt;/a&gt;, if you like to know how it works.&lt;/p&gt;
&lt;p&gt;The basic idea follows the Android google keyboard.
Because &lt;code&gt;q&lt;/code&gt;, &lt;code&gt;w&lt;/code&gt;, &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;y&lt;/code&gt; are not used in Esperanto, we reuse this key and let a similar Esperanta alphabet nearby the English alphabet.&lt;br /&gt;
For example, the &lt;code&gt;ĉ&lt;/code&gt; is taken the place &lt;code&gt;x&lt;/code&gt;,
because there is no &lt;code&gt;x&lt;/code&gt; in Esperanto, and the key &lt;code&gt;x&lt;/code&gt; is nearby &lt;code&gt;c&lt;/code&gt; in QWERT layout.
Furthermore, there are only three phrase with &lt;code&gt;ĥ&lt;/code&gt; in Esperanto, we use &lt;code&gt;ŭ&lt;/code&gt; for the key &lt;code&gt;y&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In addition, I add a prefix method, if someone really forgets the Esperanto layout.
You can key in  &lt;code&gt;^&lt;/code&gt; and &lt;code&gt;g&lt;/code&gt;, and the input method will change the letter into &lt;code&gt;ĝ&lt;/code&gt;.  Because &lt;code&gt;^&lt;/code&gt; is the special prefix key if you want to input pure &lt;code&gt;^&lt;/code&gt; with this input method, you just key in it twice.&lt;/p&gt;
&lt;p&gt;Here is the special mapping.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;q -&amp;gt; ŝ&lt;/li&gt;
&lt;li&gt;w -&amp;gt; ĝ&lt;/li&gt;
&lt;li&gt;x -&amp;gt; ĉ&lt;/li&gt;
&lt;li&gt;y -&amp;gt; ŭ&lt;/li&gt;
&lt;li&gt;; -&amp;gt; ĵ&lt;/li&gt;
&lt;li&gt;^h -&amp;gt; ĥ&lt;/li&gt;
&lt;li&gt;^^ -&amp;gt; ^&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is an example of output for the input method.
&lt;img src=&quot;/img/esperanto_output.png&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I use the green star symbol for the input method icon showing in the system tray because is proposed in 1892 according to &lt;a rel=&quot;external&quot; href=&quot;https://en.wikipedia.org/wiki/Esperanto_symbols&quot;&gt;Wikipedia&lt;/a&gt;.
&lt;img src=&quot;/img/esperanto_icon.png&quot; /&gt;&lt;/p&gt;
</description>
      </item>
      <item>
          <title>S3RS v0.3.0 release</title>
          <pubDate>Sat, 28 Sep 2019 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://www.ant-lab.tw/blog/2019-09-28/</link>
          <guid>https://www.ant-lab.tw/blog/2019-09-28/</guid>
          <description xml:base="https://www.ant-lab.tw/blog/2019-09-28/">&lt;p&gt;The most of difference between S3RS and other S3 clients is the shell interface.&lt;/p&gt;
&lt;p&gt;Because I often to change s3 configure file and connect to different S3 storage cluster in my work.&lt;/p&gt;
&lt;p&gt;the shell interface is easy for me to switch s3 connection with different S3 storage cluster.&lt;/p&gt;
&lt;p&gt;Recently, there are other people using my S3 client and request a command-line interface,&lt;/p&gt;
&lt;p&gt;so I implement this as the first priority.&lt;/p&gt;
&lt;p&gt;Now, S3RS is easy to use as a command line interface tool or a shell interface tool.&lt;/p&gt;
&lt;!-- yt(id=&quot;PNFoOJ1MuAw&quot;) --&gt;
&lt;p&gt;This is an example for original usage with S3RS.
&lt;img src=&quot;/img/s3rs_v0.3.0-shell.png&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Here, you can see the command line interface of S3RS.
&lt;img src=&quot;/img/s3rs_v0.3.0-cli.png&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Furthermore, the parameter of &lt;code&gt;--config=&lt;/code&gt; can be a full path of a configure file or the filename of the configure under &lt;code&gt;~/.config/s3rs&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you like my side project, please donate and also request new feature what you want.  Thank you.&lt;/p&gt;
&lt;!-- paypal(code=&quot;MXL9TXC4C2MQU&quot;, desc=&quot;Donate with a feature request&quot;) --&gt;
&lt;!-- paycoin(desc=&quot;A love from the outer space&quot;, btc=&quot;3EwoCmXr4HV7WD8uLcqvcJRYWF9Sz23Kqt&quot;, eth=&quot;0xeD5897cCEa7aee785D31cdcA87Cf59D1D041aAFC&quot;) --&gt;
</description>
      </item>
      <item>
          <title>S3RS v0.2.9 release</title>
          <pubDate>Sun, 22 Sep 2019 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://www.ant-lab.tw/blog/2019-09-22/</link>
          <guid>https://www.ant-lab.tw/blog/2019-09-22/</guid>
          <description xml:base="https://www.ant-lab.tw/blog/2019-09-22/">&lt;p&gt;S3 is object storage, the object is easy addressed by &lt;code&gt;bucket&lt;/code&gt; and &lt;code&gt;key&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;People still use &lt;code&gt;/&lt;/code&gt; in the key, but there is no folder concept in the &lt;code&gt;key&lt;/code&gt; part.&lt;/p&gt;
&lt;p&gt;However, key in the &lt;code&gt;s3://bucket/key&lt;/code&gt; to specify the object is normal but verbose.&lt;/p&gt;
&lt;p&gt;So, the way to address an object can be much easier.&lt;/p&gt;
&lt;!-- yt(id=&quot;_HVj7_dJEkE&quot;) --&gt;
&lt;p&gt;As you can see, these styles, &lt;code&gt;s3://bucket/key&lt;/code&gt;, &lt;code&gt;/bucket/key&lt;/code&gt;, and &lt;code&gt;bucket/key&lt;/code&gt;,
to address an object is acceptable in S3RS.
&lt;img src=&quot;/img/s3rs_v0.2.9.png&quot; /&gt;&lt;/p&gt;
&lt;p&gt;If you like my side project, please donate and also request new feature what you want.  Thank you.&lt;/p&gt;
&lt;!-- paypal(code=&quot;MXL9TXC4C2MQU&quot;, desc=&quot;Donate with a feature request&quot;) --&gt;
&lt;!-- paycoin(desc=&quot;A love from the outer space&quot;, btc=&quot;3EwoCmXr4HV7WD8uLcqvcJRYWF9Sz23Kqt&quot;, eth=&quot;0xeD5897cCEa7aee785D31cdcA87Cf59D1D041aAFC&quot;) --&gt;
</description>
      </item>
      <item>
          <title>S3RS v0.2.8 release</title>
          <pubDate>Sat, 21 Sep 2019 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://www.ant-lab.tw/blog/2019-09-21/</link>
          <guid>https://www.ant-lab.tw/blog/2019-09-21/</guid>
          <description xml:base="https://www.ant-lab.tw/blog/2019-09-21/">&lt;p&gt;S3RS is a command-line tool for S3 storage protocol.
This is also a side project when I working at Bigtera.
This agent provides basic S3 storage protocol both for CEPH and AWS.
The special feature is that can easy to switch with multiple config files.&lt;/p&gt;
&lt;p&gt;S3RS now release a new feature in v0.2.8 is to let the user filter the object list from a bucket.  Following video demonstrate this new feature.&lt;/p&gt;
&lt;!-- yt(id=&quot;59ijqbGxK6U&quot;) --&gt;
&lt;p&gt;As you can see, there are thousands of test files in a bucket.
&lt;img src=&quot;/img/s3rs_v0.2.8-1.png&quot; /&gt;&lt;/p&gt;
&lt;p&gt;By using S3RS, you can easily show the objects with this prefix.
&lt;img src=&quot;/img/s3rs_v0.2.8-2.png&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Also, you can list the detail about these objects.
&lt;img src=&quot;/img/s3rs_v0.2.8-3.png&quot; /&gt;&lt;/p&gt;
&lt;p&gt;If you like my side project, please donate and also request new feature what you want.  Thank you.&lt;/p&gt;
&lt;!-- paypal(code=&quot;MXL9TXC4C2MQU&quot;, desc=&quot;Donate with a feature request&quot;)  --&gt;
&lt;!-- paycoin(desc=&quot;A love from the outer space&quot;, btc=&quot;3EwoCmXr4HV7WD8uLcqvcJRYWF9Sz23Kqt&quot;, eth=&quot;0xeD5897cCEa7aee785D31cdcA87Cf59D1D041aAFC&quot;) --&gt;
</description>
      </item>
      <item>
          <title>Face to the Waterfall</title>
          <pubDate>Thu, 19 Sep 2019 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://www.ant-lab.tw/blog/2019-09-19/</link>
          <guid>https://www.ant-lab.tw/blog/2019-09-19/</guid>
          <description xml:base="https://www.ant-lab.tw/blog/2019-09-19/">&lt;figure&gt;
  &lt;img src=&quot;/img/climb_waterfall.jpg&quot; alt=&quot;It&#39;s me!&quot; /&gt;
  &lt;figcaption&gt;It&#39;s me!&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;This picture is taken at the &quot;school main entrance&quot; of this river.&lt;br /&gt;
The school main entrance means that means there will be a new world after the climber over it.
Climbing over the small waterfall is not really hard, but it still needs faith.
There are several moments the climber may afraid, first is at the first sight of the waterfall,
hearing the sounds and feeling the water splashed on the face. The second is the moment climbing on and leaving the pool.
When leaving the pool, the body is very heavy because of wet and losing buoyancy.
The last also the most is when on the top of the wall because there is the longest distance climber may fall.&lt;/p&gt;
&lt;p&gt;This month I leave my comfort zone because I still try to my destiny.&lt;br /&gt;
I like to learn new things and not easy to comprise with legacy technologies.
Give up what I accumulate, and start to search is just like the first moment to see the waterfall, and try to leave the pool.
I know there will be a period I need to bear the heavy things in my life,  and I still need to face another difficulties in the future.
Maybe I will be afraid.
However, I put myself in this situation and I know when these overcome I will be better and excellent.&lt;/p&gt;
</description>
      </item>
      <item>
          <title>[legacy] Line Billing Bot</title>
          <pubDate>Wed, 17 Jan 2018 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://www.ant-lab.tw/blog/2018-01-17/</link>
          <guid>https://www.ant-lab.tw/blog/2018-01-17/</guid>
          <description xml:base="https://www.ant-lab.tw/blog/2018-01-17/">&lt;p&gt;Accounting is a tedious and easily forgotten thing.
By connecting Line Bot API and Google Sheet API,
acounting become easy and quick by talking with line bot.
Besides, it can be customize as you wish.&lt;/p&gt;
&lt;p&gt;This is an example of line bot view.
&lt;img src=&quot;/img/line_bot.png&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The is an example of the google sheet.
&lt;img src=&quot;/img/line_bot_gsheet.png&quot; /&gt;&lt;/p&gt;
&lt;p&gt;If you are interesting with this project, you can find more &lt;a rel=&quot;external&quot; href=&quot;https://github.com/yanganto/LineBillingBot&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;!-- paypal(code=&quot;MXL9TXC4C2MQU&quot;, desc=&quot;Donate with a feature request&quot;)  --&gt;
&lt;!-- paycoin(desc=&quot;A love from the outer space&quot;, btc=&quot;3EwoCmXr4HV7WD8uLcqvcJRYWF9Sz23Kqt&quot;, eth=&quot;0xeD5897cCEa7aee785D31cdcA87Cf59D1D041aAFC&quot;) --&gt;
</description>
      </item>
      <item>
          <title>[legacy] PAY</title>
          <pubDate>Tue, 25 Aug 2015 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://www.ant-lab.tw/blog/2015-08-25/</link>
          <guid>https://www.ant-lab.tw/blog/2015-08-25/</guid>
          <description xml:base="https://www.ant-lab.tw/blog/2015-08-25/">&lt;h2 id=&quot;pay&quot;&gt;PAY&lt;a class=&quot;zola-anchor&quot; href=&quot;#pay&quot; aria-label=&quot;Anchor link for: pay&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;An ordering system&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There are so may great but small restaurant in Taiwan, people need to line up for ordering. I want to solve this problem by using RPi2. When the RPi2 connect to the wifi ap and power up, the display shows the IP, which directs to a web application. From the web application, the store manager can easily print out QR codes and paste these codes on tables. Thus, customers can easily order meals by scanning the QR codes. The most different thing between the POS system is that people can use their own device to order meals. Besides, the project is open source, so it is easy to maintain and customize by themself.&lt;/p&gt;
&lt;!-- polaroid(f=&quot;pay.jpg&quot;, desc=&quot;This is the rasperberry pi in my home.&quot;) --&gt;
&lt;img src=&quot;/img/pay.jpg&quot; /&gt;
&lt;p&gt;If you are interesting with this project, you can find more &lt;a rel=&quot;external&quot; href=&quot;https://github.com/yanganto/pay&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;!-- paypal(code=&quot;MXL9TXC4C2MQU&quot;, desc=&quot;Donate with a feature request&quot;) --&gt; 
&lt;!-- paycoin(desc=&quot;A love from the outer space&quot;, btc=&quot;3EwoCmXr4HV7WD8uLcqvcJRYWF9Sz23Kqt&quot;, eth=&quot;0xeD5897cCEa7aee785D31cdcA87Cf59D1D041aAFC&quot;) --&gt; 
</description>
      </item>
      <item>
          <title>[legacy] NoDoorBell</title>
          <pubDate>Mon, 27 Apr 2015 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://www.ant-lab.tw/blog/2015-04-27/</link>
          <guid>https://www.ant-lab.tw/blog/2015-04-27/</guid>
          <description xml:base="https://www.ant-lab.tw/blog/2015-04-27/">&lt;h2 id=&quot;nodoorbell&quot;&gt;NoDoorBell&lt;a class=&quot;zola-anchor&quot; href=&quot;#nodoorbell&quot; aria-label=&quot;Anchor link for: nodoorbell&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I am living in an apratment. The building is old, and the doorbell of the building is broken. Some people live in the same building do not want to buy a new door bell, thus I make this virtual doorbell for me. I post a QR code, which direct to the specific web page, on the wall near the front door of the apartment. When the specific web page loading, the http server in my home will play the door bell sound, so as to notify me.&lt;/p&gt;
&lt;!-- polaroid(f=&quot;QR_DoorBell.jpg&quot;, desc=&quot;The QR code post in my house.&quot;) --&gt;
&lt;img src=&quot;/img/QR_DoorBell.jpg&quot; /&gt;
&lt;p&gt;If you are interesting with this project, you can find more &lt;a rel=&quot;external&quot; href=&quot;https://github.com/yanganto/NoDoorBell&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
      </item>
    </channel>
</rss>
