dogfen 2025.1006.0 → 2025.1008.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +16 -2
  2. package/index.js +102 -67
  3. package/package.json +8 -9
package/README.md CHANGED
@@ -1,5 +1,3 @@
1
-
2
-
3
1
  # dogfen
4
2
 
5
3
  ## usage
@@ -18,6 +16,22 @@ Add the below oneliner to an existing markdown document:
18
16
  |cell 1 | cell 2 |
19
17
  ```
20
18
 
19
+ ## converter
20
+
21
+ You could define a shell helper function to quickly convert a markdown doc to a dogfen doc.
22
+
23
+ ```sh
24
+ md2dogfen() {
25
+ printf "%s\n\n%s\n" \
26
+ '<!DOCTYPE html><html><body><script src="https://unpkg.dev/dogfen"></script><textarea style="display:none;">' \
27
+ "$(< "$1")"
28
+ }
29
+ ```
30
+
31
+ ```sh
32
+ md2dogfen README.md > README.dogfen.html
33
+ ```
34
+
21
35
  ## related projects
22
36
 
23
37
  - [texme](https://github.com/susam/texme)