Feb. 21st, 2023

solarbird: Brigitte Lindholm from Overwatch (brigitte)

eta: There’s a better version of this now.

This is about 70% notes for myself because I have got to get back to work on my taxes, which I did not finish last weekend. It’ll also show you the lollertastic state of this code, even if it works just fine once you’re setup, and why I want to make it at least a bit better before posting it on github.

(I really didn’t think anyone would ask but I had two requests the first day, so.)

LET’S GOOOOOOOOOOOO

First, get an XML backup using this tool from the official dreamwidth github:

https://github.com/dreamwidth/dreamwidth/blob/main/src/jbackup/jbackup.pl

Second, set a whole bunch of resource allocations:

In [wp-home]/wp-includes/functions.php set runtime to 300 seconds max (default is 30 – and yes this is core code, deal with it) by adding this up top:

ini_set('max_execution_time', '300');

In /etc/php/[your version]/apache2/php.ini set runtime maximum to 90 seconds (default is 30):

max_execution_time = 90

and set process memory allocation limit to 1GB (default is like 132MB):

memory_limit = 1G

Using mysql console for MariaDB, increase maximum allowed packet size (default is 1:6777216)

SET GLOBAL max_allowed_packet=1073741824;

Now you’re ready to run. For the 2023/2/20 version of the code (fully functional but trainwreck version):

  1. Install the Livejournal importer plugin, if you do not already have it. (You probably do, I think it’s part of default install. It does not show up in plugins view, it shows up in tools/import. But it’s functionally a plugin.)
  2. Place the .xml of your downloaded journal in [wordpress-home]/wp-content/plugins/livejournal-importer (directory), name it tinytest.xml (as with many things, this will change)
  3. Because trainwreck, edit the .xml file to delete the <events> tag at the top of the file, and the closing </events> tag down at the bottom. This will also change.
  4. You will find livejournal-importer.php already existing in this directory. Replace it, using the same name, with the importer code. (You can just rename the original to go back.)
  5. In the WordPress administration view, go to Tools/Import and select Livejournal importer.
  6. Ignore the username and livejournal password fields, but DO enter a password for screened posts if you don’t want them to be public.

Click go and wait. Depending upon the size of your account, this could be a while. My 60mb journal (not counting images, they aren’t in the XML file) took around 12 hours of runtime.

If the import stops early:

Check to see what posts have successfully imported. Make sure they got all their comments, as well. Then edit the successfully imported posts out of the XML file and run the importer again. If you have one post where the post imported but the comments did not, keep it in the XML file and delete the half-imported version, it’ll be fine.

I don’t feel bad about this part because the official Livejournal importer does this same shit. Sometimes things just fall over. And also, standalone WordPress – particularly default config – just isn’t set up for this kind of massive import and you’ll both end up doing things it’ll regret. Kind of surprised by that, but there y’go.

The release version will be somewhat better? But it’ll still be stupid and fiddly like this, and you’ll need to have the ability to set those resource limits. Trust me on this, you’ll need to. (And it’s not just me. I found out about the MariaDB transaction resource lift by finding other people writing completely different importers saying you’ll need to for it to work.)

Okay. There’s that.

eta: see also this thread with denise and others on dreamwidth.

Posted via Solarbird{y|z|yz}, Collected.

solarbird: (korra-on-the-air)

Every time the fundamentalists set up some “alternative” business for their own community – well, not every time, but really often – it ends up being one kind of rugpull or another, and yet, they keep falling for it. This goes back decades. I remember hearing about this one at its startup, and the rug has now been pulled: A Christian Ministry Promised An Obamacare Alternative. The FBI Says Its Leaders Pocketed $4 Million And Left Members With Thousands In Unpaid Medical Bills.

The American fundamentalist movement has always been like this. I’ve written extensively in the past about how they took over the party over time, and this is exactly the sort of result you’d expect: Michigan GOP Picks Election-Denying Demon Hunter As New Chair, following a similar pick in Kansas.

Florida is has now officially banned health care for trans children, because that’s what fundamentalist authoritarians do. From NPR: Florida has banned gender-affirming care for transgender youth, over the objections of medical professionals and trans families. Now, families have to decide whether to move states or stop their kid’s treatment.

Not satisfied with going after trans kids, Texas is now going after trans adults, as literally everyone paying any attention fully expected. Here’s the bill banning insurance coverage for trans people. They’ll keep expanding the net until we’re all illegal again.

For example, see this obscenity of a ruling, where a lesbian mother’s parental rights were taken and transferred to the sperm donor by an Oklahoma judge. She was even removed from the birth certificate, despite, you know, carrying the child. (She has since been reinstated to the birth certificate, at least.) The decision is obscene, but here we go.

