summaryrefslogtreecommitdiff
path: root/tissue/document.scm
AgeCommit message (Collapse)Author
2022-07-09bin: Move indexing document type into document-term-generator.Arun Isaac
* bin/tissue (index): Move indexing document type into document-term-generator generic function. * tissue/document.scm (document-term-generator): Index document type.
2022-07-09document: Make snippet source text extraction a generic function.Arun Isaac
* tissue/document.scm (document-snippet-source-text): New generic method. (document-html-snippet): Use document-snippet-source-text.
2022-07-09document: Prefix ID term with document type.Arun Isaac
We need to prefix the ID term in order to distinguish between future document types (such as the commit document type) that may not be based off a file. * tissue/document.scm (document-id-term): Prefix ID term with "file." indicating the document type.
2022-07-09document: Generalize document-type method of <document> parent class.Arun Isaac
* tissue/document.scm (document-type): Generalize generic method of <document> to apply to most child classes. Pass on generic method of <file-document> to that of <document>. * tissue/issue.scm (document-type): Remove generic method for <issue> class.
2022-07-03tissue: Read files from git repository, not from the working tree.Arun Isaac
This also frees us from checking if the file actually exists in the working tree. * bin/tissue (tissue-show): Use call-with-file-in-git instead of call-with-input-file. (load-config): Use call-with-file-in-git and eval-string instead of load. * tissue/document.scm: Import (tissue git). (document-text, read-gemtext-document): Use call-with-file-in-git instead of call-with-input-file. * tissue/issue.scm (file-details): Read from a port instead of from a file. (read-gemtext-issue): Call file-details with a port reading the file committed into the git repository. * tissue/web/server.scm: Import (tissue git). * tissue/web/static.scm (exporter): Use call-with-file-in-git instead of call-with-input-file.
2022-06-29document: Add search result title CSS class.Arun Isaac
* tissue/document.scm (document->sxml): Add search result title CSS class. * tissue/issue.scm (document->sxml): Add search result title CSS class.
2022-06-29document: Add CSS classes identifying document type.Arun Isaac
* tissue/document.scm (document->sxml): Add search-result-document class. * tissue/issue.scm (document->sxml): Add search-result-issue and search-result-open-issue/search-result-closed-issue classes.
2022-06-29document: Print identifier identifying type of search result.Arun Isaac
* tissue/document.scm (print): Print DOCUMENT identifier. * tissue/issue.scm (print): Print ISSUE identifier.
2022-06-29document: Accept port argument when printing to text.Arun Isaac
* tissue/document.scm (print): Accept port argument. * tissue/issue.scm (print): Accept port argument.
2022-06-29document: Remove blank line between title and snippet.Arun Isaac
* tissue/document.scm (print): Remove blank line between title and snippet.
2022-06-29web: server: Use div instead of span for snippets and metadata.Arun Isaac
A div is already a block element. There is no need to use a span and then make it a block element. * tissue/document.scm (document->sxml): Use div instead of span for snippets and metadata. * tissue/issue.scm (document->sxml): Use div instead of span for snippets and metadata. * tissue/web/server.scm (%css)[.search-result-metadata]: Remove "display: block" property.
2022-06-29document: Remove blank lines in search snippets.Arun Isaac
Blank lines waste precious space in search snippets. * tissue/document.scm (document-html-snippet): Remove blank lines in search snippets.
2022-06-29document: Abstract out HTML snippet generation.Arun Isaac
* tissue/document.scm (document-html-snippet): New function. (document-snippet, document-sxml-snippet): Use document-html-snippet.
2022-06-29web: server: Add web server for search.Arun Isaac
* tissue/web/server.scm: New file. * tissue/document.scm (document-sxml-snippet): New public function. (document->sxml): New generic method. * tissue/issue.scm: Import (web uri). (document->sxml): New generic method. * bin/tissue: Import (system repl server) and (tissue web server). (address->socket-address, tissue-run-web): New function. (print-usage): List `tissue run-web' subcommand. (main): Call tissue-run-web.
2022-06-29document: Add web-uri slot to <document> class.Arun Isaac
* tissue/document.scm (<document>)[web-uri]: New slot. * bin/tissue (main): Set web-uri slot before indexing document.
2022-06-29document: Abstract out document snippet selection.Arun Isaac
* tissue/document.scm: Import (htmlprag). (document-snippet): New public function. (print): Use document-snippet. * tissue/issue.scm (print): Use document-snippet.
2022-06-28document: Add slot-set utility.Arun Isaac
* tissue/document.scm (slot-set): New public function.
2022-06-28document: Override write to print object slots and values.Arun Isaac
* tissue/document.scm: Import (srfi srfi-1). (write): New generic method.
2022-06-28Migrate to GOOPS.Arun Isaac
* tissue/document.scm: Do not import (srfi srfi-9). Import (srfi srfi-19), (ice-9 match) and (oop goops). (<document>): Delete type. (<document>, <file-document>): New classes. (date->alist, alist->date, object->scm, scm->object): New functions. (document->alist, alist->document, print-document): Delete functions. (document-term-generator, document-type, document-id-term, document-text, print): New generic methods. (read-gemtext-document): Return <file-document> object. (index-document): Delete function. * tissue/issue.scm: Do not import (srfi srfi-9) and (srfi srfi-19). Import (oop goops) and (tissue document). (date->iso-8601, iso-8601->date): Move to tissue/document.scm. (<issue>, <post>): Re-implement as class. (issue->alist, post->alist, alist->issue, alist->post, index-issue): Delete functions. (print-issue): Rename to print, a generic method. (print): Use document-title and file-document-path instead of issue-title and issue-file respectively. Accept mset argument. (print-issue-to-gemtext): Use document-title instead of issue-title. (read-gemtext-issue): Return a <issue> object. (document-term-generator): New generic methods. * bin/tissue: Import (tissue document) without a prefix. (print-document, alist->document, document->text, index-document): Delete functions. (tissue-search): Use the print generic function. (main): Use the document-type, document-id-term, document-term-generator generic functions and replace-document! instead of index-document. * tissue/conditions.scm (&unknown-document-type-violation): Delete condition.
2022-06-27document: Add <document> object.Arun Isaac
* tissue/document.scm: New file.