Entry tags:
Question thread #62
It's time for another question thread!
The rules:
- You may ask any dev-related question you have in a comment. (It doesn't even need to be about Dreamwidth, although if it involves a language/library/framework/database Dreamwidth doesn't use, you will probably get answers pointing that out and suggesting a better place to ask.)
- You may also answer any question, using the guidelines given in To Answer, Or Not To Answer and in this comment thread.
The rules:
- You may ask any dev-related question you have in a comment. (It doesn't even need to be about Dreamwidth, although if it involves a language/library/framework/database Dreamwidth doesn't use, you will probably get answers pointing that out and suggesting a better place to ask.)
- You may also answer any question, using the guidelines given in To Answer, Or Not To Answer and in this comment thread.

enhanced Livejounal import
I don't know how to ask this question without a really long introduction, but if you want to save some reading, skip to the final paragraph once you get the idea.
I have a Livejournal with almost 8000 entries, over 1000 pictures, and 5000 comments received. Frequently I link one entry to another when referring to things I wrote about in past messages (and sometimes I even revise past messages to link later messages).
For example:
Those intra-journal links are a mess for importing from Livejournal to Dreamwidth, because message serial numbers (the "999" in "999.html" above, in case that's not the standard term for those numbers) aren't necessarily going to be the same on different journal hosts.
The simple answer is that the intra-journal links stay as-is, linking the original journal rather than within the new journal, but that sends readers off to Russia. Not ideal.
My thought about how to make it work was to build a tool that opens an entry, finds intra-journal links, and inserts an HTML data-link-conversion="(value)" attribute into the <a href="(URL)"> tag. Then, after an import, the tool could find the data-link-conversion attributes, and modify the URL to match the new host of the impoted journal.
Note: the data-link-conversion tag is a user-defined attribute; search data-* attribute if it's unfamiliar.
My thought is that the attribute value of the data-link-conversion attribute could be either the year-month-date-hour:minute or the year-month-date-serial of the destination journal entry, or maybe even year-month-date-hour:minute-serial for error checking.
Of course, using a message's position in the calendar breaks if an edit to a message changes its calendar position without correcting all data-link-conversion attributes that point to it, which is messy business. Best answer there is, "Don't do that!" More precisely, it's probably best to strip the data-link-conversion attributes from both source and destination journal versions once the import and link conversion is finished.
So, finally, my questions are: 1. Is this a problem that anyone else sees as a problem? 2. Does my solution outline look like a good way to re-link intra-journal links? 3. Is anyone else interested in teaming up on such a tool? 4. Where should I look for code to use as a starting point for such a tool?
Re: enhanced Livejounal import
Re: enhanced Livejounal import
Re: enhanced Livejounal import
Re: enhanced Livejounal import
Re: enhanced Livejounal import
Re: enhanced Livejounal import
Re: enhanced Livejounal import
Re: enhanced Livejounal import
Re: enhanced Livejounal import
Re: enhanced Livejounal import
Re: enhanced Livejounal import
Re: enhanced Livejounal import
Re: enhanced Livejounal import
SVG images
Re: SVG images
Re: SVG images
(Anonymous) - 2018-03-28 20:22 (UTC) - ExpandRe: SVG images
Re: SVG images
Re: SVG images
Re: SVG images
Re: SVG images
Re: SVG images
no subject
I'm still writing a small browser script to enable the "Repost" functionality, similar to what the LJ has.
It is a simple GreaseMonkey/TamperMonkey Javascript tool, no LJ API is used.
At the moment, I have managed to populate Subject and Entry Text, but I seem to be stuck populating "to Community" dropdown, Tags, and "Icon" fields. These fields are apparently JS-rich and heavily depend on user interaction (mouse clicks etc).
Is there a tutorial of how to fill these fields programmatically?
(no subject)
(no subject)
(no subject)
(no subject)
no subject
Icons either a) duplicate somehow, replacing other icons, b) load after refreshing the page 3-4 times, or c) won't load at all. Is there something wrong with my databases or mogile, I wonder?
(no subject)
(no subject)
(no subject)
(no subject)