Cosmetics towards 0.8.3 release

- Updated readme/man page
- Build GNU gettext mo files from po files
- Disable gettext stuff for Win32
- Update dates
This commit is contained in:
Fabian Kurz 2020-04-15 11:20:38 +02:00
parent 03096032d8
commit c101f224a5
5 changed files with 22 additions and 14 deletions

View File

@ -1,7 +1,7 @@
0.8.3 / 2015- - Fabian Kurz <fabian@fkurz.net>
0.8.3 / 2020-04-15 Fabian Kurz <fabian@fkurz.net>
* Added lowercase Greek alphabet
* Added multiple language support by GNU gettext.
* Added text command |Sx will add x (1 < x < 10000) milliseconds
* Added text command |Sx will add x (1 < x < 20000) milliseconds
of silence to the output file
* Comments can now be used in the CW input file; anything after
a hash sign (#) will be treated as such (suggested by DM3DA)

View File

@ -25,6 +25,7 @@ all: ebook2cw
ebook2cw: ebook2cw.c codetables.h
gcc ebook2cw.c -pedantic -Wall -lm $(LDFLAGS) $(CFLAGS) -o ebook2cw
msgfmt -o po/de.mo po/de.po
cgi: ebook2cw.c codetables.h
gcc -static ebook2cw.c $(LDFLAGS) -lm $(CFLAGS) -D CGI -o cw.cgi
@ -46,6 +47,7 @@ install:
install -m 0644 ebook2cw.conf $(DESTDIR)/share/doc/ebook2cw/examples/
install -m 0644 isomap.txt $(DESTDIR)/share/doc/ebook2cw/examples/
install -m 0644 utf8map.txt $(DESTDIR)/share/doc/ebook2cw/examples/
install -m 0644 po/de.mo $(DESTDIR)/share/locale/de/LC_MESSAGES/ebook2cw.mo
uninstall:
rm -f $(DESTDIR)/bin/ebook2cw
@ -62,10 +64,12 @@ dist:
rm -f releases/ebook2cw-$(VERSION).tar.gz
rm -rf releases/ebook2cw-$(VERSION)
mkdir ebook2cw-$(VERSION)
mkdir ebook2cw-$(VERSION)/po
cp ebook2cw.c codetables.h ChangeLog ebook2cw.1 \
ebook2cw.conf isomap.txt utf8map.txt \
ebook2cw.bat \
README COPYING Makefile ebook2cw-$(VERSION)
cp po/*.po ebook2cw-$(VERSION)/po
tar -zcf ebook2cw-$(VERSION).tar.gz ebook2cw-$(VERSION)
mv ebook2cw-$(VERSION) releases/
mv ebook2cw-$(VERSION).tar.gz releases/

11
README
View File

@ -1,8 +1,7 @@
ebook2cw v0.8.3 - convert ebooks to morse code - Fabian Kurz, DJ1YFK
---------------------------------------------------------------------
$Id$
Website: http://fkurz.net/ham/ebook2cw.html
Website: https://fkurz.net/ham/ebook2cw.html
ebook2cw is a command line program which converts a plain text ebook to morse
code MP3 or OGG files. It works on several platforms, including Windows and
@ -27,9 +26,9 @@ Support for LAME and/or OGG can be disabled by USE_LAME=NO and USE_OGG=NO
respectively.
make [DESTDIR=..] [USE_OGG=NO] [USE_LAME=NO]
make install
sudo make install
Build prerequisites (Debian/Ubuntu): build-essential libvorbis-dev libmp3lame-dev
CGI
---
@ -44,10 +43,10 @@ ebook2cw as a CGI can be found at http://lcwo.net/.
The default cgi version operates "on the fly", the "cgibuffered" option
first writes the whole MP3/OGG to a temporary file, so it can send a proper
Content-Length: header which may be used with some clients.
Content-Length: header which may be required for some clients.
Contact
-------
Fabian Kurz, DJ1YFK <fabian@fkurz.net>
http://fkurz.net/ham/ebook2cw.html
https://fkurz.net/ham/ebook2cw.html

View File

@ -1,4 +1,4 @@
.TH ebook2cw 1 "DECEMBER 2012" Linux "User Manuals"
.TH ebook2cw 1 "APRIL 2020" Linux "User Manuals"
.SH NAME
ebook2cw \- Convert ebooks to Morse code audio files (MP3/OGG)
.SH SYNOPSIS
@ -145,6 +145,6 @@ on the fly for web applications.
.SH AUTHOR
Fabian Kurz, DJ1YFK <fabian@fkurz.net>
http://fkurz.net/ham/ebook2cw.html
https://fkurz.net/ham/ebook2cw.html
.SH "SEE ALSO"
.BR morse (1)

View File

@ -1,9 +1,9 @@
/*
ebook2cw - converts an ebook to Morse MP3/OGG-files
Copyright (C) 2007 - 2013 Fabian Kurz, DJ1YFK
Copyright (C) 2007 - 2020 Fabian Kurz, DJ1YFK
$Id$
https://fkurz.net/ham/ebook2cw.html
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@ -35,11 +35,15 @@ source code looks properly indented with ts=4
#include <ctype.h>
#include <time.h>
#if !__MINGW32__
#include <locale.h> /* For GNU gettext */
#include <libintl.h>
#define _(String) gettext (String)
#define gettext_noop(String) String
#define N_(String) gettext_noop (String)
#else
#define _(String) (String)
#endif
#ifndef CGI
#include <signal.h> /* Ctrl-C handling with signalhandler() */
@ -242,11 +246,12 @@ int main (int argc, char** argv) {
start_time = time(NULL);
srand((unsigned int) start_time);
#if !__MINGW32__
/* Native Language Support by GNU gettext */
setlocale(LC_ALL, "" );
bindtextdomain( "ebook2cw", "/usr/share/locale" );
textdomain("ebook2cw");
#endif
#ifndef CGI
/* Signal handling for Ctrl-C -- Does not work on Win32 because
@ -258,7 +263,7 @@ int main (int argc, char** argv) {
return EXIT_FAILURE;
}
printf(_("ebook2cw %s - (c) 2013 by Fabian Kurz, DJ1YFK\n\n"), VERSION);
printf(_("ebook2cw %s - (c) 2007 - 2020 by Fabian Kurz, DJ1YFK\n\n"), VERSION);
/*
* Find and read ebook2cw.conf