Thread: PDF line unwrap
View Single Post
Old 05-18-2010, 03:57 PM   #2
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by miquel View Post
Now, am I a bit slow, or is opt_unwrap_factor picked up in the gui, and never carried over for conversion?

Should this be happening at ./ebooks/conversion/preprocess.py:252 ?
I'm not 100% sure of what you're asking. FYI, here is where unwrap_factor and opt_unwrap_factor are used in the code (courtesy of UltraEdit - recent code, but not latest.).

Code:
Find 'unwrap_factor' in ' src\calibre\ebooks\conversion\preprocess.py' :
 src\calibre\ebooks\conversion\preprocess.py/252:         if getattr(self.extra_opts, 'unwrap_factor', 0.0) > 0.01:
 src\calibre\ebooks\conversion\preprocess.py/253:             length = line_length(html, getattr(self.extra_opts, 'unwrap_factor'))
Found 'unwrap_factor' 2 time(s).
----------------------------------------
Find 'unwrap_factor' in ' src\calibre\ebooks\html\input.py' :
 src\calibre\ebooks\html\input.py/266:         OptionRecommendation(name='unwrap_factor', recommended_value=0.0,
Found 'unwrap_factor' 1 time(s).
----------------------------------------
Find 'unwrap_factor' in ' src\calibre\ebooks\pdb\pdf\reader.py' :
 src\calibre\ebooks\pdb\pdf\reader.py/24:         setattr(self.options, 'unwrap_factor', 0.5)
Found 'unwrap_factor' 1 time(s).
----------------------------------------
Find 'unwrap_factor' in ' src\calibre\ebooks\pdf\input.py' :
 src\calibre\ebooks\pdf\input.py/25:         OptionRecommendation(name='unwrap_factor', recommended_value=0.5,
Found 'unwrap_factor' 1 time(s).
----------------------------------------
Find 'unwrap_factor' in ' src\calibre\gui2\convert\pdf_input.py' :
 src\calibre\gui2\convert\pdf_input.py/17:             ['no_images', 'unwrap_factor'])
Found 'unwrap_factor' 1 time(s).
----------------------------------------
Find 'unwrap_factor' in ' src\calibre\gui2\convert\pdf_input.ui' :
 src\calibre\gui2\convert\pdf_input.ui/23:       <cstring>opt_unwrap_factor</cstring>
 src\calibre\gui2\convert\pdf_input.ui/41:     <widget class="QDoubleSpinBox" name="opt_unwrap_factor">
Found 'unwrap_factor' 2 time(s).
----------------------------------------
Find 'unwrap_factor' in ' src\calibre\gui2\convert\pdf_input_ui.py' :
 src\calibre\gui2\convert\pdf_input_ui.py/23:         self.opt_unwrap_factor = QtGui.QDoubleSpinBox(Form)
 src\calibre\gui2\convert\pdf_input_ui.py/24:         self.opt_unwrap_factor.setMaximum(1.0)
 src\calibre\gui2\convert\pdf_input_ui.py/25:         self.opt_unwrap_factor.setSingleStep(0.01)
 src\calibre\gui2\convert\pdf_input_ui.py/26:         self.opt_unwrap_factor.setProperty("value", 0.5)
 src\calibre\gui2\convert\pdf_input_ui.py/27:         self.opt_unwrap_factor.setObjectName("opt_unwrap_factor")
 src\calibre\gui2\convert\pdf_input_ui.py/28:         self.gridLayout.addWidget(self.opt_unwrap_factor, 0, 1, 1, 1)
 src\calibre\gui2\convert\pdf_input_ui.py/32:         self.label_2.setBuddy(self.opt_unwrap_factor)
Found 'unwrap_factor' 8 time(s).
Search complete, found 'unwrap_factor' 16 time(s). (7 files.)
Starson17 is offline   Reply With Quote