incomplete work, will continue working on my laptop

This commit is contained in:
Rick 2021-07-06 08:50:15 +05:30
parent 2c9b5bd6a7
commit 7fd588170a
1 changed files with 17 additions and 1 deletions

18
twtxt-c
View File

@ -26,7 +26,12 @@ Commands:
tweet Append a new tweet to your twtxt file.
unfollow Remove an existing source from your...
view Show feed of given source.
registry Show registers\n"
registry Show registers\n
reg list Show registers
reg add Add your twtxt to registry
reg users List users on the registry
"
}
case $1 in
-h | --help)
@ -45,6 +50,7 @@ case $1 in
read -p "URL to twtxt [https://example.com/twtxt.txt]: " url
url=${url:-"https://example.com/twtxt.txt"}
printf "[twtxt]\n nick = %s\n twtfile = %s\n url = %s\n" "$nick" "$path_to_twtxt" "$url" >> $config/config
printf "https://twtxt.envs.net/api/plain/\n https://twtxt.tilde.institute/api/plain/" > $config/registry
;;
tweet)
export config=/home/$USER/.config/twtxt-c/config
@ -55,4 +61,14 @@ case $1 in
;;
*)
printf "Work in progress\n" ;;
reg)
case $2 in
list | *)
cat /home/$USER/twtxt-c/registry
;;
add)
url=
curl -X POST 'https://twtxt.tilde.institute/api/plain/users?url=&nickname='
esac