Latest offline documentation

Where can I find the latest offline documentation for SDL2? I found the following thread from 2013 with two links, but they are out-of-date:

Thanks.

Hi Istarus,
As you might guess, manually transferring the web pages into an offline version, while avoiding same name/different case pages which ms windows has
problems with, removing the cms “junk” to reduce the bloat and remove dependency on external css,jscript etc , and fixing up all the links takes a while.
Since my first offline version I haven’t got round to updating it. You’re welcome to give it a go. :slight_smile:
I will get around to doing a newer version, eventually, but if anyone wants to use what I’ve done and update it themselves they are welcome.
It does mean the latest one at the is what I did a few years back, as a devpac for devcpp
i do still have a copy of the documentation, I could email you, and the devpack, but it is 6.5yrs old.
just let me know if you want me to email a copy.
regards, Tim

Hi Tim,

Thank you for the offer. I already downloaded your version from SourceForge. It looks great, but as you mentioned, it is outdated. So, I ended up using wget to download the current wiki. Unfortunately, the links don’t work well, but I can manually get to the pages I need which is sufficient for me at the moment.

When you do end up releasing a new version of the offline docs, I would be very interested.

Thanks again.

I am also interested in offline documentation. Unfortunately, trying to create a local copy of wiki.libsdl.org via httrack resulted in 503 “Surge protection” errors and now I can’t access the online documentation, either.

SDL is a great library with great documentation, but it doesn’t mean much if that documentation is difficult to access. Either the website ought to be more friendly to attempts to create a local copy e.g. via httrack or there ought to be some proper download link.

1 Like

… up to a point. It takes too long for new features to be documented in my opinion; for example I still cannot find any mention of render batching in the Wiki, nor of the floating-point rendering APIs (e.g. SDL_RenderCopyExF) despite them having been available since SDL 2.0.10.

1 Like

If you stop accessing the wiki altogether, the surge protection blocking should end after an hour or so.

Here’s the command I used to avoid triggering the surge protection:
wget --no-check-certificate --recursive --level 1000 --convert-links --adjust-extension --wait 10 --random-wait --no-clobber --page-requisites --timestamping https://wiki.libsdl.org

Note that this will take a few hours to download the wiki since wget waits somewhere from 5 to 15 seconds between each retrieval.

Well, it took about five hours, but I did finally get more or less the local docs I was hoping for by running httrack with a limit of one request per ten seconds. I might take the time to write a script that cleans up the downloaded html and then share the result.

httrack wiki.libsdl.org -c1 -%c0.1
1 Like

I have created a reasonably complete and well-functioning offline version of the wiki documentation, along with instructions for how to produce your own copy should this one become out of date (see munge.py).

Downloading the wiki without triggering a rate limiting error takes several hours, but putting together a usable offline copy from the downloaded files is completely automated and should take only a few seconds.

You can download an offline version of wiki.libsdl.org here:

https://files.pineapplemachine.com/public/sdl/wiki/offline-archive/wiki.libsdl.org.2020.06.23.zip

You can grab just the munge.py script and instructions on how to use it to produce a local copy here:

https://files.pineapplemachine.com/public/sdl/wiki/offline-archive/munge.py

https://pastebin.com/b6220XNF

I wasn’t able to find a license for the wiki content, but I’m going to operate on the assumption that either the license once mentioned here is still valid, or else that the intention hasn’t changed and no one will mind that I’m modifying and redistributing wiki content.

2 Likes

This is great, @pinemach . Thank you very much.