Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old January 4, 2016, 17:45   #1
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,666
PowerWyrm is on a distinguished road
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 http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old January 4, 2016, 22:18   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,848
Donated: $60
Nick will become famous soon enough
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.
Nick is offline   Reply With Quote
Old January 5, 2016, 00:11   #3
fph
Knight
 
Join Date: Apr 2009
Location: Berlin / Italy
Posts: 785
fph is on a distinguished road
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.
--
You read a scroll labeled 'lol gtfo' of Teleport Level.
fph is offline   Reply With Quote
Old January 5, 2016, 01:11   #4
debo
Veteran
 
debo's Avatar
 
Join Date: Oct 2011
Location: Toronto, Canada
Posts: 2,364
debo is on a distinguished road
Quote:
Originally Posted by fph View Post
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.'
debo is offline   Reply With Quote
Old January 5, 2016, 09:09   #5
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,666
PowerWyrm is on a distinguished road
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 http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old January 5, 2016, 09:29   #6
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,666
PowerWyrm is on a distinguished road
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 http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Contradicting descriptions of majesty(will) in manual wobbly Sil 3 July 2, 2014 22:39
Making pdf of help files qwerty Development 28 June 29, 2011 20:03
Do they still make old-school RPGs anymore? Max Stats Idle chatter 14 February 15, 2011 19:10
I don't think I can take it anymore... Fendell Orcbane AAR 23 May 30, 2010 21:25
Angband User Manual Wiki JamesDoyle Oook! 31 February 7, 2008 01:25


All times are GMT +1. The time now is 10:22.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.