anchor.diff:  ;;; for prepare old cliki pages
   
   (in-package #:cliki2.converter)
  -
  -(defun read-file (path)
  -  (alexandria:read-file-into-string path :external-format :latin1))
   
   (defun convert-article-revision (content)
     (flet ((fixup-tag (regex str fixup)
  
positive.code: 
    (open-store (merge-pathnames "store/" cliki2::*datadir*))
  
    (let ((old-articles (make-hash-table :test 'equalp))) ;; case insensitive
      (dolist (file (cl-fad:list-directory old-article-dir))
        (let ((file-name (cliki2::cut-whitespace
                          (hunchentoot:url-decode
                           (substitute #\% #\= (pathname-name file))
                           hunchentoot::+latin-1+))))
          (setf (gethash file-name old-articles)
                (merge 'list
                       (list file)
                       (gethash file-name old-articles)
                       #'<
                       :key (lambda (x)
                              (parse-integer (or (pathname-type x) "0")
  
negative.code:            (import-revisions
              cliki-import-user
              (make-instance 'cliki2::article :title article-title)
              (match-edits-to-files article-title
                                    (edits-for-article article-title all-edits)
                                    revision-paths)
              revision-paths))))
  
    (cliki2::init-recent-revisions)
    (snapshot))
  
  ;; (load-old-articles #P"/home/viper/tmp/cliki-virgin/")
  