BukkitDev & SpaceBukkit - Parsing the repo

Discussion in 'BukkitDev Information and Feedback' started by Antariano, Oct 21, 2011.

Thread Status:
Not open for further replies.
  1. Offline


    Hey there fellow Bukkiteers!

    My name is Antariano, and I am currently working on a project called Spacebukkit.

    I am encountering some troubles in BukkitDev related manners and thought I'd share my troubles to the community, so perhaps somebody has an idea or two, or maybe a solution :p

    Now, without going into too much detail, what is giving me headaches is the automatic plugin update system I am attempting to write right now.

    The current issue on my part is the following: How can I retrieve the correct files page, or latest build/version from a plugin, with only the plugin's name or jar file.

    The problems I encountered are obvious - aside from plugins not even being on BukkitDev, the name of the project sometimes doesn't correspond to the exact plugin's name, or a plugin has multiple .jars (like Essentials) making the retrival of the correct file difficult.

    Yes, even the version check is difficult since it's not written somewhere easily accessible without complicated parsing.

    So my questions are these:
    Aside from a free-for-all brainstorming and suggestion-suggesting (ugh... )

    is there some kind of API of Curse I can use,

    or am I missing an important feature of Bukkitdev that could help me

    or did I miss a project that already did this (apart from CBuptodate)

    or is there any way Curse/Bukkitdev could make this possible?
    Jamy and NeatMonster like this.
  2. Plugins would need to implement some kind of metadata to indicate where updates should come from.
  3. Offline


    Yes, that's what I'm trying to avoid. Because that would cause dependencies not all plugin authors would like to have + uncomplete lists of update locations.
    Making it manually isn't difficult, the point here is to do it automatically.
  4. Offline


  5. Offline


    You Could Get Maven, It Creates The Latest .jar When You Update A Repo On GitHub. But You'll Need Jenkins, Which, Sadly, You Need A VPS Or Host It On Your Computer.
  6. Offline

    Daniel Heppner

    Do You Really Have To Capitalize Every Word Like You're Writing A Title Or Something?
    robinjam and Walker Crouse like this.
  7. Offline


    I Just Learnt To Type Like That.
  8. Offline


    Maven is for the plugin, not for the web interface. And I also don't see how Maven/Jenkins could help us getting plugins last version from Bukkit Dev'.
  9. Offline


    The critical info to have, is the slug.
    is the overview of the files.
    .main-body .listing-container tbody
    contains a row for each file.

    The File to look for is: the first file with the "Normal" status, and the "Release" release type, with the corresponding Game version.

    Also, don't forget to look for dependencies.

    How to get the slug? that's something you can ask in the interface (Hint: Ask for the dev.bukkit.org project URL) or automatically when resolving dependencies.

    Naturally, there are some problems with that too, such as plugins that require you to download multiple files, get only distributed as ZIP files etc. Those plugins can't be managed automatically.
  10. Offline


    That again would require work from plugin authors to be done. What we need here is a system that does it automatically.

    Finally a post that helps me here :)
    I'll look into this, thanks alex

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 20, 2016
  11. Yes, but it still requires work on the plugin developer's part because some have multiple files, some include zipped versions of jars (packs or stupid people who zip single jars).
  12. Offline


  13. Offline


    Oh, I Got A Little Confused. Sorry.
  14. Offline


    What Kind Of School/Entity Teaches You To Type Like This ><
    robinjam and Walker Crouse like this.
  15. Offline


    Just putting this out there, if the authors would put the project name in the plugin, the same way it is listed on the Dev page, then all the plugin required files saved in a zip. When the zip files are downloaded, they could be extracted into the specified folder, only overwriting the jar files.

    The only problems I see is the config files or plugins that have had major changes.

    I've begun using craftBukkitUpToDate and it works fairly well. It downloads all the files it knows about, saves the files in a specific folder along with an (offline) html file listing that version's changelog.

    If anything, authors could keep things simple and have code just stating the project name, version, and url.

    I know I am not a dev, but I don't usually have the patients of coding after my computer classes during college days. (Then again, all I've been taught lately is mostly C++, only one small semester of Java, so I'm guessing java and c++ is similar :/ )
  16. Offline


    Mavis Beacon Didn't Make You Capitalize Every Word?
  17. Offline


    Maybe we can improve @alexanderpas idea by saving in a global database the link the user typed.
  18. Offline


    It would get manual again. But I guess there's now way around it, is there?
  19. Offline


    I think it's the better idea because if one user enters the link, the link will automatically be shared with the whole community. So all plugins will be easily supported.
  20. Offline


    The plugin "CraftBukkitUpToDate" does search for newest versions of plugins on dev.bukkit.org based on the jar files it finds in the "plugins" folder. It will also download them and include the changelog of the new version(s), compared to your current version, as a text file. You may want to look that up and see how the author of that plugin manages to find the correct files and changelogs etc.
  21. Offline


    Hey Everyone,

    I know BukGet hasn't received much love lately (a new job will do that), and with everything now on bukkitdev, I am working on a way to parse the data on bukkitdev and build a json file for parsing. The new json format will be different than the current bukget format and will track all of the version of a given plugin. Yes I am writing it in python (as usual) as you really cant beat BeautifulSoup for an HTML parsing engine. The code will update the json every 6 hours from BukkitDev and is setup to space the requests out in such a way as not to piss off Curse. So far I have most of the parsing out of the way and will be storing the persistance data in a SQLite database. As always I am welcome to anyone who would like to help with the code.
  22. Offline


    I'd like to know more about this. Will there be an API? What is required on the user-side of things? How can we intregrate this into SpaceBukkit?
  23. Offline


    as the end result will be a static url slug that you can use to grab the file which would have all the information needed to pull multiple versions of a plugin, including the CB build numbers that they are tagged to work for.
  24. Offline


    So I give you the jar name (or something similar), and you throw all information back to me in some kind of read-friendly format. This sounds like a solution :)
  25. Offline


    I'm still developing it at the moment, and it will probably require a minor rewrite of the bukget client to use it, but all is well ;)
  26. Offline


    I was under the impression you weren't really supposed to do this.
  27. Make as many rules as you like, there'll be someone out there not following them.
    rakiru likes this.
  28. Offline


    So the new format is pretty much feature-complete. Here is the posting for help on the client: <Edit by Moderator: Redacted bit url>
    Last edited by a moderator: Feb 21, 2017
  29. Offline


  30. Offline


    Wasting time to be incorrect, classic. Does this "Mavis Beacon" actually teach typing like that?
Thread Status:
Not open for further replies.

Share This Page