This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Blogger's backup file to WordPress' WXR converter. | |
# | |
# Only tested with posts and comments, and NOT with pages. | |
# May not be efficient for huge blogs since the script keep | |
# all content in the memory during conversion. | |
# | |
# Released as public domain. | |
# | |
# Please note that I converted the labels in Blogspot | |
# as tags in WordPress. I also hardcoded two categories for the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function djb2Hash(str, seed) { | |
for (var counter = 0, len = str.length; counter < len; counter++) { | |
seed ^= (seed << 5); | |
seed ^= str.charCodeAt(counter); | |
} | |
// We discard the sign-bit for compatibility with the DB implementation | |
// and "always positive integers" | |
return seed & ~(1 << 31); | |
} |