Skip to content

Commit

Permalink
rebuilding site Thu Jan 25 14:13:32 UTC 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
johtani committed Jan 25, 2024
1 parent a541a7a commit f824272
Show file tree
Hide file tree
Showing 603 changed files with 4,732 additions and 1,507 deletions.
2 changes: 1 addition & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ <h1>404</h1>

</ul>
<p class="copyright text-muted">
Copyright &copy; @johtaniの日記 3rd 2023
Copyright &copy; @johtaniの日記 3rd 2024
<br>
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
<iframe
Expand Down
2 changes: 1 addition & 1 deletion algolia.json

Large diffs are not rendered by default.

56 changes: 55 additions & 1 deletion atom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,61 @@
<description>Recent content on @johtaniの日記 3rd</description>
<generator>Hugo -- gohugo.io</generator>
<language>ja</language>
<lastBuildDate>Sun, 31 Dec 2023 07:49:21 +0000</lastBuildDate><atom:link href="https://blog.johtani.info/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Thu, 25 Jan 2024 09:30:53 +0000</lastBuildDate><atom:link href="https://blog.johtani.info/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>kagome-botのユーザーサービス化</title>
<link>https://blog.johtani.info/blog/2024/01/25/kagome-bot-as-a-user-service/</link>
<pubDate>Thu, 25 Jan 2024 09:30:53 +0000</pubDate>

<guid>https://blog.johtani.info/blog/2024/01/25/kagome-bot-as-a-user-service/</guid>
<description>日常でよく、形態素解析したくなることがありますよね? そして、Slackも日常的に立ち上がってますよね? ということは、Slackのボットとして</description>
<content:encoded>&lt;p&gt;日常でよく、形態素解析したくなることがありますよね?
そして、Slackも日常的に立ち上がってますよね?
ということは、Slackのボットとして常駐してもらえばできるのでは?&lt;/p&gt;
&lt;h2 id=&#34;kagome-bot&#34;&gt;kagome-bot&lt;/h2&gt;
&lt;p&gt;知り合いが&lt;a href=&#34;https://github.com/ikawaha/kagome&#34;&gt;kagome&lt;/a&gt;という形態素解析ライブラリを開発しています。
その知り合いが、ボットにもしてくれています(複数辞書対応してみたかったので、PR作って取り込んでもらいました)。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/ikawaha/kagome-bot&#34;&gt;https://github.com/ikawaha/kagome-bot&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;ただ、デプロイはしてなかったので、我が家にあるUbuntuのサーバーにデプロイして動かすことにしました。
ボットについては、上記のリポジトリを見てもらえればいいかなと。&lt;/p&gt;
&lt;p&gt;とりあえず動けばいいや、ということで、適当なshell scriptに&lt;code&gt;nohup&lt;/code&gt;で起動していたのですが、Ubuntuの更新後の再起動で毎回ログインしてスクリプトの実行はめんどくさいな?ということでググって調べてみました。&lt;/p&gt;
&lt;h2 id=&#34;systemdでユーザーのサービスとして登録&#34;&gt;systemdでユーザーのサービスとして登録&lt;/h2&gt;
&lt;p&gt;参考ブログにある手順ほぼそのままでした。知見ありがたいです。&lt;/p&gt;
&lt;p&gt;サービスの登録自体は、指定のディレクトリにファイルを作るのではなく、systemdコマンドをしようしました。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ systemctl --user --force --full edit kagome
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;これで、参考ブログにあるように&lt;code&gt;kagome.service&lt;/code&gt;というファイルが&lt;code&gt;~/.config/systemd/user/&lt;/code&gt;ディレクトリに作られます。
ファイルの内容などはほぼ参考ブログにある通りです。こんなかんじ。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[Unit]
Description=kagome bot

[Service]
ExecStart=/home/johtani/kagome-bot/start_kagomebot_service.sh
ExecStop=/bin/kill ${MAINPID}
Restart=always

