ctrl-kd 2.0.0__tar.gz → 3.0.0__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ctrl-kd
3
- Version: 2.0.0
3
+ Version: 3.0.0
4
4
  Summary: Convert WordStar 4-7 documents and print-to-disk files to text, Markdown, HTML, RTF, or PDF. ^KD: save and done.
5
5
  Author: Jon Michaels
6
6
  License: MIT
@@ -95,6 +95,10 @@ against surviving period printouts of the same documents. Its rules are empirica
95
95
  * `--mode printed`: every line as laid out, fixed-width, `.pa`/form-feed page
96
96
  breaks honored — how it came off the printer.
97
97
 
98
+ Version coverage, known limitations (WordStar 6's bare `.pl`, WordStar 3
99
+ status), and how behaviour gets verified: **[FAQ.md](FAQ.md)**, with the
100
+ technical account in **[ERAS.md](ERAS.md)**.
101
+
98
102
  ## Install
99
103
 
100
104
  ```console
@@ -76,6 +76,10 @@ against surviving period printouts of the same documents. Its rules are empirica
76
76
  * `--mode printed`: every line as laid out, fixed-width, `.pa`/form-feed page
77
77
  breaks honored — how it came off the printer.
78
78
 
79
+ Version coverage, known limitations (WordStar 6's bare `.pl`, WordStar 3
80
+ status), and how behaviour gets verified: **[FAQ.md](FAQ.md)**, with the
81
+ technical account in **[ERAS.md](ERAS.md)**.
82
+
79
83
  ## Install
80
84
 
81
85
  ```console
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ctrl-kd"
7
- version = "2.0.0"
7
+ version = "3.0.0"
8
8
  description = "Convert WordStar 4-7 documents and print-to-disk files to text, Markdown, HTML, RTF, or PDF. ^KD: save and done."
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ctrl-kd
3
- Version: 2.0.0
3
+ Version: 3.0.0
4
4
  Summary: Convert WordStar 4-7 documents and print-to-disk files to text, Markdown, HTML, RTF, or PDF. ^KD: save and done.
5
5
  Author: Jon Michaels
6
6
  License: MIT
@@ -95,6 +95,10 @@ against surviving period printouts of the same documents. Its rules are empirica
95
95
  * `--mode printed`: every line as laid out, fixed-width, `.pa`/form-feed page
96
96
  breaks honored — how it came off the printer.
97
97
 
98
+ Version coverage, known limitations (WordStar 6's bare `.pl`, WordStar 3
99
+ status), and how behaviour gets verified: **[FAQ.md](FAQ.md)**, with the
100
+ technical account in **[ERAS.md](ERAS.md)**.
101
+
98
102
  ## Install
99
103
 
100
104
  ```console
@@ -12,4 +12,5 @@ src/ctrlkd/convert.py
12
12
  src/ctrlkd/core.py
13
13
  src/ctrlkd/emit.py
14
14
  src/ctrlkd/pdf.py
15
+ src/ctrlkd/typestyles.py
15
16
  tests/test_ctrlkd.py
@@ -6,4 +6,4 @@ from .emit import (emit_text, emit_markdown, emit_html, emit_rtf,
6
6
  from .pdf import emit_pdf # registers the 'pdf' format
7
7
  from .convert import convert, select_notes, DEFAULT_NOTE_KINDS, ALL_NOTE_KINDS
8
8
 
9
- __version__ = '2.0.0'
9
+ __version__ = '3.0.0'
@@ -57,14 +57,18 @@ def main(argv=None):
57
57
  help='output format (repeatable; default: markdown)')
58
58
  ap.add_argument('-o', '--output', help='output file (single input only)')
59
59
  ap.add_argument('-d', '--outdir', help='output directory for batch conversion')
60
- ap.add_argument('--mode', choices=('modern', 'printed'), default='modern',
61
- help='modern: reflowed paragraphs. printed: line-for-line, '
62
- 'fixed-width, as it printed in 1990 (default: modern; '
63
- 'print streams and ruler-line documents always render printed)')
60
+ ap.add_argument('--mode', choices=('modern', 'printed'), default='printed',
61
+ help='printed: line-for-line, fixed-width, as it printed in '
62
+ '1990 (DEFAULT). modern: reflowed paragraphs for '
63
+ 'reading. Print streams and ruler-line documents '
64
+ 'always render printed regardless.')
64
65
  ap.add_argument('--variant', choices=('ws4', 'ws5+', 'printstream', 'text'),
65
66
  help='override detection')
66
67
  ap.add_argument('--encoding', default='cp437',
67
68
  help='byte encoding of the source (default: cp437)')
69
+ ap.add_argument('--no-styles', action='store_true',
70
+ help='omit paragraph-style pass-through (HTML classes + '
71
+ 'generated CSS, RTF stylesheet) from the output')
68
72
  ap.add_argument('--no-notes', action='store_true',
69
73
  help='omit footnotes, endnotes and annotations from the output')
70
74
  ap.add_argument('--comments', action='store_true',
@@ -103,7 +107,8 @@ def main(argv=None):
103
107
  base = os.path.splitext(os.path.basename(path))[0]
104
108
  for fmt in formats:
105
109
  reg = emit.get_emitter(fmt)
106
- out = reg['fn'](doc, a.mode, title=base, notes=notes)
110
+ out = reg['fn'](doc, a.mode, title=base, notes=notes,
111
+ styles=not a.no_styles)
107
112
  if a.output:
108
113
  dest = a.output
109
114
  else:
@@ -117,7 +122,12 @@ def main(argv=None):
117
122
  else:
118
123
  with open(dest, 'w', encoding='utf-8', newline='\n') as f:
119
124
  f.write(out)
120
- print(f'{path} -> {dest}')
125
+ # Status goes to STDERR: with `-o /dev/stdout` (or a pipe) a
126
+ # status line on stdout lands INSIDE the converted document --
127
+ # found 2026-08-04 when a Python-vs-Swift archive comparison
128
+ # flagged all 81 convertible documents as differing by exactly
129
+ # this line. Both CLIs carried the defect; both fixed together.
130
+ print(f'{path} -> {dest}', file=sys.stderr)
121
131
  return status
122
132
 
123
133
  if __name__ == '__main__':