Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.

Commit 7b0c681

Browse files
Cleaned Command Line Description Text
Cleaned description text for commands and option arguments where possible.
1 parent c62fe7d commit 7b0c681

File tree

4 files changed

+54
-16
lines changed

4 files changed

+54
-16
lines changed

changelog.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
# Changelog
22

3-
**./src/common/sub-interface/**
4-
* When displaying help on the command line, all command and option descriptions are now lowercase.
5-
* This affects the files:
6-
* cmd-desc.js
7-
* option-desc.js
3+
**./src/common/sub-interface/cmd-desc.js**
4+
* Added substring breaks to:
5+
* 'writeMapDesc' at "and performs..."
6+
* 'writeAbsoluteConversionDesc' at "and outputs..."
7+
* writeRelativeConversionDesc at "and outputs..."
8+
9+
---
10+
11+
**./src/common/sub-interface/option-desc.js**
12+
* Split the text of these functions into substrings:
13+
* writeIgnoreParseDesc
14+
* writeOriginDesc
15+
* Added substring break to 'writeColourDesc' at "(default:"
16+
* Wrote new function 'writeSaveImageConvConfigDesc'
17+
* Used to assign global variable 'saveImageConvConfigDesc'

src/common/sub-interface/cmd-desc.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ function writeMapDesc(fileDesc)
2323

2424
writeRes += "takes ";
2525
writeRes += fileDesc;
26-
writeRes += ", converts it into an interactive diagram, and performs a pathfinding algorithm.";
26+
writeRes += ", converts it into an interactive diagram, ";
27+
writeRes += "and performs a pathfinding algorithm.";
2728

2829
return writeRes;
2930
}
@@ -35,7 +36,8 @@ function writeAbsoluteConversionDesc(inputDesc)
3536

3637
writeRes += "takes an existing ";
3738
writeRes += inputDesc;
38-
writeRes += " file, parses it into a graph, and outputs an absolute definition text file.";
39+
writeRes += " file, parses it into a graph, ";
40+
writeRes += "and outputs an absolute definition text file.";
3941

4042
return writeRes;
4143
}
@@ -47,7 +49,8 @@ function writeRelativeConversionDesc(inputDesc)
4749

4850
writeRes += "takes an existing ";
4951
writeRes += inputDesc;
50-
writeRes += " file, parses it into a graph, and outputs a relative definition text file.";
52+
writeRes += " file, parses it into a graph, ";
53+
writeRes += "and outputs a relative definition text file.";
5154

5255
return writeRes;
5356
}

src/common/sub-interface/option-desc.js

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,19 @@ const tileSizeDesc = "the approximate size of a maze tile in pixels. (default: 1
1414
const imageOriginDescX = writeOriginDesc("x");
1515
const imageOriginDescY = writeOriginDesc("y");
1616
const replaceExistingFileDesc = "specifies whether existing files will be replaced.";
17-
const saveImageConvConfigDesc = "specifies the path where the image configuration file will be saved. if this is blank, no file will be saved.";
17+
const saveImageConvConfigDesc = writeSaveImageConvConfigDesc();
1818

1919

2020

2121
function writeIgnoreParseDesc(typeDesc)
2222
{
23-
var writeRes = "ignores or corrects non-fatal errors when parsing input " + typeDesc + " files.";
23+
var writeRes = "";
24+
25+
writeRes += "ignores or corrects non-fatal errors ";
26+
writeRes += "when parsing input ";
27+
writeRes += typeDesc;
28+
writeRes += " files.";
29+
2430
return writeRes;
2531
}
2632

@@ -44,7 +50,8 @@ function writeColourDesc(pixelDesc, defaultHex)
4450

4551
writeRes += "the hex colour of ";
4652
writeRes += pixelDesc;
47-
writeRes += " pixels in the target image. (default: ";
53+
writeRes += " pixels in the target image. ";
54+
writeRes += "(default: ";
4855
writeRes += defaultHex;
4956
writeRes += ")";
5057

@@ -54,7 +61,25 @@ function writeColourDesc(pixelDesc, defaultHex)
5461

5562
function writeOriginDesc(oPlane)
5663
{
57-
var writeRes = "the approximate " + oPlane + " location of the first tile. (default: 0)";
64+
var writeRes = "";
65+
66+
writeRes += "the approximate ";
67+
writeRes += oPlane;
68+
writeRes += " location of the first tile. ";
69+
writeRes += "(default: 0)";
70+
71+
return writeRes;
72+
}
73+
74+
75+
function writeSaveImageConvConfigDesc()
76+
{
77+
var writeRes = "";
78+
79+
writeRes += "specifies the path where the ";
80+
writeRes += "image configuration file will be saved. ";
81+
writeRes += "if this is blank, no file will be saved.";
82+
5883
return writeRes;
5984
}
6085

summary.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Summary
22

3-
**Version:** 1.0.25
3+
**Version:** 1.0.26
44

55
**Date:** 2021-03-31
66

7-
**Title:** Lowercase command and option descriptions.
7+
**Title:** Cleaned Command Line Description Text
88

99
**Description:**
1010

11-
When displaying help on the command line, all command and
12-
option descriptions are now lowercase.
11+
Cleaned description text for commands and option arguments
12+
where possible.

0 commit comments

Comments
 (0)