Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 03-01-2020, 10:46 PM   #1
dxcore35
Member
dxcore35 began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Mar 2018
Device: Kindle Voyage
Create new section.xhtml from Python

Hello,

I would like to create new page via Regex-function search.

Basically I would like to know how to create new page in book via Python:
  • with custom file name
  • with custom content

The purpose of why I need it is that I want to capture footnotes and move them into special page. I can post whole code later.
Thank you for your insights!
dxcore35 is offline   Reply With Quote
Old 03-02-2020, 12:10 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,337
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
boss.do_add_file(file_name, data)
kovidgoyal is offline   Reply With Quote
Advert
Old 03-02-2020, 07:47 AM   #3
dxcore35
Member
dxcore35 began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Mar 2018
Device: Kindle Voyage
Thank you!

Now I'm rethinking if I can append text there... since the regex function is running one match and then another... I cannot really collect all references and paste them in one step...
dxcore35 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I create a template for the xhtml files? Banjo Sigil 9 01-02-2019 07:37 PM
mkepub tool to create epub from xhtml sethportman ePub 0 02-03-2012 08:59 AM
How do I create a section list for MOBI/ Kindle zdavatz Kindle Formats 8 02-12-2010 12:47 AM
How do I Create a Python Plugin? Sydney's Mom Plugins 25 01-27-2010 06:26 AM
Python script to create collections gwynevans Sony Reader Dev Corner 2 03-13-2008 12:29 PM


All times are GMT -4. The time now is 12:28 AM.


MobileRead.com is a privately owned, operated and funded community.