poddb_client 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,145 @@
1
1
  # poddb
2
2
 
3
- Poddb is a podcast aggregator, fetcher, and discovery tool for Unix systems.
3
+ Poddb lets you find, track, and download podcasts from the Unix command line and Vim.
4
+
5
+ [screenshots]
6
+
7
+
8
+ ## Benefits
9
+
10
+ * Search for podcasts from the command line
11
+ * Lean Vim interface to navigate, favorite, and download podcasts
12
+ * Handle podcasts directly as files; use any tool to play them
13
+
14
+
15
+ ## Prerequisites
16
+
17
+ * Vim (7.2 or later)
18
+ * Ruby 1.9.x
19
+ * wget
20
+ * curl
21
+ * mplayer or another media player
22
+
23
+ To install Ruby 1.9.2, I recommend using the [RVM Version Manager][rvm].
24
+
25
+ [rvm]:http://rvm.beginrescueend.com
26
+
27
+ Poddb assumes a Unix (POSIX) environment.
28
+
29
+
30
+ ## Install
31
+
32
+ gem install poddb_client
33
+
34
+ Test your installation by typing `poddb -h`. You should see poddb's help.
35
+
36
+ On some systems you may run into a PATH issue, where the system can't find the
37
+ `poddb` command after installation. You might want to try
38
+
39
+ sudo gem install poddb
40
+
41
+ to see if that puts `poddb` on your PATH.
42
+
43
+ If you ever want to uninstall Poddb from your system, just execute this command:
44
+
45
+ gem uninstall poddb
46
+
47
+ and all traces of Poddb will removed, except the application-specific files it
48
+ creates during execution. These files are created in a directory called `~/.poddb`.
49
+
50
+
51
+ ## How to use it
52
+
53
+ Invoke `poddb` from command line interface, passing it flags and search terms.
54
+ After you press `ENTER`, Poddb will send the query over the internet to the poddb
55
+ server. The server will send back data, and poddb will launch Vim to let you
56
+ navigate and interact with the results.
57
+
58
+ The command line interface is as follows:
59
+
60
+ Usage: poddb [options] [query]
61
+
62
+ -f, --from-favorites Show all recent items from favorite podcasts
63
+ -a, --add PODCAST_URL Add podcast with PODCAST_URL to the poddb database
64
+ -l, --list [QUERY] List all podcasts in the poddb database
65
+ (If QUERY is supplied, will return matching podcasts)
66
+ -F, --favorite-podcasts Show favorite podcasts
67
+ -o, --order ORDER Sort results by ORDER
68
+ The only option right now is 'popular'. Default order is pubdate.
69
+ -d, --days DAYS Limit results to items published since DAYS days ago
70
+ -t, --type MEDIA_TYPE Return items of MEDIA_TYPE only (audio,video)
71
+ --download-and-play ITEM_ID Download item and play with PODDB_MEDIA_PLAYER
72
+ --key-mappings Show key mappings for Vim navigation interface
73
+ -h, --help Show this message
74
+ -v, --version Show version number
75
+
76
+
77
+ ## Podcast list
78
+
79
+ To see all the podcasts in the poddb database, type `poddb -l`. Type `poddb -l
80
+ QUERY` to see if any podcasts matching the QUERY string are in the database. If
81
+ you don't see a favorite feed of yours in the list, you can add the feed to the
82
+ Poddb database with this command:
83
+
84
+ poddb -a PODCAST_URL
85
+
86
+ This command will also add the podcast to your favorites.
87
+
88
+ When you're viewing a list of podcasts, you can add a podcast to your favorites
89
+ by putting the cursor over it and pressing `f`. Press `f` again to remove the
90
+ podcast from your favorite podcasts. Your favorite podcasts are stored in
91
+ `~/.poddb/favorites` as a simple list of podcast ids.
92
+
93
+ Press `ENTER` on a podcast to see its items.
94
+
95
+
96
+ ## Item list
97
+
98
+ If you see a list of items (i.e. downloadable podcast episodes), the following
99
+ key commands apply:
100
+
101
+ * `l` or `ENTER` show item detail
102
+ * `d` mark item for download
103
+ * `D` start downloading item and play with mplayer or `PODDB_MEDIA_PLAYER`
104
+ * `p` show all items for this podcast
105
+ * `CTRL-j` show next item
106
+ * `CTRL-k` show previous item
107
+
108
+ If you mark items for downloading, Poddb will download them as soon as you quit
109
+ the Vim interface with `:qa` or some similar command.
110
+
111
+ If you press `D`, Poddb will quit the Vim interface immediately and begin
112
+ downloading the item that was under the cursor. After the download is complete,
113
+ Poddb will start playing the item with `mplayer` or whatever command you
114
+ specify using the `PODDB_MEDIA_PLAYER` environment variable.
115
+
116
+ If you see a `D` on the left margin of an item in the item list, that means
117
+ that you already downloaded that podcast item into the current directory.
118
+
119
+ Poddb uses `wget` to download items.
120
+
121
+
122
+ ## Bug reports and feature requests
123
+
124
+ Please submit them here:
125
+
126
+ * <https://github.com/danchoi/poddb_client/issues>
127
+
128
+
129
+ ## About the developer
130
+
131
+ My name is Daniel Choi. I make software with Ruby, Rails, MySQL, PostgreSQL,
132
+ and iOS. I am based in Cambridge, Massachusetts, USA, and the little software
133
+ company I run with Hoony Youn is called [Kaja
134
+ Software](http://kajasoftware.com).
135
+
136
+ * Company Email: info@kajasoftware.com
137
+ * Twitter: [@danchoi][twitter]
138
+ * Personal Email: dhchoi@gmail.com
139
+ * My Homepage: <http://danielchoi.com/software>
140
+
141
+ [twitter]:http://twitter.com/#!/danchoi
142
+
4
143
 
5
144
 
6
145
 
@@ -1,4 +1,4 @@
1
- let s:client_cmd = "ruby -Ilib bin/poddb"
1
+ let s:client_cmd = "poddb"
2
2
  if !exists($PODDB_SERVER)
3
3
  let g:poddb_base_url = $PODDB_SERVER
4
4
  else
@@ -129,7 +129,6 @@ class PoddbClient
129
129
  end
130
130
  File.open(@outfile, 'w') {|f| f.puts @output }
131
131
  cmd = "export PODDB_SERVER=#{SERVER} && vim -S #{VIMSCRIPT} #{@outfile} "
132
- puts cmd
133
132
  system(cmd)
134
133
  if download_and_play?
135
134
  download_and_play
@@ -149,7 +148,7 @@ class PoddbClient
149
148
  if File.size?(FAVORITE_PODCASTS_FILE)
150
149
  @output = @output.split("\n").map {|line|
151
150
  # podcast_ids here are strings
152
- if (podcast_id = line[/\d+$/,0]) && favorite_podcast_ids.include?(podcast_id)
151
+ if (podcast_id = line[/\d+$/,0]) && favorite_podcast_ids.detect{|i| i.to_s == podcast_id}
153
152
  line.sub(/^ /, "@")
154
153
  else
155
154
  line
@@ -10,6 +10,7 @@ class PoddbClient
10
10
  end
11
11
 
12
12
  def download(item_id)
13
+ puts "Downloading podcast item #{item_id}"
13
14
  response = `curl -s #{SERVER}/item/#{item_id}/download`
14
15
  data = YAML::load(response)
15
16
  item = data[:item]
@@ -1,3 +1,3 @@
1
1
  class PoddbClient
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poddb_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: