<commit_before>
(define-library (lehti command search)

    (export
      search)
  (import (scheme base)
          (scheme write)
          (gauche)
          (srfi 1)
          (srfi 13)
          (file util)
          (util match)
          (lehti env)
          (lehti base)
          (lehti util))

  (begin


    (define (all-packages)
      (let ((package-list (remove-dot-directory
                           (directory-list2 (*lehti-projects-repository-directory*)))))
        (for-each
            (lambda (p) (display p)
                    (newline))
          package-list)))

    (define (remove-dot-directory lst)
      (remove
          (lambda (x)
            (equal? (string-ref x 0) #\.))
        lst))

    (define (search-package package)
      (let ((package-list (remove-dot-directory
                           (directory-list2 (*lehti-projects-repository-directory*)))))
        (cond
          ((member package package-list)
           (display package)
           (newline))
          (else
              (format #true "~a not found!" package)
            (newline)))))

    (define (search args)
      (match args
             (()
              (all-packages))
             (else
                 (if (file-exists? (*lehti-projects-repository-directory*))
                   (search-package (car args))
                   (display "please install lehti")))))


    ))<commit_msg>add srfi-29<commit_after>
(define-library (lehti command search)

    (export
      search)
  (import (scheme base)
          (scheme write)
          (gauche)
          (srfi 1)
          (srfi 13)
          (srfi 29)
          (file util)
          (util match)
          (lehti env)
          (lehti base)
          (lehti util))

  (begin


    (define (all-packages)
      (let ((package-list (remove-dot-directory
                           (directory-list2 (*lehti-projects-repository-directory*)))))
        (for-each
            (lambda (p) (display p)
                    (newline))
          package-list)))

    (define (remove-dot-directory lst)
      (remove
          (lambda (x)
            (equal? (string-ref x 0) #\.))
        lst))

    (define (search-package package)
      (let ((package-list (remove-dot-directory
                           (directory-list2 (*lehti-projects-repository-directory*)))))
        (cond
          ((member package package-list)
           (display package)
           (newline))
          (else
              (display (format "~a not found!" package))
            (newline)))))

    (define (search args)
      (match args
             (()
              (all-packages))
             (else
                 (if (file-exists? (*lehti-projects-repository-directory*))
                   (search-package (car args))
                   (display "please install lehti")))))


    ))
{'fraction_non_alphanumeric': 0.12693935119887165, 'fraction_numerical': 0.005641748942172073, 'mean_word_length': 1.382031905961377, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4412634', 'n_tokens_mistral': 830, 'n_tokens_neox': 767, 'n_words': 189}