• I’m working on importing stuff from my html pages into WordPress via the MT import script and I seriously need help at the forum discussion post here.

    If anyone has any experience with importing into the WP database tables or converting data to the MT import layout for importing through WP, PLEASE help me.

    Thanks,

    Lorelle

Viewing 9 replies - 16 through 24 (of 24 total)
  • Thread Starter Lorelle

    (@lorelle)

    I really want to write up documentation for the codex on how to import html stuff to the database, through WP or not, so people like me who are moving from a normal site and not a blogging tool can get our stuff into WordPress and working.

    I’m stuck here, though. It’s a mysql thing, but it is stuff being transferred in prepared for WordPress. Anyone help me?

    It looks like you gave up on using the MT import method, and I can’t even get WP running to test anything to help with the rest, BUT… if you do feel like trying the MT import method again, here’s an example of an MT 2.6 export file. Note that nothing is escaped – quotes in the HTML tags are just fine.

    AUTHOR: Michael
    TITLE: Ohwha Tador Kiam
    STATUS: Publish
    ALLOW COMMENTS: 2
    CONVERT BREAKS: 0
    ALLOW PINGS: 0
    PRIMARY CATEGORY:

    DATE: 10/05/2002 03:10:03 PM
    -----
    BODY:
    <p>
    <strong><acronym title="Law School Admissions Test">LSAT</acronym></strong>: done. Please don’t ask me how I did. I don’t get the score for weeks, and right now I’d like to focus on killing my brain cells with beer. I will admit, though, that I closed my writing sample with: <i>Ceterum censeo Carthaginem esse delendam</i>. I am an &uuml;berdork.
    </p>
    <p>
    My friend from work gets married tonight within stumbling distance of my apartment. Guess who’s going to enjoy himself at the reception tonight?
    </p>
    <p>

    </p>
    <p>
    Me, in case that wasn’t clear.
    </p>
    <p class="np">
    NP: The Autumns, <i>Rose Catcher</i>
    </p>
    -----
    EXTENDED BODY:

    -----
    EXCERPT:

    -----
    KEYWORDS:

    -----
    COMMENT:
    AUTHOR: ben
    EMAIL: ???????
    IP: ???????
    URL:
    DATE: 10/07/2002 06:58:26 PM
    So...How did you do?
    -----
    COMMENT:
    AUTHOR: Michael Hoke
    EMAIL: ???????
    IP: ???????
    URL: http://www.jokeofalltrades.com
    DATE: 10/08/2002 08:58:34 AM
    <strong>Beer</strong>: 10
    <strong>Brain</strong>: 0

    <strong>Winner</strong>: Beer!!!

    I assume that’s what you were asking about, because if you were asking about something else, say, oh, the <strong><acronym>LSAT</acronym></strong>, I’d have to beat you. Severely.
    -----

    The newline character (‘\n’) does NOT have to be typed – you just need to have a new line begin after the dashes (I don’t know if saving the file in Windows will mess it up – if you can use TextPad or another editor that will allow you to save the export file with Unix-style newlines, that might be safer, but I don’t know, as I can’t get WP up to test). Also, I have no idea whether the import script in WP requires the elements to be in a certain order, but MT spit them out as above. Hope this helps.

    And yeah, this forum needs a post preview.

    –M

    Thread Starter Lorelle

    (@lorelle)

    Oh, that’s lovely. I still have the test file I did for the MT setup. Maybe it was the \n that was messing up the import.

    I’ll give it a try first thing in the morning before my flight.

    Thanks!

    Thread Starter Lorelle

    (@lorelle)

    Tried it and nothing is working. I can’t get anything to import and I’ve tried very simple things. I can search and replace, and do all kinds of other things but I can’t get the import working.

    There must be some little thing I’m slipping up on. I’ve written the whole thing out in notepad, checked all the quote marks, commas, semi colons, etc., and I can’t get anything to import. Ideas?

    I haven’t had a chance to put things back into MT format and give that try.

    Thread Starter Lorelle

    (@lorelle)

    DO A LITTLE DANCE. THE TRUMPETS SOUND. SUCCESS IS MINE!!!

    Okay, so it worked. I started over from scratch with a few little files and it finally worked. I don’t know exactly what it was that stopped almost the identical process for the past two months, but I finally got the import-mt.php to work on my html stuff. A lot of search and replace, but now I’m the queen of search and replace!

    Note
    One of the things that might have caused my problems with the import is that the:

    AUTHOR: Fred
    TITLE: Ohwha Tador Kiam
    STATUS: Publish
    ALLOW COMMENTS: 2
    CONVERT BREAKS: 0
    ALLOW PINGS: 0
    PRIMARY CATEGORY:
    DATE: 10/05/2002 03:10:03 PM

    MUST be in this order. It can’t be Title > Author or Status > Title > Author. It has to be in this order. This might have been part of the screwups since somewhere I read that the order wasn’t important. Well, folks, IT IS.

    Thanks to everyone for walking me through this 100 times.

    I would like to convert my static html pages to wordpress, too. how did you convert the html to a MT export file? any recommendations?

    Thanks.

    Thread Starter Lorelle

    (@lorelle)

    I’ll be adding an article about the process to the codex soon, but in the interium, you need to copy either all of your html from your pages OR the specific information you will be putting into the MT format for importing into a sophisticated text editor or a word processor (if you really know what you are doing). Then begins a very long process of search and replace to remove the excess and add the formating to match the mt import layout.

    As mentioned above, the first part of the structure must match exactly in order as shown. If you don’t have comments, pings, or any specific items, these can be ignored and dropped, but the first part of the structure must be exactly as shown.

    Unfortunately, this means that after you do all these wonderful search and replaces (and hopefully your original html layout is well defined and consistent…making this process very easy) you have to go through the entire thing manually and make sure that everything is lined up correctly.

    I really recommend doing no more than 50 “posts” at a whack, just in case you screw up. The first couple batches will be learning lessons, and the rest will go very fast once you get the process figured out. Take notes as you go.

    Really watch to make sure each field section is separated by 5 dashes and the end of the record is separated from the next by 8 dashes in a line.

    I’ll work on the rest of the details later. Just got back from a month on the road traveling and I have to find my desk under my luggage.

    Do take lots of notes as you work and either post it here or email me directly to let me know what you learned as you went through the process so I can add it to my notes.

    Good luck. It’s actually time consuming but easier than you might think.

    Thanks for the tipps. I will beginn the formatting in the next few days and will let you know.
    As for pictures included in the blog entries, is there something I should be aware of or will the <img> tags just work fine?

    p.s. impressive amount of information on your pages!!!

    Thread Starter Lorelle

    (@lorelle)

    On my web pages? Thanks. It’s a lot of years of hard work. Once heralded as one of the largest personal websites on the net…until the bloggers took over. Damn them…;-)

    As for the pictures, I left the links all as they were (though another search and replace through the data would change the folders and such). But then I have a very structured way of sorting all my images. All “images” such as gifs which are non-photos go into a directory called “images” with specific subfolders depending upon their use. All photographs go into a “photos” directory with subfolders as per their use. I’m keeping the same hierarchy with the move.

    As described in this thread, if you put the base reference for the images in the header, then it will find your images from there. Very helpful.

    If you don’t have your images well organized but dumped in here and there, fix it now or it will haunt you.

    And be sure and move away from the computer and take a walk or two or three every hour or so while doing this. It ain’t a mindless task and requires a lot of sitting and careful looking as you plow through it.

Viewing 9 replies - 16 through 24 (of 24 total)

The topic ‘Importing MT-like data problem’ is closed to new replies.