Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-04-12 03:18:48

archayl
New Member
Registered: 2010-04-03
Posts: 5

[contrib] In progress to make new Blogger import tool, like to have opinion

Hi all,
Straight to the point. I’m in the middle of making a Blogger import tool which import the current default Blogger export file, which is in standard Atom format. I used SimplePie library to parse the data in the XML file, it’s BSD licensed. Now, I have some dilemma. In a Blogger post, everything is cramped inside the body. Post text, images, and links. Should I filter them and separate them into TXP style?

Blogger have what it calls ‘Label’. Should I move that to TXP keyword? Somewhat it feels more appropriate for category, because it functions more to grouping, rather than revealing keywords.

About Feed Time, what should I put? Blogger doesn’t have that, I think.

That’s it for the time being. Anyone have any suggestion, please do response. Because I’m using the Blogger default export file, it should be easier for new TXP users to import their Blogger articles.

Owh, by the way, Blogger also have static pages, should I get that too? If so, where is the suitable place to put them?

Cheers!

Offline

#2 2010-04-12 08:08:13

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

Re: [contrib] In progress to make new Blogger import tool, like to have opinion

archayl wrote:

I’m in the middle of making a Blogger import tool which import the current default Blogger export file

Wow, impressive. Was this the one that James referenced in this thread and said ‘Wouldn’t want to go near it myself’?

In a Blogger post, everything is cramped inside the body. Post text, images, and links. Should I filter them and separate them into TXP style?

Without knowing what they’ve done in the new format I can’t really say but my gut feeling is yes, if you can, put article text in textpattern’s Body/Body_html fields (non-textiled I assume?), images in txp_image and links in txp_link. I guess the image(s), once created, should be referenced by ID in the article_image field. No idea how you’d reference the links, sorry.

Blogger have what it calls ‘Label’. Should I move that to TXP keyword?

Do they have another concept of ‘categories’ in Blogger? If not then these labels should probably go in categories, although that does imply a few things:

  1. If they don’t already exist they need to be created in the txp_category table and the table rebuilt after each insert
  2. The (current) 2-category limitation needs to be respected. Whether that means only taking the 1st two categories and using them, I don’t really know
  3. Whatever category method you choose, consider making it extendable so that it can easily be switched to import unlimited categories in some possible TXP future

About Feed Time, what should I put? Blogger doesn’t have that, I think.

Hmmm, I don’t really know what it is either(!), but my guess is to put just the date portion (discard the time) of the article’s Posted date in there.

Blogger also have static pages, should I get that too?

If they’re treated separately in Blogger, one option might be to offer people the option to import standard articles into one Section and static articles into another nominated Section. That would keep things nice and organised in TXP. If no static section is defined, it would use the section as given for standard articles.

How’s that? Also, if you have some test data


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2010-04-12 09:17:58

archayl
New Member
Registered: 2010-04-03
Posts: 5

Re: [contrib] In progress to make new Blogger import tool, like to have opinion

Thanks a lot for your suggestions Bloke. Actually, it’s not that bad. Because the export file is in standard Atom feed format. I can easily parse the file and get the desired data, of course by using SimplePie. I don’t want to reinvent the whell, so since it is open source, I decided to go with it. I’m fine with it. I’m not sure about the TXP community though.

About exploding the texts, links, and images, that should be okay, as long as I keep data abstractions at my best. I think that is possible.

For the categories, tough decision. I’m thinking to just ignore the labels. I think that it is better to not mess with it rather than compromising data integrity. Only human can best determine which categories should be chosen to be kept, not scripts. That needs to wait until TXP can have flexible number of categories.

I’ll take your suggestion about feed time. Somehow it makes sense. LoL.

How about if I put the static pages into ‘about’ section? That’s enabled by default in TXP, so I think it is some sort of failsafe feature. Hmm..better off with your suggestion. The static pages doesn’t necessarily belong to ‘about’ section, that’s somewhat not a semantic approach.

By the way, I need more test data too~ Maybe some Blogger export from a multiple author blog. Right now, I’ve got only me and my friend, only after I beg her to give me her Blogger export file…Sigh… How to send the Blogger export data to dev? My blog is in my native language. I’m afraid that later it is hard to interpret the results, since you’ll see the results like some gibberish manuscript. ;)

Offline

#4 2010-04-12 09:38:51

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

Re: [contrib] In progress to make new Blogger import tool, like to have opinion

archayl wrote:

Because the export file is in standard Atom feed format. I can easily parse the file and get the desired data, of course by using SimplePie.

OK, so this probably isn’t something that can be made into a core feature directly then. Shame :-( But if you don’t mind, the code could be made available if people need it and some instructions for doing so could be posted on Textbook perhaps?

I’m thinking to just ignore the labels.

Makes sense.

How to send the Blogger export data to dev?

I don’t mind it in another language. I write gibberish in my own language anyway :-) I’ll try and strip out a couple of the posts at a time if I can for testing. So if you want to send some stuff my way, get in touch by e-mail (if you can see the link in the forum here) or from my web site and then we can arrange for you to attach it to an e-mail. I assume this Blogger data format is described somewhere on the web? I’ll take a Google tour when I get a chance, but if you know of a good link I’ll gladly take it.

Thanks for looking at this.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#5 2010-05-07 12:30:04

archayl
New Member
Registered: 2010-04-03
Posts: 5

Re: [contrib] In progress to make new Blogger import tool, like to have opinion

Question! …again. Is there any specific way for TXP to keep YouTube embed videos? For example, in Blogger, YouTube videos embed in article body looks like this:

[youtube=http://www.youtube.com/watch?v=XWJBeDSawMQ&hl=en_US&fs=1&]

I’m pretty sure that is some sort of tag that will be parsed by internal Blogger code and produce a real YouTube embed format. Should I parse the code into a normal YouTube embedded code? Or is there any specific way TXP handle embed videos without any plugins? This, as I can see does not fit in any category of item. Not a link, not an image, not a file. It looks like it can’t be ripped odd from article body and be replaced by some sort of TXP tag.

Suggestions, please. TIA!

Offline

#6 2010-11-29 17:49:48

armartinez135
New Member
Registered: 2010-11-29
Posts: 5

Re: [contrib] In progress to make new Blogger import tool, like to have opinion

Good afternoon. I have been working for the past day or so trying to import a blogger template into Textpattern. I am having little to no luck. I went through what textbook had said to do and even went back to the classic view as suggested on a previous thread. The problem I am having is just like this post. I found some suggestions about changing the time in the txp_import.php file and every time I do this the time max just increases. Along with that the errors remain the same. Is there any documentation of a successful transfer from blogger into Textpattern (in the past year? Everything is so outdated in regards to this issue.).

Offline

#7 2010-11-29 18:01:44

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: [contrib] In progress to make new Blogger import tool, like to have opinion

archayl wrote:

Question! …again. Is there any specific way for TXP to keep YouTube embed videos? For example, in Blogger, YouTube videos embed in article body looks like this:

[youtube=http://www.youtube.com/watch?v=XWJBeDSawMQ&hl=en_US&fs=1&]

Hi archayl,

try the_video


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB