<commit_before>#!/usr/bin/env python

"""
	Small example script that publish post with JPEG image
"""

# import library
import wordpresslib

print 'Example of posting.'
print

url = raw_input('Wordpress URL (xmlrpc.php will be added):')
user = raw_input('Username:')
password = raw_input('Password:')

# prepare client object
wp = wordpresslib.WordPressClient(url+"xmlrpc.php", user, password)

# select blog id
wp.selectBlog(0)
	
# upload image for post
# imageSrc = wp.newMediaObject('python.jpg')

# FIXME if imageSrc:

# create post object
post = wordpresslib.WordPressPost()
post.title = 'Test post'
post.description = '''
Python is the best programming language in the earth !

No image BROKEN FIXME <img src="" />

'''
#post.categories = (wp.getCategoryIdFromName('Python'),)

# Add tags
post.tags = ["python", "snake"]

# do not publish post
idNewPost = wp.newPost(post, False)

print
print 'Posting successfull! (Post has not been published though)'
	
<commit_msg>correct spelling mistake<commit_after>#!/usr/bin/env python

"""
	Small example script that publish post with JPEG image
"""

# import library
import wordpresslib

print 'Example of posting.'
print

url = raw_input('Wordpress URL (xmlrpc.php will be added):')
user = raw_input('Username:')
password = raw_input('Password:')

# prepare client object
wp = wordpresslib.WordPressClient(url+"xmlrpc.php", user, password)

# select blog id
wp.selectBlog(0)
	
# upload image for post
# imageSrc = wp.newMediaObject('python.jpg')

# FIXME if imageSrc:

# create post object
post = wordpresslib.WordPressPost()
post.title = 'Test post'
post.description = '''
Python is the best programming language in the earth !

No image BROKEN FIXME <img src="" />

'''
#post.categories = (wp.getCategoryIdFromName('Python'),)

# Add tags
post.tags = ["python", "snake"]

# do not publish post
idNewPost = wp.newPost(post, False)

print
print 'Posting successful! (Post has not been published though)'
	

{'fraction_non_alphanumeric': 0.12372188139059305, 'fraction_numerical': 0.0010224948875255625, 'mean_word_length': 5.021538461538461, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5948133', 'n_tokens_mistral': 619, 'n_tokens_neox': 608, 'n_words': 200}