<commit_before>
(restas:define-policy render
  (:interface-package #:gallery.policy.render)
  (:interface-method-template "THEME.~A")
  (:internal-package #:gallery.internal.render)
  (:internal-function-template "~A-RENDER")
  
  (define-method add-pic (form album)
    "Draw a page with form for a picture addendum")
  (define-method add-album (form)
    "Draw a page for new album form")
  (define-method album-list (add-album-url albums)
    "Draw a list of all albums")
  (define-method view-album (add-pic-url album)
    "Draw all pictures in the album"))

(restas:define-module #:gallery
    (:use :cl :files-locator :gallery.content
          :gallery.internal.render)
  (:export #:main
           #:add-pic
           #:receive-pic
           #:receive-album
           #:add-album
           #:view-album
           
           #:add-pic-render
           #:add-album-render
           #:album-list-render
           #:view-album-render

           #:static.route

           #:*drawer*
           #:*store*))

(in-package #:gallery)

(restas:mount-module files (#:restas.directory-publisher)
  (:inherit-parent-context t)
  (:url "files")
  (restas.directory-publisher:*directory* #p"/tmp/")
  (restas.directory-publisher:*autoindex* t))

(restas:mount-module static (#:restas.directory-publisher)
  (:inherit-parent-context t)
  (:url "static")
  (restas.directory-publisher:*directory* #p"./static/"))

(defparameter *current-files* nil)<commit_msg>cleanup + portable path issue is addressed<commit_after>
(restas:define-policy render
  (:interface-package #:gallery.policy.render)
  (:interface-method-template "THEME.~A")
  (:internal-package #:gallery.internal.render)
  (:internal-function-template "~A-RENDER")
  
  (define-method add-pic (form album)
    "Draw a page with form for a picture addendum")
  (define-method add-album (form)
    "Draw a page for new album form")
  (define-method album-list (add-album-url albums)
    "Draw a list of all albums")
  (define-method view-album (add-pic-url album)
    "Draw all pictures in the album"))

(restas:define-module #:gallery
    (:use :cl :files-locator :gallery.content
          :gallery.internal.render)
  (:export #:main
           #:add-pic
           #:receive-pic
           #:receive-album
           #:add-album
           #:view-album

           #:static.route

           #:*drawer*
           #:*store*))

(in-package #:gallery)

(restas:mount-module files (#:restas.directory-publisher)
  (:inherit-parent-context t)
  (:url "files")
  (restas.directory-publisher:*directory* #p"/tmp/")
  (restas.directory-publisher:*autoindex* t))

(restas:mount-module static (#:restas.directory-publisher)
  (:inherit-parent-context t)
  (:url "static")
  (restas.directory-publisher:*directory*
   (asdf:system-relative-pathname '#:gallery #p"static/")))

(defparameter *current-files* nil)
{'fraction_non_alphanumeric': 0.15253054101221641, 'fraction_numerical': 0.0, 'mean_word_length': 3.0480225988700567, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5847258', 'n_tokens_mistral': 971, 'n_tokens_neox': 905, 'n_words': 202}