-
Gathering Requirements for Native Crossposting in Tanzawa
byRu made a feature request for Tanzawa to be able to syndicate / cross post from Tanzawa to other sites natively. I think it's a great idea and spent some time to collect my thoughts about what that could look like.
My thoughts were posted on GitHub, but I'm copying them here so I always have a copy and in case people who read my blog but don't followย the Tanzawa GitHub have any input.
---ย
Agreed โ being able to syndicate content directly from Tanzawa would be ideal. All syndication is currently manual (it doesn't hurt enough to automate it, yet).Base Thoughtsย
If we can figure out what the workflow would look like, I think we can define some base requirements for the feature. A couple of general thoughts about syndication:- I don't think posting should be syndicated automatically on publish. There's a couple of reasons for this:ย
- Tanzawa doesn't support any kind of background tasks. Posts that have a bunch of links take a while to complete it tries to send webmentions. Adding more external requests could increase the response time to longer than the request timeout allows quite easily. This is especially true because webmentions require 2 requests per save (before content update and after content update). We could probably process webmentions concurrently to speed this up, but that feels like a bit much at this point? It may be easy with asyncio, but I'd need to research it.
- When I was posting with Wordpress there was a syndication checkbox (via brid.gy) and found it you'd get errors if you saved twice as the post had already been syndicated. Because there also wasn't a preview, it was always a bit of a gamble for how it would post.
- Syndication is a separate concern from authoring posts themselves. And as such warrants dedicated screens to make it _right_.ย Initially I had thought it might work well to handle syndication via a modal on the edit post page, but the more I think about it, it would box us in.
- Brid.gy is still super handy for backfeeding likes/replies as webmentions. I still think brid.gy is useful / "required" unless we were to build in some kind of polling mechanism, which is difficult without support for cron/background tasks. ( It could be done "easily" with a django management command, I'm hesitant to introduce undue complexity).
- "Syndication" feels a bit jargony to me. Is "Cross post" (or something similar)ย a better term to use in the interface?
- Each syndication destination is going to require some kind of settings (API keys, mostly). These can / should be managed via the Django admin?
Workflow
Create ofย Syndication/Cross Posts
This is assuming that all syndication can be handled with the same form.- Creating a new syndication would happen from the edit post button. The button should be on the meta menu (on the right), below the publishย buttons and only display once the post is published (you can't syndicate a draft).
- Clicking this button would take you to dedicated syndication page.
- The top of the page would be a form. The form would display the syndication text and up to 4 photos (with the caption).
The syndication text is free text and pre-filled with either the post title + link or the first 280 chars of the note. Above the text field itself would be a segmented control (tabs? radio button?) that when clicked would let you toggle between the different presets.
You may not want to syndicate each photo, so perhaps a checkbox is warranted to let you select which photos will be sent. - Finally at the bottom there's some checkboxes for which networks to syndicate to. As you can only syndicate a post once per network, posts that have already been syndicated to would be disabled with text explaining that you've already syndicated to that network for this post.
- Once syndicated they'd store the url of the syndication and create a TSyndication record.
Syndication List
I think we'd want a separate section for syndication, like we do with "Posts / Files" on the left for syndications / cross posts.ย
Clicking that would show you a list of your most recent syndication activity ( syndication destination (link to twitter etc..), syndicated text, link to the related post).ย
Selecting a crosspost would show you a (readonly?) version of the syndication Create form.
---
Does that sound about right? Anything you'd change or we should consider (especially regards to Mastodon,ย I don't have an account/haven't used it before). - I don't think posting should be syndicated automatically on publish. There's a couple of reasons for this:ย
-
TIL: English and GEOS Reference Points Opposite of Each Other
byThis post is less a TIL and more of a I knew that and I don't want to forget it again and stems from a bugfix in Tanzawa.
In English when we refer to a geo-coordinate we usually say it in latitude, longitude order. The reason why we say coordinates in this order is we could measure latitude accurately (via astronomical measurements) before longitude. Frontend mapping libraries like leaflet.js keep this familiar ordering. i.e. plotting points on a map takes a latitude/longitude array and events have a latlng property for referencing points.
GEOS, the open source geometry library used in most GIS (include GeoDjango) applications doesn't think of points in those terms, but as a graph of x,y coordinates.ย As such if you when you're working with data across these boundaries it's important to not mix up your ordering.
When instantiating a Point it's tempting to just pass in floats directly. But if you do that it's easy to mix up the ordering , so I've started make sure I always use the keyword argument name to reduce mistakes.from django.contrib.gis.geos import Point # Keep our familiar lat/lon ordering without messing up the data point. point = Point(y=35.31593281000502, x=139.4700015160363)
-
The Week #51
by- A Roller coaster? The Great Crash in 1929? I keep trying to find the right way to describe this week, but I can't. Most everything that was under my control went well. Those that weren't, less so.
- Japan is handling vaccine distribution in a very measured way. There's basically 3 groups of people getting vaccines right now: the elderly, those with pre-existing conditions, and those that work for large companies. If you are none of those, tough luck. To get a vaccine outside of working for a major company, you need a voucher. My voucher is supposed to come sometime next month, but I won't be able to get an appointment until mid-August at the earliest. Which will have me fully vaccinated my October-ish? Maybe?
When I postedย that I found a clinic that would give a vaccine to anyone, even without a vaccine I couldn't believe it. I could get fully vaccinated before the Olympics and take back 3 months of 2021. I had an appointment for 30th.
But then I saw reports that the health authorities found out and told them to start canceling reservations for people outside from outside of the ward. Existing reservations seemed to be fine for a couple of days. Then the health authorities dropped the hammer on them and they've been forced to turn away everything without a voucher and everyone from outside the ward.
And just like that. Poof. My hope for getting vaccinated this summer vanished. Gutted. Who knows, maybe once I get my golden ticket in a couple of weeksย I'll find a clinic that'll let me get vaccinated earlier.ย
Silver lining is that I found out I'll get turned away at the door before taking the day off work and making an hour-ish trip train ride into Ikebukuro. I also won't ended up being unable to get a second shot or have to make a trip to Ikebukuro to get a stamp on my voucher so I can get a second shot. - I joined Leo for his first field trip to Kodomo no kuni ( Kid country?) Check the link, they got all sorts of slides, trains, and so forth. We watched the cows, ran up and down a big hill, and Leo bounced on a white bouncing dome. I definitely want to go back when it's cooler and when we're not with a huge group. I expanded my checkin to a proper blog post, which is something I want to do more often.
- The issue of Web+DB Press that I wrote an article for is finally release for sale. I haven't gained any new followers or gotten mentions, so I assume people aren't running into any issues following along.
- Another work update โ I was the guest this week on BPZM, an internal company podcast(?) / show. It was fun to shoot the breeze in Japanese. One thing I'd like to get better at is off-the-cuff explanations of things in Japanese without having to stop and think. The largest issue ( I think) is I think of how to explain in, then have to reverse the order of some of the explanation for it work in Japanese and I derail my train of thought.
- I'm trying to focus less on each day and more on the week. I'm not sure if it's helping, but I did manage to run twice this week. Compared to the previous weeks (months) of 0 runs, it's a vast improvement. Yay me.
-
Checkin to Kodomo no Kuni (ใใฉใใฎๅฝ)
We went on Leo's first "ensoku" (field trip) with his pre-school. Originally we were supposed to go to the beach, but with covid-19 they don't want people going to the beaches, so we had it at Kodomo no Kuni instead.
Kodomo no Kuni is this huge park in Yokohama close to Tokyo. Inside they've got some huge jungle gyms, different pedal-powered rides, a full-on dairy farm and heaps of open space to run and explore in. You can buy the milk (to drink on the spot) and soft-serve, which I believe comes from the cows (they have a dairy farm, so it would make sense).
Since we were with a big group, we just played in this huge field / hill and went and saw the cows. The cows are a major attraction, so much so that the train that comes to Kodomo no Kuni is cow themed.
Next time I want to go by the cow-themed train!The field and huge ground that we played The view from the top of the hill. The white domes are bouncy. The cows taking a rest -
by