RSS
Donación

WMZ: Z087754155981 (USD)
WME: E110509803261 (EUR)

WebMoney

Balabolka Programa para extraer texto del fichero

El programa está diseñado para extraer textos de ficheros de diferentes formatos. El texto extraído puede ser reunido en un solo fichero y / o distribuido en varios ficheros. Al texto se le puede aplicar las reglas de los diccionarios de corrección de pronunciación del programa Balabolka.

Se soportan los siguientes formatos de fichero: AZW, AZW3, CHM, DjVu, DOC, DOCX, EML, EPUB, FB2, FB3, HTML, LIT, MD, MHT, MOBI, ODP, ODS, ODT, PDB, PDF, PPT, PPTX, PRC, RTF, TCR, TXT, WPD, WRI, XLS, XLSX.

La aplicación no tiene interfaz gráfica y se ejecuta en modo texto. La modalidad del programa puede ser configurada a través de la línea de comandos o un fichero de configuración.


El programa cumple operaciones en el orden siguiente:

  1. Extraer el texto del fichero.
  2. Formatear el texto: eliminar espacios extra, saltos de línea, etc. (si tales opciones están especificadas).
  3. Reunir textos en un solo fichero (si tal opción está especificada).
  4. Dividir el texto en partes (si tales opciones están especificadas).
  5. Aplicar las reglas de corrección de pronunciación (si tales opciones están especificadas).
  6. Salvar el fichero o los ficheros en el disco.

Descargar el programa BLB2TXT


Tamaño: MB
 
Versión: Lista de cambios
 
Licencia: Gratuito (Freeware)
 
Sistema operativo:




Línea de comandos

El programa se puede configurar mediante la línea de comandos. Las opciones son separadas por un espacio y comienzan con un signo "-" (guión). Se puede obtener una lista completa de opciones de la línea de comandos tecleando blb2txt con opciones -? o -h.


-f nombre_de_fichero
El nombre de fichero o una máscara para los nombres de los ficheros de los cuales se extrae el texto. La línea de comandos puede contener varias opciones -f.
-fl nombre_de_fichero
Sets the name of the text file with the list of input files (one file name per line).
-v nombre_de_carpeta
Nombre de la carpeta para salvar el fichero con el texto extraído.
-p texto
Plantilla para el nombre del fichero con el texto extraído (por ejemplo, "Documento de texto"). Si no se especifica la opción se usa el nombre del fichero de origen.
  • Use the %FileName% variable to insert the input file name to the output file name.
  • Use the %FirstLine% variable to insert the first line of text.
  • Use the %Header% variable to insert the chapter title.
  • Use the %Number% variable to change the position of the sequence number inside the output file name.
