[WIP]Guide helper

Discussion in '3DS - Flashcards & Custom Firmwares' started by Quantumcat, Sep 3, 2016.

  1. Quantumcat
    OP

    Quantumcat Dead and alive

    Member
    10,501
    5,540
    Nov 23, 2014
    Australia
    Canberra, Australia
    Hi all,

    I made a little scraper that turns Plailect's guide into pdf files, for posterity purposes and for speed of use. It also downloads the latest release of all the tools, and downloads any zip files it finds in the guide. The intention is to make it even quicker to install a9lh (saves time going back and forth from the GitHub release pages of the tools), and makes sure you're not using any outdated files.

    Some issues though - using the free pdf tool Dompdf seems to get stuck at the same place ("Fatal error: Call to a member function get_cellmap() on null"), so the script shuts down and not all pages are converted. This doesn't seem to be an issue for Pdfcrowd, but unfortunately that's paid, and I burned through all my free tokens before I realised they were limited :-( If they give me more free tokens I will redo it to get more of the pages (hopefully all). Also, the free one makes the pages a little ugly, while Pdfcrowd manages to generate exactly what the page looks like. Oh well. Also, if the source code on a tool's release page is the same file type as the release, it will download the source code too. So the download is a little bigger than it needs to be.

    Obviously this might have been more useful before the most recent big revision of the guide (when it used to change significantly every week or so). Now I doubt it'll change much, it's probably the ultimate version right now :-)

    Anyway, for the guide download visit quantumc.at, and my repository is at https://github.com/quantumcat1/Guide-Helper. I am new to GitHub so let me know if I need to change a setting or something so people can contribute! You will need to install dompdf (the free pdf conversion tool) into your php www folder for it to run.

    This is my first contribution to anything, so please be nice if it's not very good :-) I only learned PHP yesterday (and git only a few weeks ago), so I am pretty pleased with what I worked out so far!
     
  2. Skyshadow101

    Skyshadow101 The Sky Is The Limit!

    Member
    912
    314
    May 22, 2016
    United States
    The Underground
    Thank you so much! Now I don't have to use my data on my modem everytime I want to go to the guide.

    Sent from my Browser on a New 3DS XL with A9LH
     
    Last edited by Skyshadow101, Jan 8, 2017
    Sonic Angel Knight likes this.
  3. Sonic Angel Knight

    Sonic Angel Knight GBAtemp Guru

    Member
    9,835
    4,920
    May 27, 2016
    United States
    New York
    @Quantumcat Cool. I didn't know you can do that stuff. Those glasses are not just making you look smart. You actually are. :blush:
     
    Quantumcat likes this.
  4. Quantumcat
    OP

    Quantumcat Dead and alive

    Member
    10,501
    5,540
    Nov 23, 2014
    Australia
    Canberra, Australia
    I found a free-ish html-to-pdf api so now the pages will look pretty, and it doesn't freak out when it tried to convert a table (dompdf couldn't deal with the anonymous table in the part 1 decrypt9 page). I am trying to make it run regularly as a cron job (so it will always be updated with no input from me). However it doesn't seem to want to run despite copying what I saw in tutorials. If anybody knows about cron jobs and can help me make it work I would really appreciate it :-)

    And it would be also great, if when you are directing newbies to the guide, you could offer them mine as an alternative if they want to download everything at once and have an offline reference.
     
  5. Sonic Angel Knight

    Sonic Angel Knight GBAtemp Guru

    Member
    9,835
    4,920
    May 27, 2016
    United States
    New York
    Why not just add the link to your signature? :)
     
  6. Quantumcat
    OP

    Quantumcat Dead and alive

    Member
    10,501
    5,540
    Nov 23, 2014
    Australia
    Canberra, Australia
    I did :-p
     
  7. Sonic Angel Knight

    Sonic Angel Knight GBAtemp Guru

    Member
    9,835
    4,920
    May 27, 2016
    United States
    New York
    I don't see a link, i can't click anything.:unsure:
     
  8. Quantumcat
    OP

    Quantumcat Dead and alive

    Member
    10,501
    5,540
    Nov 23, 2014
    Australia
    Canberra, Australia
    Oh I see what you mean, I'll fix that
     
  9. Quantumcat
    OP

    Quantumcat Dead and alive

    Member
    10,501
    5,540
    Nov 23, 2014
    Australia
    Canberra, Australia
    I just added a select list to make it a bit tidier.
     
    Sonic Angel Knight likes this.