[Install]
WantedBy=default.target
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;code&gt;start_kagomebot_service.sh&lt;/code&gt;の中で、kagome-botコマンドを実行しますが、こちらは絶対パスで記述しておきました。
サービス起動時のパスは&lt;code&gt;~/&lt;/code&gt;のようなのですが、念のために。&lt;/p&gt;
&lt;p&gt;あとは、次の手順でサービスを登録して開始します。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ systemctl --user enable kagome
$ systemctl --user start kagome
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;ログを見るのは&lt;code&gt;journalctl&lt;/code&gt;コマンドです。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ journalctl --user -u kagome
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;あとは、以下のコマンドを実行しないと、マシン再起動後にログインするまでサービスが起動しないので忘れないようにしましょう。
(忘れてログインしてみて起動してるじゃん?というコントみたいなことをしてしまいました)。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo loginctl enable-linger username
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;参考ブログ本当にありがたいですね。
備忘録のついでにブログにしておきます。&lt;/p&gt;
&lt;h2 id=&#34;参考ブログ&#34;&gt;参考ブログ&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://pyopyopyo.hatenablog.com/entry/2021/04/30/233755&#34;&gt;ユーザー権限で systemd のサービスを稼働させる方法 - pyopyopyo - Linuxとかプログラミングの覚え書き -&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content:encoded>
</item>

<item>
<title>今年の振り返りと来年の抱負(2023)</title>
<link>https://blog.johtani.info/blog/2023/12/31/review-2023/</link>
Expand Down
4 changes: 3 additions & 1 deletion blog/2011/05/20/ブログはじめます/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,8 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>





<a href="/tags/hadoop" title="hadoop">
hadoop
</a>
Expand Down Expand Up @@ -795,7 +797,7 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>

</ul>
<p class="copyright text-muted">
Copyright &copy; @johtaniの日記 3rd 2023
Copyright &copy; @johtaniの日記 3rd 2024
<br>
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
<iframe
Expand Down
4 changes: 3 additions & 1 deletion blog/2011/05/23/lucene-gosenとは/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>





<a href="/tags/hadoop" title="hadoop">
hadoop
</a>
Expand Down Expand Up @@ -830,7 +832,7 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>

</ul>
<p class="copyright text-muted">
Copyright &copy; @johtaniの日記 3rd 2023
Copyright &copy; @johtaniの日記 3rd 2024
<br>
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
<iframe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,8 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>





<a href="/tags/hadoop" title="hadoop">
hadoop
</a>
Expand Down Expand Up @@ -845,7 +847,7 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>

</ul>
<p class="copyright text-muted">
Copyright &copy; @johtaniの日記 3rd 2023
Copyright &copy; @johtaniの日記 3rd 2024
<br>
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
<iframe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,8 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>





<a href="/tags/hadoop" title="hadoop">
hadoop
</a>
Expand Down Expand Up @@ -960,7 +962,7 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>

</ul>
<p class="copyright text-muted">
Copyright &copy; @johtaniの日記 3rd 2023
Copyright &copy; @johtaniの日記 3rd 2024
<br>
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
<iframe
Expand Down
4 changes: 3 additions & 1 deletion blog/2011/06/06/lucene-gosenのtokenfilterたち/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>





<a href="/tags/hadoop" title="hadoop">
hadoop
</a>
Expand Down Expand Up @@ -838,7 +840,7 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>

</ul>
<p class="copyright text-muted">
Copyright &copy; @johtaniの日記 3rd 2023
Copyright &copy; @johtaniの日記 3rd 2024
<br>
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
<iframe
Expand Down
4 changes: 3 additions & 1 deletion blog/2011/06/13/lucene-gosen-1-1-0-リリース/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>





<a href="/tags/hadoop" title="hadoop">
hadoop
</a>
Expand Down Expand Up @@ -802,7 +804,7 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>

</ul>
<p class="copyright text-muted">
Copyright &copy; @johtaniの日記 3rd 2023
Copyright &copy; @johtaniの日記 3rd 2024
<br>
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
<iframe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,8 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>





<a href="/tags/hadoop" title="hadoop">
hadoop
</a>
Expand Down Expand Up @@ -868,7 +870,7 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>

</ul>
<p class="copyright text-muted">
Copyright &copy; @johtaniの日記 3rd 2023
Copyright &copy; @johtaniの日記 3rd 2024
<br>
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
<iframe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,8 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>





<a href="/tags/hadoop" title="hadoop">
hadoop
</a>
Expand Down Expand Up @@ -821,7 +823,7 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>

</ul>
<p class="copyright text-muted">
Copyright &copy; @johtaniの日記 3rd 2023
Copyright &copy; @johtaniの日記 3rd 2024
<br>
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
<iframe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,8 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>





