APSL / wordpress-to-puput

Import your Wordpress blog data into Puput
MIT License
13 stars 16 forks source link

Does not work with Wagtail 2.3 #8

Open clmerle opened 5 years ago

clmerle commented 5 years ago

Was wondering if this add-on will be updated to work with puput 1.03 and Wagtail 2.3 because I ran into several issues but have been able to workaround some of them.

It requires requests=2.7.10, but the minimum requests version Wagtail 2.3 will work with is 2.12.0. I cloned a copy of the repo and changed the requirements, made it into a package, and then pip installed it, but then I ran into another problem. It complained about not finding wagtail.wagtailcore.models and wagtail.wagtailimages.models which I discovered had been changed to wagtail.core.models and wagtail.images.models in Wagtail 2.0. I changed this as well in ../commands/wpy2puput.py. I was then able to import some wordpress posts, but there were problems there as well. It won't import and create the categories but a glance at the code looks like it should. If I create the categories in advance then it will import those posts and will import tags. Also it imports \n\r and embeds them in the posts. WordPress doesn't export featured images without a plugin, so wasn't able to test to see if they were imported as header images.

My coding skills are a little rusty, but I will try to fix what I can, but unsure of how to make sure that this package is up to date to work with at least puput 1.0.3 and Wagtail 2.3. I'm still a novice at git as well but I'll try to upload what I fixed as a branch repository, but I've made only just a few changes to get it to work. Most of the functionality works great and my posts are importing as are images in the posts.

Here are the pip packages installed in my Python 3.6.4 virtual environment:

Package              Version 
-------------------- --------
beautifulsoup4       4.6.0   
certifi              2019.3.9
chardet              3.0.4   
Django               2.1.7   
django-colorful      1.3     
django-el-pagination 3.2.4   
django-modelcluster  4.3     
django-social-share  1.3.2   
django-taggit        0.23.0  
django-treebeard     4.3     
djangorestframework  3.9.2   
draftjs-exporter     2.1.5   
html5lib             1.0.1   
idna                 2.8     
lxml                 3.4.4   
Pillow               5.4.1   
pip                  19.0.3  
puput                1.0.3   
pytz                 2018.9  
requests             2.12.0  
setuptools           40.8.0  
six                  1.12.0  
Unidecode            1.0.23  
urllib3              1.24.1  
wagtail              2.3     
webencodings         0.5.1   
wheel                0.33.1  
Willow               1.1     
wordpress-to-puput   0.3     
marctc commented 4 years ago

Does it works for your with the last version?