Paste number 66530: cl-mediawiki in action

Index of paste annotations: 2 | 1

Paste number 66530: cl-mediawiki in action
Pasted by: bobbysmith007
When:1 year, 5 months ago
Share:Tweet this! | http://paste.lisp.org/+1FC2
Channel:None
Paste contents:
Raw Source | XML | Display As
(when new-object-p
  (let ((id (adwolf-db:accountid (data ctl))))
;;expands to with-mediawiki with url and credentials specified
    (with-wiki () 
      (ignore-errors
	(cl-mediawiki:create-page
	 #?"Client:${id}"
	 #?"{{Client|id=${id}|name=${ (display-name (data ctl)) }}}\r\n\r\n== ADWClient Notes ==\r\n\r\n"
	 :summary "New Client Created by ${ (get-authenticated-user) } in adwclient"
	 ))
      (ignore-errors
	(cl-mediawiki:create-page
	 #?"Category:Client:${id}"
	 #?"Category Page for Client:${id}"
	 :summary "New Client Category Created by ${ (get-authenticated-user) } in adwclient"
	 ))
      )))

Annotations for this paste:

Annotation number 2: Keeping account number matched
Pasted by: bobbysmith007
When:1 year, 5 months ago
Share:Tweet this! | http://paste.lisp.org/+1FC2/2
Paste contents:
Raw Source | Display As
(when (or new-object-p
	  has-new-account-num)
  (with-wiki ()
    (ignore-errors
      (let ((new-dsl-order-template
	     (aif (adwolf-db:adwaccountnumber (data form))
		  #?"{{DslOrder|id=${id}|accountid=${it}|name=${ (adwolf-db:billingname (data form)) }}}"
		  #?"{{DslOrder|id=${id}|name=${ (adwolf-db:billingname (data form)) }}}")))
	(cl-mediawiki:regex-replace-all
	 #?/{{DslOrder[^\}]*}}/ #?"DslOrder:${id}"
	 new-dsl-order-template
	 :summary "New Client Created by ${ (get-authenticated-user) } in adwclient"
	 :default-content #?"${new-dsl-order-template}\r\n\r\n== Dsl Order Notes ==\r\n\r\n"
	 )))
    ))

Annotation number 1: adding cancellation notes
Pasted by: bobbysmith007
When:1 year, 5 months ago
Share:Tweet this! | http://paste.lisp.org/+1FC2/1
Paste contents:
Raw Source | Display As
(with-wiki ()
  (cl-mediawiki:add-new-page-section #?"DslOrder:${db-id}" "Cancellation Notes"
				     #?|${(adwolf-db:notes (data dsl))}

Date Canceled: ${ (clsql-sys:print-date  (clsql-sys:get-time)) } by ${ (get-authenticated-user) }
Former Ip Addresses: ${ (or new-notes "none") }
|
				     ))

Colorize as:
Show Line Numbers
Index of paste annotations: 2 | 1

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.