This file contains hidden or 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
# This script will parse a json response from randomuser.me and convert it to the xml | |
# format required to import into Salesforce Demandware | |
# | |
# It fetches 500 random users from Canada. Just modify the URL parameters to modify these conditions. | |
import json | |
import os, sys | |
import codecs | |
from datetime import datetime | |
from xml.etree.ElementTree import ElementTree, Element, SubElement, Comment, tostring |
This file contains hidden or 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
(defun applescript-quote-string (argument) | |
"Quote a string for passing as a string to AppleScript." | |
(if (or (not argument) (string-equal argument "")) | |
"\"\"" | |
;; Quote using double quotes, but escape any existing quotes or | |
;; backslashes in the argument with backslashes. | |
(let ((result "") | |
(start 0) | |
end) | |
(save-match-data |