API Docs for: 1.4.4
Show:

ugsEditorPlus.reformat Class

Module: ugsEditorPlus

Methods

countChords

(
  • words
)

Looks for supported chords.

Parameters:

  • words Array of words

Returns:

[int] number found

hasChords

() Bool

TRUE if one or more chord lines detected

Returns:

Bool:

isTabBlock

(
  • lines
  • index
)

TRUE if we can make a Tab block using this and the following 3 linrd (we need a set of four tab lines followed by a non-tab line)

Parameters:

  • lines Array of Lines
  • index Int

    current line's index within line array

Returns:

[bool]

merge

(
  • lines
)

Return merged song -- chords embedded within lyrics

Parameters:

  • lines Array of Lines

Returns:

[string]

mergeLines

(
  • chordLine
  • lyricsLine
)

Return a single line

Parameters:

  • chordLine String

    the line containing the chord names

  • lyricsLine String

    the line of lyrics

Returns:

[string] merged lines

read

(
  • text
)
Array of Lines

Accepts a text block

Parameters:

  • text String

    string RAW song

Returns:

Array of Lines:

run

(
  • text
)
String public

Accepts a text block, returns "ChordPro" text block with chord lines merged into lyric lines with chords enclosed in square-brackets (i.e. [Cdim])

Parameters:

  • text String

    songstring

Returns:

String:

ChordPro format text block

toLineType

(
  • line
)
_enums.lineTypes

Guesses as to the line's tyupe --

Parameters:

  • line Line

Returns:

_enums.lineTypes:

wrapChords

(
  • chordLine
)

Wraps the words on the line within square brackets " C D " is returned as "[C] [D]"

Parameters:

  • chordLine String

    the line containing the chord names

Returns:

[string] each word of input line gets bracketed

Properties

_enums

Unknown private

_public

JsonObject

attach public members to this object