dcx 0.76.0__tar.gz → 0.78.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dcx
3
- Version: 0.76.0
3
+ Version: 0.78.0
4
4
  Summary: Minimalistic selenium wrapper
5
5
  Author-email: Robert Degen <turbodev@mailbox.org>
6
6
  Project-URL: Homepage, https://github.com/turbo-bert/dcx
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "dcx"
7
- version = "0.76.0"
7
+ version = "0.78.0"
8
8
  authors = [
9
9
  { name="Robert Degen", email="turbodev@mailbox.org" },
10
10
  ]
@@ -488,47 +488,51 @@ def process_report(logbasedir_):
488
488
  pdf.page(the_page).text(61,10, "_"*52 + " [ after ] " + "_"*52)
489
489
 
490
490
  # IN screenshot###################################################################################
491
- png = REPORT['viewports_in'][report_i]
492
- jpg = "%s.jpg" % png
493
- png_ = PIL.Image.open(png)
494
- jpg_ = png_.convert("RGB")
495
- jpg_.save(jpg)
496
- jpg_width, jpg_height = jpg_.size
497
- jpg_landscape = jpg_width >= jpg_height
498
- image_params = []
499
- if jpg_landscape:
500
- # bring to maximal width (DIN A3 Port = 250mm)
501
- jpg_ratio = float(jpg_width) / float(jpg_height) # 1.XXXX
502
- calclulated_height = int(float(screenshot_w_default_mm) / jpg_ratio)
503
- image_params = [25, 185, screenshot_w_default_mm, calclulated_height, jpg]
504
- else:
505
- #TODO: porttrait mode
491
+ try:
492
+ png = REPORT['viewports_in'][report_i]
493
+ jpg = "%s.jpg" % png
494
+ png_ = PIL.Image.open(png)
495
+ jpg_ = png_.convert("RGB")
496
+ jpg_.save(jpg)
497
+ jpg_width, jpg_height = jpg_.size
498
+ jpg_landscape = jpg_width >= jpg_height
499
+ image_params = []
500
+ if jpg_landscape:
501
+ # bring to maximal width (DIN A3 Port = 250mm)
502
+ jpg_ratio = float(jpg_width) / float(jpg_height) # 1.XXXX
503
+ calclulated_height = int(float(screenshot_w_default_mm) / jpg_ratio)
504
+ image_params = [25, 185, screenshot_w_default_mm, calclulated_height, jpg]
505
+ else:
506
+ #TODO: porttrait mode
507
+ pass
508
+ pdf.page(the_page).image_manual_mm(*image_params)
509
+ except IndexError:
506
510
  pass
507
- pdf.page(the_page).image_manual_mm(*image_params)
508
511
 
509
512
  # OUT screenshot##################################################################################
510
- png = REPORT['viewports_out'][report_i]
511
- jpg = "%s.jpg" % png
512
- png_ = PIL.Image.open(png)
513
- jpg_ = png_.convert("RGB")
514
- jpg_.save(jpg)
515
- jpg_width, jpg_height = jpg_.size
516
- jpg_landscape = jpg_width >= jpg_height
517
- image_params = []
518
- if jpg_landscape:
519
- # bring to maximal width (DIN A3 Port = 250mm)
520
- jpg_ratio = float(jpg_width) / float(jpg_height) # 1.XXXX
521
- calclulated_height = int(float(screenshot_w_default_mm) / jpg_ratio)
522
- image_params = [25, 5, screenshot_w_default_mm, calclulated_height, jpg]
523
- else:
524
- #TODO: porttrait mode
513
+
514
+ # screenshot maybe missing
515
+
516
+ try:
517
+ png = REPORT['viewports_out'][report_i]
518
+ jpg = "%s.jpg" % png
519
+ png_ = PIL.Image.open(png)
520
+ jpg_ = png_.convert("RGB")
521
+ jpg_.save(jpg)
522
+ jpg_width, jpg_height = jpg_.size
523
+ jpg_landscape = jpg_width >= jpg_height
524
+ image_params = []
525
+ if jpg_landscape:
526
+ # bring to maximal width (DIN A3 Port = 250mm)
527
+ jpg_ratio = float(jpg_width) / float(jpg_height) # 1.XXXX
528
+ calclulated_height = int(float(screenshot_w_default_mm) / jpg_ratio)
529
+ image_params = [25, 5, screenshot_w_default_mm, calclulated_height, jpg]
530
+ else:
531
+ #TODO: porttrait mode
532
+ pass
533
+ pdf.page(the_page).image_manual_mm(*image_params)
534
+ except IndexError:
525
535
  pass
526
- pdf.page(the_page).image_manual_mm(*image_params)
527
-
528
-
529
-
530
-
531
-
532
536
 
533
537
  the_page += 1
534
538
  i+=1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dcx
3
- Version: 0.76.0
3
+ Version: 0.78.0
4
4
  Summary: Minimalistic selenium wrapper
5
5
  Author-email: Robert Degen <turbodev@mailbox.org>
6
6
  Project-URL: Homepage, https://github.com/turbo-bert/dcx
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes