3 ms·
No Javascript: https://writing.exchange/@ernie.rss https://writing.exchange/@ernie.rss https://writing.exchange/@ernie/111977450241144169/embed https://writin
by 1vuio0pswjnm7 3y ago
No Javascript:
https://writing.exchange/@ernie.rss https://writing.exchange/@ernie.rss
https://writing.exchange/@ernie/111977450241144169/embed https://writing.exchange/@ernie/111977450241144169/embed
- 1vuio0pswjnm7 3y agoHere is how to get the replies: curl -si40A "" -o 1.json https://writing.exchange/api/v1/statuses/111977450241144169/context Here is a small program to convert the JSON to a simple, text-only HTML page. No Javascript. cat > 777.l /* mastodon */ int fileno (FILE *); #define jmp (yy_start) = 1 + 2 * int x,y=1,z=1; #define echo(y) {for(x=y;x<yyleng;x++)putc(yytext[x],yyout);fwrite("<br>",1,4,yyout);} %s M0 %option nounput noinput noyywrap %% \"poll\":(null|[^\"]+) z++; \"id\":\"[^\"]+ if(z){fwrite("<br>",1,4,yyout);y++;echo(6); z=0;} \"group\":(false|true) y=0; \"created_at\":\"[^\"]+ if(y)echo(14); \"acct\":\"[^\"]+ echo(8); \"content\":\" jmp M0; <M0>\", fwrite("<br>",1,4,yyout);putc(10,yyout);jmp 0; <M0>\\ <M0>\\u003c putc(60,yyout); <M0>\\u003e putc(62,yyout); <M0>\\u0026 putc(38,yyout); <M0>[^,] putc(yytext[0],yyout); .|\n %% int main(){ fwrite("<meta charset=utf-8>\n",1,21,stdout); yylex(); exit(0); } ^D flex -8Cem 777.l cc -O3 -std=c89 -W -Wall -pedantic -pipe lex.yy.c -static -o yy777 strip -s yy777 yy777 < 1.json > 1.htm firefox ./1.htm links 1.htm