Skip to content

Commit 9c0e268

Browse files
author
Kay McCormick
committed
compile nodes works
1 parent 2d9e272 commit 9c0e268

20 files changed

+6838
-3117
lines changed

convertSettingsSpec.js

+17-11
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11
const fs = require('fs');
22
const camelcase = require('camelcase');
3-
const spec = require('./settingsSpec');
3+
const spec = require('./gen/settingsSpec');
44
const specOut = {};
5-
Object.keys(spec.options).forEach(key => {
6-
specOut[key] = {};
7-
spec.options[key].forEach((d) => {
8-
const { desc, optname, t, def } = d;
9-
const opt1 = optname;
10-
const f2 = (t || '').replace(/^validate_/, '');
5+
Object.keys(spec).forEach(key => {
6+
const outKey = camelcase(key, { pascalCase: true });
7+
8+
specOut[outKey] = {};
9+
10+
spec[key].forEach((d) => {
11+
const { desc, opts, e } = d;
12+
13+
const [opt1] = opts;
14+
const f2 = (e.validator || '').replace(/^validate_/, '');
1115
const x = {
1216
desc,
1317
t: f2
1418
}
15-
if (Object.prototype.hasOwnProperty.call(d, 'def')) {
16-
x['def'] = def;
19+
const dest = camelcase(e.dest || opt1.substring(2));
20+
21+
if (Object.prototype.hasOwnProperty.call(e, 'default')) {
22+
x.def = e.default;
1723
}
18-
specOut[key][camelcase(opt1.substring(2))] = x
24+
specOut[outKey][dest] = x;
1925

2026
});
2127
});
22-
fs.writeFileSync('newSettingsSpec.json',
28+
fs.writeFileSync('gen/newSettingsSpec.json',
2329
JSON.stringify(specOut), 'utf-8');

docutils-export.py

-42
This file was deleted.

gen/Settings.ts

+434-103
Large diffs are not rendered by default.

gen/defaults.json

+1-50
Original file line numberDiff line numberDiff line change
@@ -1,50 +1 @@
1-
{
2-
"standaloneReader": {
3-
"doctitleXform": 1,
4-
"docinfoXform": 1
5-
},
6-
"xmlWriter": {
7-
"xmlDeclaration": 1,
8-
"doctypeDeclaration": 1
9-
},
10-
"rstParser": {
11-
"pepBaseUrl": "http://www.python.org/dev/peps/",
12-
"pepFileUrlTemplate": "pep-%04d",
13-
"rfcBaseUrl": "http://tools.ietf.org/html/",
14-
"tabWidth": 8,
15-
"syntaxHighlight": "long",
16-
"smartQuotes": false,
17-
"characterLevelInlineMarkup": false
18-
},
19-
"frontend": {
20-
"exitStatusLevel": 5,
21-
"inputEncodingErrorHandler": "strict",
22-
"outputEncoding": "utf-8",
23-
"outputEncodingErrorHandler": "strict",
24-
"errorEncoding": "UTF-8",
25-
"errorEncodingErrorHandler": "backslashreplace",
26-
"languageCode": "en",
27-
"recordDependencies": null,
28-
"idPrefix": "",
29-
"autoIdPrefix": "id"
30-
},
31-
"html4css1": {
32-
"template": "/usr/share/docutils/writers/html4css1/template.txt",
33-
"stylesheetPath": [
34-
"html4css1.css"
35-
],
36-
"stylesheetDirs": [
37-
".",
38-
"/usr/share/docutils/writers/html4css1",
39-
"/usr/share/docutils/writers/html5_polyglot"
40-
],
41-
"initialHeaderLevel": "1",
42-
"fieldNameLimit": 14,
43-
"optionLimit": 14,
44-
"footnoteReferences": "brackets",
45-
"attribution": "dash",
46-
"tableStyle": "",
47-
"mathOutput": "HTML math.css",
48-
"xmlDeclaration": 1
49-
}
50-
}
1+
{"DocutilsCoreOptionParser":{"exitStatusLevel":5,"inputEncodingErrorHandler":"strict","outputEncoding":"utf-8","outputEncodingErrorHandler":"strict","errorEncoding":"UTF-8","errorEncodingErrorHandler":"backslashreplace","languageCode":"en","recordDependencies":null,"idPrefix":"","autoIdPrefix":"id"},"DocutilsFrontendOptionParser":{"exitStatusLevel":5,"inputEncodingErrorHandler":"strict","outputEncoding":"utf-8","outputEncodingErrorHandler":"strict","errorEncoding":"UTF-8","errorEncodingErrorHandler":"backslashreplace","languageCode":"en","recordDependencies":null,"idPrefix":"","autoIdPrefix":"id"},"DocutilsParsersRstParser":{"pepBaseUrl":"http://www.python.org/dev/peps/","pepFileUrlTemplate":"pep-%04d","rfcBaseUrl":"http://tools.ietf.org/html/","tabWidth":8,"syntaxHighlight":"long","smartQuotes":false,"characterLevelInlineMarkup":false},"DocutilsWritersDocutilsXmlWriter":{"xmlDeclaration":1,"doctypeDeclaration":1},"DocutilsWritersPepHtmlWriter":{"template":"/usr/share/docutils/writers/html4css1/template.txt","stylesheetPath":["html4css1.css"],"stylesheetDirs":[".","/usr/share/docutils/writers/html4css1","/usr/share/docutils/writers/html5_polyglot"],"initialHeaderLevel":"1","fieldNameLimit":14,"optionLimit":14,"footnoteReferences":"brackets","attribution":"dash","tableStyle":"","mathOutput":"HTML math.css","xmlDeclaration":1},"DocutilsWritersLatex2EWriter":{"documentclass":"article","documentoptions":"a4paper","docutilsFootnotes":true,"footnoteReferences":"superscript","attribution":"dash","stylesheet":"","embedStylesheet":0,"stylesheetDirs":["."],"latexPreamble":"% PDF Standard Fonts\n\\usepackage{mathptmx} % Times\n\\usepackage[scaled=.90]{helvet}\n\\usepackage{courier}","template":"default.tex","usePartSection":0,"useLatexDocinfo":0,"useLatexAbstract":0,"hyperlinkColor":"blue","hyperrefOptions":"","sectionEnumeratorSeparator":"-","literalBlockEnv":"","useVerbatimWhenPossible":0,"tableStyle":["standard"],"graphicxOption":"","fontEncoding":"T1","referenceLabel":null,"useBibtex":null},"DocutilsWritersOdfOdtWriter":{"stylesheet":"/usr/share/docutils/writers/odf_odt/styles.odt","cloakEmailAddresses":false,"tableBorderThickness":null,"addSyntaxHighlighting":false,"createSections":true,"createLinks":false,"endnotesEndDoc":false,"generateOowriterToc":true,"customHeader":"","customFooter":""},"DocutilsWritersOdfOdtReader":{"doctitleXform":1,"docinfoXform":1},"DocutilsWritersHtml4Css1Writer":{"template":"/usr/share/docutils/writers/html4css1/template.txt","stylesheetPath":["html4css1.css"],"stylesheetDirs":[".","/usr/share/docutils/writers/html4css1","/usr/share/docutils/writers/html5_polyglot"],"initialHeaderLevel":"1","fieldNameLimit":14,"optionLimit":14,"footnoteReferences":"brackets","attribution":"dash","tableStyle":"","mathOutput":"HTML math.css","xmlDeclaration":1},"DocutilsWritersXetexWriter":{"documentclass":"article","documentoptions":"a4paper","docutilsFootnotes":true,"footnoteReferences":"superscript","attribution":"dash","stylesheet":"","embedStylesheet":0,"stylesheetDirs":["."],"latexPreamble":"% Linux Libertine (free, wide coverage, not only for Linux)\n\\setmainfont{Linux Libertine O}\n\\setsansfont{Linux Biolinum O}\n\\setmonofont[HyphenChar=None,Scale=MatchLowercase]{DejaVu Sans Mono}","template":"xelatex.tex","usePartSection":0,"useLatexDocinfo":0,"useLatexAbstract":0,"hyperlinkColor":"blue","hyperrefOptions":"","sectionEnumeratorSeparator":"-","literalBlockEnv":"","useVerbatimWhenPossible":0,"tableStyle":["standard"],"graphicxOption":"","referenceLabel":null,"useBibtex":null},"DocutilsWritersHtml5PolyglotWriter":{"template":"/usr/share/docutils/writers/html5_polyglot/template.txt","stylesheetPath":["minimal.css","plain.css"],"stylesheetDirs":[".","/usr/share/docutils/writers/html5_polyglot"],"initialHeaderLevel":"1","footnoteReferences":"brackets","attribution":"dash","tableStyle":"","mathOutput":"HTML math.css"},"DocutilsWritersS5HtmlWriter":{"template":"/usr/share/docutils/writers/html4css1/template.txt","stylesheetPath":["html4css1.css"],"stylesheetDirs":[".","/usr/share/docutils/writers/html4css1","/usr/share/docutils/writers/html5_polyglot"],"initialHeaderLevel":"1","fieldNameLimit":14,"optionLimit":14,"footnoteReferences":"brackets","attribution":"dash","tableStyle":"","mathOutput":"HTML math.css","xmlDeclaration":1},"DocutilsReadersPepReader":{},"DocutilsReadersStandaloneReader":{"doctitleXform":1,"docinfoXform":1}}

0 commit comments

Comments
 (0)