Hierarchical Taxonomy Import for Drupal
[Here's a repost of an old post that didn't make it from the old Wordpress database into the new version of this site
If you need to import large amounts of data into a Drupal taxonomy, this may help you. I had a large (5000+ terms) vocabulary that was hierarchical. The solution wasn’t obvious, nothing existed to import them, and I didn’t want to do it by hand (it would’ve taken a whole day probably).
The solution was to format the terms by copying and pasting them from an Excel file, with some nifty markup. My database needed 3 levels of hierarchy and here’s a sample:
*Banjos %Dean Backwoods 3 Backwoods 5 Backwoods 6
Banjos is the first level, Dean is second and the rest are third level. You need the * and % to denote 1st and 2nd level respectively. (It only took about a half hour to mark up my list - not too bad)
The script will iterate through the terms, creating the taxonomy.
Perhaps this could be made into a modeule someday, but I don’t have the skillset to do so at this point (feel free to modify the code).
Migrated Jonahan.com from WordPress to Drupal
FINALLY! I've escaped the evil clutches of the monster known as WordPress. Ok, I'm sure it's not bad, but I didn't have the time to learn it through and through. On top of that, I had been getting hacked and Google claimed my site was malware [still was at time of writing].
So I created a whole new version of the site in Drupal. The conversion went ok, and the Wordpress Import module worked perfectly. All the old content is in here.
A Drupal install makes sense for me, as we use it for work all the time. This will be my little playground for testing out new modules and whatnot.
Let me know whatcha think... :)
Weekendtastic - Some Mind-blowing Media
[I wrote this a couple days ago, but didn't post it. Just FYI about when it was written.]
Good weekend, good weekend. Got a lot of chit done, but it was mostly stuff that pretty much only exists in my head. That is, I don't have anything physical to show for it. I can't point at a garden and say, "See what I helped to grow?" or point at a porch and say, "Look at this! Come and sit with me on this fine wooden construction!"
What I did accomplish was to learn more on the guitar as well as come up with some music. I managed to record some stuff in Garageband as well. I did some writing, but mostly stuck to lyrics, which is a totally new and different thing for me. (So I guess I do have a record of some of the stuff I did.)
Evil Phishing Email - "Google AdWords"
Here's a nasty one that's making the rounds. It's a new phishing email that had me thinking about it:
From: adwords-noreply@google.com
Subject: Your ads have been suspended.
Date: May 13, 2008 4:06:01 PM EDT
To: jonahan@*****.***
---------------------------------
Dear Google AdWords Customer,
We were unable to process your payment.
Your ads will be suspended soon unless we can process your payment.
To prevent your ads from being suspended, please update your payment information.
Please sign in
to your account at http://adwords.google.com/select/login,
and update your payment information.
-------------------------------------------
This message was sent from a notification-only email address that does
not accept incoming email. Please do not reply to this message.
-------------------------------------------
When you click the link it takes you to: http://www.adwords.google.com.onlinecdx.cn/select/Login/. Sons'a'bitches.
Always look at the domain name, peoples! Be wary...
No Compromise on the REAL ID act - No National ID card!
Do we really want a national ID card? Doesn't that sound like something out of Nazi Germany? Well REAL ID is being pounded down our throats, and we need to make a stand.
Many Americans ARE standing up, and now the freedom-usurpers are trying to make a compromise to the REAL ID act that would help pay the states, as if money was the only problem with it.
Senate bill S.717, short titled the "Identification Security Enhancement Act of 2007," and its virtually identical companion bill in the House, H.R.1117, purportedly would alleviate concerns about The REAL ID Act of 2005 relative to the act's huge unfunded federal mandate on state governments and its serious threat to privacy and civil liberties. It appears to be a compromise intended to bring into agreement the Bush administration and those state governments which have objected to or complained about the implementation of the REAL ID Act.
Tue May 13, 2008
Jooblie jumping into the melee
Have you ever learned something that corrected what you thought since you were a kid? It's a total mindblow and you have to laugh because you took that thing to be true for years and years and all of a sudden it's totally different. There should be a name for that. Like retrognosticamendation or something.
For me, this wasn't really a retrognosticamendation, but I did learn something I didn't know the reason for. The whole way that a subscription channel like HBO works, is by renting, or leasing, the rights to movies for a period of time. I suspect that in some cases they buy a movie outright and can show it over and over, which is why you have the same crap running for years on the crappy Showtime channels.
This is their whole business model, but I didn't get it until now. Makes perfect sense, you subscribe and pay a monthly fee, they take that money and buy the rights to shows (or create them) and play them for you.
But I didn't get that for, what maybe 25 years of HBO being around.
Another example of a retrognosticamendation would be that I thought the word "melee" was pronounced "meee-leee". Being a hardcore D&D player, I thought I knew what was up and what a melee was, and what constituted melee weapons. But the whole time I was saying it wrong --- it's actually pronounced "may-lay".
25 years and I've been saying it wrong, thinking I'm an expert on melee weapons, and melee's ensuing and jumping into a melee. Meee-leee. Ha!!!
But it's another example of thinking one thing for eons, and suddenly you see it in a whole new light. You have to change your way of thinking, pronounce things differently. Adapt, change your thought process a bit.
Granted, doing this for just a word like melee is almost insignificant, but apply it to something like the aspect of God, religion in general, politics, American history. You can see how some people get stuck in a thought pattern and don't want to break out of it.
You think history is one thing for 30+ years and then are presented with something else, an alternate reality. For instance (and I'm just throwing this out there) let's say that 3-headed aliens fly in on hovercycles and say they'be been watching us for years and finally thought they'd drop in and have a beer with us.
Many of us could cope with it - I like to think I could. But what if one of those aliens told you our reality is only one tiny slice of reality; there are many more dimensions than this and that our existence is merely just a thought, and then he/she/it proceeds to manipulate your brain like a Rubik's Cube, causing you to peek into 11 dimensions at once. You see infinity, and that planets are atoms, that time really -is- relative, that your Grandma is your son, all in the space of a fraction of a second. Then he releases your mind back to 3D reality and tosses you a Beck's, chuckling and telling you it's ok and hey check out the TV, the 'Sixers are ahead.
Could you handle it? Not sure if I could. I'm curious as to what people's reactions would be. How many would just go nuts? I think a big percentage would try to kill said alien. Perhaps that's what's wrong with humanity - when presented with something so alien from our thought processes, our instinct is to destroy that thing.
Perhaps that instinct isn't a bad thing, maybe it was there to ensure our survival. But then again maybe it's time to evolve past that.
"Melee". Heh. That's a funny word.
What is up with Jib Jooblie!?
I haven't been keeping up my daily blogging. This is mostly because Google has determined that my WordPress install is hackable and visitors get a warning before coming here. My traffic has dropped to virtually nil. I haven't had a chance to upgrade Wordpress, and I'm VERY cautious, as last time I broke everything. It's not a simple upgrade path.
Anyway, I've decided to still write a little bit for the people that come here from time to time or have it in their RSS readers. This ones for YOU! Go 'head, take a sip. Relax, and but on some Barry Manilow. Ahh, that's better, yes?
So, I've finished Ron Paul's book - a very good read. I have 2 copies that I'll be loaning about so let me know if you want it. I've been getting back into reading my Astral Projection book (yeah, weird, I know, but it's cool). I haven't been making any noticable progress, but learning about chakras and stuff is interesting. Also had some CRAZY dreams that were intense, complicated and I remembered most of them. Perhaps I'm slipping into lucid dreaming?
Also, I'm enthralled with a new book: Darth Bane - Path of Destruction. Excellent writing and I read some passages over and over, tearing it apart and seeing what makes it tick, storing those nuggets away for use in my own writing someday. It's a must-read for any Star Wars fan, perhaps the best book I've read in the SW universe, and Drew Kapryshyn has quickly joined the ranks of my favorite authors.
Also got a Epiphone SG copy, a beginner guitar but it sounds awesome and has good action. I've been learning stuff like crazy and playing quite a bit. I really missed having a straight-up electric guitar. It's SO much easier to play than an acoustic/electric.
S'all for now folks. Peace.
Daily update and random crazyness
All right. Daily blog post because YOU requested it, dear reader.
The dog Rogue is doing much better and not squealing in pain nor bleeding from her abdomen area. I slept on the couch w/ both dogs again last nite, and despite sleeping sitting up I actually got quite a refreshing sleep, replete with odd dreams that I remembered wrote down the in the dream journal.
I jammed on the new axe last nite quite a bit, this time refining my knowledge of "Freewill" by Rush and taking a stab at "Crazy Train".
Hooked up with Spencer last night to play some online Warcraft. I ran my little level 15 gnome rogue all the way to the Night Elf area of Darkshore. His NE Hunter, "Ocho" his spider pet, and Panster the Rogue just tore right thru the area leaving a wake of dead bodies in their trail. A Rogue and Hunter combo is some SERIOUS DPS! Makes me wonder how cool an arena team with those two classes would be.
I've finished building out the new site I'm working on and am in the process of Drupalizing it. Trying out FCKEditor and it seems pretty smooth. Next up is to get IMCE working and allow image uploading and insertion. (By the way, what is up with names like TinyMCe, IMCE, FCKEditor and WYMEditor... seriously? How about something memorable - like "TextZapper" or "Web Wizard"? Something corny, yet memorable. Always remember KISS - Keep it Simple Stupid)
S'all fer now. We'll talk again soon. I do miss you so Rodrigo. Know that my love for you is undying and once this war is over I'll be home to sew the rutabaga hats onto the walruses.
Give my regards to the talking trout, and ask him how the suit that he wears stays so well-pressed in that aquarium.
Your always,
Jib Jooblesticks
Rogue out of the action; Jooblie gets little sleep
I am not going to write today not matter what! You cannot make me?
'Tis my birthday, and despite feeling great yesterday and this morning, this afternoon I am shot: no energy and can't focus. Perhaps it's due in part to the bad night's sleep I got last nite.
Rogue is still acting like a little bitch hurting from her surgery to get fixed. I don't know what's going on, but it's 100% different than when Mackie got fixed: Mackie had no problems at all. Rogue, on the other hand was still bleeding in the area of her stitches last night.
I "slept" with her on the couch, keeping her upside down in a position where it wouldn't hurt.
Don't tell me I'm a softie. Sometimes I am, but much of the time I'm a heartless bastard. I really just want to do whatever it takes to get her healed so that she's not dripping blood from her stomach. Gooooo!
I took her to the vet but he said all systems were functional, she hadn't torn open any stitches or anything. Moof.
Anybody know a doggie witch-doctor? We gots to get this bitch fixed up!
Well that's all for now, back to the code-mill.
Um, can we do the weekend over please?
Had a sorta bad weekend. The kid (our pup Rogue) was home after having surgery as Bob Barker used to recommend. Mackie at one point crushed Rogue up against the house (they accidentally both got outside at the same time and started to play). Rogue came back bleeding: although her stitches weren't blown open, it was kinda nasty.
I had eyes of fire most of the weekend too, so yeah it sucked.
One major point of goodness: the guitar I ordered on Friday arrived on Saturday! That NEVER happens! A hell of a deal, $140 for an Epiphone SG knockoff that really performs well (BTW, until this weekend I thought Epiphone was pronounced like 'epiphane', not Epi-Phone). So I attempted to rock it out a bit. It's nice having an electric guitar after many years of just having an acoustic.
Pants off,
-- Jonahan
