readconfig, etc.
This commit is contained in:
parent
82e3e2c8e1
commit
9bd972a5be
|
|
@ -1,4 +1,4 @@
|
||||||
0.7.0 / 2008-06-?? Fabian Kurz <mail@fkurz.net>
|
0.7.0 / 2008-07-03 Fabian Kurz <mail@fkurz.net>
|
||||||
* Paragraph separator (<BT>) can be disabled by
|
* Paragraph separator (<BT>) can be disabled by
|
||||||
-p command line switch (suggested by DJ3KU).
|
-p command line switch (suggested by DJ3KU).
|
||||||
* All command line parameters can now also be set in the config
|
* All command line parameters can now also be set in the config
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
@echo off
|
||||||
|
echo ebook2cw - Batch file for Windows.
|
||||||
|
echo -
|
||||||
|
echo Usage: You will be promted for a filename and (at your option)
|
||||||
|
echo additional parameters for ebook2cw (such as wpm, tone freq etc).
|
||||||
|
echo -
|
||||||
|
echo If a config file (ebook2cw.conf) was found in the current directory,
|
||||||
|
echo the settings in this file are used, but any settings you specify
|
||||||
|
echo here will override those.
|
||||||
|
echo -
|
||||||
|
echo -
|
||||||
|
echo Enter the name of the text file to convert to CW. Note that you can
|
||||||
|
echo simply drag and drop a file from the Windows Explorer to this window.
|
||||||
|
echo -
|
||||||
|
set /p file="Text file: "
|
||||||
|
echo -
|
||||||
|
echo Enter any additional command line parameters for ebook2cw, or leave
|
||||||
|
echo just press enter to use the values from ebook2cw.conf.
|
||||||
|
echo -
|
||||||
|
set /p par="Parameters: "
|
||||||
|
echo -
|
||||||
|
ebook2cw.exe %par% %file%
|
||||||
|
echo Done.
|
||||||
|
pause
|
||||||
|
|
||||||
17
ebook2cw.c
17
ebook2cw.c
|
|
@ -89,7 +89,7 @@ int use_isomapping = 0;
|
||||||
int use_utf8mapping = 0;
|
int use_utf8mapping = 0;
|
||||||
|
|
||||||
/* Config file location */
|
/* Config file location */
|
||||||
char *configfile = "ebook2cw.conf";
|
char configfile[1024] = "ebook2cw.conf";
|
||||||
|
|
||||||
/* ID3-tag data: author and title */
|
/* ID3-tag data: author and title */
|
||||||
char id3_author[80]="CW audio book";
|
char id3_author[80]="CW audio book";
|
||||||
|
|
@ -124,15 +124,11 @@ int main (int argc, char** argv) {
|
||||||
|
|
||||||
printf("ebook2cw %s - (c) 2008 by Fabian Kurz, DJ1YFK\n\n", VERSION);
|
printf("ebook2cw %s - (c) 2008 by Fabian Kurz, DJ1YFK\n\n", VERSION);
|
||||||
|
|
||||||
/* Find and read ebook2cw.conf
|
/*
|
||||||
*
|
* Find and read ebook2cw.conf
|
||||||
* TODO: Find in ~/.ebook2cw/
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (fopen(configfile, "r") != NULL) {
|
readconfig();
|
||||||
readconfig();
|
|
||||||
}
|
|
||||||
|
|
||||||
while((i=getopt(argc,argv, "o:w:W:e:f:uc:k:Q:R:pF:s:b:q:a:t:y:S:hn"))!= -1){
|
while((i=getopt(argc,argv, "o:w:W:e:f:uc:k:Q:R:pF:s:b:q:a:t:y:S:hn"))!= -1){
|
||||||
setparameter(i, optarg);
|
setparameter(i, optarg);
|
||||||
|
|
@ -653,11 +649,10 @@ void readconfig (void) {
|
||||||
char tmp[81] = "";
|
char tmp[81] = "";
|
||||||
char p; /* parameter */
|
char p; /* parameter */
|
||||||
char v[80]=""; /* value */
|
char v[80]=""; /* value */
|
||||||
static char mapfile[256]="";
|
static char mapfile[1024]="";
|
||||||
|
|
||||||
if ((conf = fopen(configfile, "r")) == NULL) {
|
if ((conf = fopen(configfile, "r")) == NULL) {
|
||||||
fprintf(stderr, "Error: Unable to open config file %s!\n", configfile);
|
return; /* No config found -> silently ignore */
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Reading configuration file: %s\n\n", configfile);
|
printf("Reading configuration file: %s\n\n", configfile);
|
||||||
|
|
|
||||||
35
isomap.txt
35
isomap.txt
|
|
@ -1,18 +1,17 @@
|
||||||
# Example ISO8859 character mapping file of ebook2cw.
|
# Example ISO8859 character mapping file of ebook2cw.
|
||||||
#
|
#
|
||||||
# The format of each line is:
|
# The format of each line is:
|
||||||
# x=yyy
|
# x=yyy
|
||||||
#
|
#
|
||||||
# where x is the character to be mapped to the string yyy
|
# where x is the character to be mapped to the string yyy
|
||||||
#
|
#
|
||||||
# x is a single character, yyy is a string of up to 3 characters.
|
# x is a single character, yyy is a string of up to 3 characters.
|
||||||
|
|
||||||
|
ä=ae
|
||||||
ä=ae
|
ö=oe
|
||||||
ö=oe
|
ü=ue
|
||||||
ü=ue
|
Ä=aw
|
||||||
Ä=aw
|
Ü=ue
|
||||||
Ü=ue
|
Ö=oe
|
||||||
Ö=oe
|
ß=sz
|
||||||
ß=sz
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
d586035356b3040af0d4ebc82205b335 releases/ebook2cw-0.4.0.tar.gz
|
|
||||||
0df0ae175e71743aaea1c6d9526966dc releases/ebook2cw-0.5.0.tar.gz
|
|
||||||
1c170b6593ad2b8c6fdef55b5ead9a54 releases/ebook2cw-0.5.1.tar.gz
|
|
||||||
a40768d09676012d62d60852dd59449c releases/ebook2cw-0.5.3.tar.gz
|
|
||||||
57fafc5382fa38c4e646f1deaf116ae0 releases/ebook2cw-0.6.0.tar.gz
|
|
||||||
f843ff84f3a8fa5234e5c1fe694d26c6 releases/ebook2cw-0.6.1.tar.gz
|
|
||||||
58accf8bbd8d1f5b582c444b107fac84 releases/ebook2cw-0.6.2.tar.gz
|
|
||||||
0c8b2f40812f8405f5dc266e95d9590f releases/ebook2cw-0.6.3.tar.gz
|
|
||||||
bea78588dada08449a7065fe6222ca75 releases/ebook2cw-0.6.4.tar.gz
|
|
||||||
9b00b5c4093ed02c75ccadea0b4734d2 releases/ebook2cw-0.7.0.tar.gz
|
|
||||||
40
utf8map.txt
40
utf8map.txt
|
|
@ -1,21 +1,19 @@
|
||||||
# UTF-8 mapping example for ebook2cw..
|
# UTF-8 mapping example for ebook2cw..
|
||||||
#
|
#
|
||||||
# The format of each line is:
|
# The format of each line is:
|
||||||
# x=yyy
|
# x=yyy
|
||||||
#
|
#
|
||||||
# where x is the character to be mapped to the string yyy
|
# where x is the character to be mapped to the string yyy
|
||||||
#
|
#
|
||||||
# x is a single character, yyy is a string of up to 3 characters.
|
# x is a single character, yyy is a string of up to 3 characters.
|
||||||
|
|
||||||
ä=ae
|
ä=ae
|
||||||
ü=ue
|
ü=ue
|
||||||
ö=oe
|
ö=oe
|
||||||
Ä=ae
|
Ä=ae
|
||||||
Ü=ue
|
Ü=ue
|
||||||
Ö=oe
|
Ö=oe
|
||||||
ß=sz
|
ß=sz
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue