-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
279 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# rado-download(1) -- download shows in batch | ||
|
||
## SYNOPSIS | ||
```sh | ||
rado download <slug> [--out path] [--skip offset] [--get number] | ||
``` | ||
|
||
## DESCRIPTION | ||
This command identifies a show by it's "**slug**", or the last part of the show page's URL | ||
For example, to download shows listed on http://www.radioechoes.com/alka-seltzer-time, use: | ||
|
||
A directory is created in the output path for each series, based on the slug. | ||
|
||
## OPTIONS | ||
`-o, --out <path>` | ||
where to create show directory (if it doesn't exist). defaults to `.`. | ||
|
||
`-s, --skip <offset>` | ||
how many to skip (`0` to start with first show i.e. skip none) | ||
If not specified the user will be prompted for this value. | ||
|
||
`-n, --get <n>` | ||
how many files to download. | ||
If not specified the user will be prompted for this value. | ||
|
||
## CONFIGURATION | ||
All options for `rado download` may be specified in `.radorc`. Example: | ||
``` | ||
# Always put tracks where Songbird can find them | ||
out=~/Music | ||
``` | ||
|
||
## EXAMPLES | ||
Download Space Patrol, prompt for how many to d/l & skip | ||
```sh | ||
$ rado download space-patrol | ||
``` | ||
Download the 11th episode of The Burkiss Way | ||
```sh | ||
$ rado download the-burkiss-way -s 10 -n 1 | ||
``` | ||
Download the first three episodes of The Six Shooter to your home directory | ||
```sh | ||
$ rado download the-burkiss-way --skip 0 --get 3 --out ~ | ||
``` | ||
This will prompt you for how many to skip & how many to get | ||
```sh | ||
$ ./rado.js download the-burkiss-way | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# rado-search(1) -- search for shows by title | ||
|
||
## SYNOPSIS | ||
```sh | ||
rado search <search_term> | ||
``` | ||
|
||
## DESCRIPTION | ||
This command does what it says on the tin: it searches for shows by title. This | ||
is useful to find a show if you only remember part of the title, and especially | ||
useful to get the slug for `rado download` | ||
|
||
## EXAMPLES | ||
Search for shows with "shoot" in the title | ||
```sh | ||
$ rado search shoot | ||
``` | ||
Serach for Space Patrol | ||
```sh | ||
$ rado search "space patrol" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
.TH "RADO\-DOWNLOAD" "1" "April 2015" "" "" | ||
.SH "NAME" | ||
\fBrado-download\fR \- download shows in batch | ||
.SH SYNOPSIS | ||
.P | ||
.RS 2 | ||
.nf | ||
rado download <slug> [\-\-out path] [\-\-skip offset] [\-\-get number] | ||
.fi | ||
.RE | ||
.SH DESCRIPTION | ||
.P | ||
This command identifies a show by it's "\fBslug\fR", or the last part of the show page's URL | ||
For example, to download shows listed on http://www\.radioechoes\.com/alka\-seltzer\-time, use: | ||
.P | ||
A directory is created in the output path for each series, based on the slug\. | ||
.SH OPTIONS | ||
.P | ||
\fB\-o, \-\-out <path>\fR | ||
where to create show directory (if it doesn't exist)\. defaults to \fB\|\.\fR\|\. | ||
.P | ||
\fB\-s, \-\-skip <offset>\fR | ||
how many to skip (\fB0\fR to start with first show i\.e\. skip none) | ||
If not specified the user will be prompted for this value\. | ||
.P | ||
\fB\-n, \-\-get <n>\fR | ||
how many files to download\. | ||
If not specified the user will be prompted for this value\. | ||
.SH CONFIGURATION | ||
.P | ||
All options for \fBrado download\fR may be specified in \fB\|\.radorc\fR\|\. Example: | ||
.P | ||
.RS 2 | ||
.nf | ||
# Always put tracks where Songbird can find them | ||
out=~/Music | ||
.fi | ||
.RE | ||
.SH EXAMPLES | ||
.P | ||
Download Space Patrol, prompt for how many to d/l & skip | ||
.P | ||
.RS 2 | ||
.nf | ||
$ rado download space\-patrol | ||
.fi | ||
.RE | ||
.P | ||
Download the 11th episode of The Burkiss Way | ||
.P | ||
.RS 2 | ||
.nf | ||
$ rado download the\-burkiss\-way \-s 10 \-n 1 | ||
.fi | ||
.RE | ||
.P | ||
Download the first three episodes of The Six Shooter to your home directory | ||
.P | ||
.RS 2 | ||
.nf | ||
$ rado download the\-burkiss\-way \-\-skip 0 \-\-get 3 \-\-out ~ | ||
.fi | ||
.RE | ||
.P | ||
This will prompt you for how many to skip & how many to get | ||
.P | ||
.RS 2 | ||
.nf | ||
$ \./rado\.js download the\-burkiss\-way | ||
.fi | ||
.RE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.TH "RADO\-SEARCH" "1" "April 2015" "" "" | ||
.SH "NAME" | ||
\fBrado-search\fR \- search for shows by title | ||
.SH SYNOPSIS | ||
.P | ||
.RS 2 | ||
.nf | ||
rado search <search_term> | ||
.fi | ||
.RE | ||
.SH DESCRIPTION | ||
.P | ||
This command does what it says on the tin: it searches for shows by title\. This | ||
is useful to find a show if you only remember part of the title, and especially | ||
useful to get the slug for \fBrado download\fR | ||
.SH EXAMPLES | ||
.P | ||
Search for shows with "shoot" in the title | ||
.P | ||
.RS 2 | ||
.nf | ||
$ rado search shoot | ||
.fi | ||
.RE | ||
.P | ||
Serach for Space Patrol | ||
.P | ||
.RS 2 | ||
.nf | ||
$ rado search "space patrol" | ||
.fi | ||
.RE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.TH "RADO" "1" "April 2015" "" "" | ||
.SH "NAME" | ||
\fBrado\fR \- find & download OTR programs | ||
.SH SYNOPSIS | ||
.P | ||
.RS 2 | ||
.nf | ||
rado <command> [options] | ||
.fi | ||
.RE | ||
.SH DESCRIPTION | ||
.P | ||
This tool allows you to find & download old time radio shows available on | ||
radioechoes\.com\. You can specify how which show to download and how many | ||
episodes\. See the \fBdocs/\fR directory or the manpages for each command for more | ||
info about those commands and their usage\. | ||
.SH COMMANDS | ||
.P | ||
\fBdownload <slug> [options]\fR | ||
Download shows\. See \fBrado help download\fR for more | ||
.P | ||
\fBsearch <search_term>\fR | ||
Search for shows\. See \fBrado help search\fR for more | ||
.SH ABOUT | ||
.P | ||
I wanted all the The Burkiss Way \fIhttps://en\.wikipedia\.org/wiki/The_Burkiss_Way\fR | ||
mp3s from RadioEchoes\.com \fIhttp://radioechoes\.com\fR\|\. In order to get the mp3 | ||
urls from the show page, one must click "download mp3", which opens a \fIsecond\fR | ||
page (typically in overlay), and that second page has the link\. So I wrote this simple scraper\. | ||
.SH LICENSE | ||
.P | ||
GPL 3 | ||
.SH CREDITS | ||
.P | ||
by Sequoia McDowell | ||
.P | ||
Special thanks to duchess & the entire honeyhole team, without whom this wouldn't have been possible |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,33 @@ | ||
## Background | ||
I wanted all the [The Burkiss Way](https://en.wikipedia.org/wiki/The_Burkiss_Way) mp3s from [RadioEchoes.com](http://radioechoes.com). In order to get the mp3 urls from the show page, one must click "download mp3", which opens a *second* page (typically in overlay), and that second page has the link. So I wrote this simple scraper. | ||
# rado(1) -- find & download OTR programs | ||
|
||
## Later on... | ||
I decided to use this project as the basis for a talk with tags as steps & I don't keep the readme up to date on each step. As such the readme **may/will be inaccurate** 'til the end when I'll update it all to reflect the state of the project. | ||
|
||
# Commands | ||
:warning: Changes from step to step, watch the talk @todo link to talk :warning: | ||
:point_right: Will update in the end | ||
|
||
## `download` | ||
|
||
### Arguments | ||
* show slug: e.g. `a-day-in-the-life-of-dennis-day` for `http://www.radioechoes.com/a-day-in-the-life-of-dennis-day` | ||
|
||
### Switches | ||
* `out` *default: `.`*: where to create show directory (if it doesn't exist) | ||
* `skip`: offset-- how many to skip (`0` to start with first show i.e. skip none) | ||
* `get`: how many files to download | ||
|
||
### `.radorc` | ||
Any of the options that can be passed as switches may also be set in a `.radorc` | ||
file in any of the [usual `rc` file locations](https://github.com/dominictarr/rc#standards). | ||
See `.radorc.example` | ||
## SYNOPSIS | ||
```sh | ||
rado <command> [options] | ||
``` | ||
|
||
:information_source: `skip` & `get` will be requested if not passed as switches | ||
## DESCRIPTION | ||
This tool allows you to find & download old time radio shows available on | ||
radioechoes.com. You can specify how which show to download and how many | ||
episodes. See the `docs/` directory or the manpages for each command for more | ||
info about those commands and their usage. | ||
|
||
## `search` | ||
Search for shows by title & output info about those shows | ||
## COMMANDS | ||
`download <slug> [options]` | ||
Download shows. See `rado help download` for more | ||
|
||
### Arguments | ||
* search string: word/term to search for. show title is searched, case insensitive | ||
`search <search_term>` | ||
Search for shows. See `rado help search` for more | ||
|
||
## Examples | ||
Download the first 10 Burkiss Ways | ||
```sh | ||
$ ./rado.js download the-burkiss-way --out . --skip 0 --get 10 | ||
``` | ||
This will prompt you for how many to skip & how many to get | ||
```sh | ||
$ ./rado.js download the-burkiss-way | ||
``` | ||
Download episodes 11-20 of The Six Shooter | ||
```sh | ||
$ ./rado.js download the-six-shooter -s 10 -n 10 | ||
``` | ||
Search for shows with "shoot" in the title | ||
```sh | ||
$ ./rado.js search shoot | ||
``` | ||
Search for "space patrol" | ||
```sh | ||
$ ./rado.js search "space patrol" | ||
``` | ||
## ABOUT | ||
I wanted all the [The Burkiss Way](https://en.wikipedia.org/wiki/The_Burkiss_Way) | ||
mp3s from [RadioEchoes.com](http://radioechoes.com). In order to get the mp3 | ||
urls from the show page, one must click "download mp3", which opens a *second* | ||
page (typically in overlay), and that second page has the link. So I wrote this simple scraper. | ||
|
||
## License | ||
## LICENSE | ||
GPL 3 | ||
|
||
## Special Thanks | ||
to duchess & the entire honeyhole team, without whom this wouldn't have been possible | ||
## CREDITS | ||
by Sequoia McDowell | ||
|
||
Special thanks to duchess & the entire honeyhole team, without whom this wouldn't have been possible |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env node | ||
var path = require('path-extra'); | ||
var fs = require('fs'); | ||
var _ = require('lodash'); | ||
var markedman= require('marked-man'); | ||
|
||
var docspath = path.resolve(__dirname,'../doc'); | ||
var manpath = path.resolve(__dirname,'../man'); | ||
|
||
//md files in doc/ | ||
fs.readdirSync(docspath) | ||
.filter(isMarkdown) //just markdown files | ||
.map(function(filename){ //write md file | ||
createManfile( | ||
path.join(docspath, filename), | ||
path.basename(filename,'.md') | ||
); | ||
}); | ||
|
||
//special case: readme.md is not in doc/ | ||
var readmePath = path.resolve(__dirname,'..','readme.md'); | ||
createManfile(readmePath, 'rado'); | ||
|
||
function isMarkdown(filename){ | ||
return path.extname(filename) === '.md'; | ||
} | ||
|
||
function createManfile(mdpath, commandName){ | ||
var manfilePath = path.join(manpath,commandName + '.1'); | ||
var md = fs.readFileSync(mdpath,'utf8'); | ||
fs.writeFileSync(manfilePath,markedman(md)); | ||
} |