Created
November 9, 2012 00:43
-
-
Save papoanaya/4042962 to your computer and use it in GitHub Desktop.
Lorem Ipsum in New Lisp
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 code is in newLisp | |
;; | |
;; Use the lipsum generator to generate Lorem Ipsum dummy paragraphs / words / bytes. | |
;; | |
;; Lorem Ipsum courtesy of www.lipsum.com by James Wilson | |
;; | |
;; @param what in "paras","words","bytes"] | |
;; @param amount of paras/words/bytes (for words minimum is 5, for bytes it is 27) | |
;; @param start always start with 'Lorem Ipsum' "true"/"false" | |
(define (lipsum what amount start) | |
(setq lipsum-buffer (get-url (format "http://www.lipsum.com/feed/xml?what=%s&amount=%d&start=%s" what amount start))) | |
(setq lipsum-list (xml-parse lipsum-buffer 7)) | |
(nth 1 (first (nth 2 (first (nth 2 (first lipsum-list))))))) | |
(lipsum "paras" 2 "true") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment