main.scm 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. (add-to-load-path (dirname (current-filename)))
  2. (use-modules ((grid-printer) #:prefix grid:)
  3. )
  4. #;(define (main)
  5. (let ([data
  6. '((("a" "b" "c") ("a" "b" "c") ("a" "b" "c"))
  7. (("1" "2" "3") ("1" "2" "3") ("1" "2" "3"))
  8. (("x" "y" "z") ("x" "y" "z") ("x" "y" "z")))])
  9. (grid:print-grid data
  10. (current-output-port)
  11. #:grid-config grid:default-grid-config)))
  12. #;(define (main)
  13. (let ([data
  14. '((("a" "b b b" "c") ("a" "b" "c") ("a" "b" "c"))
  15. (("1" "2" "3") ("1" "2" "3 3 3") ("1" "2" "123"))
  16. (("x" "y" "z") ("x" "y" "z") ("x x" "y" "z")))]
  17. [custom-grid-config (grid:make-grid-config "|" "-" "+" " " 1 0 'left)])
  18. (grid:print-grid data
  19. (current-output-port)
  20. #:grid-config custom-grid-config)))
  21. (define (main)
  22. (define cell-1-content
  23. (let ([data
  24. '((("a" "b b b" "c") ("a" "b" "c") (""))
  25. (("1" "2" "3") ("1" "3 3 3") ("1" "2" "123"))
  26. (("x" "y" "z") ("x" "y" "z") ("x x" "y")))]
  27. [custom-grid-config (grid:make-grid-config "|" "-" "+" " " 1 0 'left)])
  28. (call-with-output-string
  29. (lambda (port)
  30. (grid:print-grid data port #:grid-config custom-grid-config)))))
  31. (display cell-1-content))
  32. (main)