|
journal
all | Rob is 20,357 days old today. |
Oct 2014 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Dec 2014 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
2013
jan feb mar apr
may jun jul aug
sep oct nov dec
2015
jan feb mar apr
may jun jul aug
sep oct nov dec
|< << more >> >| |
Entries this day: don't-overwater-succulent-plants imported-all-entries-from-my-wordpress-journal importing-journal-entries-from-perl-journal don't overwater succulent plants ##12:29 Saturday 08 November 2014 JST## Their leaves rot when they are chilling in water. Somone overwatered the aloe (?) Lin got from Mikako and its leaves started to go black and fall off. ahem. I dunno if it's revivable, but I put one of the still green leaves on some course sand cactus soil and put the rootball in a separate container with course sand cactus soil. Next to the rootball, I put little still-green tips of leaves that had otherwise turned black and mushy inside. Dunno if those might grow, but we shall see what happens. The main problem for these plants here is lack of sunlight and excess of cats. permalinkimported all entries from my wordpress journal ##22:41 Friday 07 November 2014 JST## Got all the text as far as I can tell, though the tags sometimes have capital letters. BUT the much bigger problem is that none of the images were imported. Their links are embedded in the entries, but the actual files are on robnugen.com/blog/wordpress/whatsit ##10:13am Saturday 8 November 2014 JST Okay, so last night I forked and tweaked mloskot/exitwp-hakyll so now I have my own hakyll version of exitwp I tweaked the code so it would use ".md" as the file extension, insert the entry date inside the body of the text the way I like, and I upated the README a bit. (I also made it say "tags" instead of "categories" because I don't plan to have categories in my Hakyll journal, at least not yet) After pip install pyyaml Then python exitwp-hakyll.py processed the xml file perfectly but I was like, "hey where are the images?" Turns out the images are not included in the export from Wordpress, which just produces an XML file of the textual data. Links to images are simply HTML links within the body of the entries. Part of me wants to solve it in code: for each file in the output
regex search for links to images
for each regex found
determine new URL (path)
download the file from old URL to new path
update the link in the text file
But it will be simpler overall to just migrate the whole file structure via scp like Martin did in May: From Wordpress to Jekyll So here's what I did: mkdir ~/journal-images cd ~/journal-images scp -r robnugen.com:~/robnugen.com/blog/wp-content/uploads/* . Then with Finder moved the images from Search and replace over all new markdown files: importing journal entries from perl journal ##23:06 Saturday 08 November 2014 JST## I've spent a few hours today processing my old school journal entries for inclusion in my hakyll journal. I have been doing it all in emacs, with some macros to speed up the process (of processing them). The first macro redacts email address domains from comments: (fset 'rn-00-redact-emails-in-comments [?\C-s ?c ?o ?m ?m ?e ?n ?t return return ?\C-s ?@ return ?\C-k ? ?* ?r ?e ?d ?a ?c ?t ?e ?d ?* escape ?b escape ?b return ?< ?p ?> ?< ?b ?> ?E ?m ?a ?i ?l ?: ?< ?/ ?b ?> ? ?\C-a ?\C-p ?\C-k ?\C-k ?\C-x ?\C-s ?\C-x ?k return ?n]) The second macro embeds each comment (which were stored in separate files in the old system) in the journal entry for which the comment was written. (fset 'rn-01-embed-comments [?\C-s ?. ?c ?o ?m ?m ?e ?n ?t return return ?\C- escape ?> ?\C-w ?\C-x ?\C-s ?\C-x ?k return ?p return escape ?> escape ?> return ?# ?# ?# ?c ?o ?m ?m ?e ?n ?t ?s return ?\C-y ?\C-x ?\C-s ?\C-x ?k return ?n ?n]) The third macro creates files that will be the meta data for each entry (fset 'rn-02-create-yaml-files [?\C- ?\C-e escape ?w ?\C-x ?\C-f ?\C-y ?. ?y ?a ?m ?l return ?\C-y return ?\C-x ?i ?~ ?/ ?j ?o ?u ?r ?n ?a ?l ?. backspace ?- ?r ?n ?. ?c ?o ?m ?/ ?y ?a ?m tab return ?\C-p ?\C-f ?\C-f ?\C-k backspace backspace ?\C-d ?\C-n ?\C-e ?\C-y backspace backspace backspace backspace backspace ?\C-n ?\C-n ?\C-n ?\C-x ?\C-s ?\C-x ?b ?* ?M ?e ?s ?s ?a ?g ?e ?s tab return ?\C-p ?\C-s ?. ?c ?o ?m ?\C-s return ?\C-f ?\C- ?\C-f ?\C-f ?\C-f ?\C-f ?\C-f ?\C-f ?\C-f ?\C-f ?\C-f ?\C-f escape ?w ?\C-x ?k return ?\C-y ?\C-b ?\C-b backspace ?- ?\C-b ?\C-b ?\C-b backspace ?- escape ?< escape ?x ?r ?e ?p ?l tab ?s ?t tab return ?_ return ? return ?\C-a ?\C-x ?\C-s ?\C-x ?k return ?n]) There are a couple of macros to place tags in the meta data, based on file names: zzzz -> sleepy dream -> dream etc Then the last macro embeds the meta data in the files: (fset 'rn-06-merge-yaml-files [?\C- ?\C-e escape ?w return return ?\C-p ?\C-x ?i ?\C-y ?. ?y tab return ?\C-x ?\C-s ?\C-x ?k return ?R ?\C-y backspace backspace backspace backspace ?m ?d return ?n ?d]) So far, I have embedded comments and created meta-data files for files from 1985 down through the middle of 2003. permalinkprev day next day |