<a href="/tags/hadoop" title="hadoop">
hadoop
</a>
Expand Down Expand Up @@ -807,7 +809,7 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>

</ul>
<p class="copyright text-muted">
Copyright &copy; @johtaniの日記 3rd 2023
Copyright &copy; @johtaniの日記 3rd 2024
<br>
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
<iframe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,8 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>





<a href="/tags/hadoop" title="hadoop">
hadoop
</a>
Expand Down Expand Up @@ -1106,7 +1108,7 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>

</ul>
<p class="copyright text-muted">
Copyright &copy; @johtaniの日記 3rd 2023
Copyright &copy; @johtaniの日記 3rd 2024
<br>
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
<iframe
Expand Down
4 changes: 3 additions & 1 deletion blog/2011/07/01/lucene-solr-3-3リリース速報/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>





<a href="/tags/hadoop" title="hadoop">
hadoop
</a>
Expand Down Expand Up @@ -805,7 +807,7 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>

</ul>
<p class="copyright text-muted">
Copyright &copy; @johtaniの日記 3rd 2023
Copyright &copy; @johtaniの日記 3rd 2024
<br>
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
<iframe
Expand Down
4 changes: 3 additions & 1 deletion blog/2011/07/04/lucene-gosen-1-1-1リリース/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,8 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>





<a href="/tags/hadoop" title="hadoop">
hadoop
</a>
Expand Down Expand Up @@ -800,7 +802,7 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>

</ul>
<p class="copyright text-muted">
Copyright &copy; @johtaniの日記 3rd 2023
Copyright &copy; @johtaniの日記 3rd 2024
<br>
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
<iframe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,8 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>





<a href="/tags/hadoop" title="hadoop">
hadoop
</a>
Expand Down Expand Up @@ -878,7 +880,7 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>

</ul>
<p class="copyright text-muted">
Copyright &copy; @johtaniの日記 3rd 2023
Copyright &copy; @johtaniの日記 3rd 2024
<br>
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
<iframe
Expand Down
4 changes: 3 additions & 1 deletion blog/2011/07/20/kuromojiを調べてみた/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,8 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>





<a href="/tags/hadoop" title="hadoop">
hadoop
</a>
Expand Down Expand Up @@ -870,7 +872,7 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>

</ul>
<p class="copyright text-muted">
Copyright &copy; @johtaniの日記 3rd 2023
Copyright &copy; @johtaniの日記 3rd 2024
<br>
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
<iframe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,8 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>





<a href="/tags/hadoop" title="hadoop">
hadoop
</a>
Expand Down Expand Up @@ -1101,7 +1103,7 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>

</ul>
<p class="copyright text-muted">
Copyright &copy; @johtaniの日記 3rd 2023
Copyright &copy; @johtaniの日記 3rd 2024
<br>
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
<iframe
Expand Down
4 changes: 3 additions & 1 deletion blog/2011/08/04/apple教に入信しました/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,8 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>





<a href="/tags/hadoop" title="hadoop">
hadoop
</a>
Expand Down Expand Up @@ -853,7 +855,7 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>

</ul>
<p class="copyright text-muted">
Copyright &copy; @johtaniの日記 3rd 2023
Copyright &copy; @johtaniの日記 3rd 2024
<br>
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
<iframe
Expand Down
4 changes: 3 additions & 1 deletion blog/2011/08/10/mbaセットアップ備忘録/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,8 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>





<a href="/tags/hadoop" title="hadoop">
hadoop
</a>
Expand Down Expand Up @@ -844,7 +846,7 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>

</ul>
<p class="copyright text-muted">
Copyright &copy; @johtaniの日記 3rd 2023
Copyright &copy; @johtaniの日記 3rd 2024
<br>
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
<iframe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>





<a href="/tags/hadoop" title="hadoop">
hadoop
</a>
Expand Down Expand Up @@ -841,7 +843,7 @@ <h5><a href="/tags/">FEATURED TAGS</a></h5>

</ul>
<p class="copyright text-muted">
Copyright &copy; @johtaniの日記 3rd 2023
Copyright &copy; @johtaniの日記 3rd 2024
<br>
<a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
<iframe
Expand Down
Loading

0 comments on commit f824272

Please sign in to comment.