From ab86d9bf5d9accf681588dd48df581d77126708c Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Sat, 12 Nov 2022 13:00:01 -0500 Subject: rip twitter Signed-off-by: Xe Iaso --- blog/birdsong-persists.markdown | 72 ++++++++++++ blog/rip-twitter.markdown | 128 +++++++++++++++++++++ ...4d2769cc2ef33d4e82080befb67e32f833050b712e.json | 34 ++++++ ...d091ca5d35fdee9e9e1199f0fab1b81a709e0641aa.json | 34 ++++++ ...71a6b5751cbf8fd82aac01c08e82223bf6733514bb.json | 32 ++++++ ...4650871c1ea6249e8fc77a8ab036794daa4bf9f585.json | 50 ++++++++ ...6974989523ccc3cd862ca0a63c9628d6fa09af0850.json | 34 ++++++ ...fd6539bbd5570e6d0305aafc736244ba6a4393bb9f.json | 28 +++++ ...09249e4508485de17a9b61c0f66faf8150bb6e9cd2.json | 28 +++++ ...04f497885c79bb7a9f9ee13334ebaf4ca7e41b122f.json | 24 ++++ ...6e5aadd105d376cf12194b1248ffe0a27d91eb4a28.json | 24 ++++ ...6112cce09fb894ba4e14eb113e8bcabc5d0e8fd7ef.json | 28 +++++ lib/xesite_templates/src/lib.rs | 5 +- lib/xesite_types/src/mastodon.rs | 33 +++--- src/bin/fetch_mastodon_post.rs | 25 ++-- 15 files changed, 556 insertions(+), 23 deletions(-) create mode 100644 blog/birdsong-persists.markdown create mode 100644 blog/rip-twitter.markdown create mode 100644 data/toots/31777d891e2ef2943d7f484d2769cc2ef33d4e82080befb67e32f833050b712e.json create mode 100644 data/toots/323905a6746cdd5eb8a994d091ca5d35fdee9e9e1199f0fab1b81a709e0641aa.json create mode 100644 data/toots/455ffb63a80adb1422a4a471a6b5751cbf8fd82aac01c08e82223bf6733514bb.json create mode 100644 data/toots/afb86f8f3a751552fe10a14650871c1ea6249e8fc77a8ab036794daa4bf9f585.json create mode 100644 data/toots/dc6a3c52c03b28cf6dfd766974989523ccc3cd862ca0a63c9628d6fa09af0850.json create mode 100644 data/users/5ec5fb05e2d4420aa4f3b1fd6539bbd5570e6d0305aafc736244ba6a4393bb9f.json create mode 100644 data/users/7f26aa6a1980f5fd14167609249e4508485de17a9b61c0f66faf8150bb6e9cd2.json create mode 100644 data/users/85e2523d36626f373f76f404f497885c79bb7a9f9ee13334ebaf4ca7e41b122f.json create mode 100644 data/users/de4007588856073a68b85f6e5aadd105d376cf12194b1248ffe0a27d91eb4a28.json create mode 100644 data/users/e5886a0174dcc2d1d2288c6112cce09fb894ba4e14eb113e8bcabc5d0e8fd7ef.json diff --git a/blog/birdsong-persists.markdown b/blog/birdsong-persists.markdown new file mode 100644 index 0000000..f022d17 --- /dev/null +++ b/blog/birdsong-persists.markdown @@ -0,0 +1,72 @@ +--- +title: "The birdsong persists" +date: 2022-11-13 +series: twitter +tags: + - prose +--- + + + +In the days before, there were many roosts for the itinerant birds of the ether. +Flocks of birds flittered about between roosts, but never really settled on one +in particular for very long. This continued for generations, the birds just +understood the roosts being temporary as an immutable fact of their existence. + +Then a bird decided to build a new roost. A roost that could house _everyone_. +With a bright and proud announcement, that bird proclaimed thus: + + + +Birds flocked to the new roost and everyone started to sing and tweet to +eachother. This filled that small initial roost quickly. Birds were joining +faster than the roost could be built, but they stuffed themselves in anyways. +Eventually the icon of failure had been purged and the birdsong was able to +thrive on that roost. + +The roost became a massive hub in that network of itinerant roosts. As the roost +grew, the other roosts it replaced started to feel depopulated and withered. +Others lost interest and joined in the main roost. + +The roost continued to grow at the expense of all the others. It kept growing +and consuming more and more flocks. Those flocks started to lose their identity +of their previous roosts and started to see themselves as _belonging_ in the big +roost. + +With so much birdsong, you would think that the roost would be invincible. It +was not. It was in dire straits. The constant building and maintenance had a +cost that was only realized when things were almost falling apart. Somehow they +had managed to avoid the cracks showing on the outside, but things were +incredibly dire. + +They made a deal with the devil during a point of contention between the flocks. +The roost thrived, but at a huge cost. The previously united flock had been +divided into groups that wanted to destroy eachother. The roost continued, but +the flocks started to grow bitter. + +Then came the idealist. The idealist proposed to buy the roost from its former +owners and reshape it into his vision. The idealist saw the vision and agreed +before seeing the cracks in the roost's core. But it was too late. The idealist +was now the owner of the roost. To an even worse result than the deal with the +devil. + +With the caretakers of the roost fleeing to the winds, the cracks became more +and more visible. First they were notable, then they were unignorable, then they +were threatening to the flocks. The whole roost was unstable and the birdsong +started to change its tune until it was almost entirely against the idealist and +his flawed visions. + +More flocks fled the roost in fear that it will collapse out from under them. +Their happy birdsong left with them, leaving the anger against the idealist to +dominate the roost so much that it became a poison. + +The flocks did not flee to another single roost though. They had learned that +lesson. On the side a flock had been building tools to let flocks create their +own roosts. But, at the same time they also made those roosts able to +communicate with eachother. This means that the flocks could flee the main +roost, but still be able to hear eachother's birdsong. There were thousands of +roosts instead of one big one. + +As wave after wave of flocks fled the roost, each of the other roosts found +themselves with more and more friends. The birds sang in harmony forever on. +Still welcoming those fleeing the failing roost to this day. diff --git a/blog/rip-twitter.markdown b/blog/rip-twitter.markdown new file mode 100644 index 0000000..42de7bd --- /dev/null +++ b/blog/rip-twitter.markdown @@ -0,0 +1,128 @@ +--- +title: "Goodbye Twitter, Hello Fediverse!" +date: 2022-11-12 +series: twitter +tags: + - fediverse + - rant +--- + + + +I have been watching in horror as Elon Musk seems to be doing his best to +destroy Twitter as fast as he can. This has been really hard to watch, but at +the same time I can't help but watch the trainwreck unfold. The biggest thing +that this all has been making me think about is the fact that Twitter has been +one of my main ways that I use the Internet for so long. My phone tells me that +I've had the Twitter app open for an absolutely depressing amount of time. I +would be willing to argue that I have been _addicted_ to Twitter. Twitter was +consuming a large part of my life. + +I've been aware of how bad it was getting. This has been made slightly worse by +the fact that a large part of my job involves stalking Twitter, but in general +it was starting to be a problem. At some level, I am relieved that Elon Musk is +destroying Twitter. At another, I am horrified that one of the main ways that I +communicate on the Internet is being destroyed. + +This feels like it's [freenode](https://withinstudios.itch.io/closed-projects) +all over again. Same story, different threat actor. The main difference is that +there is no one [libera.chat](https://libera.chat/) to take over and save us +this time. Twitter is too big for one community to absorb _that many_ people. It +can feel like there is going to be a massive diaspora of former communities into +god knows where. It feels like you will become an anonymous voice in an infinite +crowd, never to be heard from again. + +However, I think there is a way that we all can get off of Twitter and _still +retain some of the communities we will lose_. I think that we all need to take +the [Fediverse](https://en.wikipedia.org/wiki/Fediverse) more seriously. The +main gimmick of the Fediverse is that there's no longer one platform, one +provider, one service. Instead there are a constellation of independent +platforms that communicate with eachother. If you create an account on +[vt.social](https://vt.social), you can follow me on +[pony.social](https://pony.social). You can also follow people on other websites +that participate in the Fediverse. There's even a whole YouTube clone called +[PeerTube](https://joinpeertube.org/) that can federate out to other websites. +Follow a PeerTube user from your Mastodon server and then you can reply to the +video and _those replies show up as comments on that video_. No more siloes, no +more having to create an account everywhere to do basic interaction. You just +follow and reply to people on other platforms like they were on the same website +as you are. + +One of the biggest complaints I've heard about the Fediverse is that they get +analysis paralysis from having to _choose_ a server to start out with. This is +most common with people that aren't used to the fact that this is how the old +internet started out. There weren't big siloes. You had to choose where to hang +out. However, just pick something at random. [You can move your account +later](https://docs.joinmastodon.org/user/moving/#migration) if you want to. It +is not hard to do. Trust me. + + + +For a while I was running a crossposter between [my Fediverse +profile](https://pony.social/@cadey) and Twitter. I have turned that off. The +only things that I am going to use Twitter for in the future are the automated +posts for this blog and whatever else I need to do for work. It has been really +hard to build up the courage to torch an almost 6-thousand person following on +Twitter, but I feel that this will be better for everyone involved. + +Being able to have 2048 characters per +post is also helping me recover from the koan-like shitposting style that +Twitter forced me to adopt. 280 characters is _just not enough space_ for +nuance. 2048 characters allows me to use _sentences_ and _paragraphs_. It is +such a lovely feeling. Even the Mastodon default of 500 characters leaves so +much more room for nuance. + +## Follow suggestions + +On the Fediverse there is a tradition we lovingly call +[#FollowFriday](https://pony.social/tags/followfriday). Every friday people will +make a message with the hashtag `#FollowFriday` and list out a bunch of people +that they think are worth following. Some people will name why they should be +followed and I did miss my `#FollowFriday` this week because I was on a train +with absolutely terrible WiFi so I'm going to list out people I think are worth +following here: + +[@xe@vt.social](https://vt.social/@xe) is my Lojbanist vtubing alt. I'm working +on being more comfortable with being _wrong_ in front of people as a part of +getting better at public speaking and healing from my past. If you choose to +follow this account, please keep in mind that I am _committed to the bit_ and I +will be posting _entirely_ in [Lojban](https://lojban.pw/welcome/). + + + +[@cwebber@octodon.social](https://octodon.social/@cwebber) is one of the +co-authors of the ActivityPub specification. She has done incredible work in +making the Fediverse shine and I suggest following to see what she has cooked up +next. + +[@ghuntley@ghuntley.com](https://fediverse.ghuntley.com/@ghuntley) is one of the +most amusing people I know. Don't be fooled by the fact that his profile picture +is a Bored Ape NFT. He's actually quite vocally anti-NFT and cryptocurrency in +general. He has that Bored Ape because he randomly got a _pirated ape_ shoved +into his Ethereum wallet and now uses it out of pure irony. + + + +[@LunaFoxgirlVT@vt.social](https://vt.social/@LunaFoxgirlVT) is the creator of +[Inochi2D](https://inochi2d.com/), an open-source vtubing application for +Windows, macOS, and Linux. Luna is a passionate game developer and someone that +I personally sponsor on GitHub. I don't even use Inochi2D _yet_, but I support her +mission of making vtubing free and easy to use for the masses. Give her a +follow! + +[@Lyude@queer.party](https://queer.party/@Lyude) is someone I have been friends +with for almost a decade. Lyude is the person I go to when I have issues with X +and Wayland. Lyude is also a fearless rustacean and someone that I would love to +work with some day. If only we worked on things that were remotely related to +eachother. + +[@Gankra@toot.cat](https://toot.cat/@Gankra) is one of the most powerful +rustaceans I know. Gankra fearlessly helps make Rust easier to use and is +adept at posting. Here's an example of a Gankra post: + + + +[@cult@pony.social](https://pony.social/@cult) is the person that runs the +Mastodon server that I post on. He's worth following because he has a true +understanding of irony and humor that you can only really get from a sarcastic +German. diff --git a/data/toots/31777d891e2ef2943d7f484d2769cc2ef33d4e82080befb67e32f833050b712e.json b/data/toots/31777d891e2ef2943d7f484d2769cc2ef33d4e82080befb67e32f833050b712e.json new file mode 100644 index 0000000..4de1f32 --- /dev/null +++ b/data/toots/31777d891e2ef2943d7f484d2769cc2ef33d4e82080befb67e32f833050b712e.json @@ -0,0 +1,34 @@ +{ + "id": "https://mastodon.sdf.org/users/Ricardus/statuses/109322650979345324", + "type": "Note", + "inReplyTo": null, + "published": "2022-11-11T01:47:51Z", + "url": "https://mastodon.sdf.org/@Ricardus/109322650979345324", + "attributedTo": "https://mastodon.sdf.org/users/Ricardus", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://mastodon.sdf.org/users/Ricardus/followers" + ], + "sensitive": false, + "conversation": "tag:mastodon.sdf.org,2022-11-11:objectId=57740029:objectType=Conversation", + "summary": null, + "content": "

I wish people would just fucking say this out loud:

INSTANCE CHOICE IS LARGELY IRRELEVANT. EVEN IF YOU DID FIND AN INSTANCE OF (INSERT YOUR HOBBY/INTEREST HERE) IT'S NOT LIKE YOU GET TOGETHER AND PARTY ON WEEKENDS.

Just avoid toxic instances where you find the kind of people like we beat in WW2. Just hang out and have fun.

SDF is a great instance with a wide variety of users.

Once you have chosen an instance your experience will basically be EXACTLY like twitter from an end-user perspective.

", + "contentMap": { + "en": "

I wish people would just fucking say this out loud:

INSTANCE CHOICE IS LARGELY IRRELEVANT. EVEN IF YOU DID FIND AN INSTANCE OF (INSERT YOUR HOBBY/INTEREST HERE) IT'S NOT LIKE YOU GET TOGETHER AND PARTY ON WEEKENDS.

Just avoid toxic instances where you find the kind of people like we beat in WW2. Just hang out and have fun.

SDF is a great instance with a wide variety of users.

Once you have chosen an instance your experience will basically be EXACTLY like twitter from an end-user perspective.

" + }, + "attachment": [], + "tag": [], + "replies": { + "id": "https://mastodon.sdf.org/users/Ricardus/statuses/109322650979345324/replies", + "type": "Collection", + "first": { + "type": "CollectionPage", + "next": "https://mastodon.sdf.org/users/Ricardus/statuses/109322650979345324/replies?only_other_accounts=true&page=true", + "partOf": "https://mastodon.sdf.org/users/Ricardus/statuses/109322650979345324/replies", + "items": [] + } + }, + "source": null +} \ No newline at end of file diff --git a/data/toots/323905a6746cdd5eb8a994d091ca5d35fdee9e9e1199f0fab1b81a709e0641aa.json b/data/toots/323905a6746cdd5eb8a994d091ca5d35fdee9e9e1199f0fab1b81a709e0641aa.json new file mode 100644 index 0000000..af72ff2 --- /dev/null +++ b/data/toots/323905a6746cdd5eb8a994d091ca5d35fdee9e9e1199f0fab1b81a709e0641aa.json @@ -0,0 +1,34 @@ +{ + "id": "https://vt.social/users/xe/statuses/109308323411835557", + "type": "Note", + "inReplyTo": null, + "published": "2022-11-08T13:04:09Z", + "url": "https://vt.social/@xe/109308323411835557", + "attributedTo": "https://vt.social/users/xe", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://vt.social/users/xe/followers" + ], + "sensitive": false, + "conversation": "tag:vt.social,2022-11-08:objectId=3240:objectType=Conversation", + "summary": null, + "content": "

coi! πŸ‘‹ le tarci (β˜€οΈ) cu galtu (⬆️) ^^

", + "contentMap": { + "en": "

coi! πŸ‘‹ le tarci (β˜€οΈ) cu galtu (⬆️) ^^

" + }, + "attachment": [], + "tag": [], + "replies": { + "id": "https://vt.social/users/xe/statuses/109308323411835557/replies", + "type": "Collection", + "first": { + "type": "CollectionPage", + "next": "https://vt.social/users/xe/statuses/109308323411835557/replies?only_other_accounts=true&page=true", + "partOf": "https://vt.social/users/xe/statuses/109308323411835557/replies", + "items": [] + } + }, + "source": null +} \ No newline at end of file diff --git a/data/toots/455ffb63a80adb1422a4a471a6b5751cbf8fd82aac01c08e82223bf6733514bb.json b/data/toots/455ffb63a80adb1422a4a471a6b5751cbf8fd82aac01c08e82223bf6733514bb.json new file mode 100644 index 0000000..222d6de --- /dev/null +++ b/data/toots/455ffb63a80adb1422a4a471a6b5751cbf8fd82aac01c08e82223bf6733514bb.json @@ -0,0 +1,32 @@ +{ + "id": "https://akko.within.website/objects/61402c97-043f-4ac2-8f54-3e62cd9f3378", + "type": "Note", + "inReplyTo": null, + "published": "2022-11-10T17:33:22.335756Z", + "url": null, + "attributedTo": "https://akko.within.website/users/xe", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://akko.within.website/users/xe/followers" + ], + "sensitive": null, + "conversation": "https://akko.within.website/contexts/f6f5b1bf-6338-4fa2-8513-f4c99763ad34", + "summary": "", + "content": "This is yet another test of the #tailscale alert system", + "contentMap": null, + "attachment": [], + "tag": [ + { + "type": "Hashtag", + "href": "https://akko.within.website/tags/tailscale", + "name": "#tailscale" + } + ], + "replies": null, + "source": { + "content": "This is yet another test of the #tailscale alert system", + "mediaType": "text/plain" + } +} \ No newline at end of file diff --git a/data/toots/afb86f8f3a751552fe10a14650871c1ea6249e8fc77a8ab036794daa4bf9f585.json b/data/toots/afb86f8f3a751552fe10a14650871c1ea6249e8fc77a8ab036794daa4bf9f585.json new file mode 100644 index 0000000..17f0250 --- /dev/null +++ b/data/toots/afb86f8f3a751552fe10a14650871c1ea6249e8fc77a8ab036794daa4bf9f585.json @@ -0,0 +1,50 @@ +{ + "id": "https://fediverse.ghuntley.com/users/ghuntley/statuses/109329174967503675", + "type": "Note", + "inReplyTo": null, + "published": "2022-11-12T05:26:59Z", + "url": "https://fediverse.ghuntley.com/@ghuntley/109329174967503675", + "attributedTo": "https://fediverse.ghuntley.com/users/ghuntley", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://fediverse.ghuntley.com/users/ghuntley/followers" + ], + "sensitive": false, + "conversation": "tag:ghuntley.com,2022-11-12:objectId=4484:objectType=Conversation", + "summary": null, + "content": "

If you want to #selfhost a #mastodon server on #nixos heres how you do it / here is my config https://gist.github.com/ghuntley/9369011a979ce2422d9851e38e784895

", + "contentMap": { + "en": "

If you want to #selfhost a #mastodon server on #nixos heres how you do it / here is my config https://gist.github.com/ghuntley/9369011a979ce2422d9851e38e784895

" + }, + "attachment": [], + "tag": [ + { + "type": "Hashtag", + "href": "https://fediverse.ghuntley.com/tags/selfhost", + "name": "#selfhost" + }, + { + "type": "Hashtag", + "href": "https://fediverse.ghuntley.com/tags/mastodon", + "name": "#mastodon" + }, + { + "type": "Hashtag", + "href": "https://fediverse.ghuntley.com/tags/nixos", + "name": "#nixos" + } + ], + "replies": { + "id": "https://fediverse.ghuntley.com/users/ghuntley/statuses/109329174967503675/replies", + "type": "Collection", + "first": { + "type": "CollectionPage", + "next": "https://fediverse.ghuntley.com/users/ghuntley/statuses/109329174967503675/replies?only_other_accounts=true&page=true", + "partOf": "https://fediverse.ghuntley.com/users/ghuntley/statuses/109329174967503675/replies", + "items": [] + } + }, + "source": null +} \ No newline at end of file diff --git a/data/toots/dc6a3c52c03b28cf6dfd766974989523ccc3cd862ca0a63c9628d6fa09af0850.json b/data/toots/dc6a3c52c03b28cf6dfd766974989523ccc3cd862ca0a63c9628d6fa09af0850.json new file mode 100644 index 0000000..57b8d98 --- /dev/null +++ b/data/toots/dc6a3c52c03b28cf6dfd766974989523ccc3cd862ca0a63c9628d6fa09af0850.json @@ -0,0 +1,34 @@ +{ + "id": "https://toot.cat/users/Gankra/statuses/109320427252456972", + "type": "Note", + "inReplyTo": null, + "published": "2022-11-10T16:22:19Z", + "url": "https://toot.cat/@Gankra/109320427252456972", + "attributedTo": "https://toot.cat/users/Gankra", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://toot.cat/users/Gankra/followers" + ], + "sensitive": false, + "conversation": "tag:toot.cat,2022-11-10:objectId=35170513:objectType=Conversation", + "summary": null, + "content": "

tired: documenting that a function has weird behaviour

wired: documenting that a function shouldn't be used because it won't do what you want

inspired: making most of the documentation for a function a detailed treatise on how to use *other* APIs to do the thing you really want

", + "contentMap": { + "en": "

tired: documenting that a function has weird behaviour

wired: documenting that a function shouldn't be used because it won't do what you want

inspired: making most of the documentation for a function a detailed treatise on how to use *other* APIs to do the thing you really want

" + }, + "attachment": [], + "tag": [], + "replies": { + "id": "https://toot.cat/users/Gankra/statuses/109320427252456972/replies", + "type": "Collection", + "first": { + "type": "CollectionPage", + "next": "https://toot.cat/users/Gankra/statuses/109320427252456972/replies?only_other_accounts=true&page=true", + "partOf": "https://toot.cat/users/Gankra/statuses/109320427252456972/replies", + "items": [] + } + }, + "source": null +} \ No newline at end of file diff --git a/data/users/5ec5fb05e2d4420aa4f3b1fd6539bbd5570e6d0305aafc736244ba6a4393bb9f.json b/data/users/5ec5fb05e2d4420aa4f3b1fd6539bbd5570e6d0305aafc736244ba6a4393bb9f.json new file mode 100644 index 0000000..a0cd2dd --- /dev/null +++ b/data/users/5ec5fb05e2d4420aa4f3b1fd6539bbd5570e6d0305aafc736244ba6a4393bb9f.json @@ -0,0 +1,28 @@ +{ + "id": "https://mastodon.sdf.org/users/Ricardus", + "type": "Person", + "following": "https://mastodon.sdf.org/users/Ricardus/following", + "followers": "https://mastodon.sdf.org/users/Ricardus/followers", + "inbox": "https://mastodon.sdf.org/users/Ricardus/inbox", + "outbox": "https://mastodon.sdf.org/users/Ricardus/outbox", + "featured": "https://mastodon.sdf.org/users/Ricardus/collections/featured", + "featuredTags": "https://mastodon.sdf.org/users/Ricardus/collections/tags", + "preferredUsername": "Ricardus", + "name": "Ricardus", + "summary": "

Recording Engineer and former Technical Director (A1 Tech). Currently running an Antique Mall for a friend. I enjoy: building recording equipment, music, science fiction, Cons, wellness, absurdist humour, and other stuff.

Sometimes I play guitar.

Frustrated writer.

Geek.

Does not code.

If you enjoy anything I do on Masto please consider a donation.

Donations can be made to:

Paypal: 'ricardus @ sdf . org'

Venmo: Ricardus-W

https://liberapay.com/Ricardus/

", + "url": "https://mastodon.sdf.org/@Ricardus", + "manuallyApprovesFollowers": false, + "discoverable": true, + "published": "2017-04-26T00:00:00Z", + "devices": "https://mastodon.sdf.org/users/Ricardus/collections/devices", + "icon": { + "type": "Image", + "mediaType": "image/jpeg", + "url": "https://mastodon.sdf.org/system/accounts/avatars/000/000/850/original/e794501e9dc0b32d.jpg" + }, + "image": { + "type": "Image", + "mediaType": "image/jpeg", + "url": "https://mastodon.sdf.org/system/accounts/headers/000/000/850/original/3dcda4182cf11abb.jpg" + } +} \ No newline at end of file diff --git a/data/users/7f26aa6a1980f5fd14167609249e4508485de17a9b61c0f66faf8150bb6e9cd2.json b/data/users/7f26aa6a1980f5fd14167609249e4508485de17a9b61c0f66faf8150bb6e9cd2.json new file mode 100644 index 0000000..ccd2879 --- /dev/null +++ b/data/users/7f26aa6a1980f5fd14167609249e4508485de17a9b61c0f66faf8150bb6e9cd2.json @@ -0,0 +1,28 @@ +{ + "id": "https://fediverse.ghuntley.com/users/ghuntley", + "type": "Person", + "following": "https://fediverse.ghuntley.com/users/ghuntley/following", + "followers": "https://fediverse.ghuntley.com/users/ghuntley/followers", + "inbox": "https://fediverse.ghuntley.com/users/ghuntley/inbox", + "outbox": "https://fediverse.ghuntley.com/users/ghuntley/outbox", + "featured": "https://fediverse.ghuntley.com/users/ghuntley/collections/featured", + "featuredTags": "https://fediverse.ghuntley.com/users/ghuntley/collections/tags", + "preferredUsername": "ghuntley", + "name": "Geoffrey Huntley :vim: :nixos:", + "summary": "

πŸ™Œ I’m Geoff, I β€œstole” all of your NFTs via https://thenftbay.org. Software Engineer at Coder and ex Gitpod.

Opinions are my own. 
I live a minimalist lifestyle and work remotely from a van doing #vanlife. The internet is already decentralised (#indieweb)


p.s Just in case it it isn't clear enough #blockchain / #nft's are dumb and so is my avatar. πŸ‘‡πŸ‘‡πŸΏπŸ‘‡β€©

1. https://concerned.tech 

2. https://www.smh.com.au/business/companies/extortion-why-web3-is-pissing-off-a-lot-of-software-developers-20220

", + "url": "https://fediverse.ghuntley.com/@ghuntley", + "manuallyApprovesFollowers": false, + "discoverable": true, + "published": "2022-11-11T00:00:00Z", + "devices": "https://fediverse.ghuntley.com/users/ghuntley/collections/devices", + "icon": { + "type": "Image", + "mediaType": "image/png", + "url": "https://fediverse.ghuntley.com/system/accounts/avatars/109/325/034/786/571/675/original/c5843b458911682c.png" + }, + "image": { + "type": "Image", + "mediaType": "image/jpeg", + "url": "https://fediverse.ghuntley.com/system/accounts/headers/109/325/034/786/571/675/original/332eac79a4bfd21b.jpeg" + } +} \ No newline at end of file diff --git a/data/users/85e2523d36626f373f76f404f497885c79bb7a9f9ee13334ebaf4ca7e41b122f.json b/data/users/85e2523d36626f373f76f404f497885c79bb7a9f9ee13334ebaf4ca7e41b122f.json new file mode 100644 index 0000000..f005e63 --- /dev/null +++ b/data/users/85e2523d36626f373f76f404f497885c79bb7a9f9ee13334ebaf4ca7e41b122f.json @@ -0,0 +1,24 @@ +{ + "id": "https://toot.cat/users/Gankra", + "type": "Person", + "following": "https://toot.cat/users/Gankra/following", + "followers": "https://toot.cat/users/Gankra/followers", + "inbox": "https://toot.cat/users/Gankra/inbox", + "outbox": "https://toot.cat/users/Gankra/outbox", + "featured": "https://toot.cat/users/Gankra/collections/featured", + "featuredTags": "https://toot.cat/users/Gankra/collections/tags", + "preferredUsername": "Gankra", + "name": "Gankra", + "summary": "

It's me, the gay cat who maintains your docs

", + "url": "https://toot.cat/@Gankra", + "manuallyApprovesFollowers": false, + "discoverable": true, + "published": "2022-11-04T00:00:00Z", + "devices": "https://toot.cat/users/Gankra/collections/devices", + "icon": { + "type": "Image", + "mediaType": "image/png", + "url": "https://pool.jortage.com/tootcat/accounts/avatars/109/287/068/466/286/465/original/99d44c73ee0b2e69.png" + }, + "image": null +} \ No newline at end of file diff --git a/data/users/de4007588856073a68b85f6e5aadd105d376cf12194b1248ffe0a27d91eb4a28.json b/data/users/de4007588856073a68b85f6e5aadd105d376cf12194b1248ffe0a27d91eb4a28.json new file mode 100644 index 0000000..20dd157 --- /dev/null +++ b/data/users/de4007588856073a68b85f6e5aadd105d376cf12194b1248ffe0a27d91eb4a28.json @@ -0,0 +1,24 @@ +{ + "id": "https://akko.within.website/users/xe", + "type": "Person", + "following": "https://akko.within.website/users/xe/following", + "followers": "https://akko.within.website/users/xe/followers", + "inbox": "https://akko.within.website/users/xe/inbox", + "outbox": "https://akko.within.website/users/xe/outbox", + "featured": "https://akko.within.website/users/xe/collections/featured", + "featuredTags": null, + "preferredUsername": "xe", + "name": "Xe", + "summary": "Hey,

I'm the admin of this place. My main account is @cadey@pony.social. Consider this an alt in the Twitter sense.", + "url": "https://akko.within.website/users/xe", + "manuallyApprovesFollowers": false, + "discoverable": false, + "published": null, + "devices": null, + "icon": { + "type": "Image", + "mediaType": null, + "url": "https://f001.backblazeb2.com/file/xeserv-akko/74777ece434cea213de37d78c46df8623572331aa27183d4bc225182c7be2e17.png" + }, + "image": null +} \ No newline at end of file diff --git a/data/users/e5886a0174dcc2d1d2288c6112cce09fb894ba4e14eb113e8bcabc5d0e8fd7ef.json b/data/users/e5886a0174dcc2d1d2288c6112cce09fb894ba4e14eb113e8bcabc5d0e8fd7ef.json new file mode 100644 index 0000000..277de03 --- /dev/null +++ b/data/users/e5886a0174dcc2d1d2288c6112cce09fb894ba4e14eb113e8bcabc5d0e8fd7ef.json @@ -0,0 +1,28 @@ +{ + "id": "https://vt.social/users/xe", + "type": "Person", + "following": "https://vt.social/users/xe/following", + "followers": "https://vt.social/users/xe/followers", + "inbox": "https://vt.social/users/xe/inbox", + "outbox": "https://vt.social/users/xe/outbox", + "featured": "https://vt.social/users/xe/collections/featured", + "featuredTags": "https://vt.social/users/xe/collections/tags", + "preferredUsername": "xe", + "name": "la .zi. :verified_purple:​", + "summary": "

coi!

ni'o mi'e la .zi. .i mi cu vtubar .i mi nelci la'oi zo NixOS je lonu samyzilkei loi kelproga je lonu ciska .i mi cu samseltcanytivni fo la'oi Twitch (https://twitch.tv/princessxen)

.i ko gleki je kurji .ua.

", + "url": "https://vt.social/@xe", + "manuallyApprovesFollowers": false, + "discoverable": true, + "published": "2022-11-08T00:00:00Z", + "devices": "https://vt.social/users/xe/collections/devices", + "icon": { + "type": "Image", + "mediaType": "image/png", + "url": "https://vt.social/media/accounts/avatars/109/306/006/417/606/734/original/b81ee6243764b836.png" + }, + "image": { + "type": "Image", + "mediaType": "image/png", + "url": "https://vt.social/media/accounts/headers/109/306/006/417/606/734/original/99ca3d0bbf69c436.png" + } +} \ No newline at end of file diff --git a/lib/xesite_templates/src/lib.rs b/lib/xesite_templates/src/lib.rs index e744531..5e6fee2 100644 --- a/lib/xesite_templates/src/lib.rs +++ b/lib/xesite_templates/src/lib.rs @@ -190,7 +190,7 @@ pub fn toot_embed(u: User, t: Toot) -> Markup { br; } - a href=(t.url) { "Link" } + a href=(t.url.unwrap_or(t.id)) { "Link" } }; html! { .media { @@ -202,6 +202,9 @@ pub fn toot_embed(u: User, t: Toot) -> Markup { .media-body { .media-heading { (u.name) + @if u.id == "https://pony.social/users/cadey" { + img src="https://cdn.xeiaso.net/file/christine-static/blog/verified.png" style="height=1.5ch;width=1.5ch"; + } " " a href=(u.url) {"@" (u.preferred_username)} br; diff --git a/lib/xesite_types/src/mastodon.rs b/lib/xesite_types/src/mastodon.rs index 942bbc7..80445bd 100644 --- a/lib/xesite_types/src/mastodon.rs +++ b/lib/xesite_types/src/mastodon.rs @@ -25,7 +25,7 @@ pub struct User { pub featured: String, #[serde(rename = "featuredTags")] - pub featured_tags: String, + pub featured_tags: Option, #[serde(rename = "preferredUsername")] pub preferred_username: String, @@ -46,10 +46,10 @@ pub struct User { pub discoverable: bool, #[serde(rename = "published")] - pub published: String, + pub published: Option, #[serde(rename = "devices")] - pub devices: String, + pub devices: Option, #[serde(rename = "icon")] pub icon: Icon, @@ -64,7 +64,7 @@ pub struct Icon { pub icon_type: String, #[serde(rename = "mediaType")] - pub media_type: String, + pub media_type: Option, #[serde(rename = "url")] pub url: String, @@ -85,7 +85,7 @@ pub struct Toot { pub published: DateTime, #[serde(rename = "url")] - pub url: String, + pub url: Option, #[serde(rename = "attributedTo")] pub attributed_to: String, @@ -97,13 +97,7 @@ pub struct Toot { pub cc: Vec, #[serde(rename = "sensitive")] - pub sensitive: bool, - - #[serde(rename = "atomUri")] - pub atom_uri: String, - - #[serde(rename = "inReplyToAtomUri")] - pub in_reply_to_atom_uri: Option, + pub sensitive: Option, #[serde(rename = "conversation")] pub conversation: String, @@ -115,7 +109,7 @@ pub struct Toot { pub content: String, #[serde(rename = "contentMap")] - pub content_map: ContentMap, + pub content_map: Option, #[serde(rename = "attachment")] pub attachment: Vec, @@ -124,7 +118,10 @@ pub struct Toot { pub tag: Vec, #[serde(rename = "replies")] - pub replies: Replies, + pub replies: Option, + + #[serde(rename = "source")] + pub source: Option, } impl Toot { @@ -133,6 +130,14 @@ impl Toot { } } +#[derive(Serialize, Deserialize)] +pub struct Source { + #[serde(rename = "content")] + pub content: String, + #[serde(rename = "mediaType")] + pub content_type: String, +} + #[derive(Serialize, Deserialize)] pub struct Tag { #[serde(rename = "type")] diff --git a/src/bin/fetch_mastodon_post.rs b/src/bin/fetch_mastodon_post.rs index 408d90c..c7f4275 100644 --- a/src/bin/fetch_mastodon_post.rs +++ b/src/bin/fetch_mastodon_post.rs @@ -15,11 +15,15 @@ async fn main() -> Result<()> { } let mut post_url = args[1].clone(); - if !post_url.ends_with(".json") { - post_url = format!("{post_url}.json"); - } - let toot: Toot = reqwest::get(&post_url) + let cli = reqwest::Client::builder() + .user_agent("github.com/Xe/site fetch_mastodon_post") + .build()?; + + let toot: Toot = cli + .get(&post_url) + .header("Accept", "application/json") + .send() .await? .error_for_status()? .json() @@ -29,6 +33,9 @@ async fn main() -> Result<()> { fs::create_dir_all("./data/toots")?; + if !post_url.ends_with(".json") { + post_url = format!("{post_url}.json"); + } let post_hash = xesite::hash_string(post_url); debug!("wrote post to ./data/toots/{post_hash}.json"); @@ -36,10 +43,11 @@ async fn main() -> Result<()> { let mut fout = fs::File::create(&format!("./data/toots/{post_hash}.json"))?; serde_json::to_writer_pretty(&mut fout, &toot)?; - let user_url = format!("{}.json", toot.attributed_to); - debug!("fetching {user_url} ..."); - - let user: User = reqwest::get(&user_url) + debug!("fetching {} ...", toot.attributed_to); + let user: User = cli + .get(&toot.attributed_to) + .header("Accept", "application/json") + .send() .await? .error_for_status()? .json() @@ -49,6 +57,7 @@ async fn main() -> Result<()> { debug!("got user {} ({})", user.preferred_username, user.name); + let user_url = format!("{}.json", toot.attributed_to); let user_hash = xesite::hash_string(user_url); debug!("wrote post to ./data/users/{user_hash}.json"); -- cgit v1.2.3