Eisvana / Eisvana-Census

Census management website for Eisvana
http://census.eisvana.com/
GNU General Public License v3.0
0 stars 1 forks source link

Form: Update Base #57

Closed Lenni009 closed 6 months ago

Lenni009 commented 7 months ago

Editable fields:

Unchangeable fields:

Lenni009 commented 7 months ago

Method for getting all the infobox content (some is not saved in cargo):

https://nomanssky.fandom.com/api.php?action=parse&format=json&origin=*&page=Eisvana%20Research%20Outpost&prop=sections%7Cwikitext&section=0

returns

{
    "parse": {
        "title": "Eisvana Research Outpost",
        "pageid": 546876,
        "sections": [],
        "wikitext": {
            "*": "{{Version|Echoes}}\n{{Eisvana}}\n{{Base infobox\n| name = Eisvana Research Outpost\n| image = 20230928192154_1.jpg\n| civilized = Eisvana\n| researchteam = Eisvana Wiki Scholars\n| builderlink = Lenni009\n| builder =\n| galaxy = Eissentam\n| region = Uskabar\n| system = EV6-30 Cadiaue-Omf\n| planet = Sidenh Alpha\n| moon =\n| axes = -11.28, +95.92\n| coordinates = {{Glyphs2Coords|6030A21107FE}}\n| portalglyphs = 6030A21107FE\n| type = Residential\n| mode = Permadeath\n| platform = PC\n| release = Echoes\n| farm = No\n| geobay = No\n| landingpad = Yes\n| arena = No\n| terminal = Yes\n| racetrack = No\n| censusplayer = Lenni\n| censusreddit = Lenni009\n| censusdiscord = lenni009\n| censusfriend =\n| censusarrival = 2023/09/25\n| censusrenewal = 2023, 2024\n| censusshow = Y\n}}\n'''Eisvana Research Outpost''' is a player base."
        }
    }
}

Which can then be piped into parseWikiTemplate to get an object representation of the infobox in the shape of Record<string, string>

Lenni009 commented 6 months ago

Make a new component DynamicSections that checks whether there are any unexpected h2 sections, and then adds those to the editor as well.