Skip to content

Commit

Permalink
Merge pull request #110 from torchbox/update-setup-py-for-release
Browse files Browse the repository at this point in the history
update setup.py
  • Loading branch information
nickmoreton authored Dec 13, 2021
2 parents 6e5d1dc + b17822b commit 3c27330
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The package has been developed and tested with:
## Initial app and package setup

1. Setup a Wagtail site using your preferred method or follow the [official documentation](https://docs.wagtail.io/en/stable/getting_started/tutorial.html) to get started.
2. Install this package with pip install -e "git+https://github.com/torchbox/wagtail-wordpress-import.git#egg=wagtail-wordpress-import"
2. Install this package from PyPi with `pip install wagtail-wordpress-import`
or using any method you prefer.
3. Place your XML files somewhere on your disk. The file can have any name you choose.
4. Create a `log` folder in the root of your site. The import script will need to write report files to this folder, you may need to set the permissions on the folder.
Expand Down Expand Up @@ -107,6 +107,7 @@ class PostPage(WPImportedPageMixin, Page):
self.wp_block_json = data["wp_block_json"]
self.wp_processed_content = data["wp_processed_content"]
self.wp_normalized_styles = data["wp_normalized_styles"]
self.wp_post_meta = data["wp_post_meta"]

# own model fields
self.body = data["body"]
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
"Framework :: Django :: 3.1",
"Framework :: Django :: 3.2",
"Framework :: Wagtail",
"Framework :: Wagtail :: 2.14",
"Framework :: Wagtail :: 2.15",
"Framework :: Wagtail :: 2",
],
install_requires=[
"Django>=3.1,<3.3",
Expand Down
2 changes: 1 addition & 1 deletion wagtail_wordpress_import/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default_app_config = "wagtail_wordpress_import.apps.WagtailWordpressImportAppConfig"


VERSION = (0, 1, 0)
VERSION = (0, 1, 3)
__version__ = ".".join(map(str, VERSION))
17 changes: 17 additions & 0 deletions wagtail_wordpress_import/importers/wordpress.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,23 @@ def connect_page_categories(self, page, category_model, item):
page.categories = page_categories


def default_prefilters():
return [
{
"FUNCTION": "wagtail_wordpress_import.prefilters.linebreaks_wp",
},
{
"FUNCTION": "wagtail_wordpress_import.prefilters.transform_shortcodes",
},
{
"FUNCTION": "wagtail_wordpress_import.prefilters.transform_inline_styles",
},
{
"FUNCTION": "wagtail_wordpress_import.prefilters.bleach_clean",
},
]


class WordpressItem:
def __init__(self, node, logger):
self.node = node
Expand Down

0 comments on commit 3c27330

Please sign in to comment.