Skip to content

Instantly share code, notes, and snippets.

@hjupadhyay
hjupadhyay / wpadapter.py
Last active December 20, 2022 11:35
A csv to wordpress posting adapter written in python
# wpadapter.py inserts posts from a csv file to a wordpress blog
import datetime , xmlrpclib , csv
# STEP 1 create a wp insert function
def insert_wp_post(title="Title was not passed !",content="Content was not passed !"):
wp_url = "http:// <INSERT YOUR WORDPRESS URL HERE >/xmlrpc.php"
wp_username = "wordpress username"
wp_password = "wordpress password"
wp_blogid = ""
postype=""