This package automatically uploads Finnish casino content to WordPress using the REST API.

πŸ“ Content Structure

The uploader processes content from the following directories:

paasivut/ β†’ WordPress Pages (Main pages like homepage)

arvostelut/ β†’ Posts in “Kasinoarvostelut” category (Casino reviews)

oppaat/ β†’ Posts in “Oppaat” category (Guides and tutorials)

pelit/ β†’ Posts in “Oppaat” category (Game guides)

maksutavat/ β†’ Posts in “Maksutavat” category (Payment methods)

kategoriat/ β†’ Posts in “Kategoriat” category (Category pages)

πŸš€ Quick Start

1. Setup

“`bash

# Run the setup script

setup.bat

“`

2. Configure WordPress Credentials

1. Go to WordPress Admin β†’ Users β†’ Your Profile

2. Scroll to “Application Passwords”

3. Add new application password

4. Copy the generated password

5. Update `WP_PASSWORD` in `wp_content_uploader_fi.py`

3. Test Connection

“`bash

# Test WordPress connection

test_connection.bat

“`

4. Upload Content

“`bash

# Upload main pages first (recommended)

upload_main_pages.bat

# Upload all content

upload_all_content.bat

# Or upload specific content types:

upload_casino_reviews.bat

upload_guides.bat

“`

πŸ“‹ Available Scripts

Script Description
`setup.bat` Install dependencies and show setup instructions
`test_connection.bat` Test WordPress connection and permissions
`upload_all_content.bat` Upload all markdown files
`upload_main_pages.bat` Upload only main pages (homepage, etc.)
`upload_casino_reviews.bat` Upload only casino reviews
`upload_guides.bat` Upload guides and game content

βš™οΈ Configuration

Edit `wp_content_uploader_fi.py` to configure:

“`python

WP_BASE_URL = “http://casino5.local” # Your WordPress URL

WP_USERNAME = “admin” # WordPress username

WP_PASSWORD = “your-app-password” # Application password

“`

🎯 WordPress Categories

The uploader automatically creates these categories:

Kasinoarvostelut (arvostelut) – Casino reviews

Oppaat (oppaat) – Guides and educational content

Maksutavat (maksutavat) – Payment method information

Kategoriat (kategoriat) – Casino category pages

Sivut (sivut) – Core website pages

πŸ“ Content Processing

The uploader converts Markdown to HTML with:

– βœ… Headers (H1-H5)

– βœ… Bold and italic text

– βœ… Links

– βœ… Tables with styling

– βœ… Paragraph formatting

– βœ… Star ratings for reviews

πŸ”§ Troubleshooting

Connection Issues

– Ensure WordPress is running at the configured URL

– Check that REST API is enabled

– Verify application password is correct

Upload Issues

– Check file permissions

– Ensure markdown files exist in expected directories

– Review WordPress error logs

Content Issues

– Verify markdown syntax is correct

– Check for special characters in titles

– Ensure file encoding is UTF-8

πŸ“‚ File Structure

“`

suomi/

β”œβ”€β”€ wp_content_uploader_fi.py # Main uploader class

β”œβ”€β”€ upload_all_content.bat # Upload all content

β”œβ”€β”€ upload_main_pages.py/.bat # Upload main pages only

β”œβ”€β”€ upload_casino_reviews.py/.bat # Upload casino reviews only

β”œβ”€β”€ upload_guides.py/.bat # Upload guides only

β”œβ”€β”€ test_connection.py/.bat # Test WordPress connection

β”œβ”€β”€ setup.bat # Setup and install dependencies

β”œβ”€β”€ requirements.txt # Python dependencies

└── README.md # This file

“`

🌐 WordPress Setup After Upload

1. Set Homepage: WordPress Admin β†’ Settings β†’ Reading β†’ Static Page

2. Create Menus: Appearance β†’ Menus β†’ Create navigation

3. Check Categories: Posts β†’ Categories β†’ Verify all categories created

4. Review Content: Check all pages and posts uploaded correctly

πŸ’‘ Tips

– Upload main pages first to establish site structure

– Test with a few files before uploading all content

– Always backup your WordPress site before bulk uploads

– Check content formatting after upload and adjust as needed

Leave a Reply

Your email address will not be published. Required fields are marked *