summaryrefslogtreecommitdiff
path: root/tissue/issue.scm
AgeCommit message (Collapse)Author
2022-07-09issue: Move person related functions to (tissue person).Arun Isaac
* bin/tissue: Import (tissue person). * tissue/issue.scm: Import (tissue person). (%aliases, resolve-alias, index-person!): Move to (tissue person). * tissue/person.scm: New file.
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-09issue: Hyphenate tag in search query if it has spaces.Arun Isaac
* tissue/issue.scm (document->sxml): Hyphenate tag in search query if it has spaces.
2022-07-08issue: Allow specifying tags with keyword and tag singulars.Arun Isaac
* tissue/issue.scm (file-details): Allow specifying tags with keyword and tag singulars.
2022-07-07issue: Parse known keys in list lines even if they are long.Arun Isaac
We drop the restriction that values in key-value pairs should be 2 words or less. Instead, if the key is a known key such as "keywords:", "tags:" or "status:", we always accept it as a key. * tissue/issue.scm (file-details): Parse known keys in list lines even if they are long. * tests/issue.scm ("Parse keywords even if they are long"): New test.
2022-07-07issue: Comment on list-line->alist cond ladder.Arun Isaac
* tissue/issue.scm (list-line->alist): Comment on cond ladder.
2022-07-07issue: Rename hashtable-append! to hashtable-prepend!.Arun Isaac
Even hashtable-append! was prepending, not appending. We change its name to suit. * tissue/issue.scm (hashtable-append!): Rename to hashtable-prepend!. (file-details): Call hashtable-prepend! instead of hashtable-append!.
2022-07-03issue: Use string-remove-prefix from (tissue utils).Arun Isaac
* tissue/issue.scm (list-line->alist, file-details): Use string-remove-prefix from (tissue utils). (file-details): Delete function.
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-29issue: Remove space at the beginning of search result metadata.Arun Isaac
* tissue/issue.scm (document->sxml): Remove space at the beginning of search result metadata.
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-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-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: 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-28web: static: Move sanitize-string to (tissue issue).Arun Isaac
* tissue/web/static.scm (sanitize-string): Move to tissue/issue.scm.
2022-06-28issue: Prefix ! to destructive function index-person.Arun Isaac
* tissue/issue.scm (index-person): Rename to index-person!. (document-term-generator): Update invocations of index-person.
2022-06-28issue: Deprecate unix-time->date utility.Arun Isaac
* tissue/issue.scm (unix-time->date): Delete function.
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-27issue: Move issue printing functions to (tissue issue).Arun Isaac
* bin/tissue: Do not import (srfi srfi-19). (print-issue, print-issue-to-gemtext): Move to tissue/issue.scm. (human-date-string): Move to tissue/utils.scm. * tissue/issue.scm: Import (term ansi-color). * tissue/utils.scm: Import (srfi srfi-19).
2022-06-27issue: Replace issues thunk with read-gemtext-issue reader.Arun Isaac
* tissue/issue.scm (%issue-files): Delete parameter. (issues): Delete function. (read-gemtext-issue): New public function. (file-modification-table-for-current-repository): New function. * bin/tissue (main): Do not parameterize %issue-files.
2022-06-27issue: Deprecate authors function.Arun Isaac
The authors function, if required in the future, must be reimplemented using guile-git in (tissue git). * tissue/issue.scm (authors): Delete public function.
2022-06-26issue: Index issues with type:issue.Arun Isaac
* tissue/issue.scm (issue->alist): Add (type . issue) pair. (index-issue): Index type:issue.
2022-06-26issue: Export predicates issue? and post?.Arun Isaac
* tissue/issue.scm: Export record type predicates issue? and post?.
2022-06-25bin: Index issues using xapian.Arun Isaac
* bin/tissue: Import (ice-9 ftw), (git), (xapian wrap) and (xapian xapian). (delete-xapian-index): New function. (%state-directory, %xapian-index): New variables. (main): Build index if it does not exist. * tissue/issue.scm: Import (xapian xapian). (index-person): New function. (index-issue): New public function.
2022-06-25issue: Add serialization and deserialization functions.Arun Isaac
* tissue/issue.scm (date->iso-8601, iso-8601->date): New functions. (issue->alist, post->alist, alist->issue, alist->post): New public functions.
2022-06-23issue: Lookup commits affecting file using guile-git.Arun Isaac
* tissue/git.scm: Import (rnrs hashtables) and (ice-9 match). (commit-deltas): New function. (file-modification-table): New public function. * tissue/issue.scm: Import (git). (file-details): Do not lookup git history for file using `git log'. (issues): Use file-modification-table to lookup git history.
2022-06-23issue: Remove relative date fields.Arun Isaac
* tissue/issue.scm (<issue>)[created-relative-date, last-updated-relative-date]: New fields. * tissue/issue.scm (<post>)[post-relative-date]: New field. * tissue/issue.scm (file-details): Do not collect relative dates. (issues): Do not initialize created-relative-date and last-updated-relative-date fields.
2022-04-14tissue: Add #:issue-files configuration parameter.Arun Isaac
* tissue/tissue.scm: Import (tissue git). (<tissue-configuration>)[issue-files]: New field. (gemtext-files-in-directory): New function. (tissue-configuration): Add #:issue-files keyword argument. * tissue/issue.scm (%issue-files): New public parameter. (issues): Read issues only from files in %issue-files. * bin/tissue (main): Parameterize %issue-files.
2022-04-05git: Abstract out `git ls-files'.Arun Isaac
* tissue/git.scm: New file. * tissue/issue.scm: Import (tissue git). (issues): Use git-tracked-files.
2022-04-05issue: Sort authors in lexicographic order.Arun Isaac
* tissue/issue.scm (authors): Sort returned list of authors in lexicographic order.
2022-03-18issue: Build list of authors from list of issues.Arun Isaac
For some reason, `git shortlog' outputs nothing inside a Guix derivation. * tissue/issue.scm (file-details): Build list of authors from list of issues instead of relying on `git shortlog'.
2022-03-18issue: Arrange posts oldest first.Arun Isaac
* tissue/issue.scm (issues): Arrange posts oldest first. (<issue>)[posts]: Comment on order of contents.
2022-03-18issue: Add authors function returning all authors.Arun Isaac
* tissue/issue.scm (authors): New public function.
2022-03-18issue: Resolve authors and assignees using aliases.Arun Isaac
* bin/tissue (main): Load config and parameterize %aliases. * tissue/issue.scm (%aliases): New public parameter. (resolve-alias): New function. (file-details): Resolve authors and assignees using aliases.
2022-03-18utils: Move memoize-thunk to utils.Arun Isaac
* tissue/issue.scm (memoize-thunk): Move to ... * tissue/utils.scm (memoize-thunk): ... here.
2022-03-18issue: Record all commits affecting a file, not just how many.Arun Isaac
* tissue/issue.scm (<post>): New record type. (file-details): Record all commits affecting a file, not just how many. * bin/tissue (print-issue, print-issue-to-gemtext): Apply length on the output of issue-posts before use. * tissue/web.scm (issue-list-item-markup-writer-action): Apply length on posts before use.
2022-03-18issue: Refactor out repeated use of assq-ref.Arun Isaac
* tissue/issue.scm (issues): Refactor out repeated use of assq-ref.
2022-03-18issue: Follow files across renames.Arun Isaac
* tissue/issue.scm (file-details): Follow file across renames using `git log --follow'.
2022-03-18issue: Ignore case of keywords.Arun Isaac
* tissue/issue.scm (issues): Downcase keywords to ignore their case.
2022-03-18issue: Rename issue-open to issue-open?.Arun Isaac
issue-open returns a boolean. So, it makes sense to name it like a predicate. * bin/tissue (tissue-list): Replace issue-open with issue-open?. * tissue/issue.scm (tissue): Export issue-open? instead of issue-open. (<issue>): Rename issue-open to issue-open?. * tissue/web.scm (issue-listing): Replace issue-open with issue-open?.
2022-03-18issue: Replace delete-duplicates with lset-adjoin.Arun Isaac
* tissue/issue.scm (hashtable-append!): Replace delete-duplicates with lset-adjoin.
2022-03-18issue: Use SRFI-19 dates.Arun Isaac
* tissue/issue.scm: Use (srfi srfi-19). (unix-time->date): New function. (file-details): Convert date fields created-date and last-updated-date to SRFI-19. (issues): Use SRFI-19 time comparison in sort comparator.
2022-03-16tissue: Support tagging using "key: value" pairs.Arun Isaac
* tissue/issue.scm (<=n-words?, list-line->alist): New functions. (file-details): Support tagging using "key: value" pairs.
2022-03-16tissue: Deduplicate keywords in hash table.Arun Isaac
* tissue/issue.scm (hashtable-append!): Deduplicate after appending new values.
2022-03-16tissue: Enforce prefix check on checklist.Arun Isaac
* tissue/issue.scm (file-details): Match checklist only if it starts at the beginning of its line.
2022-03-14tissue: Ignore missing files when listing issues.Frederick Muriuki Muriithi
tissue would fail to list issues and throw an exception when a user deletes a file, or renames a file, but has not committed the changes to the issue tracker. This commit simply ignores such deletions and renames, and lists out the other issues that have not changed. * tissue/issue.scm (file-details): Read the file only if it exists. Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
2022-03-14tissue: Memoize the issues function.Arun Isaac
The issues function is disk intensive and will be frequently used in different parts of the program. Memoize it. * tissue/issue.scm (memoize-thunk): New function. (issues): Memoize.