Warning! It is necessary to double a percent sign (%) in a batch script. For example: -p %%Number%%
-ext texto
Sets the extension for output filenames. The default is "txt".
-out nombre_de_fichero
Sets the full name for output file. The option is recommended to specify only when the utility is used as a part of other software. If the utility is used for custom document import, the external program runs the utility from a command line and passes the full name of a text file to create.
-s
Search input files in subfolders.
-cf
Create a subfolder for each input file. A file name will be used as a name of an output subfolder.
-i
Leer el texto del flujo de entrada estándar (STDIN). Si se especifica la opción, se ignora la opción -f.
-o
Inscribir el texto en el flujo de salida estándar (STDOUT). Si se especifica la opción, se ignoran las opciones -v y -p.
-u
Reunir textos de varios ficheros en un solo fichero.
-b
Añadir el número de orden antes del nombre del fichero.
-a
Añadir el número de orden después del nombre del fichero.
-n entero
Establecer el número de orden inicial del fichero. El valor predeterminado es 1.
-e codificación
Codificación del fichero con el texto extraído ("ansi", "utf8" o "unicode"). El valor predeterminado es "ansi".
-t entero
Especificar el modo de partición del texto: uso de un tamaño predeterminado del fichero. The number corresponds to an amount of characters.
-k palabra_clave
Especificar el modo de partición del texto: búsqueda de palabra clave en el fichero de origen. Esta opción distingue entre mayúsculas y minúsculas. La línea de comandos puede contener varias opciones -k.
-r palabra_clave
Dividir el texto con la palabra clave y retirarla del texto. Esta opción distingue entre mayúsculas y minúsculas. La línea de comandos puede contener varias opciones -r.
-w
Especificar el modo de partición del texto: buscar dos líneas en blanco seguidas.
-l
Especificar el modo de partición del texto: buscar el texto donde todas las letras son mayúsculas.
-c
Splits text by a table of contents. The application extracts positions of chapter beginnings from the input file (or a new table of contents will be generated if the option -toc is specified).
-toc
Generates a table of contents. The application splits the extracted text by keywords (like "chapter" or "volume"). La opción se utiliza junto con la opción -c.
-m entero
Sets the minimal size of text parts for splitting (as a number of characters).
-j entero
Ignores the chapter beginning if the size of the previous chapter is less than the specified value (in characters). La opción se utiliza junto con la opción -c.
-hh texto
Inserts text in front of headings (for example: ## Chapter 1).
-d nombre_de_fichero
Usar el diccionario para la corrección de la pronunciación (fichero con extensión *.BXD, *.REX o *.DIC). La línea de comandos puede contener varios parámetros -d.
-if
Uses IFilter interface to extract text. If this fails, the default method will be used by the application.
-g nombre_de_carpeta
Sets the name of output folder for saving of images from documents.
-cvr nombre_de_carpeta
Sets the name of output folder for saving of a book cover image.
-cft
Clones the Created/Modified/Accessed time of the input file into the output file. If the application combines text files or splits the extracted text, the option is ignored.
-x tipo_de_fichero
Sets the input file type. It allows to define a format of input documents with unknown file name extensions. For example: -x doc.
-pwd texto
Designar una contraseña para sacar el texto del fichero en formato PDF.
-dll nombre_de_fichero
Sets the path and name for 7z.dll (32bit). This library helps to extract text and images from documents inside archives (ZIP, RAR, etc.). 7z.dll is a part of 7-Zip software. If the option is not specified, the application and the library must be in the same folder; otherwise, the application will not be able to extract data from archive files.
-dex tipos_de_fichero
Sets the list of file types for extracting from archives. The option contains a comma-separated list of file types, for example: -dex "fb2,epub"
The command line may contain few options -dex. If the option is not specified, the application will extract text from all files in an archive. If it is necessary to extract text for all file types supported by the application, use the value "all-". For example: -dex all-
-dne tipos_de_fichero
Sets the list of file types to ignore when documents are extracted from archives. The option contains a comma-separated list of file types, for example: -dne "exe,dll"
The command line may contain few options -dne. If the option is not specified, the application will extract text from all files in an archive.
-dp
Display progress information in a console window.
-cfg nombre_de_fichero
Establece el nombre del archivo de configuración con las opciones de la línea de comandos (un archivo de texto en el que cada línea contiene una opción). Si no se especifica la opción, se utilizará el archivo blb2txt.cfg que se encuentra en la misma carpeta que la utilidad.
-h
Mostrar descripción de la línea de comandos.
--remove-spaces o -rs
Eliminar espacios en blanco (dos o más espacios seguidos, espacios sin separación).
--remove-hyphens o -rh
Eliminar guiones en los extremos de líneas en el texto.
--remove-linebreaks o -rl
Eliminar saltos de línea dentro de un párrafo.
--remove-empty-lines o -rm
Eliminar todas las líneas en blanco.
--replace-empty-lines o -rp
Reemplazar múltiples líneas en blanco una sola línea en blanco.
--remove-square-brackets o -rsb
Eliminar el texto entre [corchetes].
--remove-curly-brackets o -rcb
Eliminar el texto entre {llaves}.
--remove-angle-brackets o -rab
Eliminar el texto entre <paréntesis angulares>.
--remove-round-brackets o -rrb
Eliminar el texto entre (paréntesis redondos).
--remove-comments or -rc
Borra los comentarios. Los comentarios de una sola línea comienzan con // y continúan hasta el final de la línea. Los comentarios de varias líneas comienzan con /* y terminan con */.
--remove-page-numbers o -rpn
Eliminar los números de página (puede ser útil para archivos DjVu/PDF).
--fix-ocr-errors o -ocr
Corregir errores ocurridos en OCR (sólo para idiomas con alfabeto cirílico).
--fix-letter-spacing o -ls
Fixes letter-spacing in words (for example: s p a c e, _w_o_r_d).
--add-period o -ap
Adds a period if there is no punctuation after the last word of the paragraph.
--extract-summary entero or -es entero
Extracts a summary (also called "annotation") from FB2/FB3 files and inserts at the beginning of text. Possible values for the integer parameter:
  • 0 - skips a summary (used by default);
  • 1..5 - extracts a summary (a value determines the order in which an author name and a book title are listed).
--skip-notes o -sn
Skips notes, when the application extracts text from DOCX/FB2/FB3/MD/ODT files.
--include-notes entero o -in entero
Includes notes inside text, when the application extracts text from DOCX/FB2/FB3/MD/ODT files.
Possible values for the integer parameter:
  • 0 - removes links to notes from text;
  • 1 - keeps default positions of notes inside text (this value is used by default);
  • 2 - places notes at the end of sentences;
  • 3 - places notes at the end of paragraphs.
--insert-note-begin texto o -inb texto
Inserts words at the beginning of notes, when notes are included inside text (for example: Editor's note.).
The option is used for DOCX/FB2/FB3/MD/ODT files.
--insert-note-end texto o -ine texto
Inserts words at the end of notes, when notes are included inside text (for example: End of note.).
The option is used for DOCX/FB2/FB3/MD/ODT files.
--extract-tables entero o -et entero
Extract tables from DOCX/FB2/FB3/ODT files. Possible values for the integer parameter:
  • 0 - skips tables;
  • 1 - extract data from each cell as a new text line (this value is used by default);
  • 2 - keep formatting when extracting a table.
--csv-comma
Columns are separated by a comma, when the application extracts data from XLS/XLSX/ODS files (default delimiter for CSV files).
--csv-semicolon
Columns are separated by a semicolon, when the application extracts data from XLS/XLSX/ODS files.
--csv-space
Columns are separated by a blank space, when the application extracts data from XLS/XLSX/ODS files.
--csv-tab
Columns are separated by a tab, when the application extracts data from XLS/XLSX/ODS files.
--csv-double-quote
Uses double-quote characters, if a field must be quoted (export from XLS/XLSX/ODS files).
--csv-single-quote
Uses single-quote characters, if a field must be quoted (export from XLS/XLSX/ODS files).
--eml-save nombre_de_carpeta
Extracts attachments from EML files and saves to a specified folder.
--eml-att
Extracts the list of attachments from EML files (names of files attached to the message).
--eml-cc
Extracts the header field "Cc" from EML files ("carbon copy"; it specifies additional recipients of the message).
--eml-date formato_de_fecha
Extracts the header field "Date" from EML files (the local time and date when the message was composed and sent). A date format are defined by specifiers (such as "d", "m", "y", etc.). For example: "dd.mm.yyyy hh:nn:ss".
--eml-from
Extracts the header field "From" from EML files (the email address, and optionally the name of the author).
--eml-org
Extracts the header field "Organization" from EML files (the name of the organization through which the sender of the message has net access).
--eml-rt
Extracts the header field "Reply-To" from EML files (the address for replies to go to).
--eml-subj
Extracts the header field "Subject" from EML files (the subject of the message).
--eml-to
Extracts the header field "To" from EML files (the email address, and optionally the name of the message's recipient).


Ejemplos de comandos

blb2txt -f "d:\Docs\libro.doc" -v "d:\Texto\"

blb2txt -f "d:\Docs\libro.doc" -out "d:\Texto\libro.txt"

blb2txt -f "d:\Docs\*.doc" -f "d:\Docs\*.rtf" -v "d:\Text\" -e utf8 --replace-empty-lines

blb2txt -f "d:\Docs\*.*" -v "d:\Texto\" -p "Documento" -u

blb2txt -f "d:\Docs\1.doc" -v "d:\Texto\" -p "Documento" -a -n 20 -t 100000

blb2txt -f "d:\Book\libro.fb2" -v "d:\Texto\" -p "Libro" -k "CAPITULO" -k "Indice"

blb2txt -f "d:\Book\libro.epub" -v "d:\Texto\" -p "Libro" -r "###"

blb2txt -f "d:\Book\libro.fb2" -v "d:\Texto\" -p "%Number% - %Header%" -c -j 1024

blb2txt -i -o --remove-spaces --remove-linebreaks --replace-empty-lines

blb2txt -f "d:\Archivo\*.zip" -v "d:\Texto\" -dll "e:\7-Zip\7z.dll" -dex doc,docx




Archivo de configuración

Se puede guardar el archivo de configuración "blb2txt.cfg" en la misma carpeta que la aplicación de consola.

Un ejemplo del contenido del archivo:

-f d:\Docs\*.rtf
-f d:\Books\*.epub
-f d:\Books\*.fb2
-v d:\Text
-b
-n 1
-t 25000
-e utf8
-d d:\Dict\reglas.bxd
--remove-spaces
--remove-linebreaks
--replace-empty-lines

El programa puede combinar opciones del fichero de configuración y de la línea de comandos.




Licencia

You are free to use and distribute software for noncommercial purposes. For commercial use or distribution, you need to get permission from the copyright holder.