|
||
---|---|---|
.github/workflows | ||
scpt | ||
src | ||
.gitignore | ||
Cargo.toml | ||
example.config.toml | ||
readme.md |
readme.md
art
is cli clietn for at written in rust.
# example
$ curl -sLO https://github.com/syui/atr/releases/download/latest/atr-x86_64-apple-darwin
$ mv atr-* atr
$ chmod +x atr
$ ./atr
build
support : cargo 1.67.1
err : cargo 1.6.8.x
rejected by a future version of Rust: rustc-serialize v0.3.24
# install rust
$ sudo pacman -S rust
$ cargo build
$ ./target/debug/atr s
$ ./target/debug/atr s -u syui.bsky.social
start
# login
$ atr start -u syui.bsky.social -p xxx
$ atr t
~/.config/atr/config.toml
host = "bsky.social"
pass = "xxx"
user = "syui.bsky.social"
use
# feed
$ atr f
$ atr f -u syui.bsky.social
# post
$ atr p "post message"
# post link
$ atr p "post message" -l https://syui.cf
# timeline
$ atr t
# media post
$ atr m ~/test.png
# custom handle
$ atr h te.bsky.social
$ vim ~/.config/atr/config.toml
user = "syui.bsky.social"
$ atr a
$ atr t
# account create
$ cat ~/.config/atr/config.toml
user = "syui.bsky.social"
pass = "xxx"
host = "bsky.social"
$ atr c -i ${invite_code} -e user@example.com
# mention
$ atr @ syui.bsky.social
$ atr @ syui.bsky.social -p "message"
# account switch
$ atr ss -d
$ atr ss -s
# prompt
my_bluesky() {
source ~/.config/atr/atr.zsh
if [ "${BLUESKY_BASE}" = "syui.cf" ];then
export bluesky="%F{blue}${icon_bluesky} : @${BLUESKY_BASE}.bsky.social%f"
else
export bluesky="%F{red}${icon_bluesky} : @${BLUESKY_BASE}%f"
fi
}
autoload -Uz add-zsh-hook
add-zsh-hook precmd my_bluesky
$ atr deepl-api "xxx"
# deepl translate [en -> ja]
$ atr tt "test" -l ja
# deepl translate [ja -> en]
$ atr tt "テスト" -l en
$ atr p "deeplで翻訳してポストしています" -e
Translated and posted by deepl
$ atr p "Translated and posted by deepl" -j
deeplで翻訳してポストしています
$ atr openai-api "xxx"
$ atr chat "Lexicon is a schema system used to define RPC methods and record types"
It is used in distributed systems to define the various components, such as clients, servers, and databases, and their interactions. Lexicon is often used to define the data structure for RPC methods and records, and to define the communications protocols between the various components of a distributed system.
# reply
$ atr r "reply post" -c $cid -u $uri
# test : post reply option
$ atr p "[en -> ja] translate and post the english to japanese with deepl" -j --cid $cid --uri $uri
$ atr p "[chatgpt] post by openai chatgpt" -c --cid $cid --uri $uri
# test : bot
$ atr bot
ref
openai : https://github.com/syui/msr/tree/openai