diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 31f599a9..c6b379e6 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -25,14 +25,14 @@ "name": "Setup Common Lisp Environment", "uses": "40ants/setup-lisp@v2", "with": { - "asdf-system": "40ants-doc/doc" + "asdf-system": "40ants-doc-full" } }, { "name": "Build Docs", "uses": "40ants/build-docs@v1", "with": { - "asdf-system": "40ants-doc/doc", + "asdf-system": "40ants-doc-full", "error-on-warnings": true } } diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index d19b0345..f8ddfde2 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -25,7 +25,7 @@ "name": "Setup Common Lisp Environment", "uses": "40ants/setup-lisp@v2", "with": { - "asdf-system": "40ants-doc/full" + "asdf-system": "40ants-doc" } }, { @@ -45,7 +45,7 @@ }, { "name": "Run Linter", - "run": "qlot exec 40ants-linter --system \"40ants-doc/full, 40ants-doc-test\" --imports", + "run": "qlot exec 40ants-linter --system \"40ants-doc, 40ants-doc-full, 40ants-doc-test\" --imports", "shell": "bash" } ] diff --git a/40ants-doc-full.asd b/40ants-doc-full.asd index 9e6e10d6..211014ec 100644 --- a/40ants-doc-full.asd +++ b/40ants-doc-full.asd @@ -10,7 +10,47 @@ :source-control (:git "https://github.com/40ants/doc.git") :description "Documentation generator. You will need to load this system, to build documentation for a library which uses 40ANTS-DOC system." :class :package-inferred-system - :pathname "src" - :depends-on ("40ants-doc/full") + :pathname "full" + :depends-on (;; "40ants-doc/full" + "40ants-doc-full/builder" + "40ants-doc-full/doc" + + ;; TODO: Все эти locatives надо сделать доступными в минимальном пакете + ;; может быть не загружать сами модули, но сделать так, чтобы на них можно было ссылаться + "40ants-doc-full/commondoc/changelog" + "40ants-doc-full/commondoc/section" + "40ants-doc-full/github" + + "40ants-doc-full/locatives/argument" + "40ants-doc-full/locatives/asdf-system" + "40ants-doc-full/locatives/class" + "40ants-doc-full/locatives/compiler-macro" + "40ants-doc-full/locatives/constant" + "40ants-doc-full/locatives/dislocated" + "40ants-doc-full/locatives/function" + "40ants-doc-full/locatives/generic-function" + "40ants-doc-full/locatives/glossary" + "40ants-doc-full/locatives/include" + "40ants-doc-full/locatives/locative" + "40ants-doc-full/locatives/macro" + "40ants-doc-full/locatives/method" + "40ants-doc-full/locatives/package" + "40ants-doc-full/locatives/restart" + "40ants-doc-full/locatives/section" + "40ants-doc-full/locatives/slots" + "40ants-doc-full/locatives/stdout-of" + "40ants-doc-full/locatives/structure-accessor" + "40ants-doc-full/locatives/symbol-macro" + "40ants-doc-full/locatives/type" + "40ants-doc-full/locatives/variable" + + "40ants-doc-full/object-package-impl" + "40ants-doc-full/themes/dark" + "40ants-doc-full/themes/dark""40ants-doc-full/builder" + "40ants-doc-full/themes/default" + "40ants-doc-full/themes/light" + ) :in-order-to ((asdf:test-op (asdf:test-op "40ants-doc-test")))) + +(asdf:register-system-packages "3bmd-ext-code-blocks" '("3BMD-CODE-BLOCKS")) diff --git a/40ants-doc.asd b/40ants-doc.asd index cd75f899..209d511d 100644 --- a/40ants-doc.asd +++ b/40ants-doc.asd @@ -29,4 +29,5 @@ (asdf:register-system-packages "3bmd-ext-code-blocks" '("3BMD-CODE-BLOCKS")) (asdf:register-system-packages "swank" '("SWANK-BACKEND" + "SWANK/BACKEND" "SWANK-MOP")) diff --git a/elisp/transcribe.el b/elisp/transcribe.el index 7d9b3f71..fe0401c1 100644 --- a/elisp/transcribe.el +++ b/elisp/transcribe.el @@ -15,9 +15,9 @@ (defun 40ants-doc-transcribe-last-expression () "A bit like C-u C-x C-e (slime-eval-last-expression) that inserts the output and values of the sexp before the point, this -does the same but with 40ANTS-DOC/TRANSCRIBE:TRANSCRIBE. Use a numeric prefix +does the same but with 40ANTS-DOC-FULL/TRANSCRIBE:TRANSCRIBE. Use a numeric prefix argument as in index to select one of the Common Lisp -40ANTS-DOC/TRANSCRIBE:*SYNTAXES* as the SYNTAX argument to 40ANTS-DOC/TRANSCRIBE:TRANSCRIBE. +40ANTS-DOC-FULL/TRANSCRIBE:*SYNTAXES* as the SYNTAX argument to 40ANTS-DOC-FULL/TRANSCRIBE:TRANSCRIBE. Without a prefix argument, the first syntax is used." (interactive) (insert @@ -31,9 +31,9 @@ Without a prefix argument, the first syntax is used." (defun 40ants-doc-retranscribe-region (start end) "Updates the transcription in the current region (as in calling -40ANTS-DOC/TRANSCRIBE:TRANSCRIBE with :UPDATE-ONLY T). Use a numeric prefix +40ANTS-DOC-FULL/TRANSCRIBE:TRANSCRIBE with :UPDATE-ONLY T). Use a numeric prefix argument as in index to select one of the Common Lisp -40ANTS-DOC/TRANSCRIBE:*SYNTAXES* as the SYNTAX argument to 40ANTS-DOC/TRANSCRIBE:TRANSCRIBE. +40ANTS-DOC-FULL/TRANSCRIBE:*SYNTAXES* as the SYNTAX argument to 40ANTS-DOC-FULL/TRANSCRIBE:TRANSCRIBE. Without a prefix argument, the syntax of the input will not be changed." (interactive "r") @@ -69,8 +69,8 @@ changed." first-line-special-p) (let ((transcription (40ants-doc-lisp-eval - `(cl:if (cl:find-package :40ants-doc/transcribe) - (uiop:symbol-call :40ants-doc/transcribe :transcribe-for-emacs + `(cl:if (cl:find-package :40ants-doc-full/transcribe) + (uiop:symbol-call :40ants-doc-full/transcribe :transcribe-for-emacs ,(buffer-substring-no-properties start end) ',syntax ',update-only ',echo ',first-line-special-p) t)))) diff --git a/src/args.lisp b/full/args.lisp similarity index 93% rename from src/args.lisp rename to full/args.lisp index 2ac8bfd6..247c0ce9 100644 --- a/src/args.lisp +++ b/full/args.lisp @@ -1,6 +1,6 @@ -(defpackage #:40ants-doc/args +(uiop:define-package #:40ants-doc-full/args (:use #:cl)) -(in-package #:40ants-doc/args) +(in-package #:40ants-doc-full/args) ;;; Return the names of the function arguments in ARGLIST that's a diff --git a/src/builder.lisp b/full/builder.lisp similarity index 71% rename from src/builder.lisp rename to full/builder.lisp index cce6b404..c1097edc 100644 --- a/src/builder.lisp +++ b/full/builder.lisp @@ -1,40 +1,36 @@ -(uiop:define-package #:40ants-doc/builder +(uiop:define-package #:40ants-doc-full/builder (:use #:cl) - ;; NO LINT - (:import-from #:3bmd) - ;; NO LINT - (:import-from #:3bmd-code-blocks) (:import-from #:named-readtables) (:import-from #:pythonic-string-reader) - (:import-from #:40ants-doc/builder/vars + (:import-from #:40ants-doc-full/builder/vars #:*current-page*) - (:import-from #:40ants-doc/page + (:import-from #:40ants-doc-full/page #:page-base-dir #:page-format) - (:import-from #:40ants-doc/builder/printer) + (:import-from #:40ants-doc-full/builder/printer) (:import-from #:40ants-doc #:defsection) - (:import-from #:40ants-doc/github) - (:import-from #:40ants-doc/world) - (:import-from #:40ants-doc/themes/default) - (:import-from #:40ants-doc/commondoc/page) - (:import-from #:40ants-doc/commondoc/toc) - (:import-from #:40ants-doc/commondoc/format) - (:import-from #:40ants-doc/search) - (:import-from #:40ants-doc/commondoc/transcribe) + (:import-from #:40ants-doc-full/github) + (:import-from #:40ants-doc-full/world) + (:import-from #:40ants-doc-full/themes/default) + (:import-from #:40ants-doc-full/commondoc/page) + (:import-from #:40ants-doc-full/commondoc/toc) + (:import-from #:40ants-doc-full/commondoc/format) + (:import-from #:40ants-doc-full/search) + (:import-from #:40ants-doc-full/commondoc/transcribe) (:import-from #:40ants-doc/changelog) - (:import-from #:40ants-doc/commondoc/changelog) - (:import-from #:40ants-doc/commondoc/section) - (:import-from #:40ants-doc/commondoc/xref) - (:import-from #:40ants-doc/commondoc/image) - (:import-from #:40ants-doc/external-index + (:import-from #:40ants-doc-full/commondoc/changelog) + (:import-from #:40ants-doc-full/commondoc/section) + (:import-from #:40ants-doc-full/commondoc/xref) + (:import-from #:40ants-doc-full/commondoc/image) + (:import-from #:40ants-doc-full/external-index #:write-references-index) - (:import-from #:40ants-doc/commondoc/reference) - (:import-from #:40ants-doc/commondoc/builder + (:import-from #:40ants-doc-full/commondoc/reference) + (:import-from #:40ants-doc-full/commondoc/builder #:to-commondoc) - (:import-from #:40ants-doc/link) - (:import-from #:40ants-doc/rewrite) - (:import-from #:40ants-doc/themes/api) + (:import-from #:40ants-doc-full/link) + (:import-from #:40ants-doc-full/rewrite) + (:import-from #:40ants-doc-full/themes/api) (:import-from #:common-doc) (:import-from #:common-doc.format) (:import-from #:common-html) @@ -48,7 +44,7 @@ #:render-to-files #:update-asdf-system-docs #:get-current-asdf-system)) -(in-package #:40ants-doc/builder) +(in-package #:40ants-doc-full/builder) (named-readtables:in-readtable pythonic-string-reader:pythonic-string-syntax) @@ -62,8 +58,8 @@ There are two core functions which render documentation to a string or files:" - (40ants-doc/builder:render-to-string function) - (40ants-doc/builder:render-to-files function) + (render-to-string function) + (render-to-files function) "Besides RENDER-TO-STRING and RENDER-TO-FILES a convenience function is provided to serve the common case of having an ASDF system with a readme and a directory for the @@ -74,8 +70,8 @@ (*document-html-bottom-blocks-of-links* variable) (@rendering-multiple-formats section) (40ants-doc/changelog::@index section) - (40ants-doc/github::@github-workflow section) - (40ants-doc/world::@world section)) + (40ants-doc-full/github::@github-workflow section) + (40ants-doc-full/world::@world section)) (defsection @rendering-multiple-formats (:title "Multiple Formats") @@ -98,13 +94,13 @@ (render-to-files (list @full-manual - (40ants-doc/page:make-page (list @introduction + (40ants-doc-full/page:make-page (list @introduction @tutorial) - :format :markdown - :base-filename \"README\") - (40ants-doc/page:make-page @changelog - :format :markdown - :base-filename \"ChangeLog\"))) + :format :markdown + :base-filename \"README\") + (40ants-doc-full/page:make-page @changelog + :format :markdown + :base-filename \"ChangeLog\"))) ``` The same approach works with the UPDATE-ASDF-SYSTEM-DOCS function. @@ -122,12 +118,12 @@ &key (readme-sections nil) (changelog-sections nil) - (theme '40ants-doc/themes/default::default-theme) - (warn-on-undocumented-packages 40ants-doc/commondoc/page::*warn-on-undocumented-packages*) + (theme '40ants-doc-full/themes/default::default-theme) + (warn-on-undocumented-packages 40ants-doc-full/commondoc/page::*warn-on-undocumented-packages*) (base-url nil) (docs-dir #P"docs/") - (clean-urls 40ants-doc/rewrite::*clean-urls*) - (downcase-uppercase-code 40ants-doc/builder/vars::*downcase-uppercase-code*) + (clean-urls 40ants-doc-full/rewrite::*clean-urls*) + (downcase-uppercase-code 40ants-doc-full/builder/vars::*downcase-uppercase-code*) highlight-languages highlight-theme (full-package-names t)) @@ -150,9 +146,9 @@ Example usage: ```lisp - (40ants-doc/builder:update-asdf-system-docs 40ants-doc/doc:@index - :40ants-doc - :readme-sections 40ants-doc/doc:@readme) + (40ants-doc-full/builder:update-asdf-system-docs 40ants-doc-full/doc:@index + :40ants-doc + :readme-sections 40ants-doc-full/doc:@readme) ``` This is just a shorthand to call RENDER-TO-FILES for ASDF system. @@ -168,33 +164,33 @@ If you want a more generic wrapper for building documentation for your projects, take a look at [DOCS-BUILDER](https://40ants.com/docs-builder/)." - (let ((40ants-doc/builder/vars::*current-asdf-system* + (let ((40ants-doc-full/builder/vars::*current-asdf-system* (asdf:registered-system asdf-system))) (render-to-files (append (uiop:ensure-list sections-or-pages) (when readme-sections (list - (40ants-doc/page:make-page readme-sections - :base-filename "README" - :base-dir (asdf:system-relative-pathname - asdf-system - "./") - :format :markdown))) + (40ants-doc-full/page:make-page readme-sections + :base-filename "README" + :base-dir (asdf:system-relative-pathname + asdf-system + "./") + :format :markdown))) (when changelog-sections (list - (40ants-doc/page:make-page changelog-sections - :base-filename "ChangeLog" - :base-dir (asdf:system-relative-pathname - asdf-system - "./") - :format :markdown) - (40ants-doc/page:make-page changelog-sections - :base-filename "changelog" - :format '40ants-doc/commondoc/changelog::rss-feed)))) + (40ants-doc-full/page:make-page changelog-sections + :base-filename "ChangeLog" + :base-dir (asdf:system-relative-pathname + asdf-system + "./") + :format :markdown) + (40ants-doc-full/page:make-page changelog-sections + :base-filename "changelog" + :format '40ants-doc-full/commondoc/changelog::rss-feed)))) :base-dir (asdf:system-relative-pathname asdf-system (uiop:ensure-directory-pathname docs-dir)) :base-url base-url - :source-uri-fn (40ants-doc/github:make-github-source-uri-fn asdf-system) + :source-uri-fn (40ants-doc-full/github:make-github-source-uri-fn asdf-system) :warn-on-undocumented-packages warn-on-undocumented-packages :clean-urls clean-urls :downcase-uppercase-code downcase-uppercase-code @@ -210,28 +206,28 @@ This function can be used by your extensions to do add some additional features like github stripe \"Fork Me\"." - 40ants-doc/builder/vars::*current-asdf-system*) + 40ants-doc-full/builder/vars::*current-asdf-system*) ;;; Generate with the default HTML look (defun process-document (document &key base-url) - (let* ((references (40ants-doc/commondoc/reference::collect-references document)) - (document (40ants-doc/commondoc/page:warn-on-missing-exports document)) - (document (40ants-doc/commondoc/page:warn-on-undocumented-exports document + (let* ((references (40ants-doc-full/commondoc/reference::collect-references document)) + (document (40ants-doc-full/commondoc/page:warn-on-missing-exports document)) + (document (40ants-doc-full/commondoc/page:warn-on-undocumented-exports document references)) - (document (40ants-doc/commondoc/transcribe::warn-on-differences-in-transcriptions document)) - (document (if 40ants-doc/builder/printer:*document-uppercase-is-code* - (40ants-doc/commondoc/xref::extract-symbols document) + (document (40ants-doc-full/commondoc/transcribe::warn-on-differences-in-transcriptions document)) + (document (if 40ants-doc-full/builder/printer:*document-uppercase-is-code* + (40ants-doc-full/commondoc/xref::extract-symbols document) document)) - (document (40ants-doc/commondoc/xref:fill-locatives document)) - (document (40ants-doc/commondoc/section::fill-html-fragments document)) - (document (40ants-doc/commondoc/page::warn-on-references-to-internals document)) - (document (if 40ants-doc/link:*document-link-code* - (40ants-doc/commondoc/page::replace-xrefs document references + (document (40ants-doc-full/commondoc/xref:fill-locatives document)) + (document (40ants-doc-full/commondoc/section::fill-html-fragments document)) + (document (40ants-doc-full/commondoc/page::warn-on-references-to-internals document)) + (document (if 40ants-doc-full/link:*document-link-code* + (40ants-doc-full/commondoc/page::replace-xrefs document references :base-url base-url) document)) - (document (40ants-doc/commondoc/image::replace-images document))) + (document (40ants-doc-full/commondoc/image::replace-images document))) (values document references))) @@ -244,13 +240,13 @@ This function is useful for debugging 40ANTS-DOC itself." (let ((format - (40ants-doc/commondoc/format::ensure-format-class-name format)) + (40ants-doc-full/commondoc/format::ensure-format-class-name format)) (40ants-doc/reference-api:*source-uri-fn* source-uri-fn)) - (40ants-doc/commondoc/format:with-format (format) + (40ants-doc-full/commondoc/format:with-format (format) (let* ((document (to-commondoc object)) (processed-document (process-document document)) - (40ants-doc/builder/printer::*full-package-names* full-package-names)) + (40ants-doc-full/builder/printer::*full-package-names* full-package-names)) (with-output-to-string (stream) (common-doc.format:emit-document (make-instance format) processed-document @@ -261,13 +257,13 @@ (format stream "~2&* * *~&###### [generated by [40ANTS-DOC](https://40ants.com/doc/)]~%"))) -(defun render-to-files (sections &key (theme '40ants-doc/themes/default:default-theme) +(defun render-to-files (sections &key (theme '40ants-doc-full/themes/default:default-theme) (base-dir #P"./") (base-url nil) (source-uri-fn 40ants-doc/reference-api:*source-uri-fn*) - (warn-on-undocumented-packages 40ants-doc/commondoc/page::*warn-on-undocumented-packages*) - (clean-urls 40ants-doc/rewrite::*clean-urls*) - (downcase-uppercase-code 40ants-doc/builder/vars::*downcase-uppercase-code*) + (warn-on-undocumented-packages 40ants-doc-full/commondoc/page::*warn-on-undocumented-packages*) + (clean-urls 40ants-doc-full/rewrite::*clean-urls*) + (downcase-uppercase-code 40ants-doc-full/builder/vars::*downcase-uppercase-code*) (format :html) highlight-languages highlight-theme @@ -294,7 +290,7 @@ downcased. THEME argument should be a theme class name. By default it is - 40ANTS-DOC/THEMES/DEFAULT:DEFAULT-THEME. See 40ANTS-DOC/THEMES/DOCS::@DEFINING-A-THEME + 40ANTS-DOC-FULL/THEMES/DEFAULT:DEFAULT-THEME. See 40ANTS-DOC-FULL/THEMES/DOCS::@DEFINING-A-THEME to learn how to define themes. HIGHLIGHT-LANGUAGES and HIGHLIGHT-THEME arguments allow to redefine theme's @@ -315,27 +311,27 @@ " (setf format - (40ants-doc/commondoc/format::ensure-format-class-name format)) + (40ants-doc-full/commondoc/format::ensure-format-class-name format)) (let ((num-warnings 0) ;; By default it uses "~A.html/#~A" which is wrong because there shouldn't ;; be a slash after the .html (common-html.emitter:*document-section-format-control* "~A#~A") - (40ants-doc/commondoc/page::*warn-on-undocumented-packages* warn-on-undocumented-packages) - (40ants-doc/rewrite::*clean-urls* clean-urls) + (40ants-doc-full/commondoc/page::*warn-on-undocumented-packages* warn-on-undocumented-packages) + (40ants-doc-full/rewrite::*clean-urls* clean-urls) (40ants-doc/reference-api:*source-uri-fn* source-uri-fn) - (40ants-doc/builder/vars::*downcase-uppercase-code* downcase-uppercase-code) - (40ants-doc/builder/vars::*base-dir* base-dir) - (40ants-doc/builder/vars::*base-url* base-url) - (40ants-doc/builder/printer::*full-package-names* full-package-names)) + (40ants-doc-full/builder/vars::*downcase-uppercase-code* downcase-uppercase-code) + (40ants-doc-full/builder/vars::*base-dir* base-dir) + (40ants-doc-full/builder/vars::*base-url* base-url) + (40ants-doc-full/builder/printer::*full-package-names* full-package-names)) (handler-bind ((warning (lambda (c) (declare (ignore c)) (incf num-warnings)))) - (40ants-doc/commondoc/format:with-format (format) - (40ants-doc/themes/api::with-theme (theme) + (40ants-doc-full/commondoc/format:with-format (format) + (40ants-doc-full/themes/api::with-theme (theme) (let* ((sections (uiop:ensure-list sections)) - (pages (mapcar #'40ants-doc/page:ensure-page sections)) + (pages (mapcar #'40ants-doc-full/page:ensure-page sections)) (page-documents (mapcar #'to-commondoc pages))) ;; Probably it is a good idea to bind references to a special variable ;; and provide some function to generate a URL pointing to a reference? @@ -346,12 +342,12 @@ (let* ((absolute-dir (uiop:ensure-directory-pathname (uiop:ensure-absolute-pathname base-dir (probe-file ".")))) - (40ants-doc/commondoc/toc::*full-document* full-document) + (40ants-doc-full/commondoc/toc::*full-document* full-document) (output-paths nil)) (ensure-directories-exist absolute-dir) - (when (eql 40ants-doc/commondoc/format::*current-format* 'common-html:html) + (when (eql 40ants-doc-full/commondoc/format::*current-format* 'common-html:html) (write-references-index (uiop:merge-pathnames* "references.json" absolute-dir) references (or base-url @@ -360,14 +356,14 @@ (flet ((make-full-filename (page) ;; PAGE argument could be either PAGE object or string denoting a relative path ;; of HTML page. - (let* ((page-base-dir (or (when (typep page '40ants-doc/commondoc/page:page) + (let* ((page-base-dir (or (when (typep page '40ants-doc-full/commondoc/page:page) (page-base-dir page)) base-dir)) (absolute-dir (uiop:ensure-absolute-pathname page-base-dir (probe-file "."))) (filename (etypecase page - (40ants-doc/commondoc/page:page - (40ants-doc/commondoc/page::full-filename page)) + (40ants-doc-full/commondoc/page:page + (40ants-doc-full/commondoc/page::full-filename page)) (string page)))) (uiop:merge-pathnames* filename absolute-dir)))) @@ -390,11 +386,11 @@ (when (eql format 'common-html:html) - (40ants-doc/themes/api::render-static absolute-dir - :highlight-languages highlight-languages - :highlight-theme highlight-theme) + (40ants-doc-full/themes/api::render-static absolute-dir + :highlight-languages highlight-languages + :highlight-theme highlight-theme) - (let* ((page (40ants-doc/commondoc/page:make-page nil "search/index" + (let* ((page (40ants-doc-full/commondoc/page:make-page nil "search/index" :title "Search Page" :format :html)) (filename (make-full-filename page))) @@ -402,11 +398,11 @@ (uiop:with-output-file (common-html.emitter::*output-stream* filename :if-exists :supersede) - (40ants-doc/commondoc/page::emit-search-page page)) + (40ants-doc-full/commondoc/page::emit-search-page page)) (uiop:with-output-file (stream (uiop:merge-pathnames* #P"searchindex.js" absolute-dir) :if-exists :supersede) - (write-string (40ants-doc/search::generate-search-index full-document page) + (write-string (40ants-doc-full/search::generate-search-index full-document page) stream) (terpri stream))))) diff --git a/src/builder/printer.lisp b/full/builder/printer.lisp similarity index 84% rename from src/builder/printer.lisp rename to full/builder/printer.lisp index 9866ebe0..4be117ec 100644 --- a/src/builder/printer.lisp +++ b/full/builder/printer.lisp @@ -1,9 +1,9 @@ -(uiop:define-package #:40ants-doc/builder/printer +(uiop:define-package #:40ants-doc-full/builder/printer (:use #:cl) (:import-from #:named-readtables) (:import-from #:pythonic-string-reader) (:export #:*document-uppercase-is-code*)) -(in-package #:40ants-doc/builder/printer) +(in-package #:40ants-doc-full/builder/printer) (named-readtables:in-readtable pythonic-string-reader:pythonic-string-syntax) @@ -22,7 +22,7 @@ """When true, words with at least three characters and no lowercase characters naming an interned symbol are assumed to be code as if they were marked up with backticks which is especially useful when - combined with 40ANTS-DOC/LINK:*DOCUMENT-LINK-CODE*. For example, this docstring: + combined with 40ANTS-DOC-FULL/LINK:*DOCUMENT-LINK-CODE*. For example, this docstring: "`FOO` and FOO." diff --git a/src/builder/vars.lisp b/full/builder/vars.lisp similarity index 92% rename from src/builder/vars.lisp rename to full/builder/vars.lisp index 0a2808d7..59570d2f 100644 --- a/src/builder/vars.lisp +++ b/full/builder/vars.lisp @@ -1,7 +1,7 @@ -(uiop:define-package #:40ants-doc/builder/vars +(uiop:define-package #:40ants-doc-full/builder/vars (:use #:cl) (:export #:*document-max-numbering-level*)) -(in-package #:40ants-doc/builder/vars) +(in-package #:40ants-doc-full/builder/vars) (defvar *document-max-numbering-level* 3 diff --git a/src/commondoc/arglist.lisp b/full/commondoc/arglist.lisp similarity index 89% rename from src/commondoc/arglist.lisp rename to full/commondoc/arglist.lisp index e52dbe27..eaaf20f6 100644 --- a/src/commondoc/arglist.lisp +++ b/full/commondoc/arglist.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/commondoc/arglist +(uiop:define-package #:40ants-doc-full/commondoc/arglist (:use #:cl) (:import-from #:common-doc) (:import-from #:common-doc.format) @@ -6,9 +6,9 @@ (:import-from #:commondoc-markdown) (:import-from #:spinneret #:with-html) - (:import-from #:40ants-doc/utils + (:import-from #:40ants-doc-full/utils #:maybe-downcase)) -(in-package #:40ants-doc/commondoc/arglist) +(in-package #:40ants-doc-full/commondoc/arglist) (defclass arglist (common-doc:document-node) diff --git a/src/commondoc/builder.lisp b/full/commondoc/builder.lisp similarity index 93% rename from src/commondoc/builder.lisp rename to full/commondoc/builder.lisp index dc5b8c5c..c36bedc7 100644 --- a/src/commondoc/builder.lisp +++ b/full/commondoc/builder.lisp @@ -1,13 +1,13 @@ -(uiop:define-package #:40ants-doc/commondoc/builder +(uiop:define-package #:40ants-doc-full/commondoc/builder (:use #:cl) - (:import-from #:40ants-doc/commondoc/markdown + (:import-from #:40ants-doc-full/commondoc/markdown #:parse-markdown) (:import-from #:40ants-doc/object-package) (:import-from #:40ants-doc/docstring) (:import-from #:40ants-doc/reference) (:export #:to-commondoc #:reference-to-commondoc)) -(in-package #:40ants-doc/commondoc/builder) +(in-package #:40ants-doc-full/commondoc/builder) (defgeneric to-commondoc (obj) @@ -18,7 +18,7 @@ Function should return a COMMON-DOC:DOCUMENT-NODE. To show a standard documentation item with locative, - name and arguments, use 40ANTS-DOC/COMMONDOC/BULLET:MAKE-BULLET + name and arguments, use 40ANTS-DOC-FULL/COMMONDOC/BULLET:MAKE-BULLET function. ")) diff --git a/src/commondoc/bullet.lisp b/full/commondoc/bullet.lisp similarity index 88% rename from src/commondoc/bullet.lisp rename to full/commondoc/bullet.lisp index 12563b47..e61c81d6 100644 --- a/src/commondoc/bullet.lisp +++ b/full/commondoc/bullet.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/commondoc/bullet +(uiop:define-package #:40ants-doc-full/commondoc/bullet (:use #:cl) (:import-from #:common-html.emitter #:with-tag) @@ -10,30 +10,30 @@ #:with-tag) (:import-from #:common-html.emitter #:with-tag) - (:import-from #:40ants-doc/render/args + (:import-from #:40ants-doc-full/render/args #:arglist-to-string) (:import-from #:common-doc) (:import-from #:spinneret) - (:import-from #:40ants-doc/commondoc/arglist) + (:import-from #:40ants-doc-full/commondoc/arglist) (:import-from #:40ants-doc/reference) (:import-from #:40ants-doc/reference-api) (:import-from #:40ants-doc/ignored-words #:ignored-words) - (:import-from #:40ants-doc/dislocated-symbols + (:import-from #:40ants-doc-full/dislocated-symbols #:dislocated-symbols) - (:import-from #:40ants-doc/commondoc/piece + (:import-from #:40ants-doc-full/commondoc/piece #:documentation-piece #:doc-reference) - (:import-from #:40ants-doc/utils + (:import-from #:40ants-doc-full/utils #:maybe-downcase) (:import-from #:commondoc-markdown/emitter #:hash-link) - (:import-from #:40ants-doc/builder/printer) + (:import-from #:40ants-doc-full/builder/printer) (:import-from #:common-doc.format #:emit-document) (:export #:make-bullet)) -(in-package #:40ants-doc/commondoc/bullet) +(in-package #:40ants-doc-full/commondoc/bullet) (defclass bullet (documentation-piece common-doc:content-node) @@ -56,7 +56,7 @@ (object (40ants-doc/reference::reference-object reference))) (typecase object (string object) - (t (if 40ants-doc/builder/printer::*full-package-names* + (t (if 40ants-doc-full/builder/printer::*full-package-names* (let ((*package* (find-package :keyword))) (prin1-to-string object)) (prin1-to-string object))))))) @@ -66,7 +66,7 @@ t) -(defmethod 40ants-doc/dislocated-symbols:supports-dislocated-symbols-p ((obj bullet)) +(defmethod 40ants-doc-full/dislocated-symbols:supports-dislocated-symbols-p ((obj bullet)) t) @@ -91,7 +91,7 @@ ;; TODO: remove this printer format and reference resolving on this stage. ;; we only need to know format to render arglist to a string, but this ;; shouldn't be necessary on this stage. - (let ((html-fragment (40ants-doc/utils::html-safe-name + (let ((html-fragment (40ants-doc-full/utils::html-safe-name (40ants-doc/reference::reference-to-anchor reference)))) (make-instance 'bullet :name name @@ -104,14 +104,14 @@ (list (cond ((null arglist) arglist) - ((typep (first arglist) '40ants-doc/commondoc/arglist::arglist) + ((typep (first arglist) '40ants-doc-full/commondoc/arglist::arglist) arglist) (t (list - (40ants-doc/commondoc/arglist::make-arglist + (40ants-doc-full/commondoc/arglist::make-arglist (arglist-to-string arglist)))))) (string - (list (40ants-doc/commondoc/arglist::make-arglist arglist))) - (40ants-doc/commondoc/arglist::arglist + (list (40ants-doc-full/commondoc/arglist::make-arglist arglist))) + (40ants-doc-full/commondoc/arglist::arglist (list arglist))) :reference html-fragment :children (uiop:ensure-list children) ))) diff --git a/src/commondoc/changelog.lisp b/full/commondoc/changelog.lisp similarity index 76% rename from src/commondoc/changelog.lisp rename to full/commondoc/changelog.lisp index 768f6522..2cd2142f 100644 --- a/src/commondoc/changelog.lisp +++ b/full/commondoc/changelog.lisp @@ -1,8 +1,8 @@ -(defpackage #:40ants-doc/commondoc/changelog +(uiop:define-package #:40ants-doc-full/commondoc/changelog (:use #:cl) - (:import-from #:40ants-doc/builder/vars + (:import-from #:40ants-doc-full/builder/vars #:*base-url*) - (:import-from #:40ants-doc/commondoc/section + (:import-from #:40ants-doc-full/commondoc/section #:documentation-section #:make-documentation-section) (:import-from #:40ants-doc/changelog) @@ -19,21 +19,21 @@ #:rss-item #:with-rss2 #:rss-channel-header) - (:import-from #:40ants-doc/builder/vars + (:import-from #:40ants-doc-full/builder/vars #:*base-url*) - (:import-from #:40ants-doc/commondoc/format) - (:import-from #:40ants-doc/commondoc/html + (:import-from #:40ants-doc-full/commondoc/format) + (:import-from #:40ants-doc-full/commondoc/html #:with-html) (:import-from #:str) - (:import-from #:40ants-doc/commondoc/page)) -(in-package #:40ants-doc/commondoc/changelog) + (:import-from #:40ants-doc-full/commondoc/page)) +(in-package #:40ants-doc-full/commondoc/changelog) (defclass rss-feed (common-doc.format:document-format) () (:documentation "RSS feed.")) -(defmethod 40ants-doc/commondoc/format:files-extension ((format (eql 'rss-feed))) +(defmethod 40ants-doc-full/commondoc/format:files-extension ((format (eql 'rss-feed))) "xml") (defclass changelog (documentation-section) @@ -46,11 +46,11 @@ :accessor version-date))) -(defmethod 40ants-doc/commondoc/builder:to-commondoc ((obj 40ants-doc/changelog::changelog)) +(defmethod 40ants-doc-full/commondoc/builder:to-commondoc ((obj 40ants-doc/changelog::changelog)) (make-documentation-section obj :class-name 'changelog)) -(defmethod 40ants-doc/commondoc/builder:to-commondoc ((obj 40ants-doc/changelog::version)) +(defmethod 40ants-doc-full/commondoc/builder:to-commondoc ((obj 40ants-doc/changelog::version)) (let ((version (make-documentation-section obj :class-name 'version))) (when-let ((date (40ants-doc/changelog::version-date obj))) (setf (version-date version) @@ -72,7 +72,7 @@ "changelog.xml"))) -(defmethod 40ants-doc/commondoc/section::emit-html-after-title ((node changelog)) +(defmethod 40ants-doc-full/commondoc/section::emit-html-after-title ((node changelog)) (with-html (when-let ((url (get-changelog-rss-url))) (:a :class "rss-icon" @@ -80,7 +80,7 @@ (defmethod common-doc.format:emit-document ((format rss-feed) - (node 40ants-doc/commondoc/page:page) + (node 40ants-doc-full/commondoc/page:page) stream) (loop for child in (common-doc:children node) do (common-doc.format:emit-document format child stream))) @@ -90,10 +90,10 @@ (node changelog) stream) (with-rss2 (stream) - (rss-channel-header (if 40ants-doc/builder/vars::*current-asdf-system* + (rss-channel-header (if 40ants-doc-full/builder/vars::*current-asdf-system* (format nil "~A ChangeLog" (asdf:primary-system-name - 40ants-doc/builder/vars::*current-asdf-system*)) + 40ants-doc-full/builder/vars::*current-asdf-system*)) "ChangeLog") (if (boundp '*base-url*) *base-url* diff --git a/src/commondoc/format.lisp b/full/commondoc/format.lisp similarity index 93% rename from src/commondoc/format.lisp rename to full/commondoc/format.lisp index 8da08e23..c3e5ac9c 100644 --- a/src/commondoc/format.lisp +++ b/full/commondoc/format.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/commondoc/format +(uiop:define-package #:40ants-doc-full/commondoc/format (:use #:cl) (:import-from #:common-html) (:import-from #:commondoc-markdown) @@ -6,7 +6,7 @@ #:current-files-extension #:files-extension #:*keyword-format-to-real-class*)) -(in-package #:40ants-doc/commondoc/format) +(in-package #:40ants-doc-full/commondoc/format) (defvar *current-format*) diff --git a/src/commondoc/html.lisp b/full/commondoc/html.lisp similarity index 64% rename from src/commondoc/html.lisp rename to full/commondoc/html.lisp index 31d1006b..4f65ad89 100644 --- a/src/commondoc/html.lisp +++ b/full/commondoc/html.lisp @@ -1,14 +1,14 @@ -(defpackage #:40ants-doc/commondoc/html +(uiop:define-package #:40ants-doc-full/commondoc/html (:use #:cl) (:import-from #:spinneret) (:import-from #:common-html.emitter) (:export #:with-html)) -(in-package #:40ants-doc/commondoc/html) +(in-package #:40ants-doc-full/commondoc/html) (defmacro with-html (&body body) "Use this macro to render HTML inside generic-functions, - listed in the 40ANTS-DOC/THEMES/DOCS::@DEFINING-A-THEME section." + listed in the 40ANTS-DOC-FULL/THEMES/DOCS::@DEFINING-A-THEME section." `(let ((spinneret:*html* common-html.emitter::*output-stream*)) (spinneret:with-html ,@body))) diff --git a/src/commondoc/image.lisp b/full/commondoc/image.lisp similarity index 89% rename from src/commondoc/image.lisp rename to full/commondoc/image.lisp index ee9d2f20..81f5828d 100644 --- a/src/commondoc/image.lisp +++ b/full/commondoc/image.lisp @@ -1,23 +1,23 @@ -(defpackage #:40ants-doc/commondoc/image +(uiop:define-package #:40ants-doc-full/commondoc/image (:use #:cl) (:import-from #:common-html.emitter #:define-emitter) (:import-from #:str) (:import-from #:log) (:import-from #:common-doc) - (:import-from #:40ants-doc/commondoc/html + (:import-from #:40ants-doc-full/commondoc/html #:with-html) - (:import-from #:40ants-doc/commondoc/page + (:import-from #:40ants-doc-full/commondoc/page #:make-page-uri) - (:import-from #:40ants-doc/utils + (:import-from #:40ants-doc-full/utils #:make-relative-path) (:import-from #:cl-ppcre #:do-register-groups) - (:import-from #:40ants-doc/builder/vars + (:import-from #:40ants-doc-full/builder/vars #:*current-asdf-system*) - (:import-from #:40ants-doc/commondoc/mapper + (:import-from #:40ants-doc-full/commondoc/mapper #:map-nodes)) -(in-package #:40ants-doc/commondoc/image) +(in-package #:40ants-doc-full/commondoc/image) (defclass local-image (common-doc:image) ((width :initform nil @@ -96,8 +96,8 @@ (target-path (uiop:merge-pathnames* original-path (uiop:merge-pathnames* #P"images/" (uiop:ensure-directory-pathname - 40ants-doc/builder/vars::*base-dir*)))) - (page-uri (make-page-uri 40ants-doc/builder/vars::*current-page*)) + 40ants-doc-full/builder/vars::*base-dir*)))) + (page-uri (make-page-uri 40ants-doc-full/builder/vars::*current-page*)) (new-source (make-relative-path page-uri (format nil "images/~A" original-path))) diff --git a/src/commondoc/mapper.lisp b/full/commondoc/mapper.lisp similarity index 94% rename from src/commondoc/mapper.lisp rename to full/commondoc/mapper.lisp index 953318c2..ccb0576e 100644 --- a/src/commondoc/mapper.lisp +++ b/full/commondoc/mapper.lisp @@ -1,15 +1,15 @@ -(defpackage #:40ants-doc/commondoc/mapper +(uiop:define-package #:40ants-doc-full/commondoc/mapper (:use #:cl) (:import-from #:common-doc) (:import-from #:common-doc.ops) - (:import-from #:40ants-doc/commondoc/bullet) + (:import-from #:40ants-doc-full/commondoc/bullet) (:import-from #:40ants-doc/object-package #:object-package) (:export #:map-nodes #:node-supports-children #:with-node-package)) -(in-package #:40ants-doc/commondoc/mapper) +(in-package #:40ants-doc-full/commondoc/mapper) (defvar *on-going-down* nil @@ -66,11 +66,11 @@ (defun call-with-node-path (func) (flet ((collect-section (node) (when (or (typep node 'common-doc:section) - (typep node '40ants-doc/commondoc/bullet::bullet)) + (typep node '40ants-doc-full/commondoc/bullet::bullet)) (push node *path*))) (pop-section (node) (when (or (typep node 'common-doc:section) - (typep node '40ants-doc/commondoc/bullet::bullet)) + (typep node '40ants-doc-full/commondoc/bullet::bullet)) (pop *path*)))) (let ((*on-going-down* (list* #'collect-section *on-going-down*)) @@ -89,11 +89,11 @@ (common-doc:section (common-doc.ops:collect-all-text (common-doc:title item))) - (40ants-doc/commondoc/bullet::bullet + (40ants-doc-full/commondoc/bullet::bullet ;; To always render a package specified version ;; of symbol names, we need to set keyword package here (let ((*package* (find-package :keyword))) - (40ants-doc/commondoc/bullet::bullet-name item)))) + (40ants-doc-full/commondoc/bullet::bullet-name item)))) collect title)) diff --git a/src/commondoc/markdown.lisp b/full/commondoc/markdown.lisp similarity index 90% rename from src/commondoc/markdown.lisp rename to full/commondoc/markdown.lisp index ced9f952..3179b107 100644 --- a/src/commondoc/markdown.lisp +++ b/full/commondoc/markdown.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/commondoc/markdown +(uiop:define-package #:40ants-doc-full/commondoc/markdown (:use #:cl) (:import-from #:str) (:import-from #:commondoc-markdown @@ -6,14 +6,14 @@ (:import-from #:common-doc) (:import-from #:common-doc.ops) (:import-from #:common-doc.format) - (:import-from #:40ants-doc/commondoc/xref) - (:import-from #:40ants-doc/commondoc/mapper + (:import-from #:40ants-doc-full/commondoc/xref) + (:import-from #:40ants-doc-full/commondoc/mapper #:node-supports-children) - (:import-from #:40ants-doc/swank + (:import-from #:40ants-doc-full/swank #:read-locative-from-string) (:export #:parse-markdown)) -(in-package #:40ants-doc/commondoc/markdown) +(in-package #:40ants-doc-full/commondoc/markdown) ;; TODO: Remove if common-doc.ops:collect-all-text will be OK: @@ -46,12 +46,12 @@ (locative (when locative-name (read-locative-from-string locative-name :package (find-package "40ANTS-DOC/LOCATIVES"))))) - (40ants-doc/commondoc/xref:make-xref text - :symbol symbol - :locative locative)))) + (40ants-doc-full/commondoc/xref:make-xref text + :symbol symbol + :locative locative)))) (t node)))) - (40ants-doc/commondoc/mapper:map-nodes node #'replacer))) + (40ants-doc-full/commondoc/mapper:map-nodes node #'replacer))) (defun join-text-nodes (&rest nodes) @@ -122,7 +122,7 @@ finally (return (nreverse results)))))) (values node))) - (40ants-doc/commondoc/mapper:map-nodes node #'replacer))) + (40ants-doc-full/commondoc/mapper:map-nodes node #'replacer))) (defun transform-uppercase-italic-nodes-back-to-text (node) @@ -142,7 +142,7 @@ "*"))) (t node)))) - (40ants-doc/commondoc/mapper:map-nodes node #'replacer))) + (40ants-doc-full/commondoc/mapper:map-nodes node #'replacer))) (defun parse-markdown (text) diff --git a/src/commondoc/page.lisp b/full/commondoc/page.lisp similarity index 90% rename from src/commondoc/page.lisp rename to full/commondoc/page.lisp index fa16552d..14424a0b 100644 --- a/src/commondoc/page.lisp +++ b/full/commondoc/page.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/commondoc/page +(uiop:define-package #:40ants-doc-full/commondoc/page (:use #:cl) (:import-from #:common-doc #:make-code @@ -7,46 +7,46 @@ (:import-from #:common-doc.ops) (:import-from #:str) (:import-from #:common-html.emitter) - (:import-from #:40ants-doc/commondoc/xref) + (:import-from #:40ants-doc-full/commondoc/xref) (:import-from #:40ants-doc/locatives) (:import-from #:40ants-doc/reference) (:import-from #:common-html) - (:import-from #:40ants-doc/commondoc/html + (:import-from #:40ants-doc-full/commondoc/html #:with-html) (:import-from #:common-html.emitter #:define-emitter) - (:import-from #:40ants-doc/commondoc/section + (:import-from #:40ants-doc-full/commondoc/section #:documentation-section #:section-definition) - (:import-from #:40ants-doc/commondoc/mapper + (:import-from #:40ants-doc-full/commondoc/mapper #:current-path #:with-node-path) (:import-from #:40ants-doc/ignored-words #:ignored-in-package #:ignored-words #:supports-ignored-words-p) - (:import-from #:40ants-doc/commondoc/piece + (:import-from #:40ants-doc-full/commondoc/piece #:doc-reference #:documentation-piece) - (:import-from #:40ants-doc/utils + (:import-from #:40ants-doc-full/utils #:maybe-downcase #:make-relative-path #:is-external #:url-join) (:import-from #:40ants-doc/object-package) - (:import-from #:40ants-doc/commondoc/format) - (:import-from #:40ants-doc/page + (:import-from #:40ants-doc-full/commondoc/format) + (:import-from #:40ants-doc-full/page #:page-title #:page-base-url #:base-filename #:page-format) - (:import-from #:40ants-doc/rewrite) + (:import-from #:40ants-doc-full/rewrite) (:import-from #:40ants-doc/locatives/base #:locative-equal) - (:import-from #:40ants-doc/dislocated-symbols + (:import-from #:40ants-doc-full/dislocated-symbols #:dislocated-symbols #:supports-dislocated-symbols-p) - (:import-from #:40ants-doc/themes/api + (:import-from #:40ants-doc-full/themes/api #:with-page-template) (:import-from #:40ants-doc #:section-external-docs) @@ -56,10 +56,10 @@ #:warn-on-missing-exports #:warn-on-undocumented-exports #:full-filename)) -(in-package #:40ants-doc/commondoc/page) +(in-package #:40ants-doc-full/commondoc/page) -(defclass page (40ants-doc/page::page-common-mixin +(defclass page (40ants-doc-full/page::page-common-mixin common-doc:content-node) ()) @@ -76,7 +76,7 @@ (:method :around ((page t) &key from) (declare (ignore from)) - (40ants-doc/rewrite::rewrite-file + (40ants-doc-full/rewrite::rewrite-file (call-next-method))) (:method ((page (eql :no-page)) &key from) @@ -87,12 +87,12 @@ (check-type from (or page null)) (if from - (40ants-doc/utils:make-relative-path (full-filename from) - (full-filename page)) + (40ants-doc-full/utils:make-relative-path (full-filename from) + (full-filename page)) (let ((base (base-filename page)) (extension (if (page-format page) - (40ants-doc/commondoc/format:files-extension (page-format page)) - (40ants-doc/commondoc/format:current-files-extension)))) + (40ants-doc-full/commondoc/format:files-extension (page-format page)) + (40ants-doc-full/commondoc/format:current-files-extension)))) ;; Base name can be empty only if FROM argument was given and ;; we are generating a link for a cross reference. In this case ;; we need to return an empty string to make links use only HTML fragment. @@ -173,8 +173,8 @@ var DOCUMENTATION_OPTIONS = { (when (and (typep node 'documentation-piece) ;; It is OK to have some documentation section which are not ;; exported, because these can be some inner chapters. - (not (typep node '40ants-doc/commondoc/section:documentation-section))) - (let* ((reference (40ants-doc/commondoc/piece::doc-reference node)) + (not (typep node '40ants-doc-full/commondoc/section:documentation-section))) + (let* ((reference (40ants-doc-full/commondoc/piece::doc-reference node)) (package (40ants-doc/object-package::object-package node)) (obj (40ants-doc/reference::reference-object reference))) (when (and (typep obj 'symbol) @@ -184,7 +184,7 @@ var DOCUMENTATION_OPTIONS = { (warn "Symbol ~S is documented but not exported from it's package." obj)))) node)) - (40ants-doc/commondoc/mapper:map-nodes node #'checker)) + (40ants-doc-full/commondoc/mapper:map-nodes node #'checker)) node) @@ -219,7 +219,7 @@ var DOCUMENTATION_OPTIONS = { (documented-p (symbol) (member symbol references-symbols))) - (40ants-doc/commondoc/mapper:map-nodes node #'collect-packages) + (40ants-doc-full/commondoc/mapper:map-nodes node #'collect-packages) ;; This blocks extends PACKAGES list with all other ;; package-inferred packages for the system @@ -274,9 +274,9 @@ var DOCUMENTATION_OPTIONS = { separate pages." (with-node-path (flet ((check-xref (node) - (when (typep node '40ants-doc/commondoc/xref:xref) - (let* ((symbol (40ants-doc/commondoc/xref:xref-symbol node)) - (name (40ants-doc/commondoc/xref:xref-name node)) + (when (typep node '40ants-doc-full/commondoc/xref:xref) + (let* ((symbol (40ants-doc-full/commondoc/xref:xref-symbol node)) + (name (40ants-doc-full/commondoc/xref:xref-name node)) (name (etypecase name (common-doc:document-node (common-doc.ops:collect-all-text name)) (string name))) @@ -296,7 +296,7 @@ var DOCUMENTATION_OPTIONS = { (current-path))))) node)) - (40ants-doc/commondoc/mapper:map-nodes document #'check-xref)))) + (40ants-doc-full/commondoc/mapper:map-nodes document #'check-xref)))) (defun remove-references-to-other-document-formats (current-page found-references) @@ -328,7 +328,7 @@ var DOCUMENTATION_OPTIONS = { (defun make-page-uri (page &key from-page base-url) (let ((base-url (or (page-base-url page) base-url))) - (40ants-doc/rewrite::rewrite-url + (40ants-doc-full/rewrite::rewrite-url (cond ;; Links to HTML pages will be made absolute ;; if base HTML URL is known. This could be @@ -337,7 +337,7 @@ var DOCUMENTATION_OPTIONS = { ;; at the GitHub and README references items from ;; HTML version of documentation. ((and (eql (or (page-format page) - 40ants-doc/commondoc/format::*current-format*) + 40ants-doc-full/commondoc/format::*current-format*) 'common-html:html) base-url) (url-join base-url @@ -364,7 +364,7 @@ var DOCUMENTATION_OPTIONS = { a corresponding reference in the KNOWN-REFERENCES argument. KNOWING-REFERENCE argument should be a list of pairs - of a COMMON-DOC:REFERENCE and a 40ANTS-DOC/COMMON-DOC/PAGE:PAGE objects. + of a COMMON-DOC:REFERENCE and a 40ANTS-DOC-FULL/COMMON-DOC/PAGE:PAGE objects. IGNORED-WORDS will be a list of list of strings where each sublist contains words, specified as IGNORE-WORDS argument of the 40ANTS-DOC:DEFSECTION macro. @@ -433,7 +433,7 @@ var DOCUMENTATION_OPTIONS = { (should-be-ignored-p (text symbol locative) (or (and symbol (not (package-specified text)) - (not (40ants-doc/utils:is-external symbol))) + (not (40ants-doc-full/utils:is-external symbol))) (eql locative '40ants-doc/locatives:argument) @@ -451,9 +451,9 @@ var DOCUMENTATION_OPTIONS = { (eql (symbol-package symbol) keywords-package))))) (apply-replacer (node) - (40ants-doc/commondoc/mapper:map-nodes node #'replacer - :on-going-down #'go-down - :on-going-up #'go-up)) + (40ants-doc-full/commondoc/mapper:map-nodes node #'replacer + :on-going-down #'go-down + :on-going-up #'go-up)) (replacer (node) (typecase node (common-doc:code @@ -464,18 +464,18 @@ var DOCUMENTATION_OPTIONS = { ;; We also need to continue replacing on results (cond ((and (= (length children) 1) - (typep first-child '40ants-doc/commondoc/xref::xref)) + (typep first-child '40ants-doc-full/commondoc/xref::xref)) (replacer first-child)) (t node)))) - (40ants-doc/commondoc/xref:xref - (let* ((name (40ants-doc/commondoc/xref:xref-name node)) + (40ants-doc-full/commondoc/xref:xref + (let* ((name (40ants-doc-full/commondoc/xref:xref-name node)) (text (etypecase name (string name) (common-doc:document-node ;; xref-name might return document-node (common-doc.ops:collect-all-text name)))) - (symbol (40ants-doc/commondoc/xref:xref-symbol node)) - (locative (40ants-doc/commondoc/xref:xref-locative node)) + (symbol (40ants-doc-full/commondoc/xref:xref-symbol node)) + (locative (40ants-doc-full/commondoc/xref:xref-locative node)) (found-in-dislocated (loop for sublist in dislocated-symbols thereis (member text sublist @@ -527,7 +527,7 @@ var DOCUMENTATION_OPTIONS = { (make-page-uri page :from-page current-page :base-url base-url))) (html-fragment - (40ants-doc/utils::html-safe-name + (40ants-doc-full/utils::html-safe-name (40ants-doc/reference::reference-to-anchor reference)))) (common-doc:make-document-link page-uri html-fragment @@ -544,7 +544,7 @@ var DOCUMENTATION_OPTIONS = { (make-code-if-needed text)))) (40ants-doc/reference::reference (let* ((object (40ants-doc/reference:resolve reference)) - (text (or (40ants-doc/commondoc/xref:link-text object) + (text (or (40ants-doc-full/commondoc/xref:link-text object) text))) (make-link reference page diff --git a/src/commondoc/piece.lisp b/full/commondoc/piece.lisp similarity index 87% rename from src/commondoc/piece.lisp rename to full/commondoc/piece.lisp index 1b3caa83..2f135aa5 100644 --- a/src/commondoc/piece.lisp +++ b/full/commondoc/piece.lisp @@ -1,8 +1,8 @@ -(uiop:define-package #:40ants-doc/commondoc/piece +(uiop:define-package #:40ants-doc-full/commondoc/piece (:use #:cl) (:import-from #:40ants-doc/reference) (:import-from #:40ants-doc/object-package)) -(in-package #:40ants-doc/commondoc/piece) +(in-package #:40ants-doc-full/commondoc/piece) (defclass documentation-piece () diff --git a/src/commondoc/reference.lisp b/full/commondoc/reference.lisp similarity index 81% rename from src/commondoc/reference.lisp rename to full/commondoc/reference.lisp index d10b2a49..f0b22942 100644 --- a/src/commondoc/reference.lisp +++ b/full/commondoc/reference.lisp @@ -1,24 +1,24 @@ -(defpackage #:40ants-doc/commondoc/reference +(uiop:define-package #:40ants-doc-full/commondoc/reference (:use #:cl) - (:import-from #:40ants-doc/commondoc/section + (:import-from #:40ants-doc-full/commondoc/section #:section-definition #:documentation-section) (:import-from #:40ants-doc #:section-external-docs) - (:import-from #:40ants-doc/external-index + (:import-from #:40ants-doc-full/external-index #:read-references-index) - (:import-from #:40ants-doc/commondoc/piece + (:import-from #:40ants-doc-full/commondoc/piece #:doc-reference #:documentation-piece) (:import-from #:alexandria #:when-let) - (:import-from #:40ants-doc/commondoc/page + (:import-from #:40ants-doc-full/commondoc/page #:page) (:import-from #:40ants-doc/reference #:reference=) - (:import-from #:40ants-doc/commondoc/mapper + (:import-from #:40ants-doc-full/commondoc/mapper #:map-nodes)) -(in-package #:40ants-doc/commondoc/reference) +(in-package #:40ants-doc-full/commondoc/reference) (defun append-no-page-to (references) @@ -28,7 +28,7 @@ (defun collect-references (node &aux current-page results) "Returns a list of pairs where the CAR is 40ANTS-DOC/REFERENCE:REFERENCE object - and CDR is 40ANTS-DOC/COMMONDOC/PAGE:PAGE." + and CDR is 40ANTS-DOC-FULL/COMMONDOC/PAGE:PAGE." (flet ((track-page (node) (typecase node diff --git a/src/commondoc/section.lisp b/full/commondoc/section.lisp similarity index 91% rename from src/commondoc/section.lisp rename to full/commondoc/section.lisp index 059286f6..f9417fd3 100644 --- a/src/commondoc/section.lisp +++ b/full/commondoc/section.lisp @@ -1,11 +1,11 @@ -(uiop:define-package #:40ants-doc/commondoc/section +(uiop:define-package #:40ants-doc-full/commondoc/section (:use #:cl) (:import-from #:40ants-doc) (:import-from #:common-doc) (:import-from #:common-doc.ops) (:import-from #:common-doc.format) (:import-from #:commondoc-markdown) - (:import-from #:40ants-doc/commondoc/html + (:import-from #:40ants-doc-full/commondoc/html #:with-html) (:import-from #:common-html.emitter #:*section-depth*) @@ -17,20 +17,20 @@ #:emit) (:import-from #:common-html.emitter #:emit) - (:import-from #:40ants-doc/commondoc/xref + (:import-from #:40ants-doc-full/commondoc/xref #:make-xref) (:import-from #:40ants-doc/ignored-words) - (:import-from #:40ants-doc/utils) - (:import-from #:40ants-doc/commondoc/piece + (:import-from #:40ants-doc-full/utils) + (:import-from #:40ants-doc-full/commondoc/piece #:documentation-piece) (:import-from #:40ants-doc/reference #:reference-locative #:reference-object) (:import-from #:40ants-doc/object-package #:object-package) - (:import-from #:40ants-doc/commondoc/builder + (:import-from #:40ants-doc-full/commondoc/builder #:to-commondoc) - (:import-from #:40ants-doc/commondoc/mapper + (:import-from #:40ants-doc-full/commondoc/mapper #:map-nodes) (:import-from #:40ants-doc/reference-api #:canonical-reference) @@ -40,7 +40,7 @@ #:documentation-section #:section-definition #:make-section-with-reference)) -(in-package #:40ants-doc/commondoc/section) +(in-package #:40ants-doc-full/commondoc/section) (defclass section-with-reference (documentation-piece common-doc:section) @@ -88,7 +88,7 @@ (children (make-section-body section))) (let* ((reference (canonical-reference section)) - (html-fragment (40ants-doc/utils::html-safe-name + (html-fragment (40ants-doc-full/utils::html-safe-name (40ants-doc/reference::reference-to-anchor reference)))) (make-instance class-name @@ -150,7 +150,7 @@ (call-next-method))) -(defmethod 40ants-doc/commondoc/xref:link-text ((obj 40ants-doc:section)) +(defmethod 40ants-doc-full/commondoc/xref:link-text ((obj 40ants-doc:section)) (40ants-doc:section-title obj)) diff --git a/src/commondoc/toc.lisp b/full/commondoc/toc.lisp similarity index 79% rename from src/commondoc/toc.lisp rename to full/commondoc/toc.lisp index c1055764..85568596 100644 --- a/src/commondoc/toc.lisp +++ b/full/commondoc/toc.lisp @@ -1,35 +1,35 @@ -(uiop:define-package #:40ants-doc/commondoc/toc +(uiop:define-package #:40ants-doc-full/commondoc/toc (:use #:cl) - (:import-from #:40ants-doc/utils + (:import-from #:40ants-doc-full/utils #:make-relative-path) - (:import-from #:40ants-doc/commondoc/page + (:import-from #:40ants-doc-full/commondoc/page #:full-filename #:base-filename) - (:import-from #:40ants-doc/page) + (:import-from #:40ants-doc-full/page) (:import-from #:common-doc) - (:import-from #:40ants-doc/commondoc/format) - (:import-from #:40ants-doc/rewrite) - (:import-from #:40ants-doc/commondoc/changelog) - (:import-from #:40ants-doc/commondoc/mapper + (:import-from #:40ants-doc-full/commondoc/format) + (:import-from #:40ants-doc-full/rewrite) + (:import-from #:40ants-doc-full/commondoc/changelog) + (:import-from #:40ants-doc-full/commondoc/mapper #:map-nodes) (:export #:make-toc)) -(in-package #:40ants-doc/commondoc/toc) +(in-package #:40ants-doc-full/commondoc/toc) (defvar *full-document*) (defun make-toc (document page) - "Collects toplevel objects of 40ANTS-DOC/COMMONDOC/SECTION:DOCUMENTATION-SECTION class + "Collects toplevel objects of 40ANTS-DOC-FULL/COMMONDOC/SECTION:DOCUMENTATION-SECTION class and returns a table of content CommonDoc node." (let* ((current-sublist (list (common-doc:make-unordered-list (list)))) (last-list-item nil) (current-page nil) (inside-changelog nil)) (labels ((page-format (page) - (or (40ants-doc/page:page-format page) - 40ants-doc/commondoc/format::*current-format*)) + (or (40ants-doc-full/page:page-format page) + 40ants-doc-full/commondoc/format::*current-format*)) (collector (node) (when (and (typep node 'common-doc:section) (not inside-changelog) @@ -46,7 +46,7 @@ (let* ((from-uri (full-filename page)) (link-uri (make-relative-path from-uri page-uri)) - (rewritten-link-uri (40ants-doc/rewrite::rewrite-url link-uri)) + (rewritten-link-uri (40ants-doc-full/rewrite::rewrite-url link-uri)) (result (common-doc:make-document-link rewritten-link-uri html-fragment (common-doc:title node)))) @@ -63,10 +63,10 @@ (on-down (node) (typecase node - (40ants-doc/commondoc/page:page + (40ants-doc-full/commondoc/page:page (setf current-page node)) - (40ants-doc/commondoc/changelog::changelog + (40ants-doc-full/commondoc/changelog::changelog (setf inside-changelog t)) (common-doc:section @@ -77,7 +77,7 @@ (list (car current-sublist))))))) (on-up (node) (typecase node - (40ants-doc/commondoc/changelog::changelog + (40ants-doc-full/commondoc/changelog::changelog (setf inside-changelog nil)) (common-doc:section (pop current-sublist))))) @@ -97,7 +97,7 @@ #'remove-empty-sublists)))) -(defmethod 40ants-doc/commondoc/page:make-page-toc ((obj 40ants-doc/commondoc/page:page)) +(defmethod 40ants-doc-full/commondoc/page:make-page-toc ((obj 40ants-doc-full/commondoc/page:page)) (unless (boundp '*full-document*) (error "Please, set 40ANTS-DOC/COMMONDOC/TOC:*FULL-DOCUMENT* variable to generate TOC.")) (make-toc *full-document* obj)) diff --git a/src/commondoc/transcribe.lisp b/full/commondoc/transcribe.lisp similarity index 57% rename from src/commondoc/transcribe.lisp rename to full/commondoc/transcribe.lisp index 99bcd34b..ff837da1 100644 --- a/src/commondoc/transcribe.lisp +++ b/full/commondoc/transcribe.lisp @@ -1,11 +1,11 @@ -(defpackage #:40ants-doc/commondoc/transcribe +(uiop:define-package #:40ants-doc-full/commondoc/transcribe (:use #:cl) (:import-from #:common-doc) (:import-from #:common-doc.ops) - (:import-from #:40ants-doc/transcribe) - (:import-from #:40ants-doc/commondoc/mapper + (:import-from #:40ants-doc-full/transcribe) + (:import-from #:40ants-doc-full/commondoc/mapper #:with-node-package)) -(in-package #:40ants-doc/commondoc/transcribe) +(in-package #:40ants-doc-full/commondoc/transcribe) (defun warn-on-differences-in-transcriptions (document) @@ -17,9 +17,9 @@ (when (string-equal lang "cl-transcript") (with-output-to-string (out) (with-input-from-string (s code) - (handler-case (40ants-doc/transcribe::transcribe s out :check-consistency t) - (40ants-doc/transcribe:transcription-error (c) + (handler-case (40ants-doc-full/transcribe::transcribe s out :check-consistency t) + (40ants-doc-full/transcribe:transcription-error (c) (warn "~A" c)))))))) node)) (with-node-package - (40ants-doc/commondoc/mapper:map-nodes document #'check)))) + (40ants-doc-full/commondoc/mapper:map-nodes document #'check)))) diff --git a/src/commondoc/utils.lisp b/full/commondoc/utils.lisp similarity index 87% rename from src/commondoc/utils.lisp rename to full/commondoc/utils.lisp index dab8169f..147e68f4 100644 --- a/src/commondoc/utils.lisp +++ b/full/commondoc/utils.lisp @@ -1,16 +1,16 @@ -(uiop:define-package #:40ants-doc/commondoc/utils +(uiop:define-package #:40ants-doc-full/commondoc/utils (:use #:cl) - (:import-from #:40ants-doc/swank) - (:import-from #:40ants-doc/utils + (:import-from #:40ants-doc-full/swank) + (:import-from #:40ants-doc-full/utils #:maybe-downcase) (:import-from #:40ants-doc/docstring #:*whitespace-chars*) (:import-from #:str) (:import-from #:common-doc) - (:import-from #:40ants-doc/commondoc/mapper + (:import-from #:40ants-doc-full/commondoc/mapper #:map-nodes) (:export)) -(in-package #:40ants-doc/commondoc/utils) +(in-package #:40ants-doc-full/commondoc/utils) (defun left-word (node) @@ -36,7 +36,7 @@ (defun read-locative (text) (let* ((package (find-package "40ANTS-DOC/LOCATIVES")) (text (string-right-trim ".,!?" text )) - (found (40ants-doc/swank::read-locative-from-string + (found (40ants-doc-full/swank::read-locative-from-string text :package package)) (symbol diff --git a/src/commondoc/xref.lisp b/full/commondoc/xref.lisp similarity index 89% rename from src/commondoc/xref.lisp rename to full/commondoc/xref.lisp index d76b41bb..570e1400 100644 --- a/src/commondoc/xref.lisp +++ b/full/commondoc/xref.lisp @@ -1,24 +1,24 @@ -(uiop:define-package #:40ants-doc/commondoc/xref +(uiop:define-package #:40ants-doc-full/commondoc/xref (:use #:cl) (:import-from #:common-doc) (:import-from #:common-doc.ops) (:import-from #:common-doc.format) - (:import-from #:40ants-doc/commondoc/html + (:import-from #:40ants-doc-full/commondoc/html #:with-html) (:import-from #:common-html.emitter #:define-emitter) - (:import-from #:40ants-doc/commondoc/utils + (:import-from #:40ants-doc-full/commondoc/utils #:read-locative #:left-word #:right-word) (:import-from #:cl-ppcre) - (:import-from #:40ants-doc/utils + (:import-from #:40ants-doc-full/utils #:maybe-downcase) - (:import-from #:40ants-doc/commondoc/mapper + (:import-from #:40ants-doc-full/commondoc/mapper #:with-node-package) (:import-from #:commondoc-markdown) (:import-from #:40ants-doc/object-package) - (:import-from #:40ants-doc/link) + (:import-from #:40ants-doc-full/link) (:export #:make-xref #:xref @@ -28,7 +28,7 @@ #:fill-locatives #:link-text #:extract-xrefs)) -(in-package #:40ants-doc/commondoc/xref) +(in-package #:40ants-doc-full/commondoc/xref) (defclass xref (common-doc:document-node) @@ -131,7 +131,7 @@ (setf prev-xref node))))) (values node))) - (40ants-doc/commondoc/mapper:map-nodes node + (40ants-doc-full/commondoc/mapper:map-nodes node #'filler))) node) @@ -144,7 +144,7 @@ (when (typep node 'xref) (push node results)) (values node))) - (40ants-doc/commondoc/mapper:map-nodes node + (40ants-doc-full/commondoc/mapper:map-nodes node #'extractor)) results)) @@ -181,9 +181,9 @@ (let* (;; (*package* (or ;; ;; For some reason, read-locative-from-string ;; ;; does now work when current package is COMMON-LISP - ;; (40ants-doc/utils:get-package-from-symbol-name symbol-name) + ;; (40ants-doc-full/utils:get-package-from-symbol-name symbol-name) ;; *package*)) - (symbol (40ants-doc/utils:get-symbol-from-string symbol-name))) + (symbol (40ants-doc-full/utils:get-symbol-from-string symbol-name))) ;; (when (string-equal symbol-name ;; "40ANTS-DOC/DOC:@DOCUMENTATION-PRINTER-VARIABLES") @@ -241,8 +241,8 @@ (typecase node (common-doc:text-node (cond ((or inside-code-block - 40ants-doc/commondoc/mapper::*inside-title* - 40ants-doc/commondoc/mapper::*inside-link*) + 40ants-doc-full/commondoc/mapper::*inside-title* + 40ants-doc-full/commondoc/mapper::*inside-link*) node) (inside-inline-code ;; If whole content of inline code is recognized @@ -261,9 +261,9 @@ ;; to make sure, that all symbol mentions are parsed as if we being ;; in the package where DOCUMENTATION-SECTION was defined. (with-node-package - (40ants-doc/commondoc/mapper:map-nodes node #'extractor - :on-going-down #'go-down - :on-going-up #'go-up)))) + (40ants-doc-full/commondoc/mapper:map-nodes node #'extractor + :on-going-down #'go-down + :on-going-up #'go-up)))) (defgeneric link-text (object) @@ -276,12 +276,12 @@ (define-emitter (obj xref) - "Emit an reference which was not processed by 40ANTS-DOC/COMMONDOC/PAGE::REPLACE-XREFS function." + "Emit an reference which was not processed by 40ANTS-DOC-FULL/COMMONDOC/PAGE::REPLACE-XREFS function." (with-html (let ((name (xref-name obj))) (typecase name (string - (if 40ants-doc/link:*document-link-code* + (if 40ants-doc-full/link:*document-link-code* (:code :class "unresolved-reference" :title "Reference not found." name) diff --git a/src/definitions.lisp b/full/definitions.lisp similarity index 78% rename from src/definitions.lisp rename to full/definitions.lisp index 3b1a2fba..aa1aea7f 100644 --- a/src/definitions.lisp +++ b/full/definitions.lisp @@ -1,15 +1,15 @@ -(defpackage #:40ants-doc/definitions +(uiop:define-package #:40ants-doc-full/definitions (:use #:cl) (:import-from #:swank) - (:import-from #:40ants-doc/swank) - (:import-from #:40ants-doc/builder/vars)) -(in-package #:40ants-doc/definitions) + (:import-from #:40ants-doc-full/swank) + (:import-from #:40ants-doc-full/builder/vars)) +(in-package #:40ants-doc-full/definitions) (defun find-definitions-find-symbol-or-package (name) (flet ((do-find (original-name n) (multiple-value-bind (symbol found name) - (40ants-doc/swank::with-swank () + (40ants-doc-full/swank::with-swank () (swank::with-buffer-syntax (*package*) ;; TODO: Replace with custom parsing (swank::parse-symbol original-name))) @@ -30,10 +30,10 @@ (values (make-symbol name) n))))))) (do-find name (length name)) (let* ((right-trimmed - (string-right-trim 40ants-doc/builder/vars::*find-definitions-right-trim* name)) + (string-right-trim 40ants-doc-full/builder/vars::*find-definitions-right-trim* name)) (right-trimmed-length (length right-trimmed))) (do-find right-trimmed right-trimmed-length)) (let* ((right-trimmed-2 - (string-right-trim 40ants-doc/builder/vars::*find-definitions-right-trim-2* name)) + (string-right-trim 40ants-doc-full/builder/vars::*find-definitions-right-trim-2* name)) (right-trimmed-2-length (length right-trimmed-2))) (do-find right-trimmed-2 right-trimmed-2-length)))) diff --git a/src/dislocated-symbols.lisp b/full/dislocated-symbols.lisp similarity index 65% rename from src/dislocated-symbols.lisp rename to full/dislocated-symbols.lisp index 12676c91..96e6a3c2 100644 --- a/src/dislocated-symbols.lisp +++ b/full/dislocated-symbols.lisp @@ -1,9 +1,9 @@ -(uiop:define-package #:40ants-doc/dislocated-symbols +(uiop:define-package #:40ants-doc-full/dislocated-symbols (:use #:cl) (:export #:dislocated-symbols #:supports-dislocated-symbols-p)) -(in-package #:40ants-doc/dislocated-symbols) +(in-package #:40ants-doc-full/dislocated-symbols) (defgeneric supports-dislocated-symbols-p (obj) diff --git a/src/doc.lisp b/full/doc.lisp similarity index 86% rename from src/doc.lisp rename to full/doc.lisp index 8aabbb4d..461d18f6 100644 --- a/src/doc.lisp +++ b/full/doc.lisp @@ -1,34 +1,63 @@ -(uiop:define-package #:40ants-doc/doc +(uiop:define-package #:40ants-doc-full/doc (:use #:cl #:40ants-doc/locatives) (:import-from #:40ants-doc + #:exportable-locative-type-p #:defsection) (:import-from #:40ants-doc/restart) (:import-from #:40ants-doc/glossary) - - (:import-from #:40ants-doc-full) + (:import-from #:named-readtables) (:import-from #:pythonic-string-reader) - (:import-from #:40ants-doc/builder) - (:import-from #:40ants-doc/markdown) - (:import-from #:40ants-doc/builder/printer) - (:import-from #:40ants-doc/link) - (:import-from #:40ants-doc/builder/vars) - (:import-from #:40ants-doc/locatives/base) - (:import-from #:40ants-doc/reference-api) + (:import-from #:40ants-doc-full/builder + #:@generating-documentation) + (:import-from #:40ants-doc-full/markdown + #:@markdown-support) + (:import-from #:40ants-doc-full/builder/printer) + (:import-from #:40ants-doc-full/link) + (:import-from #:40ants-doc-full/tutorial) + (:import-from #:40ants-doc-full/builder/vars) + (:import-from #:40ants-doc/locatives/base + #:locate-and-find-source + #:locate-error + #:locate-object + #:define-locative-type) + (:import-from #:40ants-doc/reference-api + #:canonical-reference) (:import-from #:40ants-doc/reference) - (:import-from #:40ants-doc/source-api) + (:import-from #:40ants-doc/source-api + #:find-source) (:import-from #:40ants-doc/changelog #:@changelog) - (:import-from #:40ants-doc/themes/default) - (:import-from #:40ants-doc/themes/docs) + (:import-from #:40ants-doc-full/themes/docs) (:import-from #:docs-config #:docs-config) (:import-from #:40ants-doc/ignored-words) - (:export - #:@index - #:@readme)) -(in-package #:40ants-doc/doc) + (:import-from #:40ants-doc-full/transcribe + #:@transcript) + (:import-from #:40ants-doc-full/commondoc/builder + #:reference-to-commondoc + #:to-commondoc) + (:import-from #:40ants-doc-full/commondoc/bullet + #:make-bullet) + (:import-from #:40ants-doc-full/commondoc/mapper + #:with-node-package + #:node-supports-children + #:map-nodes) + (:import-from #:40ants-doc-full/locatives/asdf-system + #:end-of-asdf-example) + (:import-from #:40ants-doc-full/locatives/definers + #:define-symbol-locative-type) + (:import-from #:40ants-doc/locatives/define-definer + #:define-definer-for-symbol-locative-type) + (:import-from #:40ants-doc-full/locatives/variable + #:end-of-variable-example) + (:import-from #:40ants-doc-full/swank + #:locate-definition-for-emacs) + (:export #:@index + #:@readme + #:@changelog)) +(in-package #:40ants-doc-full/doc) (named-readtables:in-readtable pythonic-string-reader:pythonic-string-syntax) @@ -89,12 +118,12 @@ (@tutorial section) (@emacs-integration section) (@basics section) - (40ants-doc/builder::@generating-documentation section) - (40ants-doc/markdown::@markdown-support section) + (@generating-documentation section) + (@markdown-support section) (@documentation-printer-variables section) (@locative-types section) (@extension-api section) - (40ants-doc/transcribe::@transcript section) + (@transcript section) (@todo section)) @@ -169,7 +198,7 @@ Here are features already implemented in this fork: * Added a JS search index which will work when you are hosting pages on a static website like GitHub pages. * It is possible to render pages in multiple formats and having cross references between them. - See 40ANTS-DOC/BUILDER::@RENDERING-MULTIPLE-FORMATS. + See 40ANTS-DOC-FULL/BUILDER::@RENDERING-MULTIPLE-FORMATS. I'm planning to extend this fork even more. Read @TODO section to learn about proposed features or [start a new discussion](https://github.com/40ants/doc/discussions) @@ -189,11 +218,6 @@ See full list of changes in the 40ANTS-DOC/CHANGELOG::@CHANGELOG section. ") -(eval-when (:compile-toplevel :load-toplevel :execute) - (load - (asdf:system-relative-pathname :40ants-doc "tutorial.lisp"))) - - (defsection @background (:export nil :title "Background" :ignore-words ("OAOO")) "Here is the story behind the MGL-PAX, precursor of 40ANTS-DOC, written @@ -315,7 +339,7 @@ See full list of changes in the 40ANTS-DOC/CHANGELOG::@CHANGELOG section. easy: ```lisp - (40ants-doc/builder:render-to-string + (40ants-doc-full/builder:render-to-string @foo-random-manual :format :markdown) ``` @@ -323,7 +347,7 @@ See full list of changes in the 40ANTS-DOC/CHANGELOG::@CHANGELOG section. For this example, the generated markdown would look like this:""" (render-to-stribg-output - (stdout-of (format t (40ants-doc/builder:render-to-string + (stdout-of (format t (40ants-doc-full/builder:render-to-string foo-random::@foo-random-manual :format :markdown)) :lang "markdown")) @@ -333,13 +357,13 @@ See full list of changes in the 40ANTS-DOC/CHANGELOG::@CHANGELOG section. from a simple text editor, but I've dropped support for plain text in this fork because most time documentation are read in the browser these days. - To render into the files, use 40ANTS-DOC/BUILDER:RENDER-TO-FILES - and 40ANTS-DOC/BUILDER:UPDATE-ASDF-SYSTEM-DOCS functions. + To render into the files, use 40ANTS-DOC-FULL/BUILDER:RENDER-TO-FILES + and 40ANTS-DOC-FULL/BUILDER:UPDATE-ASDF-SYSTEM-DOCS functions. Last one can even generate documentation for different, but related libraries at the same time with the output going to different files, but with cross-page links being automatically added for symbols - mentioned in docstrings. See `40ANTS-DOC/BUILDER::@GENERATING-DOCUMENTATION` for + mentioned in docstrings. See `40ANTS-DOC-FULL/BUILDER::@GENERATING-DOCUMENTATION` for some convenience functions to cover the most common cases. Note how `(*FOO-STATE* VARIABLE)` in the DEFSECTION form includes its documentation in @@ -349,7 +373,7 @@ See full list of changes in the 40ANTS-DOC/CHANGELOG::@CHANGELOG section. The transcript in the code block tagged with `cl-transcript` is automatically checked for up-to-dateness. See - `40ANTS-DOC/TRANSCRIBE::@TRANSCRIPT`. + `40ANTS-DOC-FULL/TRANSCRIBE::@TRANSCRIPT`. """ ) @@ -403,10 +427,10 @@ See full list of changes in the 40ANTS-DOC/CHANGELOG::@CHANGELOG section. initialization file (or loading `src/pax.el`):" (edit-locative.el (include #.(asdf:system-relative-pathname :40ants-doc "elisp/edit-locative.el") :lang "elisp")) - (40ants-doc/swank:locate-definition-for-emacs function) + (locate-definition-for-emacs function) "Note, there is also another part of Emacs code, related to - transcription blocks. It is described in 40ANTS-DOC/TRANSCRIBE::@TRANSCRIPT section.") + transcription blocks. It is described in 40ANTS-DOC-FULL/TRANSCRIBE::@TRANSCRIPT section.") (defsection @basics (:title "Basics" @@ -513,9 +537,9 @@ See full list of changes in the 40ANTS-DOC/CHANGELOG::@CHANGELOG section. **Note, some of these variables might be not supported yet in this fork.** " - (40ants-doc/builder/printer:*document-uppercase-is-code* variable) - (40ants-doc/link:*document-link-code* variable) - (40ants-doc/builder/vars:*document-max-numbering-level* variable)) + (40ants-doc-full/builder/printer:*document-uppercase-is-code* variable) + (40ants-doc-full/link:*document-link-code* variable) + (40ants-doc-full/builder/vars:*document-max-numbering-level* variable)) (defsection @locative-types (:title "Locative Types" @@ -562,7 +586,7 @@ See full list of changes in the 40ANTS-DOC/CHANGELOG::@CHANGELOG section. (defsection @extension-api (:title "Extension API") - (40ants-doc/themes/docs::@defining-a-theme section) + (40ants-doc-full/themes/docs::@defining-a-theme section) (@locatives-and-references section) (@new-object-types section) (@reference-based-extensions section) @@ -575,7 +599,7 @@ See full list of changes in the 40ANTS-DOC/CHANGELOG::@CHANGELOG section. " If you wish to make it possible to render documentation for a new object type, then you have to define a method for the - 40ANTS-DOC/COMMONDOC/BUILDER:TO-COMMONDOC generic function. + 40ANTS-DOC-FULL/COMMONDOC/BUILDER:TO-COMMONDOC generic function. And to make `M-.` navigation work with new object types, a methods of 40ANTS-DOC/LOCATIVES/BASE:LOCATE-OBJECT generic-function and 40ANTS-DOC/SOURCE-API:FIND-SOURCE generic-function are to be defined. @@ -587,19 +611,19 @@ See full list of changes in the 40ANTS-DOC/CHANGELOG::@CHANGELOG section. Here is a stripped down example of how all this is done for ASDF:SYSTEM:" (asdf-example (include (:start (asdf:system locative) - :end (40ants-doc/locatives/asdf-system::end-of-asdf-example variable)) + :end (end-of-asdf-example variable)) :lang "commonlisp")) - (40ants-doc/locatives/base:define-locative-type macro) - (40ants-doc:exportable-locative-type-p generic-function) - (40ants-doc/locatives/base:locate-object generic-function) - (40ants-doc/locatives/base:locate-error function) - (40ants-doc/reference-api:canonical-reference generic-function) - (40ants-doc/source-api:find-source generic-function) - (40ants-doc/commondoc/builder:to-commondoc generic-function) - (40ants-doc/commondoc/bullet:make-bullet function) - (40ants-doc/commondoc/mapper:map-nodes generic-function) - (40ants-doc/commondoc/mapper:node-supports-children generic-function) - (40ants-doc/commondoc/mapper:with-node-package macro)) + (define-locative-type macro) + (exportable-locative-type-p generic-function) + (locate-object generic-function) + (locate-error function) + (canonical-reference generic-function) + (find-source generic-function) + (to-commondoc generic-function) + (make-bullet function) + (map-nodes generic-function) + (node-supports-children generic-function) + (with-node-package macro)) (defsection @reference-based-extensions @@ -607,7 +631,7 @@ See full list of changes in the 40ANTS-DOC/CHANGELOG::@CHANGELOG section. :ignore-words ("DEFINE-DIRECTION" "UP" "DIRECTION")) - "Let's see how to extend 40ANTS-DOC/BUILDER:RENDER-TO-FILES and `M-.` navigation if there is + "Let's see how to extend 40ANTS-DOC-FULL/BUILDER:RENDER-TO-FILES and `M-.` navigation if there is no first class object to represent the thing of interest. Recall that 40ANTS-DOC/LOCATIVES/BASE:LOCATE returns a 40ANTS-DOC/REFERENCE:REFERENCE object in this case: @@ -625,31 +649,31 @@ See full list of changes in the 40ANTS-DOC/CHANGELOG::@CHANGELOG section. Here is a stripped down example of how the VARIABLE locative is defined. Pay attention how it defines a method of - 40ANTS-DOC/COMMONDOC/BUILDER:REFERENCE-TO-COMMONDOC generic-function instead of - [40ANTS-DOC/COMMONDOC/BUILDER:TO-COMMONDOC][generic-function]. This is because we have no + 40ANTS-DOC-FULL/COMMONDOC/BUILDER:REFERENCE-TO-COMMONDOC generic-function instead of + [40ANTS-DOC-FULL/COMMONDOC/BUILDER:TO-COMMONDOC][generic-function]. This is because we have no a lisp object to represent a variable and have to specialize method on LOCATIVE-TYPE argument:" (variable-example (include (:start (variable locative) - :end (40ants-doc/locatives/variable::end-of-variable-example variable)) + :end (end-of-variable-example variable)) :lang "commonlisp")) - (40ants-doc/source-api:find-source (method () (40ants-doc/reference:reference))) - (40ants-doc/locatives/base:locate-and-find-source generic-function) - (40ants-doc/locatives/base:locate-and-find-source (method () (t t t))) - (40ants-doc/commondoc/builder:reference-to-commondoc generic-function) + (find-source (method () (40ants-doc/reference:reference))) + (locate-and-find-source generic-function) + (locate-and-find-source (method () (t t t))) + (reference-to-commondoc generic-function) "We have covered the basic building blocks of reference based extensions. Now let's see how the obscure - 40ANTS-DOC/LOCATIVES/DEFINERS:DEFINE-SYMBOL-LOCATIVE-TYPE and - 40ANTS-DOC/LOCATIVES/DEFINE-DEFINER:DEFINE-DEFINER-FOR-SYMBOL-LOCATIVE-TYPE macros work together to + DEFINE-SYMBOL-LOCATIVE-TYPE and + DEFINE-DEFINER-FOR-SYMBOL-LOCATIVE-TYPE macros work together to simplify the common task of associating definition and documentation with symbols in a certain context." - (40ants-doc/locatives/definers:define-symbol-locative-type macro) - (40ants-doc/locatives/define-definer:define-definer-for-symbol-locative-type macro)) + (define-symbol-locative-type macro) + (define-definer-for-symbol-locative-type macro)) (defsection @sections (:title "Sections") "40ANTS-DOC:SECTION objects rarely need to be dissected since - 40ANTS-DOC:DEFSECTION and 40ANTS-DOC/BUILDER:RENDER-TO-FILES cover most needs. However, it is plausible + 40ANTS-DOC:DEFSECTION and 40ANTS-DOC-FULL/BUILDER:RENDER-TO-FILES cover most needs. However, it is plausible that one wants to subclass them and maybe redefine how they are presented." (40ants-doc:section class) @@ -683,7 +707,7 @@ See full list of changes in the 40ANTS-DOC/CHANGELOG::@CHANGELOG section. ") -(defmethod docs-config ((system (eql (asdf:registered-system "40ants-doc")))) +(defmethod docs-config ((system (eql (asdf:registered-system "40ants-doc-full")))) ;; 40ANTS-DOC-THEME-40ANTS system will bring ;; as dependency a full 40ANTS-DOC but we don't want ;; unnecessary dependencies here: diff --git a/src/external-index.lisp b/full/external-index.lisp similarity index 87% rename from src/external-index.lisp rename to full/external-index.lisp index e4c4a21d..9f3932a0 100644 --- a/src/external-index.lisp +++ b/full/external-index.lisp @@ -1,6 +1,6 @@ -(defpackage #:40ants-doc/external-index +(uiop:define-package #:40ants-doc-full/external-index (:use #:cl) - (:import-from #:40ants-doc/utils + (:import-from #:40ants-doc-full/utils #:with-temp-package #:url-join) (:import-from #:40ants-doc/reference @@ -8,13 +8,13 @@ #:external-reference-p) (:import-from #:alexandria #:assoc-value) - (:import-from #:40ants-doc/commondoc/page) - (:import-from #:40ants-doc/rewrite) + (:import-from #:40ants-doc-full/commondoc/page) + (:import-from #:40ants-doc-full/rewrite) (:import-from #:str) (:import-from #:jonathan) (:import-from #:dexador #:http-request-not-found)) -(in-package #:40ants-doc/external-index) +(in-package #:40ants-doc-full/external-index) (defun load-data-from-url (url) @@ -55,9 +55,9 @@ (defun make-full-reference-url (reference page base-url-or-dir) - (let* ((page-uri (40ants-doc/commondoc/page:full-filename page)) - (rewritten-link-uri (40ants-doc/rewrite::rewrite-url page-uri)) - (fragment (40ants-doc/utils::html-safe-name + (let* ((page-uri (40ants-doc-full/commondoc/page:full-filename page)) + (rewritten-link-uri (40ants-doc-full/rewrite::rewrite-url page-uri)) + (fragment (40ants-doc-full/utils::html-safe-name (40ants-doc/reference::reference-to-anchor reference)))) (concatenate 'string (url-join diff --git a/src/github.lisp b/full/github.lisp similarity index 93% rename from src/github.lisp rename to full/github.lisp index 7cc8c795..eaba78e9 100644 --- a/src/github.lisp +++ b/full/github.lisp @@ -1,9 +1,9 @@ -(uiop:define-package #:40ants-doc/github +(uiop:define-package #:40ants-doc-full/github (:use #:cl) (:import-from #:40ants-doc #:defsection) (:import-from #:cl-fad) - (:import-from #:40ants-doc/source) + (:import-from #:40ants-doc-full/source) (:import-from #:40ants-doc/reference) (:import-from #:40ants-doc/source-api) (:import-from #:cl-ppcre) @@ -15,13 +15,13 @@ #:source-uri) (:export #:make-github-source-uri-fn)) -(in-package #:40ants-doc/github) +(in-package #:40ants-doc-full/github) (defsection @github-workflow (:title "Github Workflow" :ignore-words ("HTML")) "It is generally recommended to commit generated readmes (see - 40ANTS-DOC/BUILDER:UPDATE-ASDF-SYSTEM-DOCS) so that users have something to read + 40ANTS-DOC-FULL/BUILDER:UPDATE-ASDF-SYSTEM-DOCS) so that users have something to read without reading the code and sites like github can display them. HTML documentation can also be committed, but there is an issue with @@ -39,7 +39,7 @@ This way the HTML documentation will be available at `http://.github.io/`. It is probably a good - idea to add section like the 40ANTS-DOC/DOC:@LINKS section to allow jumping + idea to add section like the 40ANTS-DOC-FULL/DOC:@LINKS section to allow jumping between the repository and the gh-pages site." (make-github-source-uri-fn function) (*source-uri-fn* variable) @@ -57,7 +57,7 @@ (defun make-github-source-uri-fn (asdf-system &key github-uri git-version) "Return a function suitable as :SOURCE-URI-FN of - the 40ANTS-DOC/BUILDER:RENDER-TO-FILES function. The function looks the source + the 40ANTS-DOC-FULL/BUILDER:RENDER-TO-FILES function. The function looks the source location of the reference passed to it, and if the location is found, the path is made relative to the root directory of ASDF-SYSTEM and finally an URI pointing to github is returned. The @@ -94,7 +94,7 @@ (let ((line-file-position-cache (make-hash-table :test #'equal)) (find-source-cache (make-hash-table :test #'equal))) (lambda (reference) - (let ((40ants-doc/source::*find-source-cache* find-source-cache)) + (let ((40ants-doc-full/source::*find-source-cache* find-source-cache)) (multiple-value-bind (relative-path line-number) (convert-source-location (40ants-doc/source-api:find-source (40ants-doc/reference:resolve reference)) diff --git a/src/highlight.lisp b/full/highlight.lisp similarity index 98% rename from src/highlight.lisp rename to full/highlight.lisp index efcfd871..9d5e3406 100644 --- a/src/highlight.lisp +++ b/full/highlight.lisp @@ -1,4 +1,4 @@ -(defpackage #:40ants-doc/highlight +(uiop:define-package #:40ants-doc-full/highlight (:use #:cl) (:import-from #:dexador) (:import-from #:log) @@ -16,7 +16,7 @@ #:with-tmpdir) (:import-from #:trivial-extract #:extract-zip)) -(in-package #:40ants-doc/highlight) +(in-package #:40ants-doc-full/highlight) (defvar *supported-languages* diff --git a/src/link.lisp b/full/link.lisp similarity index 93% rename from src/link.lisp rename to full/link.lisp index 7e612e0d..29a7ed1e 100644 --- a/src/link.lisp +++ b/full/link.lisp @@ -1,10 +1,10 @@ -(uiop:define-package #:40ants-doc/link +(uiop:define-package #:40ants-doc-full/link (:use #:cl) (:import-from #:named-readtables) (:import-from #:pythonic-string-reader) (:export #:*document-link-code*)) -(in-package #:40ants-doc/link) +(in-package #:40ants-doc-full/link) (named-readtables:in-readtable pythonic-string-reader:pythonic-string-syntax) @@ -79,7 +79,7 @@ single symbol. Note that [*DOCUMENT-LINK-CODE*][variable] can be combined with - 40ANTS-DOC/BUILDER/PRINTER:*DOCUMENT-UPPERCASE-IS-CODE* to have links generated for + 40ANTS-DOC-FULL/BUILDER/PRINTER:*DOCUMENT-UPPERCASE-IS-CODE* to have links generated for uppercase names with no quoting required.""") diff --git a/src/locatives/argument.lisp b/full/locatives/argument.lisp similarity index 90% rename from src/locatives/argument.lisp rename to full/locatives/argument.lisp index 78f437a5..8d569399 100644 --- a/src/locatives/argument.lisp +++ b/full/locatives/argument.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/locatives/argument +(uiop:define-package #:40ants-doc-full/locatives/argument (:use #:cl) (:import-from #:40ants-doc/locatives/base #:locate-error @@ -8,7 +8,7 @@ #:argument) (:import-from #:named-readtables) (:import-from #:pythonic-string-reader)) -(in-package #:40ants-doc/locatives/argument) +(in-package #:40ants-doc-full/locatives/argument) (named-readtables:in-readtable pythonic-string-reader:pythonic-string-syntax) diff --git a/src/locatives/asdf-system.lisp b/full/locatives/asdf-system.lisp similarity index 94% rename from src/locatives/asdf-system.lisp rename to full/locatives/asdf-system.lisp index 9668edda..9817011b 100644 --- a/src/locatives/asdf-system.lisp +++ b/full/locatives/asdf-system.lisp @@ -1,4 +1,4 @@ -(defpackage #:40ants-doc/locatives/asdf-system +(uiop:define-package #:40ants-doc-full/locatives/asdf-system (:use #:cl) (:import-from #:40ants-doc/locatives/base #:locate-error @@ -15,11 +15,11 @@ #:make-content #:make-web-link #:make-text) - (:import-from #:40ants-doc/commondoc/section + (:import-from #:40ants-doc-full/commondoc/section #:make-section-with-reference) - (:import-from #:40ants-doc/commondoc/builder + (:import-from #:40ants-doc-full/commondoc/builder #:to-commondoc)) -(in-package #:40ants-doc/locatives/asdf-system) +(in-package #:40ants-doc-full/locatives/asdf-system) (define-locative-type asdf:system () "Refers to an asdf system. The generated documentation will include diff --git a/src/locatives/class.lisp b/full/locatives/class.lisp similarity index 68% rename from src/locatives/class.lisp rename to full/locatives/class.lisp index 633b9d5c..e84036b8 100644 --- a/src/locatives/class.lisp +++ b/full/locatives/class.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/locatives/class +(uiop:define-package #:40ants-doc-full/locatives/class (:use #:cl) (:import-from #:40ants-doc/locatives/base #:locate-error @@ -7,13 +7,13 @@ (:import-from #:40ants-doc/reference-api #:canonical-reference) (:import-from #:40ants-doc/reference) - (:import-from #:40ants-doc/commondoc/bullet) - (:import-from #:40ants-doc/commondoc/arglist) + (:import-from #:40ants-doc-full/commondoc/bullet) + (:import-from #:40ants-doc-full/commondoc/arglist) (:import-from #:40ants-doc/docstring) - (:import-from #:40ants-doc/commondoc/markdown) - (:import-from #:40ants-doc/commondoc/builder + (:import-from #:40ants-doc-full/commondoc/markdown) + (:import-from #:40ants-doc-full/commondoc/builder #:to-commondoc)) -(in-package #:40ants-doc/locatives/class) +(in-package #:40ants-doc-full/locatives/class) (define-locative-type class ()) @@ -50,13 +50,13 @@ (swank-mop:class-direct-superclasses class)))) (docstring (40ants-doc/docstring:get-docstring class t)) (children (when docstring - (40ants-doc/commondoc/markdown:parse-markdown docstring)))) + (40ants-doc-full/commondoc/markdown:parse-markdown docstring)))) - (40ants-doc/commondoc/bullet:make-bullet (canonical-reference class) - ;; TODO: transform superclasses to XREFs - :arglist (40ants-doc/commondoc/arglist::make-arglist superclasses) - :children children - :ignore-words symbol))) + (40ants-doc-full/commondoc/bullet:make-bullet (canonical-reference class) + ;; TODO: transform superclasses to XREFs + :arglist (40ants-doc-full/commondoc/arglist::make-arglist superclasses) + :children children + :ignore-words symbol))) (defun find-known-reference (reference) (find reference 40ants-doc/reference::*references* :test #'40ants-doc/reference::reference=)) diff --git a/src/locatives/compiler-macro.lisp b/full/locatives/compiler-macro.lisp similarity index 63% rename from src/locatives/compiler-macro.lisp rename to full/locatives/compiler-macro.lisp index 6956e022..b9aff04b 100644 --- a/src/locatives/compiler-macro.lisp +++ b/full/locatives/compiler-macro.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/locatives/compiler-macro +(uiop:define-package #:40ants-doc-full/locatives/compiler-macro (:use #:cl) (:import-from #:40ants-doc/locatives/base #:locate-and-find-source @@ -10,13 +10,13 @@ (:import-from #:40ants-doc/reference) (:import-from #:swank-backend) (:import-from #:40ants-doc/source-api) - (:import-from #:40ants-doc/commondoc/builder) - (:import-from #:40ants-doc/commondoc/bullet) + (:import-from #:40ants-doc-full/commondoc/builder) + (:import-from #:40ants-doc-full/commondoc/bullet) (:import-from #:40ants-doc/docstring) - (:import-from #:40ants-doc/commondoc/markdown) - (:import-from #:40ants-doc/args + (:import-from #:40ants-doc-full/commondoc/markdown) + (:import-from #:40ants-doc-full/args #:macro-arg-names)) -(in-package #:40ants-doc/locatives/compiler-macro) +(in-package #:40ants-doc-full/locatives/compiler-macro) (define-locative-type compiler-macro ()) @@ -28,19 +28,19 @@ (40ants-doc/reference::make-reference symbol (cons locative-type locative-args))) -(defmethod 40ants-doc/commondoc/builder:reference-to-commondoc ((symbol symbol) (locative-type (eql 'compiler-macro)) locative-args) +(defmethod 40ants-doc-full/commondoc/builder:reference-to-commondoc ((symbol symbol) (locative-type (eql 'compiler-macro)) locative-args) (let* ((reference (canonical-reference (40ants-doc/reference::make-reference symbol (cons locative-type locative-args)))) (arglist (swank-backend:arglist symbol)) (docstring (40ants-doc/docstring:get-docstring symbol 'compiler-macro)) (children (when docstring - (40ants-doc/commondoc/markdown:parse-markdown docstring)))) + (40ants-doc-full/commondoc/markdown:parse-markdown docstring)))) - (40ants-doc/commondoc/bullet::make-bullet reference - :arglist locative-args - :children children - :dislocated-symbols (macro-arg-names arglist)))) + (40ants-doc-full/commondoc/bullet::make-bullet reference + :arglist locative-args + :children children + :dislocated-symbols (macro-arg-names arglist)))) (defmethod locate-and-find-source (symbol (locative-type (eql 'compiler-macro)) diff --git a/src/locatives/constant.lisp b/full/locatives/constant.lisp similarity index 62% rename from src/locatives/constant.lisp rename to full/locatives/constant.lisp index ca835110..56c34cfe 100644 --- a/src/locatives/constant.lisp +++ b/full/locatives/constant.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/locatives/constant +(uiop:define-package #:40ants-doc-full/locatives/constant (:use #:cl) (:import-from #:40ants-doc/locatives/base #:locate-and-find-source @@ -9,14 +9,14 @@ #:canonical-reference) (:import-from #:40ants-doc/reference) (:import-from #:swank-backend) - (:import-from #:40ants-doc/locatives/utils) + (:import-from #:40ants-doc-full/locatives/utils) (:import-from #:40ants-doc/locatives #:constant) - (:import-from #:40ants-doc/commondoc/bullet) - (:import-from #:40ants-doc/commondoc/builder) + (:import-from #:40ants-doc-full/commondoc/bullet) + (:import-from #:40ants-doc-full/commondoc/builder) (:import-from #:40ants-doc/docstring) - (:import-from #:40ants-doc/commondoc/markdown)) -(in-package #:40ants-doc/locatives/constant) + (:import-from #:40ants-doc-full/commondoc/markdown)) +(in-package #:40ants-doc-full/locatives/constant) (define-locative-type constant (&optional initform) @@ -30,7 +30,7 @@ (40ants-doc/reference::make-reference symbol (cons locative-type locative-args))) -(defmethod 40ants-doc/commondoc/builder:reference-to-commondoc ((symbol symbol) (locative-type (eql 'constant)) locative-args) +(defmethod 40ants-doc-full/commondoc/builder:reference-to-commondoc ((symbol symbol) (locative-type (eql 'constant)) locative-args) (destructuring-bind (&optional (initform nil initformp)) locative-args (let* ((reference (canonical-reference (40ants-doc/reference::make-reference @@ -43,15 +43,15 @@ (symbol-value symbol))) (t "-unbound-"))) (children (when docstring - (40ants-doc/commondoc/markdown:parse-markdown docstring)))) + (40ants-doc-full/commondoc/markdown:parse-markdown docstring)))) - (40ants-doc/commondoc/bullet::make-bullet reference - :arglist arglist - :children children - :dislocated-symbols symbol)))) + (40ants-doc-full/commondoc/bullet::make-bullet reference + :arglist arglist + :children children + :dislocated-symbols symbol)))) (defmethod locate-and-find-source (symbol (locative-type (eql 'constant)) locative-args) (declare (ignore locative-args)) - (40ants-doc/locatives/utils::find-one-location (swank-backend:find-definitions symbol) - '("defconstant" "constant" "variable"))) + (40ants-doc-full/locatives/utils::find-one-location (swank-backend:find-definitions symbol) + '("defconstant" "constant" "variable"))) diff --git a/src/locatives/definers.lisp b/full/locatives/definers.lisp similarity index 80% rename from src/locatives/definers.lisp rename to full/locatives/definers.lisp index 3e1ddb55..4fec5369 100644 --- a/src/locatives/definers.lisp +++ b/full/locatives/definers.lisp @@ -1,17 +1,17 @@ -(defpackage #:40ants-doc/locatives/definers +(uiop:define-package #:40ants-doc-full/locatives/definers (:use #:cl) (:import-from #:named-readtables) (:import-from #:pythonic-string-reader) (:import-from #:40ants-doc/locatives/base) (:import-from #:40ants-doc/source-api) - (:import-from #:40ants-doc/commondoc/bullet) - (:import-from #:40ants-doc/commondoc/builder) + (:import-from #:40ants-doc-full/commondoc/bullet) + (:import-from #:40ants-doc-full/commondoc/builder) (:import-from #:40ants-doc/reference) (:import-from #:40ants-doc/docstring) - (:import-from #:40ants-doc/commondoc/markdown) + (:import-from #:40ants-doc-full/commondoc/markdown) (:export #:define-symbol-locative-type)) -(in-package #:40ants-doc/locatives/definers) +(in-package #:40ants-doc-full/locatives/definers) (named-readtables:in-readtable pythonic-string-reader:pythonic-string-syntax) @@ -60,19 +60,19 @@ (40ants-doc/reference::make-reference symbol (cons locative-type locative-args))) - (defmethod 40ants-doc/commondoc/builder::reference-to-commondoc ((symbol symbol) (locative-type (eql ',locative-type)) locative-args) + (defmethod 40ants-doc-full/commondoc/builder::reference-to-commondoc ((symbol symbol) (locative-type (eql ',locative-type)) locative-args) (let* ((method (40ants-doc/locatives/base::symbol-lambda-list-method symbol ',locative-type)) (arglist (40ants-doc/locatives/base::symbol-lambda-list symbol ',locative-type)) (reference (40ants-doc/reference::make-reference symbol (cons locative-type locative-args))) (docstring (40ants-doc/docstring:get-docstring method t)) (children (when docstring - (40ants-doc/commondoc/markdown:parse-markdown docstring)))) + (40ants-doc-full/commondoc/markdown:parse-markdown docstring)))) - (40ants-doc/commondoc/bullet:make-bullet reference - :arglist arglist - :children children - :ignore-words symbol))) + (40ants-doc-full/commondoc/bullet:make-bullet reference + :arglist arglist + :children children + :ignore-words symbol))) (defmethod 40ants-doc/locatives/base:locate-and-find-source (symbol (locative-type (eql ',locative-type)) locative-args) (40ants-doc/source-api:find-source (40ants-doc/locatives/base::symbol-lambda-list-method symbol ',locative-type)))))) diff --git a/src/locatives/dislocated.lisp b/full/locatives/dislocated.lisp similarity index 79% rename from src/locatives/dislocated.lisp rename to full/locatives/dislocated.lisp index 64b7a139..7c692b0b 100644 --- a/src/locatives/dislocated.lisp +++ b/full/locatives/dislocated.lisp @@ -1,4 +1,4 @@ -(defpackage #:40ants-doc/locatives/dislocated +(uiop:define-package #:40ants-doc-full/locatives/dislocated (:use #:cl) (:import-from #:40ants-doc/locatives/base #:locate-error @@ -6,7 +6,7 @@ #:define-locative-type) (:import-from #:40ants-doc/locatives #:dislocated)) -(in-package #:40ants-doc/locatives/dislocated) +(in-package #:40ants-doc-full/locatives/dislocated) (define-locative-type dislocated () @@ -15,7 +15,7 @@ `FOO` - will be linked to (if 40ANTS-DOC/LINK:*DOCUMENT-LINK-CODE*) its definition. However, + will be linked to (if 40ANTS-DOC-FULL/LINK:*DOCUMENT-LINK-CODE*) its definition. However, [`FOO`][dislocated] diff --git a/src/locatives/function.lisp b/full/locatives/function.lisp similarity index 61% rename from src/locatives/function.lisp rename to full/locatives/function.lisp index d2733b1f..77842dc5 100644 --- a/src/locatives/function.lisp +++ b/full/locatives/function.lisp @@ -1,4 +1,4 @@ -(defpackage #:40ants-doc/locatives/function +(uiop:define-package #:40ants-doc-full/locatives/function (:use #:cl) (:import-from #:40ants-doc/locatives/base #:locate-error @@ -8,12 +8,12 @@ (:import-from #:40ants-doc/reference-api #:canonical-reference) (:import-from #:40ants-doc/reference) - (:import-from #:40ants-doc/args) - (:import-from #:40ants-doc/commondoc/builder) - (:import-from #:40ants-doc/commondoc/bullet) + (:import-from #:40ants-doc-full/args) + (:import-from #:40ants-doc-full/commondoc/builder) + (:import-from #:40ants-doc-full/commondoc/bullet) (:import-from #:40ants-doc/docstring) - (:import-from #:40ants-doc/commondoc/markdown)) -(in-package #:40ants-doc/locatives/function) + (:import-from #:40ants-doc-full/commondoc/markdown)) +(in-package #:40ants-doc-full/locatives/function) (define-locative-type function () @@ -34,15 +34,15 @@ (40ants-doc/reference::make-reference (swank-backend:function-name function) 'function)) -(defmethod 40ants-doc/commondoc/builder::to-commondoc ((obj function)) +(defmethod 40ants-doc-full/commondoc/builder::to-commondoc ((obj function)) (let* ((arglist (swank-backend:arglist obj)) (docstring (40ants-doc/docstring:get-docstring obj 'function)) (children (when docstring - (40ants-doc/commondoc/markdown:parse-markdown docstring))) + (40ants-doc-full/commondoc/markdown:parse-markdown docstring))) (reference (canonical-reference obj)) - (dislocated (40ants-doc/args::function-arg-names arglist))) + (dislocated (40ants-doc-full/args::function-arg-names arglist))) - (40ants-doc/commondoc/bullet:make-bullet reference - :arglist arglist - :children children - :dislocated-symbols dislocated))) + (40ants-doc-full/commondoc/bullet:make-bullet reference + :arglist arglist + :children children + :dislocated-symbols dislocated))) diff --git a/src/locatives/generic-function.lisp b/full/locatives/generic-function.lisp similarity index 78% rename from src/locatives/generic-function.lisp rename to full/locatives/generic-function.lisp index 509ec4b8..656d95c1 100644 --- a/src/locatives/generic-function.lisp +++ b/full/locatives/generic-function.lisp @@ -1,4 +1,4 @@ -(defpackage #:40ants-doc/locatives/generic-function +(uiop:define-package #:40ants-doc-full/locatives/generic-function (:use #:cl) (:import-from #:40ants-doc/locatives/base #:locate-error @@ -8,16 +8,16 @@ (:import-from #:swank-mop) (:import-from #:40ants-doc/reference-api #:canonical-reference) - (:import-from #:40ants-doc/args + (:import-from #:40ants-doc-full/args #:function-arg-names) (:import-from #:40ants-doc/reference) (:import-from #:40ants-doc/docstring) - (:import-from #:40ants-doc/commondoc/markdown) - (:import-from #:40ants-doc/commondoc/builder + (:import-from #:40ants-doc-full/commondoc/markdown) + (:import-from #:40ants-doc-full/commondoc/builder #:to-commondoc) - (:import-from #:40ants-doc/commondoc/bullet + (:import-from #:40ants-doc-full/commondoc/bullet #:make-bullet)) -(in-package #:40ants-doc/locatives/generic-function) +(in-package #:40ants-doc-full/locatives/generic-function) (define-locative-type generic-function ()) @@ -41,7 +41,7 @@ (docstring (40ants-doc/docstring:get-docstring obj 'function)) ;; TODO: we should move text transfromation after it will be parsed (children (when docstring - (40ants-doc/commondoc/markdown:parse-markdown docstring))) + (40ants-doc-full/commondoc/markdown:parse-markdown docstring))) (reference (canonical-reference obj))) (make-bullet reference diff --git a/src/locatives/glossary.lisp b/full/locatives/glossary.lisp similarity index 86% rename from src/locatives/glossary.lisp rename to full/locatives/glossary.lisp index 60f105fe..e5f51b49 100644 --- a/src/locatives/glossary.lisp +++ b/full/locatives/glossary.lisp @@ -1,4 +1,4 @@ -(defpackage #:40ants-doc/locatives/glossary +(uiop:define-package #:40ants-doc-full/locatives/glossary (:use #:cl) ;; (:import-from #:40ants-doc/core) (:import-from #:40ants-doc/reference) @@ -8,16 +8,16 @@ (:import-from #:40ants-doc/glossary) (:import-from #:40ants-doc/reference-api) (:import-from #:40ants-doc/source-api) - (:import-from #:40ants-doc/commondoc/markdown) - (:import-from #:40ants-doc/commondoc/builder + (:import-from #:40ants-doc-full/commondoc/markdown) + (:import-from #:40ants-doc-full/commondoc/builder #:to-commondoc) - (:import-from #:40ants-doc/commondoc/bullet + (:import-from #:40ants-doc-full/commondoc/bullet #:make-bullet) (:import-from #:40ants-doc/docstring #:strip-docstring-indentation) - (:import-from #:40ants-doc/utils + (:import-from #:40ants-doc-full/utils #:maybe-downcase)) -(in-package #:40ants-doc/locatives/glossary) +(in-package #:40ants-doc-full/locatives/glossary) (40ants-doc/locatives/base:define-locative-type glossary-term () @@ -46,7 +46,7 @@ (when docstring (strip-docstring-indentation docstring)))) (children (when docstring - (40ants-doc/commondoc/markdown:parse-markdown docstring)))) + (40ants-doc-full/commondoc/markdown:parse-markdown docstring)))) (make-bullet reference :name (glossary-term-title-or-name glossary-term) diff --git a/src/locatives/include.lisp b/full/locatives/include.lisp similarity index 96% rename from src/locatives/include.lisp rename to full/locatives/include.lisp index 45944a95..23b660d4 100644 --- a/src/locatives/include.lisp +++ b/full/locatives/include.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/locatives/include +(uiop:define-package #:40ants-doc-full/locatives/include (:use #:cl) (:import-from #:40ants-doc/locatives/base #:locate-and-find-source @@ -13,11 +13,11 @@ (:import-from #:fare-utils) (:import-from #:named-readtables) (:import-from #:pythonic-string-reader) - (:import-from #:40ants-doc/commondoc/builder) + (:import-from #:40ants-doc-full/commondoc/builder) (:import-from #:40ants-doc/core #:exportable-locative-type-p) (:import-from #:40ants-doc/source-api)) -(in-package #:40ants-doc/locatives/include) +(in-package #:40ants-doc-full/locatives/include) (named-readtables:in-readtable pythonic-string-reader:pythonic-string-syntax) @@ -91,7 +91,7 @@ nil))) -(defmethod 40ants-doc/commondoc/builder::reference-to-commondoc ((symbol symbol) (locative-type (eql 'include)) locative-args) +(defmethod 40ants-doc-full/commondoc/builder::reference-to-commondoc ((symbol symbol) (locative-type (eql 'include)) locative-args) (destructuring-bind (source &key lang) locative-args diff --git a/src/locatives/locative.lisp b/full/locatives/locative.lisp similarity index 70% rename from src/locatives/locative.lisp rename to full/locatives/locative.lisp index 87adc7c4..2f0ae88a 100644 --- a/src/locatives/locative.lisp +++ b/full/locatives/locative.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/locatives/locative +(uiop:define-package #:40ants-doc-full/locatives/locative (:use #:cl) (:import-from #:40ants-doc/locatives/base #:locate-and-find-source @@ -7,18 +7,18 @@ #:define-locative-type) (:import-from #:40ants-doc/reference-api #:canonical-reference) - (:import-from #:40ants-doc/args + (:import-from #:40ants-doc-full/args #:function-arg-names) (:import-from #:40ants-doc/reference) (:import-from #:40ants-doc/locatives #:locative) - (:import-from #:40ants-doc/commondoc/builder) - (:import-from #:40ants-doc/commondoc/bullet) + (:import-from #:40ants-doc-full/commondoc/builder) + (:import-from #:40ants-doc-full/commondoc/bullet) (:import-from #:40ants-doc/docstring) - (:import-from #:40ants-doc/commondoc/markdown) + (:import-from #:40ants-doc-full/commondoc/markdown) (:import-from #:40ants-doc/source-api #:find-source)) -(in-package #:40ants-doc/locatives/locative) +(in-package #:40ants-doc-full/locatives/locative) (define-locative-type locative (lambda-list) @@ -38,7 +38,7 @@ (find-method #'40ants-doc/locatives/base::locative-lambda-list () `((eql ,symbol)))) -(defmethod 40ants-doc/commondoc/builder::reference-to-commondoc ((symbol symbol) (locative-type (eql 'locative)) locative-args) +(defmethod 40ants-doc-full/commondoc/builder::reference-to-commondoc ((symbol symbol) (locative-type (eql 'locative)) locative-args) (let* ((reference (canonical-reference (40ants-doc/reference::make-reference symbol (cons locative-type locative-args)))) @@ -46,13 +46,13 @@ (arglist (40ants-doc/locatives/base::locative-lambda-list symbol)) (docstring (40ants-doc/docstring:get-docstring method t)) (children (when docstring - (40ants-doc/commondoc/markdown:parse-markdown docstring)))) + (40ants-doc-full/commondoc/markdown:parse-markdown docstring)))) - (40ants-doc/commondoc/bullet:make-bullet reference - :arglist arglist - :ignore-words (list* symbol - (function-arg-names arglist)) - :children children))) + (40ants-doc-full/commondoc/bullet:make-bullet reference + :arglist arglist + :ignore-words (list* symbol + (function-arg-names arglist)) + :children children))) (defmethod locate-and-find-source (symbol (locative-type (eql 'locative)) diff --git a/src/locatives/macro.lisp b/full/locatives/macro.lisp similarity index 62% rename from src/locatives/macro.lisp rename to full/locatives/macro.lisp index 8d012206..b1cdd2db 100644 --- a/src/locatives/macro.lisp +++ b/full/locatives/macro.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/locatives/macro +(uiop:define-package #:40ants-doc-full/locatives/macro (:use #:cl) (:import-from #:40ants-doc/locatives/base #:locate-error @@ -6,18 +6,18 @@ #:define-locative-type) (:import-from #:40ants-doc/reference-api #:canonical-reference) - (:import-from #:40ants-doc/args) + (:import-from #:40ants-doc-full/args) (:import-from #:40ants-doc/reference) (:import-from #:40ants-doc/locatives #:macro) (:import-from #:swank-backend) - (:import-from #:40ants-doc/commondoc/builder) - (:import-from #:40ants-doc/commondoc/bullet) + (:import-from #:40ants-doc-full/commondoc/builder) + (:import-from #:40ants-doc-full/commondoc/bullet) (:import-from #:40ants-doc/docstring) - (:import-from #:40ants-doc/commondoc/markdown) + (:import-from #:40ants-doc-full/commondoc/markdown) (:import-from #:40ants-doc/source-api #:find-source)) -(in-package #:40ants-doc/locatives/macro) +(in-package #:40ants-doc-full/locatives/macro) (define-locative-type macro ()) @@ -29,19 +29,19 @@ (40ants-doc/reference::make-reference symbol (cons locative-type locative-args))) -(defmethod 40ants-doc/commondoc/builder::reference-to-commondoc ((symbol symbol) (locative-type (eql 'macro)) locative-args) +(defmethod 40ants-doc-full/commondoc/builder::reference-to-commondoc ((symbol symbol) (locative-type (eql 'macro)) locative-args) (let* ((reference (canonical-reference (40ants-doc/reference::make-reference symbol (cons locative-type locative-args)))) (arglist (swank-backend:arglist symbol)) (docstring (40ants-doc/docstring:get-docstring symbol 'function)) ;; TODO: we should move text transformation out from get-docstring to after it will be parsed - (children (40ants-doc/commondoc/markdown:parse-markdown docstring))) + (children (40ants-doc-full/commondoc/markdown:parse-markdown docstring))) - (40ants-doc/commondoc/bullet:make-bullet reference - :arglist arglist - :children children - :ignore-words (40ants-doc/args::macro-arg-names arglist)))) + (40ants-doc-full/commondoc/bullet:make-bullet reference + :arglist arglist + :children children + :ignore-words (40ants-doc-full/args::macro-arg-names arglist)))) (defmethod 40ants-doc/locatives/base:locate-and-find-source (symbol (locative-type (eql 'macro)) diff --git a/src/locatives/method.lisp b/full/locatives/method.lisp similarity index 92% rename from src/locatives/method.lisp rename to full/locatives/method.lisp index b187caa1..3fea9d44 100644 --- a/src/locatives/method.lisp +++ b/full/locatives/method.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/locatives/method +(uiop:define-package #:40ants-doc-full/locatives/method (:use #:cl) (:import-from #:40ants-doc/locatives/base #:locate-error @@ -6,21 +6,21 @@ #:define-locative-type) (:import-from #:40ants-doc/reference-api #:canonical-reference) - (:import-from #:40ants-doc/args) + (:import-from #:40ants-doc-full/args) (:import-from #:40ants-doc/reference) ;; NO LINT (:import-from #:swank-mop) (:import-from #:named-readtables) (:import-from #:pythonic-string-reader) - (:import-from #:40ants-doc/commondoc/builder + (:import-from #:40ants-doc-full/commondoc/builder #:to-commondoc) - (:import-from #:40ants-doc/commondoc/bullet + (:import-from #:40ants-doc-full/commondoc/bullet #:make-bullet) - (:import-from #:40ants-doc/commondoc/markdown + (:import-from #:40ants-doc-full/commondoc/markdown #:parse-markdown) (:import-from #:40ants-doc/docstring #:get-docstring)) -(in-package #:40ants-doc/locatives/method) +(in-package #:40ants-doc-full/locatives/method) (named-readtables:in-readtable pythonic-string-reader:pythonic-string-syntax) @@ -79,7 +79,7 @@ (children (when docstring (parse-markdown docstring))) (dislocated-symbols - (40ants-doc/args::function-arg-names arglist)) + (40ants-doc-full/args::function-arg-names arglist)) (reference (canonical-reference obj))) (make-bullet reference diff --git a/src/locatives/package.lisp b/full/locatives/package.lisp similarity index 61% rename from src/locatives/package.lisp rename to full/locatives/package.lisp index ab0ee509..597e609f 100644 --- a/src/locatives/package.lisp +++ b/full/locatives/package.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/locatives/package +(uiop:define-package #:40ants-doc-full/locatives/package (:use #:cl) (:import-from #:40ants-doc/locatives/base #:locate-error @@ -9,11 +9,11 @@ (:import-from #:40ants-doc/reference) (:import-from #:named-readtables) (:import-from #:pythonic-string-reader) - (:import-from #:40ants-doc/commondoc/bullet) - (:import-from #:40ants-doc/commondoc/builder) + (:import-from #:40ants-doc-full/commondoc/bullet) + (:import-from #:40ants-doc-full/commondoc/builder) (:import-from #:40ants-doc/docstring) - (:import-from #:40ants-doc/commondoc/markdown)) -(in-package #:40ants-doc/locatives/package) + (:import-from #:40ants-doc-full/commondoc/markdown)) +(in-package #:40ants-doc-full/locatives/package) (named-readtables:in-readtable pythonic-string-reader:pythonic-string-syntax) @@ -28,12 +28,12 @@ (40ants-doc/reference::make-reference (package-name package) 'package)) -(defmethod 40ants-doc/commondoc/builder:to-commondoc ((package package)) +(defmethod 40ants-doc-full/commondoc/builder:to-commondoc ((package package)) (let* ((reference (canonical-reference package)) (symbol (package-name package)) (docstring (40ants-doc/docstring:get-docstring package t)) (children (when docstring - (40ants-doc/commondoc/markdown:parse-markdown docstring)))) - (40ants-doc/commondoc/bullet:make-bullet reference - :children children - :ignore-words symbol))) + (40ants-doc-full/commondoc/markdown:parse-markdown docstring)))) + (40ants-doc-full/commondoc/bullet:make-bullet reference + :children children + :ignore-words symbol))) diff --git a/src/locatives/restart.lisp b/full/locatives/restart.lisp similarity index 83% rename from src/locatives/restart.lisp rename to full/locatives/restart.lisp index 2d97355c..28924a12 100644 --- a/src/locatives/restart.lisp +++ b/full/locatives/restart.lisp @@ -1,12 +1,12 @@ -(uiop:define-package #:40ants-doc/locatives/restart +(uiop:define-package #:40ants-doc-full/locatives/restart (:use #:cl) (:import-from #:named-readtables) (:import-from #:pythonic-string-reader) (:import-from #:40ants-doc/locatives/define-definer #:define-definer-for-symbol-locative-type) - (:import-from #:40ants-doc/locatives/definers + (:import-from #:40ants-doc-full/locatives/definers #:define-symbol-locative-type)) -(in-package #:40ants-doc/locatives/restart) +(in-package #:40ants-doc-full/locatives/restart) (named-readtables:in-readtable pythonic-string-reader:pythonic-string-syntax) diff --git a/src/locatives/section.lisp b/full/locatives/section.lisp similarity index 92% rename from src/locatives/section.lisp rename to full/locatives/section.lisp index facd3434..920f70d0 100644 --- a/src/locatives/section.lisp +++ b/full/locatives/section.lisp @@ -1,4 +1,4 @@ -(defpackage #:40ants-doc/locatives/section +(uiop:define-package #:40ants-doc-full/locatives/section (:use #:cl) (:import-from #:40ants-doc/reference #:make-reference) @@ -15,7 +15,7 @@ ) (:import-from #:40ants-doc/source-api #:find-source)) -(in-package #:40ants-doc/locatives/section) +(in-package #:40ants-doc-full/locatives/section) (define-locative-type section () diff --git a/src/locatives/slots.lisp b/full/locatives/slots.lisp similarity index 89% rename from src/locatives/slots.lisp rename to full/locatives/slots.lisp index 41200a11..612650e0 100644 --- a/src/locatives/slots.lisp +++ b/full/locatives/slots.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/locatives/slots +(uiop:define-package #:40ants-doc-full/locatives/slots (:use #:cl) (:import-from #:40ants-doc/locatives/base #:locate-and-find-source @@ -8,23 +8,23 @@ (:import-from #:40ants-doc/reference-api #:canonical-reference) (:import-from #:40ants-doc/reference) - (:import-from #:40ants-doc/utils) + (:import-from #:40ants-doc-full/utils) (:import-from #:swank-mop) (:import-from #:40ants-doc/locatives #:accessor #:reader #:writer) - (:import-from #:40ants-doc/commondoc/bullet) - (:import-from #:40ants-doc/commondoc/arglist + (:import-from #:40ants-doc-full/commondoc/bullet) + (:import-from #:40ants-doc-full/commondoc/arglist #:make-arglist) - (:import-from #:40ants-doc/commondoc/markdown) - (:import-from #:40ants-doc/commondoc/builder + (:import-from #:40ants-doc-full/commondoc/markdown) + (:import-from #:40ants-doc-full/commondoc/builder #:reference-to-commondoc) (:import-from #:40ants-doc/docstring #:strip-docstring-indentation) (:import-from #:40ants-doc/source-api #:find-source)) -(in-package #:40ants-doc/locatives/slots) +(in-package #:40ants-doc-full/locatives/slots) (define-locative-type accessor (class-name) @@ -107,7 +107,7 @@ (slot-def (funcall definition-finder symbol (first locative-args))) (initarg-strings (when (swank-mop:slot-definition-initargs slot-def) - (mapcar #'40ants-doc/utils::prin1-and-escape-markdown + (mapcar #'40ants-doc-full/utils::prin1-and-escape-markdown (swank-mop:slot-definition-initargs slot-def)))) (arglist (list (make-arglist locative-args) ;; TODO: make a special node for this kind of data where NAME = SOME-DATA or DEFAULT IS SOME-DATA @@ -116,7 +116,7 @@ (if (swank-mop:slot-definition-initfunction slot-def) (format nil "~A= ~A" (if initarg-strings " " "") - (40ants-doc/utils::prin1-and-escape-markdown + (40ants-doc-full/utils::prin1-and-escape-markdown (swank-mop:slot-definition-initform slot-def))) ""))))) @@ -125,11 +125,11 @@ (when docstring (strip-docstring-indentation docstring))))) (children (when docstring - (40ants-doc/commondoc/markdown:parse-markdown docstring)))) - (40ants-doc/commondoc/bullet:make-bullet reference - :arglist arglist - :children children - :ignore-words symbol))) + (40ants-doc-full/commondoc/markdown:parse-markdown docstring)))) + (40ants-doc-full/commondoc/bullet:make-bullet reference + :arglist arglist + :children children + :ignore-words symbol))) (defmethod reference-to-commondoc ((symbol symbol) (locative-type (eql 'reader)) locative-args) diff --git a/src/locatives/stdout-of.lisp b/full/locatives/stdout-of.lisp similarity index 83% rename from src/locatives/stdout-of.lisp rename to full/locatives/stdout-of.lisp index 1dc8c1af..ebd377ef 100644 --- a/src/locatives/stdout-of.lisp +++ b/full/locatives/stdout-of.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/locatives/stdout-of +(uiop:define-package #:40ants-doc-full/locatives/stdout-of (:use #:cl) (:import-from #:40ants-doc/locatives #:stdout-of) @@ -8,9 +8,9 @@ (:import-from #:40ants-doc/locatives/base #:locate-object #:define-locative-type) - (:import-from #:40ants-doc/commondoc/builder) + (:import-from #:40ants-doc-full/commondoc/builder) (:import-from #:40ants-doc/reference)) -(in-package #:40ants-doc/locatives/stdout-of) +(in-package #:40ants-doc-full/locatives/stdout-of) (named-readtables:in-readtable pythonic-string-reader:pythonic-string-syntax) @@ -45,7 +45,7 @@ (40ants-doc/reference::make-reference symbol (cons locative-type locative-args)))) -(defmethod 40ants-doc/commondoc/builder::reference-to-commondoc ((symbol symbol) (locative-type (eql 'stdout-of)) locative-args) +(defmethod 40ants-doc-full/commondoc/builder::reference-to-commondoc ((symbol symbol) (locative-type (eql 'stdout-of)) locative-args) (destructuring-bind (form &key lang) locative-args diff --git a/src/locatives/structure-accessor.lisp b/full/locatives/structure-accessor.lisp similarity index 67% rename from src/locatives/structure-accessor.lisp rename to full/locatives/structure-accessor.lisp index 55e0ddf2..6d03708c 100644 --- a/src/locatives/structure-accessor.lisp +++ b/full/locatives/structure-accessor.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/locatives/structure-accessor +(uiop:define-package #:40ants-doc-full/locatives/structure-accessor (:use #:cl) (:import-from #:40ants-doc/locatives/base #:locate-and-find-source @@ -12,13 +12,13 @@ (:import-from #:40ants-doc/source-api) (:import-from #:40ants-doc/locatives #:structure-accessor) - (:import-from #:40ants-doc/locatives/utils) - (:import-from #:40ants-doc/commondoc/builder) - (:import-from #:40ants-doc/commondoc/bullet) + (:import-from #:40ants-doc-full/locatives/utils) + (:import-from #:40ants-doc-full/commondoc/builder) + (:import-from #:40ants-doc-full/commondoc/bullet) (:import-from #:40ants-doc/docstring) - (:import-from #:40ants-doc/commondoc/markdown + (:import-from #:40ants-doc-full/commondoc/markdown #:parse-markdown)) -(in-package #:40ants-doc/locatives/structure-accessor) +(in-package #:40ants-doc-full/locatives/structure-accessor) (define-locative-type structure-accessor () @@ -36,7 +36,7 @@ ;; TODO: Maybe support initial value, ;; type and read-only flag. -(defmethod 40ants-doc/commondoc/builder::reference-to-commondoc ((symbol symbol) (locative-type (eql 'structure-accessor)) locative-args) +(defmethod 40ants-doc-full/commondoc/builder::reference-to-commondoc ((symbol symbol) (locative-type (eql 'structure-accessor)) locative-args) (let* ((reference (canonical-reference (40ants-doc/reference::make-reference symbol (cons locative-type locative-args)))) @@ -44,10 +44,10 @@ (children (when docstring (parse-markdown docstring)))) - (40ants-doc/commondoc/bullet::make-bullet reference - :arglist locative-args - :children children - :ignore-words symbol))) + (40ants-doc-full/commondoc/bullet::make-bullet reference + :arglist locative-args + :children children + :ignore-words symbol))) (defmethod locate-and-find-source (symbol @@ -58,6 +58,6 @@ ;; accessor function, so fall back on FIND-ONE-LOCATION. (let ((location (40ants-doc/source-api:find-source (symbol-function symbol)))) (if (eq :error (first location)) - (40ants-doc/locatives/utils::find-one-location (swank-backend:find-definitions symbol) - '("function" "operator")) + (40ants-doc-full/locatives/utils::find-one-location (swank-backend:find-definitions symbol) + '("function" "operator")) location))) diff --git a/src/locatives/symbol-macro.lisp b/full/locatives/symbol-macro.lisp similarity index 64% rename from src/locatives/symbol-macro.lisp rename to full/locatives/symbol-macro.lisp index 021a9329..23596e3f 100644 --- a/src/locatives/symbol-macro.lisp +++ b/full/locatives/symbol-macro.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/locatives/symbol-macro +(uiop:define-package #:40ants-doc-full/locatives/symbol-macro (:use #:cl) (:import-from #:40ants-doc/locatives/base #:locate-and-find-source @@ -12,13 +12,13 @@ (:import-from #:40ants-doc/source-api) (:import-from #:40ants-doc/locatives #:symbol-macro) - (:import-from #:40ants-doc/locatives/utils) - (:import-from #:40ants-doc/commondoc/builder) - (:import-from #:40ants-doc/commondoc/bullet) + (:import-from #:40ants-doc-full/locatives/utils) + (:import-from #:40ants-doc-full/commondoc/builder) + (:import-from #:40ants-doc-full/commondoc/bullet) (:import-from #:40ants-doc/docstring) - (:import-from #:40ants-doc/commondoc/markdown + (:import-from #:40ants-doc-full/commondoc/markdown #:parse-markdown)) -(in-package #:40ants-doc/locatives/symbol-macro) +(in-package #:40ants-doc-full/locatives/symbol-macro) (define-locative-type symbol-macro () "") @@ -31,7 +31,7 @@ (locate-error)) (40ants-doc/reference::make-reference symbol (cons locative-type locative-args))) -(defmethod 40ants-doc/commondoc/builder::reference-to-commondoc ((symbol symbol) (locative-type (eql 'symbol-macro)) locative-args) +(defmethod 40ants-doc-full/commondoc/builder::reference-to-commondoc ((symbol symbol) (locative-type (eql 'symbol-macro)) locative-args) (let* ((reference (canonical-reference (40ants-doc/reference::make-reference symbol (cons locative-type locative-args)))) @@ -39,10 +39,10 @@ (children (when docstring (parse-markdown docstring)))) - (40ants-doc/commondoc/bullet::make-bullet reference - :arglist locative-args - :children children - :ignore-words symbol))) + (40ants-doc-full/commondoc/bullet::make-bullet reference + :arglist locative-args + :children children + :ignore-words symbol))) (defmethod locate-and-find-source (symbol (locative-type (eql 'symbol-macro)) @@ -52,7 +52,7 @@ ;; accessor function, so fall back on FIND-ONE-LOCATION. (let ((location (40ants-doc/source-api::find-source (symbol-function symbol)))) (if (eq :error (first location)) - (40ants-doc/locatives/utils::find-one-location (swank-backend:find-definitions symbol) - '("function" "operator")) + (40ants-doc-full/locatives/utils::find-one-location (swank-backend:find-definitions symbol) + '("function" "operator")) location))) diff --git a/src/locatives/type.lisp b/full/locatives/type.lisp similarity index 61% rename from src/locatives/type.lisp rename to full/locatives/type.lisp index 554072f6..61dd214a 100644 --- a/src/locatives/type.lisp +++ b/full/locatives/type.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/locatives/type +(uiop:define-package #:40ants-doc-full/locatives/type (:use #:cl) (:import-from #:40ants-doc/locatives/base #:locate-and-find-source @@ -7,12 +7,12 @@ #:define-locative-type) (:import-from #:40ants-doc/reference) (:import-from #:swank-backend) - (:import-from #:40ants-doc/locatives/utils) - (:import-from #:40ants-doc/commondoc/builder) - (:import-from #:40ants-doc/commondoc/bullet) + (:import-from #:40ants-doc-full/locatives/utils) + (:import-from #:40ants-doc-full/commondoc/builder) + (:import-from #:40ants-doc-full/commondoc/bullet) (:import-from #:40ants-doc/docstring) - (:import-from #:40ants-doc/commondoc/markdown)) -(in-package #:40ants-doc/locatives/type) + (:import-from #:40ants-doc-full/commondoc/markdown)) +(in-package #:40ants-doc-full/locatives/type) (define-locative-type type () @@ -32,22 +32,22 @@ ;; ;; Type-specifier documentation: Very small integer, less or equal than 3. ;; Type-specifier expansion: (AND INTEGER (SATISFIES A-FEW-P)) -(defmethod 40ants-doc/commondoc/builder::reference-to-commondoc ((symbol symbol) (locative-type (eql 'type)) locative-args) +(defmethod 40ants-doc-full/commondoc/builder::reference-to-commondoc ((symbol symbol) (locative-type (eql 'type)) locative-args) (let* ((reference (40ants-doc/reference:make-reference symbol (cons locative-type locative-args))) (arglist (swank-backend:type-specifier-arglist symbol)) (docstring (40ants-doc/docstring:get-docstring symbol 'type)) (children (when docstring - (40ants-doc/commondoc/markdown:parse-markdown docstring)))) + (40ants-doc-full/commondoc/markdown:parse-markdown docstring)))) - (40ants-doc/commondoc/bullet:make-bullet reference - :arglist arglist - :children children - :ignore-words symbol))) + (40ants-doc-full/commondoc/bullet:make-bullet reference + :arglist arglist + :children children + :ignore-words symbol))) (defmethod locate-and-find-source (symbol (locative-type (eql 'type)) locative-args) (declare (ignore locative-args)) - (40ants-doc/locatives/utils::find-one-location (swank-backend:find-definitions symbol) - '("type" "class"))) + (40ants-doc-full/locatives/utils::find-one-location (swank-backend:find-definitions symbol) + '("type" "class"))) diff --git a/src/locatives/utils.lisp b/full/locatives/utils.lisp similarity index 95% rename from src/locatives/utils.lisp rename to full/locatives/utils.lisp index b2b3bc22..203860af 100644 --- a/src/locatives/utils.lisp +++ b/full/locatives/utils.lisp @@ -1,7 +1,7 @@ -(defpackage #:40ants-doc/locatives/utils +(uiop:define-package #:40ants-doc-full/locatives/utils (:use #:cl) (:import-from #:str)) -(in-package #:40ants-doc/locatives/utils) +(in-package #:40ants-doc-full/locatives/utils) ;;; A utility for writing FIND-SOURCE methods. Try FILTER-STRINGS one ;;; by one, and if one matches exactly one of LOCATIONS, then return diff --git a/src/locatives/variable.lisp b/full/locatives/variable.lisp similarity index 62% rename from src/locatives/variable.lisp rename to full/locatives/variable.lisp index 9ce29d28..3641fad9 100644 --- a/src/locatives/variable.lisp +++ b/full/locatives/variable.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/locatives/variable +(uiop:define-package #:40ants-doc-full/locatives/variable (:use #:cl) (:import-from #:40ants-doc/locatives/base #:locate-and-find-source @@ -8,15 +8,15 @@ (:import-from #:40ants-doc/reference-api #:canonical-reference) (:import-from #:40ants-doc/reference) - (:import-from #:40ants-doc/utils) + (:import-from #:40ants-doc-full/utils) (:import-from #:swank-backend) - (:import-from #:40ants-doc/locatives/utils) - (:import-from #:40ants-doc/commondoc/builder) - (:import-from #:40ants-doc/commondoc/bullet) + (:import-from #:40ants-doc-full/locatives/utils) + (:import-from #:40ants-doc-full/commondoc/builder) + (:import-from #:40ants-doc-full/commondoc/bullet) (:import-from #:40ants-doc/docstring) - (:import-from #:40ants-doc/commondoc/markdown + (:import-from #:40ants-doc-full/commondoc/markdown #:parse-markdown)) -(in-package #:40ants-doc/locatives/variable) +(in-package #:40ants-doc-full/locatives/variable) (define-locative-type variable (&optional initform) @@ -28,14 +28,14 @@ (40ants-doc/reference:make-reference symbol (cons locative-type locative-args))) -(defmethod 40ants-doc/commondoc/builder:reference-to-commondoc ((symbol symbol) (locative-type (eql 'variable)) locative-args) +(defmethod 40ants-doc-full/commondoc/builder:reference-to-commondoc ((symbol symbol) (locative-type (eql 'variable)) locative-args) (destructuring-bind (&optional (initform nil initformp)) locative-args (let* ((reference (canonical-reference (40ants-doc/reference:make-reference symbol (cons locative-type locative-args)))) (docstring (40ants-doc/docstring:get-docstring symbol 'variable)) - (arglist (multiple-value-bind (value unboundp) (40ants-doc/utils::symbol-global-value symbol) + (arglist (multiple-value-bind (value unboundp) (40ants-doc-full/utils::symbol-global-value symbol) (cond (initformp (prin1-to-string initform)) (unboundp "-unbound-") @@ -44,16 +44,16 @@ (children (when docstring (parse-markdown docstring)))) - (40ants-doc/commondoc/bullet:make-bullet reference - :arglist arglist - :children children - :dislocated-symbols symbol)))) + (40ants-doc-full/commondoc/bullet:make-bullet reference + :arglist arglist + :children children + :dislocated-symbols symbol)))) (defmethod locate-and-find-source (symbol (locative-type (eql 'variable)) locative-args) (declare (ignore locative-args)) - (40ants-doc/locatives/utils::find-one-location (swank-backend:find-definitions symbol) - '("variable" "defvar" "defparameter" - "special-declaration"))) + (40ants-doc-full/locatives/utils::find-one-location (swank-backend:find-definitions symbol) + '("variable" "defvar" "defparameter" + "special-declaration"))) (defvar end-of-variable-example) diff --git a/src/markdown.lisp b/full/markdown.lisp similarity index 96% rename from src/markdown.lisp rename to full/markdown.lisp index 33ec0e54..a59b7f12 100644 --- a/src/markdown.lisp +++ b/full/markdown.lisp @@ -1,11 +1,10 @@ -(uiop:define-package #:40ants-doc/markdown +(uiop:define-package #:40ants-doc-full/markdown (:use #:cl) (:import-from #:40ants-doc/core #:defsection) - (:import-from #:40ants-doc/utils) (:import-from #:named-readtables) (:import-from #:pythonic-string-reader)) -(in-package #:40ants-doc/markdown) +(in-package #:40ants-doc-full/markdown) (named-readtables:in-readtable pythonic-string-reader:pythonic-string-syntax) diff --git a/src/object-package-impl.lisp b/full/object-package-impl.lisp similarity index 87% rename from src/object-package-impl.lisp rename to full/object-package-impl.lisp index 1cb596c3..694b11f8 100644 --- a/src/object-package-impl.lisp +++ b/full/object-package-impl.lisp @@ -1,4 +1,4 @@ -(defpackage #:40ants-doc/object-package-impl +(uiop:define-package #:40ants-doc-full/object-package-impl (:use #:cl) (:import-from #:40ants-doc/object-package #:object-package) @@ -6,8 +6,8 @@ (:import-from #:closer-mop ;; NO-LINT #:generic-function-name) - (:import-from #:40ants-doc/utils)) -(in-package #:40ants-doc/object-package-impl) + (:import-from #:40ants-doc-full/utils)) +(in-package #:40ants-doc-full/object-package-impl) (defmethod object-package ((object t)) @@ -45,7 +45,7 @@ (getf (getf swank-response :location) :file)) (package (when filename - (40ants-doc/utils::file-package filename)))) + (40ants-doc-full/utils::file-package filename)))) (if package package (call-next-method)))) diff --git a/src/page.lisp b/full/page.lisp similarity index 88% rename from src/page.lisp rename to full/page.lisp index bad9b1bc..82de4f7c 100644 --- a/src/page.lisp +++ b/full/page.lisp @@ -1,13 +1,13 @@ -(uiop:define-package #:40ants-doc/page +(uiop:define-package #:40ants-doc-full/page (:use #:cl) (:import-from #:40ants-doc #:section-title #:section-name) (:import-from #:40ants-doc/object-package) - (:import-from #:40ants-doc/commondoc/builder) + (:import-from #:40ants-doc-full/commondoc/builder) ;; TODO: solve circular dependency :( - ;; (:import-from #:40ants-doc/commondoc/page) - (:import-from #:40ants-doc/commondoc/format + ;; (:import-from #:40ants-doc-full/commondoc/page) + (:import-from #:40ants-doc-full/commondoc/format #:ensure-format-class-name) (:import-from #:str #:title-case) @@ -19,7 +19,7 @@ #:page-base-url #:page-sections #:page-title)) -(in-package #:40ants-doc/page) +(in-package #:40ants-doc-full/page) (defclass page-common-mixin () @@ -106,9 +106,9 @@ (t (make-page obj)))) -(defmethod 40ants-doc/commondoc/builder:to-commondoc ((obj page)) - (uiop:symbol-call :40ants-doc/commondoc/page :make-page - (mapcar #'40ants-doc/commondoc/builder:to-commondoc +(defmethod 40ants-doc-full/commondoc/builder:to-commondoc ((obj page)) + (uiop:symbol-call :40ants-doc-full/commondoc/page :make-page + (mapcar #'40ants-doc-full/commondoc/builder:to-commondoc (page-sections obj)) (base-filename obj) :title (page-title obj) diff --git a/src/render/args.lisp b/full/render/args.lisp similarity index 73% rename from src/render/args.lisp rename to full/render/args.lisp index 6fef2bb7..62c98e7f 100644 --- a/src/render/args.lisp +++ b/full/render/args.lisp @@ -1,7 +1,7 @@ -(defpackage #:40ants-doc/render/args +(uiop:define-package #:40ants-doc-full/render/args (:use #:cl) - (:import-from #:40ants-doc/utils)) -(in-package #:40ants-doc/render/args) + (:import-from #:40ants-doc-full/utils)) +(in-package #:40ants-doc-full/render/args) (defun arglist-to-string (arglist) @@ -21,7 +21,7 @@ (*print-pretty* t) (*print-right-margin* nil)) (labels ((resolve* (object) - (40ants-doc/utils::prin1-and-escape-markdown object)) + (40ants-doc-full/utils::prin1-and-escape-markdown object)) (foo (arglist level) (unless (= level 0) (format out "(")) @@ -32,22 +32,22 @@ (cond ((member arg '(&key &optional &rest &body)) (setq seen-special-p t) (format out "~A" - (40ants-doc/utils::prin1-and-escape-markdown arg))) + (40ants-doc-full/utils::prin1-and-escape-markdown arg))) ((symbolp arg) (format out "~A" - (40ants-doc/utils::escape-markdown + (40ants-doc-full/utils::escape-markdown (symbol-name arg)))) ((atom arg) (format out "~A" - (40ants-doc/utils::prin1-and-escape-markdown arg))) + (40ants-doc-full/utils::prin1-and-escape-markdown arg))) (seen-special-p (if (symbolp (first arg)) (format out "(~A~{ ~A~})" - (40ants-doc/utils::escape-markdown + (40ants-doc-full/utils::escape-markdown (symbol-name (first arg))) (mapcar #'resolve* (rest arg))) (format out "~A" - (40ants-doc/utils::prin1-and-escape-markdown arg)))) + (40ants-doc-full/utils::prin1-and-escape-markdown arg)))) (t (foo arg (1+ level))))) (unless (= level 0) diff --git a/src/rewrite.lisp b/full/rewrite.lisp similarity index 91% rename from src/rewrite.lisp rename to full/rewrite.lisp index 86e9bee3..6dfdf6a7 100644 --- a/src/rewrite.lisp +++ b/full/rewrite.lisp @@ -1,10 +1,10 @@ -(defpackage #:40ants-doc/rewrite +(uiop:define-package #:40ants-doc-full/rewrite (:use #:cl) (:import-from #:cl-ppcre #:regex-replace) (:import-from #:str #:ends-with-p)) -(in-package #:40ants-doc/rewrite) +(in-package #:40ants-doc-full/rewrite) (defvar *clean-urls* t) diff --git a/src/search.lisp b/full/search.lisp similarity index 87% rename from src/search.lisp rename to full/search.lisp index 81af564f..9ed5ac06 100644 --- a/src/search.lisp +++ b/full/search.lisp @@ -1,21 +1,21 @@ -(uiop:define-package #:40ants-doc/search +(uiop:define-package #:40ants-doc-full/search (:use #:cl) - (:import-from #:40ants-doc/commondoc/mapper + (:import-from #:40ants-doc-full/commondoc/mapper #:map-nodes) - (:import-from #:40ants-doc/commondoc/section) - (:import-from #:40ants-doc/commondoc/page) - (:import-from #:40ants-doc/page) - (:import-from #:40ants-doc/utils) + (:import-from #:40ants-doc-full/commondoc/section) + (:import-from #:40ants-doc-full/commondoc/page) + (:import-from #:40ants-doc-full/page) + (:import-from #:40ants-doc-full/utils) (:import-from #:40ants-doc/locatives) (:import-from #:common-html) (:import-from #:stem) (:import-from #:str) (:import-from #:jonathan) - (:import-from #:40ants-doc/commondoc/bullet + (:import-from #:40ants-doc-full/commondoc/bullet #:bullet) - (:import-from #:40ants-doc/commondoc/format + (:import-from #:40ants-doc-full/commondoc/format #:with-format) - (:import-from #:40ants-doc/commondoc/piece + (:import-from #:40ants-doc-full/commondoc/piece #:doc-reference) (:import-from #:40ants-doc/reference #:reference-locative @@ -25,7 +25,7 @@ (:import-from #:common-doc) (:import-from #:common-doc.ops #:collect-all-text)) -(in-package #:40ants-doc/search) +(in-package #:40ants-doc-full/search) (defun objects-to-alist (hash) @@ -91,7 +91,7 @@ (document-idx -1)) (labels ((first-section (page) (loop for child in (common-doc:children page) - when (typep child '40ants-doc/commondoc/section:documentation-section) + when (typep child '40ants-doc-full/commondoc/section:documentation-section) do (return child))) (process (node) (typecase node @@ -132,8 +132,8 @@ node) (go-down (node) (typecase node - (40ants-doc/commondoc/page:page - (when (member (40ants-doc/page:page-format node) + (40ants-doc-full/commondoc/page:page + (when (member (40ants-doc-full/page:page-format node) (list 'common-html:html nil)) (setf current-page node) (incf document-idx) @@ -146,17 +146,17 @@ ;; refer to documents like /index.html. We can't use paths ;; starting from / because this will not work for static ;; documentation on local computer. - (push (40ants-doc/utils:make-relative-path (40ants-doc/page:base-filename page) - (40ants-doc/page:base-filename node)) + (push (40ants-doc-full/utils:make-relative-path (40ants-doc-full/page:base-filename page) + (40ants-doc-full/page:base-filename node)) docnames) - (push (40ants-doc/commondoc/page:full-filename node - :from page) + (push (40ants-doc-full/commondoc/page:full-filename node + :from page) filenames)))) node) (go-up (node) (typecase node - (40ANTS-DOC/COMMONDOC/PAGE:PAGE - (when (member (40ants-doc/page:page-format node) + (40ants-doc-full/commondoc/page:page + (when (member (40ants-doc-full/page:page-format node) (list 'common-html:html nil)) (setf current-page nil)))) node)) diff --git a/src/source.lisp b/full/source.lisp similarity index 92% rename from src/source.lisp rename to full/source.lisp index 2916b66b..a550ddea 100644 --- a/src/source.lisp +++ b/full/source.lisp @@ -1,4 +1,4 @@ -(uiop:define-package #:40ants-doc/source +(uiop:define-package #:40ants-doc-full/source (:use #:cl) (:import-from #:40ants-doc/source-api #:find-source) @@ -6,7 +6,7 @@ (:import-from #:swank) (:import-from #:named-readtables) (:import-from #:pythonic-string-reader)) -(in-package #:40ants-doc/source) +(in-package #:40ants-doc-full/source) (named-readtables:in-readtable pythonic-string-reader:pythonic-string-syntax) diff --git a/src/swank.lisp b/full/swank.lisp similarity index 96% rename from src/swank.lisp rename to full/swank.lisp index f13aef4c..7d42e0b6 100644 --- a/src/swank.lisp +++ b/full/swank.lisp @@ -1,16 +1,16 @@ -(uiop:define-package #:40ants-doc/swank +(uiop:define-package #:40ants-doc-full/swank (:use #:cl) (:import-from #:swank) (:import-from #:alexandria) (:import-from #:named-readtables) (:import-from #:pythonic-string-reader) - (:import-from #:40ants-doc/utils) + (:import-from #:40ants-doc-full/utils) (:import-from #:40ants-doc/source-api) (:import-from #:40ants-doc/docstring #:trim-whitespace) (:export #:locate-definition-for-emacs)) -(in-package #:40ants-doc/swank) +(in-package #:40ants-doc-full/swank) (named-readtables:in-readtable pythonic-string-reader:pythonic-string-syntax) @@ -98,7 +98,7 @@ (char= #\()) ;; Looks like a list. The first element must be an ;; interned symbol naming a locative. - (let ((delimiter-pos (position-if #'40ants-doc/utils::delimiterp string + (let ((delimiter-pos (position-if #'40ants-doc-full/utils::delimiterp string :start (1+ first-char-pos)))) (multiple-value-bind (symbol found) (swank::parse-symbol diff --git a/src/themes/api.lisp b/full/themes/api.lisp similarity index 97% rename from src/themes/api.lisp rename to full/themes/api.lisp index 43605556..dbd09f06 100644 --- a/src/themes/api.lisp +++ b/full/themes/api.lisp @@ -1,6 +1,6 @@ -(uiop:define-package #:40ants-doc/themes/api +(uiop:define-package #:40ants-doc-full/themes/api (:use #:cl) - (:import-from #:40ants-doc/highlight + (:import-from #:40ants-doc-full/highlight #:download-highlight-js) (:import-from #:alexandria #:once-only) @@ -18,7 +18,7 @@ #:render-page-footer #:highlight-languages #:highlight-theme)) -(in-package #:40ants-doc/themes/api) +(in-package #:40ants-doc-full/themes/api) (defvar *theme*) diff --git a/src/themes/dark.lisp b/full/themes/dark.lisp similarity index 74% rename from src/themes/dark.lisp rename to full/themes/dark.lisp index e4b30255..3e8b4dab 100644 --- a/src/themes/dark.lisp +++ b/full/themes/dark.lisp @@ -1,17 +1,17 @@ -(defpackage #:40ants-doc/themes/dark +(uiop:define-package #:40ants-doc-full/themes/dark (:use #:cl) - (:import-from #:40ants-doc/themes/default + (:import-from #:40ants-doc-full/themes/default #:default-theme) (:import-from #:lass) - (:import-from #:40ants-doc/themes/api) + (:import-from #:40ants-doc-full/themes/api) (:export #:dark-theme)) -(in-package #:40ants-doc/themes/dark) +(in-package #:40ants-doc-full/themes/dark) (defclass dark-theme (default-theme) ()) -(defmethod 40ants-doc/themes/api:render-css ((theme dark-theme)) +(defmethod 40ants-doc-full/themes/api:render-css ((theme dark-theme)) (let ((background "#333") (font-color "#FFFEFB")) (concatenate @@ -45,5 +45,5 @@ ((.toc-active > a) :color ,background))))))) -(defmethod 40ants-doc/themes/api:highlight-theme ((theme dark-theme)) +(defmethod 40ants-doc-full/themes/api:highlight-theme ((theme dark-theme)) "atom-one-dark") diff --git a/src/themes/default.lisp b/full/themes/default.lisp similarity index 79% rename from src/themes/default.lisp rename to full/themes/default.lisp index ff826c56..3831e95c 100644 --- a/src/themes/default.lisp +++ b/full/themes/default.lisp @@ -1,17 +1,17 @@ -(uiop:define-package #:40ants-doc/themes/default +(uiop:define-package #:40ants-doc-full/themes/default (:use #:cl) (:import-from #:common-html.emitter) - (:import-from #:40ants-doc/themes/api + (:import-from #:40ants-doc-full/themes/api #:render-css) (:import-from #:lass) - (:import-from #:40ants-doc/commondoc/html + (:import-from #:40ants-doc-full/commondoc/html #:with-html) - (:import-from #:40ants-doc/utils + (:import-from #:40ants-doc-full/utils #:make-relative-path) - (:import-from #:40ants-doc/rewrite) - (:import-from #:40ants-doc/commondoc/changelog) + (:import-from #:40ants-doc-full/rewrite) + (:import-from #:40ants-doc-full/commondoc/changelog) (:export #:default-theme)) -(in-package #:40ants-doc/themes/default) +(in-package #:40ants-doc-full/themes/default) (defclass default-theme () @@ -302,40 +302,40 @@ (.unresolved-reference :color magenta)))) -(defmethod 40ants-doc/themes/api:highlight-languages ((theme default-theme)) +(defmethod 40ants-doc-full/themes/api:highlight-languages ((theme default-theme)) '("lisp" "bash" "css" "json" "yaml" "plaintext" "xml" "markdown")) -(defmethod 40ants-doc/themes/api:highlight-theme ((theme default-theme)) +(defmethod 40ants-doc-full/themes/api:highlight-theme ((theme default-theme)) "atom-one-dark") -(defmethod 40ants-doc/themes/api:render-page ((theme default-theme) uri title - &key toc content) +(defmethod 40ants-doc-full/themes/api:render-page ((theme default-theme) uri title + &key toc content) (with-html (:html (:head - (40ants-doc/themes/api:render-html-head theme uri title)) + (40ants-doc-full/themes/api:render-html-head theme uri title)) (:body (:div :class "page" - (40ants-doc/themes/api:render-page-header theme uri title) - (40ants-doc/themes/api:render-sidebar theme uri toc) - (40ants-doc/themes/api:render-content theme uri toc content) - (40ants-doc/themes/api:render-page-footer theme uri)))))) + (40ants-doc-full/themes/api:render-page-header theme uri title) + (40ants-doc-full/themes/api:render-sidebar theme uri toc) + (40ants-doc-full/themes/api:render-content theme uri toc content) + (40ants-doc-full/themes/api:render-page-footer theme uri)))))) -(defmethod 40ants-doc/themes/api:render-page-header ((theme default-theme) uri title) +(defmethod 40ants-doc-full/themes/api:render-page-header ((theme default-theme) uri title) (declare (ignore uri title))) -(defmethod 40ants-doc/themes/api:render-page-footer ((theme default-theme) uri) +(defmethod 40ants-doc-full/themes/api:render-page-footer ((theme default-theme) uri) (declare (ignore uri))) -(defmethod 40ants-doc/themes/api:render-html-head ((theme default-theme) uri title) +(defmethod 40ants-doc-full/themes/api:render-html-head ((theme default-theme) uri title) (let ((theme-uri (make-relative-path uri "theme.css")) (highlight-css-uri (make-relative-path uri "highlight.min.css")) (highlight-js-uri (make-relative-path uri "highlight.min.js")) (jquery-uri (make-relative-path uri "jquery.js")) (toc-js-uri (make-relative-path uri "toc.js")) - (rss-url (40ants-doc/commondoc/changelog::get-changelog-rss-url))) + (rss-url (40ants-doc-full/commondoc/changelog::get-changelog-rss-url))) (with-html (:meta :name "viewport" :content "width=device-width, initial-scale=1") @@ -379,7 +379,7 @@ (:raw "$(document).ready(function() {$('a:has(img)').css('border-bottom', 'none')})"))))) -(defmethod 40ants-doc/themes/api:render-content ((theme default-theme) uri toc content-func) +(defmethod 40ants-doc-full/themes/api:render-content ((theme default-theme) uri toc content-func) (declare (ignore uri toc)) (with-html (:div :class "content" @@ -391,18 +391,18 @@ (funcall content-func))))) -(defmethod 40ants-doc/themes/api:render-sidebar ((theme default-theme) uri toc) +(defmethod 40ants-doc-full/themes/api:render-sidebar ((theme default-theme) uri toc) (with-html (:div :class "sidebar" - (40ants-doc/themes/api:render-sidebar-header theme uri toc) - (40ants-doc/themes/api:render-sidebar-content theme uri toc) - (40ants-doc/themes/api:render-sidebar-footer theme uri toc)))) + (40ants-doc-full/themes/api:render-sidebar-header theme uri toc) + (40ants-doc-full/themes/api:render-sidebar-content theme uri toc) + (40ants-doc-full/themes/api:render-sidebar-footer theme uri toc)))) -(defmethod 40ants-doc/themes/api:render-search-form ((theme default-theme) uri toc) +(defmethod 40ants-doc-full/themes/api:render-search-form ((theme default-theme) uri toc) (with-html (:form :method "GET" - :action (40ants-doc/rewrite::rewrite-url + :action (40ants-doc-full/rewrite::rewrite-url (make-relative-path uri "search/index.html")) :class "search" (:input :type "text" @@ -412,25 +412,25 @@ (:span :id "search-progress")))) -(defmethod 40ants-doc/themes/api:render-toc ((theme default-theme) uri toc) +(defmethod 40ants-doc-full/themes/api:render-toc ((theme default-theme) uri toc) (with-html (:div :class "page-toc" (common-html.emitter::emit toc)))) -(defmethod 40ants-doc/themes/api:render-sidebar-header ((theme default-theme) uri toc) +(defmethod 40ants-doc-full/themes/api:render-sidebar-header ((theme default-theme) uri toc) (with-html (:div :class "header" - (40ants-doc/themes/api:render-search-form theme uri toc)))) + (40ants-doc-full/themes/api:render-search-form theme uri toc)))) -(defmethod 40ants-doc/themes/api:render-sidebar-content ((theme default-theme) uri toc) +(defmethod 40ants-doc-full/themes/api:render-sidebar-content ((theme default-theme) uri toc) (with-html (:div :class "content" - (40ants-doc/themes/api:render-toc theme uri toc)))) + (40ants-doc-full/themes/api:render-toc theme uri toc)))) -(defmethod 40ants-doc/themes/api:render-sidebar-footer ((theme default-theme) uri toc) +(defmethod 40ants-doc-full/themes/api:render-sidebar-footer ((theme default-theme) uri toc) (declare (ignore uri toc)) (with-html (:div :class "footer" diff --git a/src/themes/docs.lisp b/full/themes/docs.lisp similarity index 73% rename from src/themes/docs.lisp rename to full/themes/docs.lisp index 6f338f07..c5874a58 100644 --- a/src/themes/docs.lisp +++ b/full/themes/docs.lisp @@ -1,6 +1,6 @@ -(uiop:define-package #:40ants-doc/themes/docs +(uiop:define-package #:40ants-doc-full/themes/docs (:use #:cl) - (:import-from #:40ants-doc/themes/api + (:import-from #:40ants-doc-full/themes/api #:render-css #:render-page #:render-html-head @@ -13,18 +13,12 @@ #:render-sidebar-content #:render-toc #:render-search-form) - (:import-from #:lass) - (:import-from #:40ants-doc/commondoc/html - #:with-html) - (:import-from #:40ants-doc/utils - #:make-relative-path) - (:import-from #:40ants-doc/rewrite) (:import-from #:40ants-doc #:defsection) - (:import-from #:40ants-doc/themes/default) - (:import-from #:40ants-doc/themes/light) - (:import-from #:40ants-doc/themes/dark)) -(in-package #:40ants-doc/themes/docs) + (:import-from #:40ants-doc-full/themes/default) + (:import-from #:40ants-doc-full/themes/light) + (:import-from #:40ants-doc-full/themes/dark)) +(in-package #:40ants-doc-full/themes/docs) (defsection @defining-a-theme (:title "Defining a Custom Theme" @@ -32,11 +26,11 @@ "40A")) "Out of the box, 40ANTS-DOC system supports three color themes: - - 40ANTS-DOC/THEMES/DEFAULT:DEFAULT-THEME - - 40ANTS-DOC/THEMES/LIGHT:LIGHT-THEME - - 40ANTS-DOC/THEMES/DARK:DARK-THEME + - 40ANTS-DOC-FULL/THEMES/DEFAULT:DEFAULT-THEME + - 40ANTS-DOC-FULL/THEMES/LIGHT:LIGHT-THEME + - 40ANTS-DOC-FULL/THEMES/DARK:DARK-THEME - You can pass these names as THEME argument to the 40ANTS-DOC/BUILDER:RENDER-TO-FILES + You can pass these names as THEME argument to the 40ANTS-DOC-FULL/BUILDER:RENDER-TO-FILES function. Or you can define your own theme. Theme allows to control HTML page rendering, colors and code highlighting. @@ -50,7 +44,7 @@ (defclass my-theme (default-theme) ()) - (defmethod 40ants-doc/themes/api:render-css ((theme my-theme)) + (defmethod 40ants-doc-full/themes/api:render-css ((theme my-theme)) (concatenate 'string (call-next-method) @@ -63,7 +57,7 @@ Also you might want to redefine a color theme for code highlighter: ``` - (defmethod 40ants-doc/themes/api:highlight-theme ((theme my-theme)) + (defmethod 40ants-doc-full/themes/api:highlight-theme ((theme my-theme)) \"atom-one-light\") ``` @@ -71,7 +65,7 @@ languages to highlight: ```lisp - (defmethod 40ants-doc/themes/api:highlight-languages ((theme my-theme)) + (defmethod 40ants-doc-full/themes/api:highlight-languages ((theme my-theme)) (list \"lisp\" \"python\" \"bash\")) @@ -83,7 +77,7 @@ RENDER-PAGE generic-function. It calls all other rendering functions. - If you are inheriting your theme class from 40ANTS-DOC/THEMES/DEFAULT:DEFAULT-THEME, + If you are inheriting your theme class from 40ANTS-DOC-FULL/THEMES/DEFAULT:DEFAULT-THEME, then rendering functions will be called in the following order: ![Page Rendering Flow](static/rendering.png{width=600}) @@ -113,16 +107,16 @@ ## Available Themes" - (40ants-doc/themes/default:default-theme class) - (40ants-doc/themes/light:light-theme class) - (40ants-doc/themes/dark:dark-theme class) + (40ants-doc-full/themes/default:default-theme class) + (40ants-doc-full/themes/light:light-theme class) + (40ants-doc-full/themes/dark:dark-theme class) "## Theme Definition Protocol" - (40ants-doc/themes/api:highlight-languages generic-function) - (40ants-doc/themes/api:highlight-theme generic-function) + (40ants-doc-full/themes/api:highlight-languages generic-function) + (40ants-doc-full/themes/api:highlight-theme generic-function) - (40ants-doc/themes/api:render-css generic-function) + (40ants-doc-full/themes/api:render-css generic-function) (render-page generic-function) (render-html-head generic-function) diff --git a/src/themes/light.lisp b/full/themes/light.lisp similarity index 69% rename from src/themes/light.lisp rename to full/themes/light.lisp index 7635f592..850a4c21 100644 --- a/src/themes/light.lisp +++ b/full/themes/light.lisp @@ -1,17 +1,17 @@ -(defpackage #:40ants-doc/themes/light +(uiop:define-package #:40ants-doc-full/themes/light (:use #:cl) - (:import-from #:40ants-doc/themes/default + (:import-from #:40ants-doc-full/themes/default #:default-theme) (:import-from #:lass) - (:import-from #:40ants-doc/themes/api) + (:import-from #:40ants-doc-full/themes/api) (:export #:light-theme)) -(in-package #:40ants-doc/themes/light) +(in-package #:40ants-doc-full/themes/light) (defclass light-theme (default-theme) ()) -(defmethod 40ants-doc/themes/api:render-css ((theme light-theme)) +(defmethod 40ants-doc-full/themes/api:render-css ((theme light-theme)) (let ((background "#FFFEFB") (font-color "#333")) (concatenate @@ -38,6 +38,6 @@ ((.toc-active > a) :color ,background))))))) -(defmethod 40ants-doc/themes/api:highlight-theme ((theme light-theme)) +(defmethod 40ants-doc-full/themes/api:highlight-theme ((theme light-theme)) "atom-one-light") diff --git a/src/transcribe.lisp b/full/transcribe.lisp similarity index 99% rename from src/transcribe.lisp rename to full/transcribe.lisp index eab56eb6..baba35b4 100644 --- a/src/transcribe.lisp +++ b/full/transcribe.lisp @@ -11,20 +11,20 @@ ;;;; ;;;; - capture conditions signalled? -(uiop:define-package #:40ants-doc/transcribe +(uiop:define-package #:40ants-doc-full/transcribe (:use #:cl) (:import-from #:40ants-doc/core #:defsection) (:import-from #:named-readtables) (:import-from #:pythonic-string-reader) - (:import-from #:40ants-doc/utils + (:import-from #:40ants-doc-full/utils #:write-prefixed-lines #:read-prefixed-lines #:read-line*) (:import-from #:40ants-doc/docstring #:whitespacep) (:import-from #:40ants-doc/reference) - ;; (:import-from #:40ants-doc/page) + ;; (:import-from #:40ants-doc-full/page) (:import-from #:swank) (:import-from #:slynk) (:import-from #:alexandria @@ -37,7 +37,7 @@ #:transcription-output-consistency-error #:transcription-values-consistency-error #:transcription-error)) -(in-package #:40ants-doc/transcribe) +(in-package #:40ants-doc-full/transcribe) (named-readtables:in-readtable pythonic-string-reader:pythonic-string-syntax) @@ -1115,7 +1115,7 @@ `C-u 0 40ants-doc-retranscribe-region` will turn commented into non-commented markup. In general, the numeric prefix argument is the - index of the syntax to be used in 40ANTS-DOC/TRANSCRIBE:*SYNTAXES*. Without a + index of the syntax to be used in 40ANTS-DOC-FULL/TRANSCRIBE:*SYNTAXES*. Without a prefix argument `40ants-doc-retranscribe-region` will not change the markup style. @@ -1154,10 +1154,10 @@ Emacs buffer." default-syntax*))))) (with-buffer-syntax () (multiple-value-bind (string prefix) - (40ants-doc/utils::strip-longest-common-prefix + (40ants-doc-full/utils::strip-longest-common-prefix string "; " :first-line-special-p first-line-special-p) (let ((transcript - (40ants-doc/utils::prefix-lines + (40ants-doc-full/utils::prefix-lines prefix (transcribe string nil :default-syntax default-syntax diff --git a/tutorial.lisp b/full/tutorial.lisp similarity index 98% rename from tutorial.lisp rename to full/tutorial.lisp index 33b6bdfb..74d387a7 100644 --- a/tutorial.lisp +++ b/full/tutorial.lisp @@ -1,4 +1,5 @@ (uiop:define-package #:foo-random + (:nicknames #:40ants-doc-full/tutorial) (:documentation "This package provides various utilities for random. See @FOO-RANDOM-MANUAL.") (:use #:common-lisp diff --git a/src/utils.lisp b/full/utils.lisp similarity index 98% rename from src/utils.lisp rename to full/utils.lisp index ecd9ba0b..eb33e8bb 100644 --- a/src/utils.lisp +++ b/full/utils.lisp @@ -1,6 +1,6 @@ -(uiop:define-package #:40ants-doc/utils +(uiop:define-package #:40ants-doc-full/utils (:use #:cl) - (:import-from #:40ants-doc/builder/vars) + (:import-from #:40ants-doc-full/builder/vars) (:import-from #:alexandria) (:import-from #:cl-ppcre) (:import-from #:str) @@ -13,7 +13,7 @@ #:parse-symbol-name #:get-symbol-from-string #:make-relative-path)) -(in-package #:40ants-doc/utils) +(in-package #:40ants-doc-full/utils) (defun symbol-global-value (symbol) @@ -473,7 +473,7 @@ "If min-length is given, then string should contain at least this number of uppercase chars." (let ((string ;; Allows plurals as in "FRAMEs" and "FRAMEs." - (string-right-trim 40ants-doc/builder/vars::*find-definitions-right-trim-2* string))) + (string-right-trim 40ants-doc-full/builder/vars::*find-definitions-right-trim-2* string))) (and (notany (lambda (char) (char/= char (char-upcase char))) string) @@ -693,7 +693,7 @@ (defgeneric maybe-downcase (obj) (:method ((string string)) - (if (and 40ants-doc/builder/vars::*downcase-uppercase-code* + (if (and 40ants-doc-full/builder/vars::*downcase-uppercase-code* (no-lowercase-chars-p string)) (string-downcase string) string)) diff --git a/src/warn.lisp b/full/warn.lisp similarity index 84% rename from src/warn.lisp rename to full/warn.lisp index 5eed7b74..2fe619f7 100644 --- a/src/warn.lisp +++ b/full/warn.lisp @@ -1,6 +1,6 @@ -(defpackage #:40ants-doc/warn +(uiop:define-package #:40ants-doc-full/warn (:use #:cl)) -(in-package #:40ants-doc/warn) +(in-package #:40ants-doc-full/warn) (defvar *dont-warn-on* nil diff --git a/src/world.lisp b/full/world.lisp similarity index 93% rename from src/world.lisp rename to full/world.lisp index 57c18cf1..de6f6341 100644 --- a/src/world.lisp +++ b/full/world.lisp @@ -1,8 +1,8 @@ -(uiop:define-package #:40ants-doc/world +(uiop:define-package #:40ants-doc-full/world (:use #:cl) (:import-from #:40ants-doc #:defsection)) -(in-package #:40ants-doc/world) +(in-package #:40ants-doc-full/world) (defsection @world (:title "PAX World" diff --git a/playground.lisp b/playground.lisp index 1979204c..a0399f11 100644 --- a/playground.lisp +++ b/playground.lisp @@ -309,12 +309,12 @@ ;; #+nil (defun render () - (40ants-doc/builder::update-asdf-system-html-docs + (40ants-doc-full/builder::update-asdf-system-html-docs playground::@index :40ants-doc :pages `((:objects (,playground::@index) - :source-uri-fn ,(40ants-doc/github::make-github-source-uri-fn + :source-uri-fn ,(40ants-doc-full/github::make-github-source-uri-fn :40ants-doc "https://github.com/40ants/doc"))))) @@ -334,19 +334,19 @@ (defun render-multi () - (40ants-doc/builder::update-asdf-system-html-docs + (40ants-doc-full/builder::update-asdf-system-html-docs (list playground::@index playground::@second-page) :40ants-doc :pages `((:objects (,playground::@index) - :source-uri-fn ,(40ants-doc/github::make-github-source-uri-fn + :source-uri-fn ,(40ants-doc-full/github::make-github-source-uri-fn :40ants-doc "https://github.com/40ants/doc")) (:objects (,playground::@second-page) - :source-uri-fn ,(40ants-doc/github::make-github-source-uri-fn + :source-uri-fn ,(40ants-doc-full/github::make-github-source-uri-fn :40ants-doc "https://github.com/40ants/doc"))))) @@ -355,7 +355,7 @@ :external-docs ("./docs/build/")) "Checking how trans work - 40ANTS-DOC/BUILDER:RENDER-TO-FILES + 40ANTS-DOC-FULL/BUILDER:RENDER-TO-FILES " (the-object function)) @@ -365,25 +365,26 @@ (defun new-render-multi () - (40ants-doc/builder:render-to-files (list ;; @index - ;; 40ants-doc/doc::@index - ;; @second-page + (40ants-doc-full/builder:render-to-files + (list ;; @index + ;; 40ants-doc-full/doc::@index + ;; @second-page - (40ants-doc/page:make-page @experiment) - ;; (40ants-doc/page:make-page @readme - ;; :format 'commondoc-markdown:markdown - ;; :base-dir "./new-docs/") - ) - :base-url "https://40ants.com/doc/" - :base-dir "./new-docs/html/" - ;; :format 'commondoc-markdown:markdown - )) + (40ants-doc-full/page:make-page @experiment) + ;; (40ants-doc-full/page:make-page @readme + ;; :format 'commondoc-markdown:markdown + ;; :base-dir "./new-docs/") + ) + :base-url "https://40ants.com/doc/" + :base-dir "./new-docs/html/" + ;; :format 'commondoc-markdown:markdown + )) (defun render-readme () - (40ants-doc/builder::page-to-markdown + (40ants-doc-full/builder::page-to-markdown (list - 40ants-doc/doc::@index + 40ants-doc-full/doc::@index ;; @second-page ;; @experiment ) @@ -396,6 +397,6 @@ #+nil (defun render-readme () - (40ants-doc/builder::update-asdf-system-readme playground::@index :40ants-doc) - (40ants-doc/builder::update-asdf-system-readme playground::@index :40ants-doc - :format :plain)) + (40ants-doc-full/builder::update-asdf-system-readme playground::@index :40ants-doc) + (40ants-doc-full/builder::update-asdf-system-readme playground::@index :40ants-doc + :format :plain)) diff --git a/qlfile.lock b/qlfile.lock index f4b2d3cb..c08825ce 100644 --- a/qlfile.lock +++ b/qlfile.lock @@ -5,4 +5,4 @@ ("ultralisp" . (:class qlot/source/dist:source-dist :initargs (:distribution "http://dist.ultralisp.org" :%version :latest) - :version "20221113193500")) + :version "20221115220000")) diff --git a/src/changelog.lisp b/src/changelog.lisp index 53ed0070..83d6b4e8 100644 --- a/src/changelog.lisp +++ b/src/changelog.lisp @@ -1,4 +1,4 @@ -(defpackage #:40ants-doc/changelog +(uiop:define-package #:40ants-doc/changelog (:use #:cl) (:import-from #:40ants-doc/core #:defsection) @@ -85,7 +85,7 @@ a version number and the rest is it's description in the markdown format. You can mention symbols from the rest of the documentation and they will be cross-linked automatically if you are using - 40ANTS-DOC/BUILDER:UPDATE-ASDF-SYSTEM-DOCS function. + 40ANTS-DOC-FULL/BUILDER:UPDATE-ASDF-SYSTEM-DOCS function. Here is an example: @@ -151,6 +151,8 @@ "*DOCUMENT-DOWNCASE-UPPERCASE-CODE*" ;; These objects are not documented yet: "40ANTS-DOC/COMMONDOC/XREF:XREF")) + (0.11.0 2022-11-16 + "* Large refactoring was introduced. All files related to the documentation builder were moved to `./full/` folder and corresponding packages was renamed to have `40ants-doc-full/` prefix.") (0.10.0 2022-11-09 "* Default theme was reworked and now uses divs and flex for rendering \"bullets\". Also, bullets were made more structured and now it is more convenient to change their design using CSS.") @@ -172,9 +174,9 @@ EXTERNAL-DOCS argument of 40ANTS-DOC:DEFSECTION macro and then mention other section like this: `40ANTS-CI::@CRITIC section`.") (0.8.0 2022-02-14 - "* Now 40ANTS-DOC/COMMONDOC/MAPPER:MAP-NODES generic-function + "* Now 40ANTS-DOC-FULL/COMMONDOC/MAPPER:MAP-NODES generic-function supports any node type which defines a method for - generic-function 40ANTS-DOC/COMMONDOC/MAPPER:NODE-SUPPORTS-CHILDREN. + generic-function 40ANTS-DOC-FULL/COMMONDOC/MAPPER:NODE-SUPPORTS-CHILDREN. * Default theme was fixed to work with latest Spinneret, which now escapes single quotes inside HTML nodes.") (0.7.0 2021-12-31 @@ -223,7 +225,7 @@ provide a list of urls of external libraries' documentation to have an automatic cross-referencing between them.") (0.4.1 2021-09-05 - "- Function 40ANTS-DOC/BUILDER:GET-CURRENT-ASDF-SYSTEM was added. Now you can use it to do something interesting + "- Function 40ANTS-DOC-FULL/BUILDER:GET-CURRENT-ASDF-SYSTEM was added. Now you can use it to do something interesting like showing \"Fork me on the GitHub\" stripe [as my own theme do][commit]. - Markdown files now will have a footer saying that a file was generated by 40ANTS-DOC. - An RSS feed is generated for changelog. Also, changelog items can have a date now. @@ -231,13 +233,13 @@ [commit]: https://github.com/40ants/40ants-doc-theme-40ants/commit/917a4c1e72b0379f509bdee4864531e641c9ec4e#diff-47d16baea2d4ef710747f19c24df8cf7ef4f6bbbfd1dbb0ade55f47457b1e8feR155-R161") (0.4.0 2021-09-05 "- *DOCUMENT-NORMALIZE-PACKAGES* variable was replaced with FULL-PACKAGE-NAMES argument - of 40ANTS-DOC/BUILDER:RENDER-TO-FILES function.") + of 40ANTS-DOC-FULL/BUILDER:RENDER-TO-FILES function.") (0.3.0 2021-09-04 "- Now images are copied to target folder together with HTML documentation and links are adjusted accordingly. - Added a protocol to define new color themes and change page layout. Three new themes are available out of the box. - Read more at 40ANTS-DOC/THEMES/DOCS::@DEFINING-A-THEME section.") + Read more at 40ANTS-DOC-FULL/THEMES/DOCS::@DEFINING-A-THEME section.") (0.2.0 2021-09-01 "- Now defsection does not exports symbols by default - You can render documents in multiple formats in a single run having cross links. @@ -255,20 +257,20 @@ - 40ANTS-DOC:DEFSECTION macro now does not generate export code if :EXPORT argument is NIL. - Functions UPDATE-ASDF-SYSTEM-HTML-DOCS and UPDATE-ASDF-SYSTEM-README - were replaced with 40ANTS-DOC/BUILDER:UPDATE-ASDF-SYSTEM-DOCS, which also supports + were replaced with 40ANTS-DOC-FULL/BUILDER:UPDATE-ASDF-SYSTEM-DOCS, which also supports ChangeLog.md generation. Use 40ANTS-DOC/CHANGELOG:DEFCHANGELOG to define versions. - Variables *DOCUMENT-HTML-MAX-NAVIGATION-TABLE-OF-CONTENTS-LEVEL* and *DOCUMENT-MAX-TABLE-OF-CONTENTS-LEVEL* were removed. Probably we'll return this feature back in other form, to restrict TOC's size. - Removed LOCATE-AND-DOCUMENT generic function. - Links to the GitHub now are generated automatically, - if 40ANTS-DOC/BUILDER:UPDATE-ASDF-SYSTEM-DOCS function is used + if 40ANTS-DOC-FULL/BUILDER:UPDATE-ASDF-SYSTEM-DOCS function is used and system definition has a :SOURCE-CONTROL slot. - Generic functions COLLECT-REACHABLE-OBJECTS and LOCATE-AND-COLLECT-REACHABLE-OBJECTS were removed. - Variables *DOCUMENT-LINK-SECTIONS*, *DOCUMENT-TEXT-NAVIGATION* and *DOCUMENT-FANCY-HTML-NAVIGATION* were removed. - Variable *DOCUMENT-MIN-LINK-HASH-LENGTH* was removed. Use COMMONDOC-MARKDOWN:*MIN-LINK-HASH-LENGTH* - - Functions 40ANTS-DOC/BUILDER:UPDATE-ASDF-SYSTEM-DOCS and 40ANTS-DOC/BUILDER:RENDER-TO-FILES + - Functions 40ANTS-DOC-FULL/BUILDER:UPDATE-ASDF-SYSTEM-DOCS and 40ANTS-DOC-FULL/BUILDER:RENDER-TO-FILES now accept WARN-ON-UNDOCUMENTED-PACKAGES argument and CLEAN-URLS argument. - Variable *DOCUMENT-MARK-UP-SIGNATURES* was removed. - Added DOWNCASE-UPPERCASE-CODE argument instead of *DOCUMENT-DOWNCASE-UPPERCASE-CODE*. diff --git a/src/ci.lisp b/src/ci.lisp index 17f76cba..2d658392 100644 --- a/src/ci.lisp +++ b/src/ci.lisp @@ -1,4 +1,4 @@ -(defpackage #:40ants-doc/ci +(uiop:define-package #:40ants-doc/ci (:use #:cl) (:import-from #:40ants-ci/workflow #:defworkflow) @@ -12,7 +12,8 @@ :on-push-to "master" :on-pull-request t :jobs ((40ants-ci/jobs/linter:linter - :asdf-systems ("40ants-doc/full" + :asdf-systems ("40ants-doc" + "40ants-doc-full" "40ants-doc-test") :check-imports t))) @@ -30,4 +31,4 @@ :on-push-to "master" :on-pull-request t :jobs ((40ants-ci/jobs/docs:build-docs - :asdf-system "40ants-doc/doc"))) + :asdf-system "40ants-doc-full"))) diff --git a/src/core.lisp b/src/core.lisp index 4caea736..c11b5d6c 100644 --- a/src/core.lisp +++ b/src/core.lisp @@ -43,7 +43,7 @@ "Define a documentation section and maybe export referenced symbols. A bit behind the scenes, a global variable with NAME is defined and is bound to a [SECTION][class] object. By convention, section names - start with the character `@`. See `40ANTS-DOC/DOC::@TUTORIAL` for an example. + start with the character `@`. See `40ANTS-DOC-FULL/DOC::@TUTORIAL` for an example. ENTRIES consists of docstrings and references. Docstrings are arbitrary strings in markdown format, references are defined in the @@ -60,14 +60,14 @@ A locative in a reference can either be a symbol or it can be a list whose CAR is a symbol. In either case, the symbol is the called the type of the locative while the rest of the elements are the locative - arguments. See 40ANTS-DOC/DOC::@LOCATIVE-TYPES for the list of locative + arguments. See 40ANTS-DOC-FULL/DOC::@LOCATIVE-TYPES for the list of locative types available out of the box. The same symbol can occur multiple times in ENTRIES, typically with different locatives, but this is not required. The references are not looked up (see 40ANTS-DOC/REFERENCE:RESOLVE in the - 40ANTS-DOC/DOC:@EXTENSION-API) until documentation is generated, so it is + 40ANTS-DOC-FULL/DOC:@EXTENSION-API) until documentation is generated, so it is allowed to refer to things yet to be defined. If you set :EXPORT to true, the referenced symbols and NAME are diff --git a/src/docstring.lisp b/src/docstring.lisp index 0f3c5f12..24d12228 100644 --- a/src/docstring.lisp +++ b/src/docstring.lisp @@ -1,4 +1,4 @@ -(defpackage #:40ants-doc/docstring +(uiop:define-package #:40ants-doc/docstring (:use #:cl) (:export #:strip-docstring-indentation diff --git a/src/full.lisp b/src/full.lisp deleted file mode 100644 index f05ff4a2..00000000 --- a/src/full.lisp +++ /dev/null @@ -1,37 +0,0 @@ -(defpackage #:40ants-doc-full - (:use #:cl) - (:nicknames #:40ants-doc/full) - (:import-from #:40ants-doc/builder) - - ;; TODO: Все эти locatives надо сделать доступными в минимальном пакете - ;; может быть не загружать сами модули, но сделать так, чтобы на них можно было ссылаться - (:import-from #:40ants-doc/locatives/section) - (:import-from #:40ants-doc/locatives/function) - (:import-from #:40ants-doc/locatives/dislocated) - (:import-from #:40ants-doc/locatives/class) - (:import-from #:40ants-doc/locatives/asdf-system) - (:import-from #:40ants-doc/locatives/argument) - (:import-from #:40ants-doc/locatives/compiler-macro) - (:import-from #:40ants-doc/locatives/constant) - (:import-from #:40ants-doc/locatives/variable) - (:import-from #:40ants-doc/locatives/glossary) - (:import-from #:40ants-doc/locatives/locative) - (:import-from #:40ants-doc/locatives/macro) - (:import-from #:40ants-doc/locatives/generic-function) - (:import-from #:40ants-doc/locatives/method) - (:import-from #:40ants-doc/locatives/package) - (:import-from #:40ants-doc/locatives/restart) - (:import-from #:40ants-doc/locatives/slots) - (:import-from #:40ants-doc/locatives/structure-accessor) - (:import-from #:40ants-doc/locatives/symbol-macro) - (:import-from #:40ants-doc/locatives/type) - (:import-from #:40ants-doc/locatives/include) - (:import-from #:40ants-doc/locatives/stdout-of) - (:import-from #:40ants-doc/github) - (:import-from #:40ants-doc/commondoc/section) - (:import-from #:40ants-doc/commondoc/changelog) - (:import-from #:40ants-doc/object-package-impl) - (:import-from #:40ants-doc/themes/default) - (:import-from #:40ants-doc/themes/light) - (:import-from #:40ants-doc/themes/dark)) -(in-package #:40ants-doc/full) diff --git a/src/glossary.lisp b/src/glossary.lisp index 36df68e0..7542ba4d 100644 --- a/src/glossary.lisp +++ b/src/glossary.lisp @@ -1,4 +1,4 @@ -(defpackage #:40ants-doc/glossary +(uiop:define-package #:40ants-doc/glossary (:use #:cl) (:import-from #:40ants-doc/core) (:export diff --git a/src/locatives/define-definer.lisp b/src/locatives/define-definer.lisp index a55b4451..14c005c4 100644 --- a/src/locatives/define-definer.lisp +++ b/src/locatives/define-definer.lisp @@ -1,4 +1,4 @@ -(defpackage #:40ants-doc/locatives/define-definer +(uiop:define-package #:40ants-doc/locatives/define-definer (:use #:cl) (:import-from #:40ants-doc/locatives/base) (:export @@ -22,7 +22,7 @@ a lambda-list and source location to a symbol in the context of LOCATIVE-TYPE. The defined macro's arglist is (SYMBOL LAMBDA-LIST &OPTIONAL DOCSTRING). LOCATIVE-TYPE is assumed to have been defined - with 40ANTS-DOC/LOCATIVES/DEFINERS:DEFINE-SYMBOL-LOCATIVE-TYPE." + with 40ANTS-DOC-FULL/LOCATIVES/DEFINERS:DEFINE-SYMBOL-LOCATIVE-TYPE." `(defmacro ,name (symbol lambda-list &body docstring) ,@docstring `,(expand-define-definer-for-symbol-as-locative-definer-body diff --git a/src/reference-api.lisp b/src/reference-api.lisp index 438807d3..736f0c58 100644 --- a/src/reference-api.lisp +++ b/src/reference-api.lisp @@ -1,4 +1,4 @@ -(defpackage #:40ants-doc/reference-api +(uiop:define-package #:40ants-doc/reference-api (:use #:cl) (:export #:canonical-reference @@ -21,12 +21,12 @@ object and the result should be a full URL leading to the web page where referenced object can be viewed. Usually this is a GitHub's page. - When you are using 40ANTS-DOC/BUILDER:UPDATE-ASDF-SYSTEM-DOCS, + When you are using 40ANTS-DOC-FULL/BUILDER:UPDATE-ASDF-SYSTEM-DOCS, this variable will be automatically bound to the result of - 40ANTS-DOC/GITHUB:MAKE-GITHUB-SOURCE-URI-FN function call if + 40ANTS-DOC-FULL/GITHUB:MAKE-GITHUB-SOURCE-URI-FN function call if ASDF system has a :SOURCE-CONTROL slot. - See 40ANTS-DOC/GITHUB:MAKE-GITHUB-SOURCE-URI-FN for details.") + See 40ANTS-DOC-FULL/GITHUB:MAKE-GITHUB-SOURCE-URI-FN for details.") (defun source-uri (reference) diff --git a/src/small.lisp b/src/small.lisp index e9acf2dc..5832ec16 100644 --- a/src/small.lisp +++ b/src/small.lisp @@ -1,7 +1,8 @@ -(defpackage #:40ants-doc/small +(uiop:define-package #:40ants-doc/small (:use #:cl) - ;; TODO: Все эти locatives надо сделать доступными в минимальном пакете + ;; TODO: Все эти locatives надо сделать доступными в минимальном пакете ;; может быть не загружать сами модули, но сделать так, чтобы на них можно было ссылаться + ;; А может вовсе удалить этот модуль? (:import-from #:40ants-doc/locatives/section) (:import-from #:40ants-doc/locatives/function) (:import-from #:40ants-doc/locatives/dislocated) diff --git a/src/source-api.lisp b/src/source-api.lisp index 510d0185..3c332b65 100644 --- a/src/source-api.lisp +++ b/src/source-api.lisp @@ -1,4 +1,4 @@ -(defpackage #:40ants-doc/source-api +(uiop:define-package #:40ants-doc/source-api (:use #:cl) (:import-from #:named-readtables) (:import-from #:pythonic-string-reader) @@ -13,8 +13,8 @@ (:documentation """Like SWANK:FIND-DEFINITION-FOR-THING, but this one is a generic function to be extensible. In fact, the default implementation simply defers to SWANK:FIND-DEFINITION-FOR-THING. - This function is called by 40ANTS-DOC/SWANK:LOCATE-DEFINITION-FOR-EMACS which lies - behind the `M-.` extension (see 40ANTS-DOC/DOC:@EMACS-INTEGRATION). + This function is called by 40ANTS-DOC-FULL/SWANK:LOCATE-DEFINITION-FOR-EMACS which lies + behind the `M-.` extension (see 40ANTS-DOC-FULL/DOC:@EMACS-INTEGRATION). If successful, the return value looks like this: diff --git a/test/data/baseline/transcribe-source.lisp b/test/data/baseline/transcribe-source.lisp index 441079e1..5d3eb151 100644 --- a/test/data/baseline/transcribe-source.lisp +++ b/test/data/baseline/transcribe-source.lisp @@ -1,4 +1,4 @@ -(defpackage #:40ants-doc-test/transcribe-source +(uiop:define-package #:40ants-doc-test/transcribe-source (:use #:cl)) (in-package 40ants-doc-test/transcribe-source) diff --git a/test/data/baseline/transcribe-transcription.lisp b/test/data/baseline/transcribe-transcription.lisp index f31029ed..b092cbbe 100644 --- a/test/data/baseline/transcribe-transcription.lisp +++ b/test/data/baseline/transcribe-transcription.lisp @@ -1,4 +1,4 @@ -(defpackage #:40ants-doc-test/transcribe-source +(uiop:define-package #:40ants-doc-test/transcribe-source (:use #:cl)) (in-package 40ants-doc-test/transcribe-source) diff --git a/test/locatives.lisp b/test/locatives.lisp index 99e6e811..145aac33 100644 --- a/test/locatives.lisp +++ b/test/locatives.lisp @@ -1,7 +1,6 @@ -(defpackage #:40ants-doc-test/locatives +(uiop:define-package #:40ants-doc-test/locatives (:use #:cl) - (:import-from #:40ants-doc) - (:import-from #:40ants-doc/swank) + (:import-from #:40ants-doc-full/swank) (:import-from #:rove #:ok #:testing @@ -11,9 +10,9 @@ (deftest test-reading-locative (testing "Usual symbols should read without problems" - (ok (eql (40ants-doc/swank::read-locative-from-string "FUNCTION") + (ok (eql (40ants-doc-full/swank::read-locative-from-string "FUNCTION") 'function))) (testing "Locative with arguments can be parsed as well" - (ok (equal (40ants-doc/swank::read-locative-from-string "(METHOD () (STRING))") + (ok (equal (40ants-doc-full/swank::read-locative-from-string "(METHOD () (STRING))") '(method () (string)))))) diff --git a/test/markdown.lisp b/test/markdown.lisp index 147a5834..d0ce9791 100644 --- a/test/markdown.lisp +++ b/test/markdown.lisp @@ -1,8 +1,7 @@ -(defpackage #:40ants-doc-test/markdown +(uiop:define-package #:40ants-doc-test/markdown (:use #:cl) - (:import-from #:40ants-doc) (:import-from #:common-doc) - (:import-from #:40ants-doc/commondoc/markdown) + (:import-from #:40ants-doc-full/commondoc/markdown) (:import-from #:rove #:ok #:deftest)) @@ -11,7 +10,7 @@ (deftest test-fully-qualified-symbols-shouldnt-be-splitted-to-italic (rove:testing "The SOME-VAR:*BLAH* should become a single common-doc:text-node" - (let* ((paragraph (40ants-doc/commondoc/markdown:parse-markdown "SOME-VAR:*BLAH*")) + (let* ((paragraph (40ants-doc-full/commondoc/markdown:parse-markdown "SOME-VAR:*BLAH*")) (children (common-doc:children paragraph))) (ok (= (length children) 1)) @@ -21,7 +20,7 @@ (deftest test-simple-markdown-text (rove:testing "Simple text should be parsed like a paragraph of a text" - (let* ((paragraph (40ants-doc/commondoc/markdown:parse-markdown "Just a text")) + (let* ((paragraph (40ants-doc-full/commondoc/markdown:parse-markdown "Just a text")) (children (common-doc:children paragraph))) (ok (= (length children) 1)) @@ -31,7 +30,7 @@ (deftest test-variable-name-should-remain-text-instead-of-italic (rove:testing "Star symbols denote italic in markdown, but they are often used to surround global var names in CL to let them be tranformed into a XREFs we need to make them back TEXT-NODEs" - (let* ((paragraph (40ants-doc/commondoc/markdown:parse-markdown "*SOME-VAR*")) + (let* ((paragraph (40ants-doc-full/commondoc/markdown:parse-markdown "*SOME-VAR*")) (children (common-doc:children paragraph))) (ok (= (length children) 1)) diff --git a/test/page.lisp b/test/page.lisp index b9c56efe..6de9f717 100644 --- a/test/page.lisp +++ b/test/page.lisp @@ -1,8 +1,8 @@ -(defpackage #:40ants-doc-test/page +(uiop:define-package #:40ants-doc-test/page (:use #:cl) - (:import-from #:40ants-doc/commondoc/format + (:import-from #:40ants-doc-full/commondoc/format #:with-format) - (:import-from #:40ants-doc/commondoc/page + (:import-from #:40ants-doc-full/commondoc/page #:make-page #:make-page-uri) (:import-from #:rove diff --git a/test/test-transcribe.lisp b/test/test-transcribe.lisp index 1b28337e..841b6b8a 100644 --- a/test/test-transcribe.lisp +++ b/test/test-transcribe.lisp @@ -1,15 +1,15 @@ (uiop:define-package #:40ants-doc-test/test-transcribe (:use #:cl) (:import-from #:alexandria) - (:import-from #:40ants-doc) - (:import-from #:40ants-doc/utils) - (:import-from #:40ants-doc/transcribe) + (:import-from #:40ants-doc-full/transcribe) (:import-from #:rove #:testing #:ok #:deftest) (:import-from #:40ants-doc-test/utils - #:get-diff)) + #:get-diff) + (:import-from #:40ants-doc-full/utils + #:read-prefixed-lines)) (in-package 40ants-doc-test/test-transcribe) @@ -17,52 +17,52 @@ (ok (equal (multiple-value-list (with-input-from-string (stream (format nil ">1")) - (40ants-doc/utils::read-prefixed-lines stream ">"))) + (read-prefixed-lines stream ">"))) '("1" 1 nil t 2))) (ok (equal (multiple-value-list (with-input-from-string (stream (format nil ">1~%")) - (40ants-doc/utils::read-prefixed-lines stream ">"))) + (read-prefixed-lines stream ">"))) '("1" 1 nil t 3))) (ok (equal (multiple-value-list (with-input-from-string (stream (format nil ">1~%>")) - (40ants-doc/utils::read-prefixed-lines stream ">"))) + (read-prefixed-lines stream ">"))) `(,(format nil "1~%") 2 nil t 4))) (ok (equal (multiple-value-list (with-input-from-string (stream (format nil ">1~%>2~%> 3")) - (40ants-doc/utils::read-prefixed-lines stream ">"))) + (read-prefixed-lines stream ">"))) `(,(format nil "1~%2~%3") 3 nil t 9))) (ok (equal (multiple-value-list (with-input-from-string (stream (format nil ">1~%>2~%> 3~%xy~%")) - (40ants-doc/utils::read-prefixed-lines stream ">"))) + (read-prefixed-lines stream ">"))) `(,(format nil "1~%2~%3") 3 "xy" nil 10))) (ok (equal (multiple-value-list (with-input-from-string (stream (format nil ">1~%>2~%> 3~%xy")) - (40ants-doc/utils::read-prefixed-lines stream ">"))) + (read-prefixed-lines stream ">"))) `(,(format nil "1~%2~%3") 3 "xy" t 10))) (ok (equal (multiple-value-list (with-input-from-string (stream (format nil ">1")) - (40ants-doc/utils::read-prefixed-lines stream ">" :first-line-prefix ""))) + (read-prefixed-lines stream ">" :first-line-prefix ""))) '(">1" 1 nil t 2))) (ok (equal (multiple-value-list (with-input-from-string (stream (format nil ">1~%>2~%> 3")) - (40ants-doc/utils::read-prefixed-lines stream ">" :first-line-prefix ""))) + (read-prefixed-lines stream ">" :first-line-prefix ""))) `(,(format nil ">1~%2~%3") 3 nil t 9))) (ok (equal (multiple-value-list (with-input-from-string (stream (format nil ">1~%>2~%> 3~%xy~%")) - (40ants-doc/utils::read-prefixed-lines stream ">" :first-line-prefix ""))) + (read-prefixed-lines stream ">" :first-line-prefix ""))) `(,(format nil ">1~%2~%3") 3 "xy" nil 10))) (ok (equal (multiple-value-list (with-input-from-string (stream (format nil ">1~%>2~%> 3~%xy")) - (40ants-doc/utils::read-prefixed-lines stream ">" :first-line-prefix ""))) + (read-prefixed-lines stream ">" :first-line-prefix ""))) `(,(format nil ">1~%2~%3") 3 "xy" t 10)))) @@ -281,12 +281,12 @@ :errors (nil)))) (defun call-format-on-strings (tree) - (40ants-doc/utils::transform-tree (lambda (parent node) - (declare (ignore parent)) - (if (stringp node) - (values (format nil node) nil nil) - (values node t nil))) - tree)) + (40ants-doc-full/utils::transform-tree (lambda (parent node) + (declare (ignore parent)) + (if (stringp node) + (values (format nil node) nil nil) + (values node t nil))) + tree)) (deftest test-read-write-transcript (loop with *package* = (find-package :40ants-doc-test/test-transcribe) @@ -303,27 +303,27 @@ (errors* ())) (catch 'here (handler-bind - ((40ants-doc/transcribe::transcription-output-consistency-error + ((40ants-doc-full/transcribe::transcription-output-consistency-error (lambda (e) - (push (40ants-doc/transcribe::transcription-error-file-position e) + (push (40ants-doc-full/transcribe::transcription-error-file-position e) output-consistency-errors*) (continue))) - (40ants-doc/transcribe::transcription-values-consistency-error + (40ants-doc-full/transcribe::transcription-values-consistency-error (lambda (e) - (push (40ants-doc/transcribe::transcription-error-file-position e) + (push (40ants-doc-full/transcribe::transcription-error-file-position e) values-consistency-errors*) (continue))) - (40ants-doc/transcribe::transcription-error + (40ants-doc-full/transcribe::transcription-error (lambda (e) - (push (40ants-doc/transcribe::transcription-error-file-position e) + (push (40ants-doc-full/transcribe::transcription-error-file-position e) errors*) (throw 'here nil)))) (let* ((input (format nil input)) (output (when output (format nil output))) (transcript (call-format-on-strings transcript)) - (transcript* (40ants-doc/transcribe::read-transcript input)) + (transcript* (40ants-doc-full/transcribe::read-transcript input)) (output* - (40ants-doc/transcribe::write-transcript + (40ants-doc-full/transcribe::write-transcript transcript* nil :check-consistency check-consistency :update-only update-only @@ -358,10 +358,10 @@ "Check that repeated transcription produces the same results." (let ((result (with-output-to-string (transcription) (with-open-file (source source-file) - (40ants-doc/transcribe::transcribe source - transcription - :update-only t - :check-consistency check-consistency))))) + (40ants-doc-full/transcribe::transcribe source + transcription + :update-only t + :check-consistency check-consistency))))) (unless (string= (alexandria:read-file-into-string transcription-file) result) (cerror "Update transcription file." diff --git a/test/test.lisp b/test/test.lisp index e4a2c6ea..db092e48 100644 --- a/test/test.lisp +++ b/test/test.lisp @@ -3,12 +3,12 @@ #:40ants-doc/locatives) (:import-from #:40ants-doc #:defsection) - (:import-from #:40ants-doc/doc) - (:import-from #:40ants-doc/args) - (:import-from #:40ants-doc/builder) + (:import-from #:40ants-doc-full/doc) + (:import-from #:40ants-doc-full/args) + (:import-from #:40ants-doc-full/builder) (:import-from #:40ants-doc/locatives/base) (:import-from #:40ants-doc/source-api) - (:import-from #:40ants-doc/page) + (:import-from #:40ants-doc-full/page) (:import-from #:common-html) (:import-from #:commondoc-markdown) (:import-from #:alexandria) @@ -16,7 +16,8 @@ #:ok #:deftest #:testing) - (:import-from #:40ants-doc/utils + (:import-from #:40ants-doc-full/utils + #:transform-tree #:symbol-name-p) (:import-from #:40ants-doc-test/utils #:get-files-diff)) @@ -190,7 +191,7 @@ (bar constant (defconstant bar)) (baz generic-function (defgeneric baz)) (baz variable (defvar baz)) - (40ants-doc/doc::@index section (defsection @index)) + (40ants-doc-full/doc::@index section (defsection @index)) (baz-aaa structure-accessor (defstruct baz)) (40ants-doc package (cl:defpackage) @@ -271,14 +272,14 @@ (deftest test-transform-tree (ok (equal '(1) - (40ants-doc/utils::transform-tree + (transform-tree (lambda (parent a) (declare (ignore parent)) (values a (listp a) nil)) '(1)))) (ok (equal '(2 (3 (4 5))) - (40ants-doc/utils::transform-tree + (transform-tree (lambda (parent a) (declare (ignore parent)) (values (if (listp a) a (1+ a)) @@ -287,7 +288,7 @@ '(1 (2 (3 4)))))) (ok (equal '(1 2 (2 3 (3 4 4 5))) - (40ants-doc/utils::transform-tree + (transform-tree (lambda (parent a) (declare (ignore parent)) (values (if (listp a) @@ -300,7 +301,7 @@ (deftest test-macro-arg-names (ok (equal '(x a b c) - (40ants-doc/args::macro-arg-names + (40ants-doc-full/args::macro-arg-names '((&key (x y)) (a b) &key (c d)))))) @@ -343,18 +344,18 @@ (defun write-test-document-files (basedir format) - (let ((pages (list (40ants-doc/page:make-page @test-other - :base-filename "other/test-other") - (40ants-doc/page:make-page @test - :base-filename "test")))) - - (40ants-doc/builder:render-to-files pages - :base-dir basedir - :base-url "https://40ants.com/doc/" - :format (ecase format - (:markdown 'commondoc-markdown:markdown) - (:html 'common-html:html)) - :downcase-uppercase-code (eq format :html)))) + (let ((pages (list (40ants-doc-full/page:make-page @test-other + :base-filename "other/test-other") + (40ants-doc-full/page:make-page @test + :base-filename "test")))) + + (40ants-doc-full/builder:render-to-files pages + :base-dir basedir + :base-url "https://40ants.com/doc/" + :format (ecase format + (:markdown 'commondoc-markdown:markdown) + (:html 'common-html:html)) + :downcase-uppercase-code (eq format :html)))) (defun update-test-document-baseline (format) (write-test-document-files @@ -363,7 +364,7 @@ (deftest test-core-dependencies - (ok (equal (40ants-doc/utils::external-dependencies :40ants-doc) + (ok (equal (40ants-doc-full/utils::external-dependencies :40ants-doc) (list "asdf" "named-readtables" "pythonic-string-reader")))) diff --git a/test/utils-test.lisp b/test/utils-test.lisp index 00672fe0..8fb0b6a1 100644 --- a/test/utils-test.lisp +++ b/test/utils-test.lisp @@ -1,36 +1,36 @@ -(defpackage #:40ants-doc-test/utils-test +(uiop:define-package #:40ants-doc-test/utils-test (:use #:cl) - (:import-from #:40ants-doc) - (:import-from #:40ants-doc/utils) (:import-from #:rove #:ok - #:deftest)) + #:deftest) + (:import-from #:40ants-doc-full/utils + #:make-relative-path)) (in-package 40ants-doc-test/utils-test) (deftest test-relative-paths - (ok (string= (40ants-doc/utils:make-relative-path "foo" - "foo") + (ok (string= (make-relative-path "foo" + "foo") "")) - (ok (string= (40ants-doc/utils:make-relative-path "foo" - "bar") + (ok (string= (make-relative-path "foo" + "bar") "bar")) - (ok (string= (40ants-doc/utils:make-relative-path "blah/minor" - "bar") + (ok (string= (make-relative-path "blah/minor" + "bar") "../bar")) - (ok (string= (40ants-doc/utils:make-relative-path "foo/blah/minor" - "bar") + (ok (string= (make-relative-path "foo/blah/minor" + "bar") "../../bar")) - (ok (string= (40ants-doc/utils:make-relative-path "bar" - "foo/blah/minor") + (ok (string= (make-relative-path "bar" + "foo/blah/minor") "foo/blah/minor")) - (ok (string= (40ants-doc/utils:make-relative-path "foo/blah/minor" - "foo/blah/bar") + (ok (string= (make-relative-path "foo/blah/minor" + "foo/blah/bar") "bar")) - (ok (string= (40ants-doc/utils:make-relative-path "foo/blah/minor" - "foo/bar") + (ok (string= (make-relative-path "foo/blah/minor" + "foo/bar") "../bar")) - (ok (string= (40ants-doc/utils:make-relative-path "foo/blah/minor" - "some/bar") + (ok (string= (make-relative-path "foo/blah/minor" + "some/bar") "../../some/bar"))) diff --git a/test/utils.lisp b/test/utils.lisp index 67703cd2..472fe55d 100644 --- a/test/utils.lisp +++ b/test/utils.lisp @@ -1,4 +1,4 @@ -(defpackage #:40ants-doc-test/utils +(uiop:define-package #:40ants-doc-test/utils (:use #:cl) (:export #:get-diff #:get-files-diff)) diff --git a/test/xref.lisp b/test/xref.lisp index 5fe21546..176e5651 100644 --- a/test/xref.lisp +++ b/test/xref.lisp @@ -5,21 +5,21 @@ #:testing #:deftest) (:import-from #:40ants-doc) - (:import-from #:40ants-doc/commondoc/builder) - (:import-from #:40ants-doc/commondoc/reference) + (:import-from #:40ants-doc-full/commondoc/builder) + (:import-from #:40ants-doc-full/commondoc/reference) (:import-from #:40ants-doc/locatives) (:import-from #:40ants-doc/reference) (:import-from #:common-doc #:make-text #:make-content) - (:import-from #:40ants-doc/commondoc/xref + (:import-from #:40ants-doc-full/commondoc/xref #:xref-name #:extract-symbols #:fill-locatives #:xref-locative #:make-xref) - (:import-from #:40ants-doc/commondoc/page) - (:import-from #:40ants-doc/commondoc/format + (:import-from #:40ants-doc-full/commondoc/page) + (:import-from #:40ants-doc-full/commondoc/format #:with-format)) (in-package 40ants-doc-test/xref) @@ -45,8 +45,8 @@ (deftest test-reference-collection (testing "Checking if this section includes two references" - (let* ((doc (40ants-doc/commondoc/builder::to-commondoc @foo-n-bar)) - (references-and-pages (40ants-doc/commondoc/reference::collect-references doc)) + (let* ((doc (40ants-doc-full/commondoc/builder::to-commondoc @foo-n-bar)) + (references-and-pages (40ants-doc-full/commondoc/reference::collect-references doc)) (references (mapcar #'car references-and-pages))) (ok (= (length references) 3)) @@ -63,14 +63,14 @@ (with-format (:html) (testing "Simple case" (let* ((reference (40ants-doc/reference::make-reference 'foo 'function)) - (doc (40ants-doc/commondoc/markdown:parse-markdown "[FOO][function]"))) + (doc (40ants-doc-full/commondoc/markdown:parse-markdown "[FOO][function]"))) (flet ((first-child () (first (common-doc:children doc)))) (testing "Before replacing we should have a paragraph with internal link" (ok (typep doc 'common-doc:paragraph)) - (ok (typep (first-child) '40ants-doc/commondoc/xref:xref))) + (ok (typep (first-child) '40ants-doc-full/commondoc/xref:xref))) - (let ((result (40ants-doc/commondoc/page::replace-xrefs doc (list (cons reference + (let ((result (40ants-doc-full/commondoc/page::replace-xrefs doc (list (cons reference :no-page))))) (testing "Resulting document should remain the same, because only paragraph's child should be changed" (ok (eql doc result))) @@ -80,7 +80,7 @@ (testing "Case when symbol name already the code" (let* ((reference (40ants-doc/reference::make-reference 'foo 'function)) (doc (extract-symbols - (40ants-doc/commondoc/markdown:parse-markdown "`FOO` function")))) + (40ants-doc-full/commondoc/markdown:parse-markdown "`FOO` function")))) (flet ((first-child (node) (first (common-doc:children node)))) (testing "Before replacing we should have a paragraph with inline code block containing a XREF" @@ -89,9 +89,9 @@ 'common-doc:code)) (ok (typep (first-child (first-child doc)) - '40ants-doc/commondoc/xref:xref))) + '40ants-doc-full/commondoc/xref:xref))) - (let ((result (40ants-doc/commondoc/page::replace-xrefs doc (list (cons reference + (let ((result (40ants-doc-full/commondoc/page::replace-xrefs doc (list (cons reference :no-page))))) (testing "Resulting document should remain the same, because only paragraph's child should be changed" @@ -118,15 +118,15 @@ (testing "Explicit method locative should be replaced with a single link" (let* ((generic-reference (40ants-doc/reference::make-reference 'blah 'generic-function)) (method-reference (40ants-doc/reference::make-reference 'blah '(method () (string)))) - (doc (40ants-doc/commondoc/markdown:parse-markdown "[BLAH][(METHOD () (STRING))]"))) + (doc (40ants-doc-full/commondoc/markdown:parse-markdown "[BLAH][(METHOD () (STRING))]"))) (flet ((first-child () (first (common-doc:children doc)))) (testing "First child should have given locative" - (ok (equal (40ants-doc/commondoc/xref::xref-locative + (ok (equal (40ants-doc-full/commondoc/xref::xref-locative (first-child)) '(method () (string))))) - (let ((result (40ants-doc/commondoc/page::replace-xrefs doc (list (cons generic-reference + (let ((result (40ants-doc-full/commondoc/page::replace-xrefs doc (list (cons generic-reference :no-page) (cons method-reference :no-page))))) @@ -139,7 +139,7 @@ (let* ((original-xref (make-xref "FOO")) (doc (common-doc:make-code original-xref))) - (let ((result (40ants-doc/commondoc/page::replace-xrefs doc nil))) + (let ((result (40ants-doc-full/commondoc/page::replace-xrefs doc nil))) (testing "Resulting document should remain the same" (ok (eql result original-xref)))))) @@ -147,7 +147,7 @@ (let* ((original-xref (make-xref "FOO")) (doc (common-doc:make-content original-xref))) - (let ((result (40ants-doc/commondoc/page::replace-xrefs doc nil))) + (let ((result (40ants-doc-full/commondoc/page::replace-xrefs doc nil))) (testing "Resulting document should remain the same" (ok (eql doc result))) @@ -217,7 +217,7 @@ (testing "Instead of one text node there should be 3 nodes now" (ok (= (length children) 3)) (ok (typep (first children) 'common-doc:text-node)) - (ok (typep (second children) '40ants-doc/commondoc/xref::xref)) + (ok (typep (second children) '40ants-doc-full/commondoc/xref::xref)) (ok (typep (third children) 'common-doc:text-node)))))) (testing "Symbol name may start from numbers" @@ -232,7 +232,7 @@ (testing "Instead of one text node there should be 3 nodes now" (ok (= (length children) 3)) (ok (typep (first children) 'common-doc:text-node)) - (ok (typep (second children) '40ants-doc/commondoc/xref::xref)) + (ok (typep (second children) '40ants-doc-full/commondoc/xref::xref)) (ok (string= (xref-name (second children)) "40ANTS-DOC")) (ok (typep (third children) 'common-doc:text-node)))))) @@ -251,7 +251,7 @@ (result (extract-symbols doc)) (children (common-doc:children result))) (ok (= (length children) 3)) - (ok (typep (second children) '40ants-doc/commondoc/xref::xref)) + (ok (typep (second children) '40ants-doc-full/commondoc/xref::xref)) (ok (string= (xref-name (second children)) "*SOME-VAR*")))) @@ -260,7 +260,7 @@ (result (extract-symbols doc)) (children (common-doc:children result))) (ok (= (length children) 3)) - (ok (typep (second children) '40ants-doc/commondoc/xref::xref)) + (ok (typep (second children) '40ants-doc-full/commondoc/xref::xref)) (ok (string= (xref-name (second children)) "+SOME-VAR+")))) @@ -269,7 +269,7 @@ (result (extract-symbols doc)) (children (common-doc:children result))) (ok (= (length children) 3)) - (ok (typep (second children) '40ants-doc/commondoc/xref::xref)) + (ok (typep (second children) '40ants-doc-full/commondoc/xref::xref)) (ok (string= (xref-name (second children)) ":SOME-VAR")))) @@ -279,7 +279,7 @@ (result (extract-symbols doc)) (children (common-doc:children result))) (ok (= (length children) 3)) - (ok (typep (second children) '40ants-doc/commondoc/xref::xref)) + (ok (typep (second children) '40ants-doc-full/commondoc/xref::xref)) (ok (string= (xref-name (second children)) "SOME-PACKAGE:+SOME-VAR+")))) @@ -288,7 +288,7 @@ (result (extract-symbols doc)) (children (common-doc:children result))) (ok (= (length children) 3)) - (ok (typep (second children) '40ants-doc/commondoc/xref::xref)) + (ok (typep (second children) '40ants-doc-full/commondoc/xref::xref)) (ok (string= (xref-name (second children)) "SOME-PACKAGE::+SOME-VAR+")))) @@ -297,7 +297,7 @@ (result (extract-symbols doc)) (children (common-doc:children result))) (ok (= (length children) 3)) - (ok (typep (second children) '40ants-doc/commondoc/xref::xref)) + (ok (typep (second children) '40ants-doc-full/commondoc/xref::xref)) (ok (string= (xref-name (second children)) "SOME/PACKAGE::+SOME-VAR+")))) @@ -306,7 +306,7 @@ (result (extract-symbols doc)) (children (common-doc:children result))) (ok (= (length children) 3)) - (ok (typep (second children) '40ants-doc/commondoc/xref::xref)) + (ok (typep (second children) '40ants-doc-full/commondoc/xref::xref)) (ok (string= (xref-name (second children)) "SOME.PACKAGE::+SOME-VAR+")))) @@ -315,7 +315,7 @@ (result (extract-symbols doc)) (children (common-doc:children result))) (ok (= (length children) 3)) - (ok (typep (second children) '40ants-doc/commondoc/xref::xref)) + (ok (typep (second children) '40ants-doc-full/commondoc/xref::xref)) (ok (string= (xref-name (second children)) "SOME-PACKAGE:@SOME-SECTION"))))) @@ -336,7 +336,7 @@ (ok (string= (common-doc:text (first children)) "This is a ")) - (ok (typep (second children) '40ants-doc/commondoc/xref::xref)) + (ok (typep (second children) '40ants-doc-full/commondoc/xref::xref)) (ok (string= (xref-name (second children)) "FOO-BAR"))