2013-09-17 14:54:25 +02:00
|
|
|
Requirements
|
|
|
|
============
|
|
|
|
- Python 3.x with argparse (which is already included in Python >= 3.2)
|
|
|
|
|
2013-09-17 11:23:22 +02:00
|
|
|
Installation
|
|
|
|
============
|
|
|
|
- Copy the config file settings.ini into your local settings directory,
|
|
|
|
depending on which platform you are using this program, e.g.:
|
|
|
|
* Linux: $HOME/.config/radiorec/settings.ini or
|
|
|
|
* Windows: %LOCALAPPDATA%/radiorec/settings.ini
|
|
|
|
- Adjust the settings to your needs. You can happily add more radio stations
|
|
|
|
to the STATIONS section.
|
|
|
|
!!! Check at least the the target_dir !!!
|
|
|
|
- The script file radiorec.py can be placed wherever you want.
|
|
|
|
|
|
|
|
Usage
|
|
|
|
=====
|
|
|
|
Open a shell and go to the directory where radiorec.py is located.
|
|
|
|
General usage:
|
2013-11-04 14:00:55 +01:00
|
|
|
* Windows: py radiorec.py […]
|
2013-09-17 11:23:22 +02:00
|
|
|
* Linux: python3 radiorec.py […] OR JUST ./radiorec.py […]
|
|
|
|
|
|
|
|
What you want to do first is getting some help about how to use the scipt:
|
|
|
|
./radiorec.py --help
|
2013-09-17 15:00:32 +02:00
|
|
|
or get some help for the record command:
|
|
|
|
./radiorec.py record --help
|
2013-09-17 11:23:22 +02:00
|
|
|
|
|
|
|
There are two main commands: record and list.
|
|
|
|
|
|
|
|
Recording a radio station usually works as follows:
|
|
|
|
./radiorec.py record <station> <duration> [name]
|
|
|
|
<station> is the radio station name, for example: dlf
|
|
|
|
<duration> is how long the recording runs in minutes, for example: 60
|
|
|
|
[name] is not required and is (currently) just appended to the filename.
|
|
|
|
Thus the command line is:
|
|
|
|
./radiorec.py record dlf 60 mytest
|
|
|
|
|
|
|
|
You can get a list of all known radio stations with:
|
|
|
|
./radiorec.py list
|
2013-11-05 08:36:25 +01:00
|
|
|
You can edit/add the radio stations in the STATIONS section of the settings
|
|
|
|
file.
|
2013-09-17 11:23:22 +02:00
|
|
|
|
|
|
|
Scheduling the recording task
|
|
|
|
=============================
|
|
|
|
Using Linux, you can use "at" for scheduling, for example:
|
|
|
|
at 22:00 friday
|
2013-09-17 16:07:45 +02:00
|
|
|
> /path/to/radiorec.py record dlf 60 mytest
|
2013-09-17 11:23:22 +02:00
|
|
|
[CTRL-D]
|
|
|
|
|
|
|
|
The recording then starts on the upcoming friday at 10 pm.
|
|
|
|
Please have a look at the manual page of "at" for more information about
|
|
|
|
how to schedule your recording tasks.
|
|
|
|
|
2013-09-17 13:36:11 +02:00
|
|
|
Known problems
|
2013-09-17 14:16:49 +02:00
|
|
|
==============
|
2013-09-17 13:36:11 +02:00
|
|
|
The Windows command line (cmd and powershell) still has problems with UTF-8.
|
|
|
|
Using the --verbose option might cause the script to crash with an
|
|
|
|
UnicodeEncodeError. If you want to avoid the crash, you have to do both,
|
|
|
|
change the command line codepage and the font. For example, doing a
|
2013-09-18 15:41:23 +02:00
|
|
|
"chcp 65001" and changing the font to "Lucidia Console" should help.
|
2013-09-17 13:36:11 +02:00
|
|
|
|
2013-09-17 14:16:49 +02:00
|
|
|
Acknowledgements
|
|
|
|
================
|
|
|
|
This project got inspiration from the dradio project by prometoys
|
|
|
|
(https://github.com/prometoys/dradio). Thanks for that!
|
|
|
|
|
2013-09-17 13:36:11 +02:00
|
|
|
--
|
2013-09-17 14:42:17 +02:00
|
|
|
If you have any questions or suggestions (or bug reports!), feel free to use
|
|
|
|
the github issue tracker: https://github.com/beedaddy/radiorec/issues
|