aboutsummaryrefslogtreecommitdiffstats
path: root/pyblackbird_cc/resources/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyblackbird_cc/resources/utils.py')
-rw-r--r--pyblackbird_cc/resources/utils.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/pyblackbird_cc/resources/utils.py b/pyblackbird_cc/resources/utils.py
new file mode 100644
index 0000000..d17aa69
--- /dev/null
+++ b/pyblackbird_cc/resources/utils.py
@@ -0,0 +1,10 @@
+def _get_pdf_collection_type(coll) -> str:
+ if len(coll) == 1 and len(coll[0]) == 1:
+ return "SINGLE_PDF_SINGLE_PAGE"
+ if len(coll) == 1 and len(coll[0]) > 1:
+ return "SINGLE_PDF_MULTI_PAGE"
+ if len(coll) > 1:
+ for c in coll:
+ if len(c) > 1:
+ return "MULTI_PDF_MULTI_PAGE"
+ return "MULTI_PDF_SINGLE_PAGE"