When I wrote the new FreeDOS software list, one of the "targets" was to provide a method for the FDUPDATE program to get a list of packages that it needed to update. An easy way to do this is to query the database, and format the output in an XML file that the FDUPDATE program can read.
I've already shared this with Mateusz, but in case anyone else wants to write their own program to check FreeDOS program information via an XML file, here's how to export the software list as XML.
You start here:
www.freedos.org/cgi-bin/fdupdate.cgi
Without any parameters, the fdupdate.cgi program returns an unformatted list of "categories" (also called "disk sets") in the software list. When you installed your distribution of FreeDOS, you may only have installed the "Base" disk set. But others may have installed the "Full" distribution, and might have chosen to include things like "Devel" and "Edit". The FDUPDATE program knows what disk sets you installed, so it also knows what disk sets it needs to update. It does the right magic in the background to fetch the right category lists.
Let's say you wanted to get the data for just the "Base" category. You just give fdupdate.cgi the "cat=" parameter:
www.freedos.org/cgi-bin/fdupdate.cgi?cat=base
That will give you an XML list of all the packages (and their version numbers) in the "Base" category. The FDUPDATE program can easily parse this to figure out which programs need updating.
Since the software list was only recently converted to a database, obviously the FDUPDATE program doesn't support the new fdupdate.cgi method yet. That's probably a good thing for right now, since the database doesn't contain any information (yet) about the specific package zip file names. We haven't entered that into the database yet, but we will.
So this is sort of a "coming soon" feature of the software list. But I wanted to share this with you now, so you can see the flexibility that a database back-end gives us.
Subscribe to:
Post Comments (Atom)
About Me
- Jim Hall
- I'm Jim Hall, the founder and Project Coordinator for the FreeDOS Project. I started FreeDOS in 1994, when I was an undergraduate physics student at the University of Wisconsin-River Falls. Other developers got in touch with me, and we began work creating our own version of DOS that would be compatible with MS-DOS. I shared the extended DOS utilities that I had written for myself, as did others. We also found public domain or open source programs that replaced other DOS commands. A few months later, we released our first FreeDOS “Alpha” distribution. And from there, FreeDOS grew into what you see today!
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.