MCPcopy Create free account
hub / github.com/PageBot/PageBot / getLastPage

Method getLastPage

Lib/pagebot/document.py:1212–1221  ·  view source on GitHub ↗

Answers last page with the highest sorted `page.y`. Answer empty list if there are no pages. >>> doc = Document(name='TestDoc', w=500, h=500, startPage=5, autoPages=10) >>> doc.getLastPage()

(self)

Source from the content-addressed store, hash-verified

1210 return None
1211
1212 def getLastPage(self):
1213 """Answers last page with the highest sorted `page.y`. Answer empty list
1214 if there are no pages.
1215
1216 >>> doc = Document(name='TestDoc', w=500, h=500, startPage=5, autoPages=10)
1217 >>> doc.getLastPage()
1218 <Page #14 default (500pt, 500pt)>
1219 """
1220 pn = sorted(self.pages.keys())[-1]
1221 return self.pages[pn][-1]
1222
1223 def getSortedPages(self, pageSelection=None):
1224 """Answers the dynamic list of pages, sorted by y, x and index."""

Callers 1

drawFlowConnectionsMethod · 0.80

Calls 1

keysMethod · 0.45

Tested by

no test coverage detected