View Single Post
Old 04-23-2017, 08:41 AM   #1
CalibUser
Addict
CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.
 
Posts: 203
Karma: 62362
Join Date: Jul 2015
Device: Sony
Plugin to import text files

Purpose
This plugin will import a text file into an ePub and format it.

Using the plugin
The plugin is very basic. When run, you will be presented with a file dialog box.

Navigate to the directory that contains the file that you want to import, select the required text file and click OK. The text file will be imported into your ePub as a new xhtml section. This new section will be given the same name as your text file.

Technical note

As some ePub readers do not seem to use the tag set <p></p> to show a blank paragraph, when a blank paragraph is required in the ePub file this will be included in the new xhtml file as : <p>&nbsp;</p>

The encoding of a text file (utf-8, ascii, etc) can vary from one system to another. This plugin assumes that the text file was saved by the system running Sigil; the plugin attempts to identify the encoding that is likely to have been used on that system and will open the text file using that encoding.

Updated to version 0.1.0.6
This version of the plugin will:
  • enable you to import multiple text files from a single folder without having to import them individually.
  • convert the '&' symbol from a text file to its html equivalent when a text file is imported to prevent Sigil showing an error message when importing files containing this symbol
  • includes an icon for the toolbar (if anybody wants to provide an improved icon then that would be good as I am not very artistic!)

Updated to version 0.1.0.7
Has a small bug fix for Windows 11
Attached Files
File Type: epub TextImporter_v0.1.0.6.epub (221.7 KB, 2370 views)
File Type: zip TextImporter_v0.1.0.7.zip (10.9 KB, 5035 views)

Last edited by CalibUser; 03-03-2022 at 04:07 AM. Reason: Plugin updated to version 0.1.0.7
CalibUser is offline   Reply With Quote