mirror of
https://git.phreedom.club/localhost_frssoft/bbs-telnet
synced 2024-11-24 00:29:23 +02:00
Compare commits
No commits in common. "b3a414ab7e4fdda38911a387a54c515c543fe144" and "bcf33de7e12eada7f397bab5cab39a1bd90526ad" have entirely different histories.
b3a414ab7e
...
bcf33de7e1
14
executor.sh
14
executor.sh
|
@ -2,6 +2,19 @@
|
|||
|
||||
. ./config
|
||||
|
||||
toot(){
|
||||
curl -s -X POST -F in_reply_to_id=$reply -F status="$1" -F visibility='unlisted' -H "Authorization: Bearer $instance_token" https://$instance/api/v1/statuses
|
||||
}
|
||||
|
||||
timeline_home(){
|
||||
curl -s -H "Authorization: Bearer $instance_token" "https://$instance/api/v1/timelines/home?limit=40&max_id=$1" |
|
||||
jq -r '.[] |
|
||||
if .reblog then
|
||||
(["bump", .reblog.id, .reblog.account.acct] | join(" ")), .reblog.pleroma.content."text/plain", (.reblog.media_attachments[] | "attach", .url, .description // empty)
|
||||
else [.id, .account.acct], .pleroma.content."text/plain", (.media_attachments[] | "attach", .url, .description // empty)
|
||||
end | @text'
|
||||
}
|
||||
|
||||
remote_ip=$SOCAT_PEERADDR
|
||||
die(){
|
||||
rm access_granted/"$remote_ip"
|
||||
|
@ -13,7 +26,6 @@ mkdir -p -m 700 access_granted
|
|||
mkdir -p -m 700 access_denied
|
||||
|
||||
if [ -f access_denied/"$remote_ip" ]; then exit 0; fi
|
||||
. ./mastodon_api.sh
|
||||
|
||||
generator_session=$(zcat -f $system_dict | shuf -n 2 | tr -d "\n'")
|
||||
randpadding=$(head -c 8 /dev/urandom | base64)
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
#/bin/sh
|
||||
|
||||
toot(){
|
||||
curl -s -X POST -F in_reply_to_id=$reply -F status="$1" -F visibility='unlisted' -H "Authorization: Bearer $instance_token" https://$instance/api/v1/statuses
|
||||
}
|
||||
|
||||
timeline_render(){
|
||||
cat - | jq -r '.[] |
|
||||
if .reblog then
|
||||
"[up^ \(.reblog.id) \(.reblog.account.acct)]", .reblog.pleroma.content."text/plain", (.reblog.media_attachments[] | "+ attach \(.url)", .description // empty)
|
||||
else "[\(.id) \(.account.acct)]", .pleroma.content."text/plain", (.media_attachments[] | "+ attach \(.url)", .description // empty)
|
||||
end | @text'
|
||||
}
|
||||
|
||||
timeline_home(){
|
||||
curl -s -H "Authorization: Bearer $instance_token" "https://$instance/api/v1/timelines/home?limit=40&max_id=$1" | timeline_render
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue