kdwatch 0.3.0 → 0.4.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.
- checksums.yaml +4 -4
- data/README.md +13 -9
- data/lib/kdwatch/version.rb +1 -1
- data/lib/kdwatch-app.rb +12 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 77f59a0c0a41535d090f2b858a44759a830b7cddc4e760a39c75613f06d2b37f
|
|
4
|
+
data.tar.gz: 6c53346765beb3f0391991db58bda4f00debfed880b8dca8763462567bbcd435
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d9c2df05241e752a0d7d80e34cf8324872110a0aa4bc800bb9ef7ec1afe0ad2034b06691b56d84c14a6462c252606ef371cad1f85f021ac424046c09dcdc5182
|
|
7
|
+
data.tar.gz: 001ca06bd402115c0d63e8cd06e3558a99787f12ba97b9641c158ec8f9f8d87f99cdea3850a5121b28f53336d14c1312c13ec037ace624b97c19effba70fdea8
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Kdwatch
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Auto-formatting, auto-reloading display of formatted [kramdown-rfc][] document in browser
|
|
4
4
|
|
|
5
5
|
[kramdown-rfc]: http://rfc.space
|
|
6
6
|
|
|
@@ -14,11 +14,11 @@ $ gem install kdwatch
|
|
|
14
14
|
|
|
15
15
|
* For some reason, the initial `gem install` takes a couple of minutes,
|
|
16
16
|
during the first few of which it may seem nothing happens.
|
|
17
|
-
* If the above `pip3` doesn't work, no problem: in a pinch,
|
|
18
|
-
use the IETF web service for xml2rfc processing (but that
|
|
19
|
-
bit slower).
|
|
20
|
-
* Depending on system configuration, add `sudo`
|
|
21
|
-
actually needed).
|
|
17
|
+
* If the above `pip3` (or `pip`) doesn't work, no problem: in a pinch,
|
|
18
|
+
kdrfc will use the IETF web service for xml2rfc processing (but that
|
|
19
|
+
may be a bit slower).
|
|
20
|
+
* Depending on system configuration, add `sudo` on the pip/gem
|
|
21
|
+
commands (but don't if it isn't actually needed).
|
|
22
22
|
|
|
23
23
|
## Usage
|
|
24
24
|
|
|
@@ -34,12 +34,16 @@ $ kdwatch
|
|
|
34
34
|
pop up with the URL to use, which depends on the options given, but
|
|
35
35
|
defaults to <http://127.0.0.1:7991/>).
|
|
36
36
|
|
|
37
|
-
Now, whenever you do an editor save of the markdown file,
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
Now, whenever you do an editor save of the kramdown-rfc markdown file,
|
|
38
|
+
kdwatch auto-formats and, after a couple of seconds(*), you see an
|
|
39
|
+
updated HTML in the browser without pressing buttons or switching windows.
|
|
40
40
|
|
|
41
41
|
You will need to keep the `kdwatch` terminal/screen open to see
|
|
42
42
|
potential error messages, e.g., if you break the markdown in some way.
|
|
43
|
+
(The author uses an Emacs "Async Shell Command" buffer for that.)
|
|
44
|
+
|
|
45
|
+
(*) The latency depends on your computer and a bit on the size of the
|
|
46
|
+
file, say, around 1.6 s for my Intel Mac, 0.8 s for my M1 Mac.
|
|
43
47
|
|
|
44
48
|
### There can only be one (per host/port)
|
|
45
49
|
|
data/lib/kdwatch/version.rb
CHANGED
data/lib/kdwatch-app.rb
CHANGED
|
@@ -40,7 +40,18 @@ get "/" do
|
|
|
40
40
|
warn "...done"
|
|
41
41
|
end
|
|
42
42
|
end
|
|
43
|
-
File.
|
|
43
|
+
dfc = File.stat(dfn).ctime rescue Time.at(0)
|
|
44
|
+
ret = File.read(dfn)
|
|
45
|
+
if sfc > dfc # somehow the above went wrong
|
|
46
|
+
ret.gsub!(<<CSS, <<RED)
|
|
47
|
+
/* general and mobile first */
|
|
48
|
+
html {
|
|
49
|
+
CSS
|
|
50
|
+
/* general and mobile first */
|
|
51
|
+
html { border: 5px solid red;
|
|
52
|
+
RED
|
|
53
|
+
end
|
|
54
|
+
ret
|
|
44
55
|
end
|
|
45
56
|
|
|
46
57
|
get "/metadata.min.js" do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kdwatch
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Carsten Bormann
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-09-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|