|
3 | 3 | (:require [robertluo.clerk-doc :as doc] |
4 | 4 | [robertluo.clerk-doc.ai :as ai])) ;=> nil |
5 | 5 | ``` |
6 | | - # io.github.robertluo/clerk-doc |
7 | 6 |
|
8 | | - [](https://github.com/robertluo/clerk-doc/actions/workflows/main.yml) |
| 7 | +# `io.github.robertluo/clerk-doc` |
9 | 8 |
|
10 | | - Turns Clojure source files into markdown. Usually [clerk](https://github.com/nextjournal/clerk) notebooks are good |
11 | | - candidates, when you do not feel like write README.md file for your Github projects. |
12 | | - ## Usage |
13 | | - |
14 | | - Write a clojure source file just like this. |
15 | | - Add an alias in your `deps.edn`: |
| 9 | +[](https://github.com/robertluo/clerk-doc/actions/workflows/main.yml) |
| 10 | + |
| 11 | +Turns Clojure source files into Markdown. Usually [clerk](https://github.com/nextjournal/clerk) notebooks are good candidates for when you do not feel like writing a README.md file for your Github project. |
| 12 | + |
| 13 | +## Usage |
| 14 | + |
| 15 | +1. Write a Clojure source file, just like this. |
| 16 | +2. Add an alias in your `deps.edn`. |
| 17 | +3. Call it by `clojure -X:clerk-doc`. |
16 | 18 | ```clojure |
17 | 19 | (comment |
18 | | - {:clerk-doc {:extra-deps {io.github.robertluo/clerk-doc {:git/tag "v0.1.0" :git/sha "xxxxxx"}} |
| 20 | + {:clerk-doc {:extra-deps {io.github.robertluo/clerk-doc {:git/tag "v0.2.1" :git/sha "xxxxxx"}} |
19 | 21 | :exec-fn robertluo.clerk-doc/clj->md |
20 | 22 | :exec-args {:from "your-source.clj" :to "README.md" |
21 | 23 | :eval-code? true :ai-improve? false}}} |
22 | 24 | ) ;=> nil |
23 | 25 | ``` |
24 | | - and call it by `clojure -X:clerk` |
25 | | - ## Goodies |
26 | | - - If `:eval-code?` set to true, the clojure code in the file will be evaluated, |
27 | | - the result will be append to the generated code blocks. |
28 | | - - Thanks to [openai-clojure](https://github.com/wkok/openai-clojure) the |
29 | | - `:ai-improve?` flag using OpenAI to improve your result md file. |
30 | | - You need set up your environment, please refer to the above link. |
31 | | - Make sure to check the result after ChatGPT's work, it sometimes |
32 | | - surprises me. |
33 | | - > You have to have a paid account of OpenAI, otherwise the OpenAI's rate limit will generate |
34 | | - > a 400 error for anything longer than one simple sentence. |
35 | | -
|
36 | | - ## Changes |
37 | | - |
38 | | - - v0.2.0 Improve eval to print out exception and nil |
39 | | - |
40 | | - ## [UnLicense](https://unlicense.org/) |
41 | | - 2023 Robert Luo |
| 26 | + |
| 27 | + |
| 28 | +## Goodies |
| 29 | +- If `:eval-code?` is set to `true`, the Clojure code in the file will be evaluated, and the result will be appended to the generated code blocks. |
| 30 | +- Thanks to [openai-clojure](https://github.com/wkok/openai-clojure), the `:ai-improve?` flag uses OpenAI to improve your resulting Markdown file. You need to set up your environment; please refer to the link above. Make sure to check the result after ChatGPT's work; it sometimes surprises me. |
| 31 | +> You have to have a paid account with OpenAI, otherwise the OpenAI's rate limit will generate a `400` error for anything longer than one simple sentence. |
| 32 | +
|
| 33 | +## Changes |
| 34 | +- v0.2.0: Improved eval to print out exceptions and nils |
| 35 | + |
| 36 | +## [UnLicense](https://unlicense.org/) |
| 37 | + |
| 38 | +Copyright (c) 2023 Robert Luo |
0 commit comments