\n"
- ])
- if (options.panelview or forcePV) and not noPV:
- options.panelviewused = True
- if not noHorizontalPV and not noVerticalPV:
- if rotatedPage:
- if options.righttoleft:
- order = [1, 3, 2, 4]
- else:
- order = [2, 4, 1, 3]
+ f.writelines(["",
+ "\n",
+ "\n",
+ "\n",
+ "", filename[0], "\n",
+ "\n",
+ "\n"
+ "\n",
+ "\n"])
+ if options.iskindle and options.panelview:
+ if options.hqmode:
+ imgfilepv = list(os.path.splitext(imgfile))
+ imgfilepv[0] += "-hq"
+ imgfilepv = "".join(imgfilepv)
+ if os.path.isfile(os.path.join(head, "Images", postfix, imgfilepv)):
+ size = Image.open(os.path.join(head, "Images", postfix, imgfilepv)).size
+ if not options.hqmode or not size:
+ imgfilepv = imgfile
+ sizeTmp = Image.open(os.path.join(head, "Images", postfix, imgfilepv)).size
+ size = (int(sizeTmp[0] * 1.5), int(sizeTmp[1] * 1.5))
+ if size[0] <= deviceres[0]:
+ noHorizontalPV = True
+ else:
+ noHorizontalPV = False
+ if size[1] <= deviceres[1]:
+ noVerticalPV = True
+ else:
+ noVerticalPV = False
+ x, y = getPanelViewSize(deviceres, size)
+ boxStyles = {"PV-TL": "position:absolute;left:0;top:0;",
+ "PV-TR": "position:absolute;right:0;top:0;",
+ "PV-BL": "position:absolute;left:0;bottom:0;",
+ "PV-BR": "position:absolute;right:0;bottom:0;",
+ "PV-T": "position:absolute;top:0;left:" + x + "%;",
+ "PV-B": "position:absolute;bottom:0;left:" + x + "%;",
+ "PV-L": "position:absolute;left:0;top:" + y + "%;",
+ "PV-R": "position:absolute;right:0;top:" + y + "%;"}
+ f.write("
\n")
+ if not noHorizontalPV and not noVerticalPV:
+ if rotatedPage:
+ if options.righttoleft:
+ order = [1, 3, 2, 4]
else:
- if options.righttoleft:
- order = [2, 1, 4, 3]
- else:
- order = [1, 2, 3, 4]
- boxes = ["BoxTL", "BoxTR", "BoxBL", "BoxBR"]
- elif noHorizontalPV and not noVerticalPV:
- if rotatedPage:
- if options.righttoleft:
- order = [1, 2]
- else:
- order = [2, 1]
+ order = [2, 4, 1, 3]
+ else:
+ if options.righttoleft:
+ order = [2, 1, 4, 3]
else:
- order = [1, 2]
- boxes = ["BoxT", "BoxB"]
- elif not noHorizontalPV and noVerticalPV:
- if rotatedPage:
+ order = [1, 2, 3, 4]
+ boxes = ["PV-TL", "PV-TR", "PV-BL", "PV-BR"]
+ elif noHorizontalPV and not noVerticalPV:
+ if rotatedPage:
+ if options.righttoleft:
order = [1, 2]
else:
- if options.righttoleft:
- order = [2, 1]
- else:
- order = [1, 2]
- boxes = ["BoxL", "BoxR"]
+ order = [2, 1]
else:
- order = [1]
- boxes = ["BoxC"]
- for i in range(0, len(boxes)):
- f.writelines(["