Home  Beta programs 
  Welcome to Mobipocket Developer Center
Home | Show TOC | Add to Favorites

How to Import a Text file

  • On the Creator Home Page, click on "Text document" under the Import From Existing File section
  • On the next screen, Browse your local disk to select the Text file to import
  • The name of your publication will be set automatically to the filename of your Text document.
  • Choose the publication folder where you want to store the publication files. The Creator will automatically create a subfolder in the publication folder, with the name of the publication. The default publication folder is the one you specified in the Application Settings, or the "My Documents\My Publications folder" if you didn't change the original settings.
  • Choose the language of the publication. The default publication language is the one you specified in the Application Settings, or the language of your operating system if you didn't change the original settings. When you change the language, an adpated encoding is automatically selected.
  • Choose the encoding of the publication; either Western (Windows 1252) or UTF-8. The default publication encoding is the one you specified in the Application Settings, or the one selected automatically for the language you chose.
  • Click on Import to start importing the file.

Text Import options

  • Suppress hyphens: some text files include preformatted hyphens at line breaks, which are adapted for reading on a PC screen. These have to be removed, otherwise they will appear at random in the ebook on a PDA screen.
  • Suppress single-carriage returns: some text files include preformatted line breaks, for reading on a PC screen. The line breaks - or single-carriage returns - have to be removed, otherwise line breaks will appear at random in the ebook on a PDA screen.

N.B. : The two options above apply more specifically to the ebook text files that you can find on the Project Gutenberg website : http://www.gutenberg.net/

Click on Import to start importing the file.
The Text document is converted into an HTML file.

N.B. : A Text document can only be imported into a New Publication. It is not possible to import a Text document into an existing publication.

 

Heading extraction rules

You have to specify a generic Extraction String. For example, if all the chapters in the text are a string of characters like :

CHAPTER N "The name of the chapter" <carriage return>

Then you can specify as Search string : CHAPTER \1 \x\n.

Note : when there is a dot "." beside the number, you have to specify the "." in the search string, e.g. Chapter \1.\x\n to find the chapter heading "Chapter 1. Introduction"

The search string can contain both characters and wildcards :

  • \1 : a number in integer format (e.g. 0 ,1, 2, ...) or roman-type (I, II, III,..)
  • \* : any one character
  • \$ : any one uppercase character
  • \x : a string of characters (any case)
  • \X : a string of uppercase characters
  • \n : a carriage return

Rules when using wildcards :

  • A search string must be specified in such a way as to clearly delimit the end of the search. Example : a search string can't end by \x, otherwise the whole book will be selected. In most cases, the search string can end by \n.
  • A search string cannot contain two wildcards in a row, to the exception of \n. For example : \1\x is not a valid search string, but \1\n is.

Copyright 2000-2007 Mobipocket.com