Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a utility script to parse a winbliss '.wbs' file and output the contents as JSON #7

Open
klown opened this issue Apr 20, 2023 · 0 comments · May be fixed by #8
Open

Create a utility script to parse a winbliss '.wbs' file and output the contents as JSON #7

klown opened this issue Apr 20, 2023 · 0 comments · May be fixed by #8
Labels
enhancement New feature or request

Comments

@klown
Copy link
Contributor

klown commented Apr 20, 2023

Is your feature request related to a problem? Please describe.

Winbliss .wbs files contain a specification of a Bliss symbol and metadata for that symbol as a single string using characters such as & and # to separate fields as well as marker strings, e.g. ##0#4*. An example of the Bliss symbol for "accessibility" is:

25002$accessibility,access$YELLOW$SWE$H#2#1#0#0#10#27#11##0#4*&W#2#2#0#2#10#29#11##0#4*&F#1#2#0#6#10#27#11##0#4*&W#4#2#0#10#8#31#9##0#4*%£

This is an opaque and non-standard way to represent information. A JSON version is a better representation.

Describe the solution you'd like

The utility reads the wbs string, parses it, and converts it to a JSON structure. The fields are the symbol's identifier, its gloss, the colour used to designate the part of speech, the country of origin, and an array of shape specifiers including their position on the Bliss grid. For example:

  {
    "identifier": "25002",
    "gloss": "accessibility,access",
    "pos_colour": "YELLOW", 
    "country": "SWE",
    "shapes": [
      {
        "code": "H-2-1",
        "x": "0",
        "y": "10",
        "letter": ""
      },
      {
        "code": "W-2-2",
        "x": "2",
        "y": "10",
        "letter": ""
      },
      {
        "code": "F-1-2",
        "x": "6",
        "y": "10",
        "letter": ""
      },
      {
        "code": "W-4-2",
        "x": "10",
        "y": "8",
        "letter": ""
      }
    ]
  }
@klown klown added the enhancement New feature or request label Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant