Re: migrating 400 images
On Mon, May 07, 2007 at 05:14:16PM -, Milan Andric wrote: > Wow, interact() is very cool. Now I just need to find write one that > does a similar thing with html body and the local img srcs recursively > on files within a directory. Is there a library that parses html > pages, I'm sure there is, but one that you recommend? There is one in the Python Standard Library[1], but I haven't used it. Perhaps someone else on the list has. Nate [1] http://docs.python.org/lib/module-HTMLParser.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: migrating 400 images
On May 5, 7:17 am, Nate Straz <[EMAIL PROTECTED]> wrote: > > >>> from blog.migrate import loadCOREBlog > > In loadCOREBlog I loaded all of the Zope libraries and started iterating > through whatever needed to be migrated. When I detected a problem I > would use Python's code.interact function to get a shell at that point > in my script to help deal with any unexpected migration issues. > > http://refried.org/viewvc/viewvc.py/refriedorg/blog/migrate.py?view=m... > Wow, interact() is very cool. Now I just need to find write one that does a similar thing with html body and the local img srcs recursively on files within a directory. Is there a library that parses html pages, I'm sure there is, but one that you recommend? -- Milan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: migrating 400 images
On Fri, May 04, 2007 at 11:13:36PM -, Milan Andric wrote: > I'm migrating a tutorials site to Django and have created a file model > that is associated with tutorial pages, etc. Now I need to go through > and migrate all the old content. Rather than upload 400 images I was > hoping to write a script to call the File.save() method appropriately > and just copy the images into the new location. > > Any thoughts on how to approach this? Do you think this will likely > take more time than just doing it by hand? When I was migrating my site from Zope to Django I added a migrate.py module to the app I was migrating to. In there I wrote a function to do the migration. I would run it like this: # python manage.py shell >>> from blog.migrate import loadCOREBlog In loadCOREBlog I loaded all of the Zope libraries and started iterating through whatever needed to be migrated. When I detected a problem I would use Python's code.interact function to get a shell at that point in my script to help deal with any unexpected migration issues. http://refried.org/viewvc/viewvc.py/refriedorg/blog/migrate.py?view=markup Nate --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: migrating 400 images
Just "mv" or "rename" the files and UPDATE the database with the new path. 10 seconds max. On 5/4/07, Milan Andric <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm migrating a tutorials site to Django and have created a file model > that is associated with tutorial pages, etc. Now I need to go through > and migrate all the old content. Rather than upload 400 images I was > hoping to write a script to call the File.save() method appropriately > and just copy the images into the new location. > > Any thoughts on how to approach this? Do you think this will likely > take more time than just doing it by hand? > > Thanks, > > Milan > > > > > -- Julio Nobrega - http://www.inerciasensorial.com.br --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
migrating 400 images
Hi, I'm migrating a tutorials site to Django and have created a file model that is associated with tutorial pages, etc. Now I need to go through and migrate all the old content. Rather than upload 400 images I was hoping to write a script to call the File.save() method appropriately and just copy the images into the new location. Any thoughts on how to approach this? Do you think this will likely take more time than just doing it by hand? Thanks, Milan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---