Xtra magazine knows the score: this is eliminationism, and they’ve wanted to exterminate all queer people forever. (I was using exactly the same term over 20 years ago.) Anybody who says anything else is lying or in denial, because they are very clear about it amongst themselves – which is always the key trick to catch, right? When they say one thing amongst themselves and another to outside-group media, the one they say amongst themselves is the one they actually mean.

The NY Times is institutionally transphobic, and is trying to play the role multiple British media did in bringing up their current wave of extremely brutal transphobia. They were also institutionally anti-LGBT in the AIDS era, and institutionally pro-fascist in the Hitler era before the war. They have a long history of horrible, horrible position-staking and people really need to figure that out. Hopefully articles like this indicate that it’s starting to sink in… again, for now. But it needs to be pointed out at virtually every turn.

Posted via Solarbird{y|z|yz}.

solarbird: (korra-on-the-air)

I’ve been tagging things watch for a while, but I haven’t really had it as a category for a while. Maybe that, too, should be brought wretchedly back to active life.

Jezebel has coverage of DeSantis’s political retaliation against a teacher for posting video of the emptied library shelves at the school where she worked. The point is to deny the reality, of course, no matter how obvious it might actually be. And that’s always true in authoritarian regimes.

Russia plans Belarus ‘absorption’ by 2030” isn’t a surprising headline, but there appear to be leaked/exposed documents saying basically that. I don’t know much about this particular source, but I am seeing it reported multiple places following Putin’s invasion of Ukraine.

Academics are slowly migrating away from Twitter, and mostly to Mastodon, since you and/or your institution can have your own instances and not be subject to Musk’s or Zuckerberg’s fashy whims. I’m obviously strongly in favour of this and hope it continues; this kind of decentralisation is pretty critical in social media right now. See also Mastodon over Mammon – Towards publicly owned scholarly knowledge and Replacing academic journals for similar efforts related to publishing work.

Supreme Court rejects Ohio man’s bid to sue police over arrest for Facebook parody is very bad, but less definitively than the article makes it sound – I’m told – because it was turned away over jurisdictional issues, not the merits of the case. So I’m not a lawyer, but take some care over this one.

The lower court’s ruling, however, sounds to me like a travesty, and a recipe for yet more ever-increasing abuse by police.

Posted via Solarbird{y|z|yz}.

solarbird: Brigitte Lindholm from Overwatch (brigitte)

Things you’ll need if you don’t want to edit your style directly:

  1. WordPress, lol
  2. WPCode plugin (you don’t need the pro version, the free one is fine)
  3. A style that’ll let you add raw HTML to a sidebar or wherever you want the share link

Okay. I started with this code previously posted around on Mastodon, but it doesn’t seem to work well with Firefox or with popup blockers. That might just be WordPress being WordPress, but this is about WordPress, so you gotta deal with it. Here’s what I ended up doing:

Go to WPCode, select Header & Footer. You’ll have three areas in which you can insert javascript, one of which is “Body,” conveniently not mentioned in the title. Select the Body area, and paste in this:

<script id=MastodonShare>
function MastodonShare(e) {

src = document.title + " – " + window.location.href;

domain = prompt("Enter your Mastodon instance", "mastodon.social");

if (domain == "" || domain == null) {
    return;
    }

url = "https://" + domain + "/share?text=" + src;

window.open(url, '_blank');
}
</script>

“mastodon.social” is the default text in the box that comes up; you can change it to whatever you like but I just left it because it’s a large instance.

Then go to the theme editor for whatever theme you’re using, find a place where you want “Share this on Mastodon” to be a clickable link, and paste in this HTML:

<a target="_blank" onclick="MastodonShare(this);" data-src="{{ page.title }}&url={{ page.url | absolute_url }}" title="Share this on Mastodon">Share this on Mastodon</a>

That should resolve to a link with label “Share this on Mastodon,” and when you click on it, it’ll throw up a query asking what your Mastodon instance is, then launch a new tab with your own Mastodon server’s text entry window, already populated with the page title and the URL of that individual page. If they’re not logged in, it’ll say that and they should be able to log in and try again.

So it’s not as clean as a traditional “share this,” which is too bad, but on the plus side it does actually work, so that’s nice.

And that seems to work. Enjoy?

Posted via Solarbird{y|z|yz}, Collected.

May 2025

S M T W T F S
    123
45678 9 10
1112 13 14151617
18192021222324
25262728293031

Most Popular Tags

OSZAR »