XML option browser


  • Admin

    @Mahks I don't think having an inlined all-in-one page fits the structure of our website.
    Of course we could just upload the file and leave everything as-is, but if we want to align the design with a website we'd want to use the existing css that's being kept seperate in its own css file.
    So if we want to drop offline support I have a pretty good strategy that'll make everything pretty easy to read.
    I'd actually prefer seperate files per entry, the opposite of @redrum's idea.
    This way everything is way more structured and easier accessible.
    Also when creating a new entry one would just create a new file which is pretty straightforward IMO.
    Also we could give "context" a special treatment so that the xml can just get pasted at the end of the file without having to to any escaping.


  • Admin

    Thanks for feedback.

    To build on how yaml knows about the double colon, it knows based on the first letter after the first colon. There are three choices, 'string', 'list', or 'map', if it sees a [, it's a list, { for a map, and any letter is a string value. You can also do lists in a different syntax, multi-line as:

    list_name:
     - a
     - b
     - c
    same_list_values: [ 'a' , 'b', c' ]
    

    And for a map:

    map_name:
      - property_a: 1
      - property_b: 2 
    map_name { 'a': 1, 'b': 2 }
    

    And you can nest these, so hence why we have a superset of JSON.

    YAML provides block values with native HTML without any escaping, so it's just a nicer format to work with and avoids the error prone syntax requirements of JSON.

    The idea is that we basically structure a YAML to match the needed JSON, work with the YAML by hand, and use software to do the relatively simple conversion to JSON and upload to website (we have an existing pattern for doing that).

    All that aside, simply hosting the HTML directly on the triplea website is a good first option! : )

    That would be just plopping the file in: https://github.com/triplea-game/triplea-game.github.io; Then it'll be available from http://triplea-game.org/theFileName.html


  • Admin

    Sounded to me like offline support was in-lieu of online support. The most brute-force option here is to just host on website as an html.

    Overall it seems we are weighing three options:

    • maintain the data as an html file (post-render) hosted directly on website repo.
    • create dynamic html page that is hosted on website repo, feed the page a JSON payload that is rendered from a YML file
    • create dynamic html page that is hosted on website repo, feed the page a JSON payload that is rendered from a set of input files (eg: all files in a given folder)

    Let me know @RoiEX if I mischaracterized the recommendation.


  • Admin

    @LaFayette Seems right.
    However I'd like to point out option 2 and 3 do not work well offline.



  • Update:

    • Added alpha buttons
    • Hierarchical index now expands & collapses

    XOB Update



  • Update:

    • Search option added
    • Navigation to previous object added.
    • Fixed off-line issues.

    XOB Update


  • Donators Moderators Admin

    @mahks Nice job.


  • Moderators Admin

    @mahks Glad to see this is still alive. Well done fine sir!