Gets Json from and json to Ablaufplan-files
- Version:
- 1.0
- Source:
Members
(inner, constant) regex
Get Json from a string
- Source:
Methods
(static) toFile(json, callback)
Write Json to a File String
Parameters:
| Name | Type | Description |
|---|---|---|
json |
object | String as delivered by fs.readFile |
callback |
ablauf~stringCallback | A Callback with an error or the String as delivered to fs.writeFile |
- Source:
Returns:
Nothing
(inner) clean(text) → {String}
Removes Strange Symbols from the Text for a better json
Parameters:
| Name | Type | Description |
|---|---|---|
text |
string | A Bite of Text |
- Source:
Returns:
- A cleaner bit of Text
- Type
- String
(inner) color2Hex(color) → {string}
Takes Color Information and returns a css-hex-representation
Parameters:
| Name | Type | Description |
|---|---|---|
color |
string | Some weird color (string, windows decimal, ...) |
- Source:
Returns:
- A clean hex-rep
- Type
- string
(inner) colourNameToHex(colour) → {string}
Takes a cssColor-Name and returns the hex-value or an empty string
Parameters:
| Name | Type | Description |
|---|---|---|
colour |
string | A ColourName |
- Source:
Returns:
- A Hex-Color or an empty String
- Type
- string
(inner) getType(caption, filename) → {string}
Guesses the Type of the Item
Parameters:
| Name | Type | Description |
|---|---|---|
caption |
string | The Caption of the item |
filename |
string | The Filename of the item |
- Source:
Returns:
- Type, may be: song, video, powerpoint, sermon, unknown
- Type
- string
(inner) hex2Color(hex) → {string}
Takes a Hex-Color and makes a windows-decimal-color out of it.
Parameters:
| Name | Type | Description |
|---|---|---|
hex |
string | A Hex Color |
- Source:
Returns:
- Windows Decimal Color
- Type
- string