forked from g1n/twtxt-c
incomplete work, will continue working on my laptop
This commit is contained in:
parent
2c9b5bd6a7
commit
7fd588170a
18
twtxt-c
18
twtxt-c
|
@ -26,7 +26,12 @@ Commands:
|
||||||
tweet Append a new tweet to your twtxt file.
|
tweet Append a new tweet to your twtxt file.
|
||||||
unfollow Remove an existing source from your...
|
unfollow Remove an existing source from your...
|
||||||
view Show feed of given source.
|
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
|
case $1 in
|
||||||
-h | --help)
|
-h | --help)
|
||||||
|
@ -45,6 +50,7 @@ case $1 in
|
||||||
read -p "URL to twtxt [https://example.com/twtxt.txt]: " url
|
read -p "URL to twtxt [https://example.com/twtxt.txt]: " url
|
||||||
url=${url:-"https://example.com/twtxt.txt"}
|
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 "[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)
|
tweet)
|
||||||
export config=/home/$USER/.config/twtxt-c/config
|
export config=/home/$USER/.config/twtxt-c/config
|
||||||
|
@ -55,4 +61,14 @@ case $1 in
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
printf "Work in progress\n" ;;
|
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
|
esac
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue