Basically it just uses elementtree to parse the wordpress XML file into a
python dictionary. From the dictionary it would be quite easy to insert the
data into the DAL. Since every site is different, and has different table
structure, or checks that need to be performed on the data, I leave it to
the programmer to do this.

The idea was mainly strictly for migration.

You could use it for syncing, however wordpress export is a manual process
that exports all data each time.

I wouldn't use it for syncing since when you export from wordpress it
exports everything, that and you have to manually export the data.

It would be nice to use our new KeyedTables to create a wordpress
compatibility layer with the DAL, so that you can just pull the data
straight from the mysql tables...

-Thadeus




On Tue, Dec 1, 2009 at 8:57 AM, david bain <pigeonfli...@gmail.com> wrote:

> Thadeus,
> So basically it creates a dictionary that represents all the content of a
> wordpress databse.
> Is this strictly for migration or more for syncing?
> I suppose it could be used for both.
>
>
> On Tue, Dec 1, 2009 at 9:53 AM, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
>> Could you explain again what is does?
>>
>> On Dec 1, 1:48 am, Thadeus Burgess <thade...@thadeusb.com> wrote:
>> > Since dreamhost insists on trying to run .py files instead of just serve
>> > them, here is a working link
>> >
>> > http://static.thadeusb.com/wordpress2python.txt
>> >
>> > -Thadeus
>> >
>> > On Tue, Dec 1, 2009 at 1:36 AM, Thadeus Burgess <thade...@thadeusb.com
>> >wrote:
>> >
>> > > Here ya go, hope this helps convince you to migrate from wordpress to
>> > > web2py :)
>> >
>> > > import, pass it an open file to the wordpress exported xml/rss. And
>> get
>> > > back a python dictionary with everything you should need :)
>> >
>> > > Then it is only a matter of inserting the data into your database.
>> >
>> > >http://static.thadeusb.com/wordpress2python.py
>> >
>> > > Here is the dict structure returned by the function
>> >
>> > >     db {
>> > >         title
>> > >         link
>> > >         description
>> > >         pub_date
>> > >         language
>> > >         categories ->
>> > >             name
>> > >             slug
>> > >             parent
>> > >             description (if available)
>> > >         tags ->
>> > >             name
>> > >             slug
>> > >         posts ->
>> > >             id
>> > >             title
>> > >             slug
>> > >             status
>> > >             type
>> > >             link
>> > >             pub_date
>> > >             description
>> > >             content
>> > >             post_date
>> > >             post_date_gmt
>> > >             categories -> flat array
>> > >             tags -> flat array
>> > >             comments ->
>> > >                 id
>> > >                 author
>> > >                 author_email
>> > >                 author_url
>> > >                 author_ip
>> > >                 date
>> > >                 date_gmt
>> > >                 content
>> > >                 approved
>> > >     }
>> >
>> > > Cheers,
>> >
>> > > -Thadeus
>> >
>> >
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups
>> "web2py-users" group.
>> To post to this group, send email to web...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> web2py+unsubscr...@googlegroups.com<web2py%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/web2py?hl=en.
>>
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to
> web2py+unsubscr...@googlegroups.com<web2py%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/web2py?hl=en.
>

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to