dogfen 2025.1005.0 → 2025.1007.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 +28 -8
  2. package/index.js +27 -27
  3. package/package.json +7 -10
package/README.md CHANGED
@@ -1,17 +1,37 @@
1
- # notes
1
+ # dogfen
2
2
 
3
- To install dependencies:
3
+ ## usage
4
4
 
5
- ```bash
6
- bun install
5
+ Add the below oneliner to an existing markdown document:
6
+
7
+ ```html
8
+ <!DOCTYPE html><html><body><script src="https://unpkg.dev/dogfen"></script><textarea style="display:none;">
9
+
10
+ # Header 1
11
+
12
+ ## Header 2
13
+
14
+ |col 1 | col 2 |
15
+ |---|---|
16
+ |cell 1 | cell 2 |
7
17
  ```
8
18
 
9
- To run:
19
+ ## converter
20
+
21
+ You could define a shell helper function to quickly convert a markdown doc to a dogfen doc.
10
22
 
11
- ```bash
12
- bun run index.js
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
+ "$(cat $1)"
28
+ }
13
29
  ```
14
30
 
15
- This project was created using `bun init` in bun v1.2.7. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
31
+ ```sh
32
+ md2dogfen README.md > README.dogfen.html
33
+ ```
16
34
 
35
+ ## related projects
17
36
 
37
+ - [texme](https://github.com/susam/texme)