Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Fixing broken links in Wiki (Articles Tutorials) - Page 4 — Gideros Forum

Fixing broken links in Wiki (Articles Tutorials)

12467

Comments

  • hgy29hgy29 Maintainer
    @antix, the script I was referring to is accessible from here http://wiki.giderosmobile.com/gidapi.php

    it is probably not what you are looking for, but it could be modified to at least provide a json formatted index into the wiki API pages
  • @antix could you please test this:
    https://wiki.giderosmobile.com/index.php/Special:Export
    you can fill what you want from this link:
    https://wiki.giderosmobile.com/index.php/Special:AllPages
    It exports to xml.

    Or you can have a look if you find a command you like:
    https://www.mediawiki.org/wiki/Help:Export

    Or this tool: https://pythonhosted.org/mwxml/
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • hgy29hgy29 Maintainer
    @antix, I wrote a quick script to return API index in json, check it out: http://wiki.giderosmobile.com/gidapiref.php
    +1 -1 (+2 / -0 )Share on Facebook
  • @hgy29 mediawiki export to xml
    I changed the extension to txt because forum doesn't allow xml files.
    I exported all accelerometer pages (main page + methods).
    What do you think of the output?
    txt
    txt
    GiderosMobile-20191204131126.txt
    10K

    Likes: antix

    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
    +1 -1 (+1 / -0 )Share on Facebook
  • @MoKaLux Thanks. Neither of those links were useful to em though :(

    @hgy29 that last pho looks interesting. It doesn't export which api and class things belong to and also doesn't list their events.

    I haven't done PHP at school yet but how would I get or edit that script so it might do what I want?
  • hgy29hgy29 Maintainer
    If you look more closely you will see that it does reference classes(objects) and namespaces(whatever is before the . or : ). You should also see events and constants
  • antixantix Member
    edited December 2019
    There is no reference to the API the class belongs to but that isn't such a great issue IMHO.

    UrlLoader does not have events listed, its just an empty array. That's the class I've been using for tests because it seems to be the smallest class which contains events, constants, and methods.

    The main wiki page has now been modified also, by @MoKaLux I am suspecting heheh.

    There's no links to the individual API pages and now all of the API stuff is at the top, where it really shouldn't be IMHO. Now the API stuff is just stuck there and delegates the actual wiki type stuff (examples and tutorials) to the bottom.

    I reckon either on the left or right of the main page there should be...
    API Reference
    -Main API
    -Physics API
    -Lua API
    -Lua enhancements
    -Plugins
    -Facebook Instant Games

    I think that might have been how it was originally (except Lua enhancements was alienated into another section).

    Everything to do with API Reference should be in that little section (API Reference). That makes it easier to see and use, and also makes it easier to scrape any pages that are listed in that section... for 3rd party scrapers like my possible one would be.

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    All events are under Event in reality, that’s why you don’t see them under UrlLoader
  • Ahh okay I see. In the actual wiki pages it does contain related events. It's not a problem as my scraper seems to be picking them up.
  • Ahh okay I see. In the actual wiki pages it does contain related events. It's not a problem as my scraper seems to be picking them up.
  • hgy29hgy29 Maintainer
    You can also see which class they relate to in the json, each event under 'Event' namespace has a 'object' and 'page' field to know which class is was declared about and on which wiki page.
  • @hgy29 okay I've looked at the output again and it is fairly good. It does have namespaces but doesn't specify which API each namespace belongs in (like UrlLoader belongs in the Main API) etc. that's not a great issue I guess.

    I've also noticed that it is not getting events, instead it just seems to only fetch one of each one. An example is UrlLoader where is has Event.ERROR but in the JSON generated by your script the only Event.ERROR is assigned to the GeoLocation namespace.

    I've made progress with my own crappy scraper and it's generating this...

    It can crawl all of the APIs but some of them have odd formts like "Lua Enhancements" and "FaceBook Instant" which are different than all other namespaces.

    I guess in the end a PHP script would be better than JavaScript? I dunno... what do you think?
    image.png
    812 x 862 - 27K
  • hgy29hgy29 Maintainer
    edited December 2019
    Yes, you are right, the general API section isn't available. We could add a tag on each API page maybe, no sure if that's the best way.
    And yes, in my script all events with the same name are merged together, I can fix that to distinguish those with different 'object' (will do in few minutes). I don't mind it being in JS or PHP, but we should find a way to do not put too much stress on the server. HTTP caching would be good, so maybe a php script is better.

    Your API look very nice BTW, it would be great if we could host it along the wiki.
  • Maybe I should stop my development then :D since mine pretty much downloads every single API page to create its data.
  • hgy29hgy29 Maintainer
    Changed my script, now it has the following structure:
    namespace -> (event/constant/method) -> page -> api details

    Likes: antix

    +1 -1 (+1 / -0 )Share on Facebook
  • Cool, I'll check it out in the morning :)
  • hgy29hgy29 Maintainer
    We could even use it to check the doc for consistency somehow: missing tags, description, etc

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • Guys, you talk so much about changing wikipedia that in that time you could manually add changes to your old documentation - which everyone liked :)
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • hgy29hgy29 Maintainer
    oleg said:

    Guys, you talk so much about changing wikipedia that in that time you could manually add changes to your old documentation - which everyone liked :)

    But which no one could maintain beside me, and at terrible time cost.

    Likes: antix

    +1 -1 (+1 / -0 )Share on Facebook
  • @all Please allow some more testing.
    I am trying to make gideros wiki as practical and nice as possible.
    I put all the functions in the front page waiting to get the side bar working...

    Likes: SinisterSoft

    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29 said:

    oleg said:

    Guys, you talk so much about changing wikipedia that in that time you could manually add changes to your old documentation - which everyone liked :)

    But which no one could maintain beside me, and at terrible time cost.
    I could support, but it's a bad idea because i have bad english

    Likes: antix

    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
    +1 -1 (+1 / -0 )Share on Facebook
  • oleg said:


    Also this command is outdated and will not work:

    gametune:play(100,5)
    I tested the function with a short message (that's easier to know when words begin and end)
    local gametune = Sound.new("new_email.mp3")
    gametune:play(700,0)
    and indeed you're right. It's not working as expected in tutorial.

    The first parameter works as stated.
    The second one doesn't work as author explains it ((it says You can tell the tune how many times to loop (play over again) by specifying the Loops option.)).

    I edited the page to mark that statement as deprecated and changed command to
    gametune:play(100)
    .

    Regards.
  • olegoleg Member
    edited December 2019
    plicatibu said:

    I edited the page to mark that statement as deprecated and changed command to.

    You can loop the sound with the command:
    gametune:play(0,true)
     
    --Sound:play(startTime,looping,paused)
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • @oleg I know.

    I saw it in API and in the tutorial the author mentions it and gives an example too.
  • Did you try with a .wav file?
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • @SinisterSoft I tried with an mp3 file.

    Does the function behaves different depending on file format?
  • Did you try with a .wav file?

    @Hgy29 said that disabled the repeat function and the SoundRegion function
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • hgy29hgy29 Maintainer
    oleg said:

    Did you try with a .wav file?

    @Hgy29 said that disabled the repeat function and the SoundRegion function
    Did I ?
  • olegoleg Member
    edited December 2019
    hgy29 said:

    oleg said:

    Did you try with a .wav file?

    @Hgy29 said that disabled the repeat function and the SoundRegion function
    Did I ?
    I once asked you about this feature and you said that it was turned off for a very long time sometime in ~2013Year
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • antixantix Member
    edited December 2019
    @hgy29 I've been looking at the JSON file your PHP script generates and found the events a bit confusing. I finally discovered that they all live in the "events" part of the "Event" namespace, and no in the "events" part of their associated namespace.

    I then started parsing it all using my beloved UrlLoader namespace since that is fairly small and contains methods, events, and constants.

    After some time and frustration I figured out why events would not parse correctly... in the "events" part of the "Event" namespace... all UrlLoader events have NO object! It's no wonder I was not able to find them LOL

    thee are errors in the output also.

    there is a namespace that is blank. The empty namespace seems to be (global) and all object references inside it are saying "Bitmap". then inside its "constants part" it has references to "Math" :D
Sign In or Register to comment.