Commit 3de0bbd6 authored by aggsol's avatar aggsol

show only first attribute of images in graph

parent e4b167b0
Pipeline #27135581 failed with stage
in 2 minutes and 51 seconds
......@@ -13,24 +13,23 @@ Helper tool for gamebooks written in Asciidoc
## Usage
```
Options:
-i, --input <file> Input file in Asciidoctor format
-o, --output <file> Output file, default is stdout
-s, --seed <number> Shuffle seed, default: 12345
-d, --dot-file <file> Create a dot file named graph.dot
Flags:
-h, --help Show this help text
-m, --mix-sections Shuffle the sections
-n, --no-color Disable colored output
-v, --verbose Show additional information
--version Show version
Options:
-i, --input <file> Input file in Asciidoctor format
-o, --output <file> Output file, default is stdout
-s, --seed <number> Shuffle seed, default: 12345
-d, --dot-file <file> Create a dot file named <file>
-c, --color-seed <number> Color seed for the generated dot file
Flags:
-h, --help Show this help text
-m, --mix-sections Shuffle the sections
-n, --no-color Disable colored output
-v, --verbose Show additional information
--version Show version
```
## Build
Tested only on Ubuntu with `g++ 7.3.0` and `clang++ 6.0.1` (Sorry!)
### Requirements
1. C++14 compiler
......@@ -45,6 +44,8 @@ $ cmake ..
$ cmake --build .
```
Tested only on Ubuntu with g++ 7.3.0, 4.8.6 and clang++ (Sorry!)
### Run the example
Check the sections
......@@ -89,7 +90,7 @@ book.adoc
### Graph
The gamecheck tool can create a graph from the sections where every node is a section. The nodes differenty by shape and color. The Color is generated from the location data. Also images are tagged to their nodes.
gamebook-checker can create a graph from the sections where every node is a section. The nodes differ by shape and color. The Color is generated from the location data. Also images are tagged to their nodes. A legend for the color coded locations is added.
### Metadata
......
......@@ -24,7 +24,7 @@
namespace
{
// TODO: altTxt also consists fo attributes of the image (comma separated)
// TODO: altTxt also consists of attributes (comma separated)
int parseImageLine(const std::string& input, std::string& outFilename, std::string& altTxt)
{
enum class State
......@@ -66,7 +66,7 @@ namespace
}
break;
case State::AltTxt:
if(c == ']')
if(c == ']' || c == ',') // only first attribute
{
state = State::Done;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment