HELP! Can't generate PDF manual anymore...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PowerWyrm
    Prophet
    • Apr 2008
    • 2986

    HELP! Can't generate PDF manual anymore...

    I'm using rst2pdf to generate the PDF manual from the txt files in /lib/help. Today I updated some Python packages, and to my horror, this doesn't work anymore...

    When I try to install the rst2pdf-0.93 package with Python, I get the following error: "cannot find distribution for PIL".

    When I try to install the PIL library directly, using the .exe from the PIL website, the installer complains that Python is not registered, even if it is.

    When I try to use "pip install rst2pdf", I get an error that "jpeg is not installed".

    When I try to install PIL directly from the source code, I get MORE errors (raise Valuerror -- u'path' ????????).

    Any idea what I should do? I wanted to package a new PWMAngband release, but I'm stuck because of this...
    PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9637

    #2
    I don't really have much idea. The details of the most recent windows build of V are here, in case there's something helpful in there for you. It is cross-compiled on Linux using mingw, so I'm guessing won't help much. I've pointed to this thread in #angband-dev, too.
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • fph
      Veteran
      • Apr 2009
      • 1030

      #3
      I can't help much because I don't know which environment you are installing in (for me under Linux it's just apt-get install rst2pdf). But this could be a good occasion to re-think the process and see if we can switch to a different conversion path with fewer exotic dependencies.

      I can help with that; I am responsible for hacking together the current rst documentation system --- although not for choosing rst in the first place.

      So I'll hijack the thread and ask a few questions to better understand your needs.

      * Pandoc is another program that can turn rst into pdf. Would it be easier to install for you?
      * If I am correct, both rst2pdf and pandoc require a full latex stack to function, which is a big beast in term of dependencies. Would it be a good option instead to convert the help files to html only rather than pdf? rst->html is performed by Python's Docutils, which has PIL as an optional dependency only. So it would be a step forward. In my view HTML is as good as PDF, and maybe even better. Having both seems redundant.
      * Another option would be changing the source format to html, and do the reverse conversion (html -> txt), which seems easier (there are programs with fewer crazy dependencies, for instance html2txt which is a single Python file and only depends on the Python standard library).

      Let me know what you think!

      TL;DR: I can't solve your immediate problem, but I can try to make it better in the next vanilla versions.
      --
      Dive fast, die young, leave a high-CHA corpse.

      Comment

      • debo
        Veteran
        • Oct 2011
        • 2402

        #4
        Originally posted by fph
        I can't help much because I don't know which environment you are installing in (for me under Linux it's just apt-get install rst2pdf). But this could be a good occasion to re-think the process and see if we can switch to a different conversion path with fewer exotic dependencies.

        I can help with that; I am responsible for hacking together the current rst documentation system --- although not for choosing rst in the first place.

        So I'll hijack the thread and ask a few questions to better understand your needs.

        * Pandoc is another program that can turn rst into pdf. Would it be easier to install for you?
        * If I am correct, both rst2pdf and pandoc require a full latex stack to function, which is a big beast in term of dependencies. Would it be a good option instead to convert the help files to html only rather than pdf? rst->html is performed by Python's Docutils, which has PIL as an optional dependency only. So it would be a step forward. In my view HTML is as good as PDF, and maybe even better. Having both seems redundant.
        * Another option would be changing the source format to html, and do the reverse conversion (html -> txt), which seems easier (there are programs with fewer crazy dependencies, for instance html2txt which is a single Python file and only depends on the Python standard library).

        Let me know what you think!

        TL;DR: I can't solve your immediate problem, but I can try to make it better in the next vanilla versions.
        Alternately, find the package versions that worked for you, put them into a requirements.txt, and then pip install your dependencies into a virtualenv before rst2pdfing.

        I've had better luck with pandoc also, but it requires all of haskell so it also kinda sucks in the dependency department. You can generally install it with the OS package manager of your choice, though, instead of relying on Python packaging.
        Glaurung, Father of the Dragons says, 'You cannot avoid the ballyhack.'

        Comment

        • PowerWyrm
          Prophet
          • Apr 2008
          • 2986

          #5
          rst2html works perfectly since it only requires Docutils. rst2pdf doesn't require much except for PIL, which was working perfectly until last week where, I suppose, PIL stopped being maintained and links stopped working (which explains why I get an error). The big problem here being a Windows user: under Linux, you simply install jpeg, then PIL, then rst2pdf and you get no error. So I guess I have only two solutions: get jpeg for Windows and try to compile it, or try 32-bit Python which theoretically should resolve the registry problem with PIL executable.
          PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

          Comment

          • PowerWyrm
            Prophet
            • Apr 2008
            • 2986

            #6
            Alright... I desinstalled 64-bit Python and reinstalled 32-bit Python instead. Now rst2pdf simply installs itself with "pip install rst2pdf" without having anything else to do (getting along the way all the dependencies including Docutils and Pillow, which is the maintained version of PIL). I'll update my batch files accordingly.
            PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

            Comment

            Working...
            😀
            😂
            🥰
            😘
            🤢
            😎
            😞
            😡
            👍
            👎