ipod_db 0.2.12 → 0.2.13

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.
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  NAME
5
5
  ====
6
6
 
7
- ipod_db v0.2.12
7
+ ipod_db v0.2.13
8
8
 
9
9
  SYNOPSIS
10
10
  ========
data/bin/ipod CHANGED
@@ -170,8 +170,14 @@ Main {
170
170
  end
171
171
  end
172
172
  rename_us.reverse_each do |from,to|
173
- info "renaming #{from} to #{to}"
174
- File.rename from, to
173
+ if Dir.exists? to
174
+ info "moving #{from}/* to #{to}/"
175
+ FileUtils.mv Dir["#{from}/*"], to
176
+ FileUtils.rm_rf from
177
+ else
178
+ info "renaming #{from} to #{to}"
179
+ File.rename from, to
180
+ end
175
181
  end
176
182
  end
177
183
 
@@ -1,3 +1,3 @@
1
1
  class IpodDB
2
- VERSION = '0.2.12'
2
+ VERSION = '0.2.13'
3
3
  end
@@ -0,0 +1,22 @@
1
+ #!/bin/bash
2
+
3
+ SRC=/home/artm/gPodder/Downloads
4
+ DEV=/media/artm/IPOD
5
+ DST=$DEV/books
6
+ LIST=./upload-files.txt
7
+ RSYNC_OPTS='-ruvh --remove-source-files'
8
+
9
+ SPACE=$(df -k $DEV | tail -1 | sed -e 's/ \+/\t/g' | cut -f 4)
10
+
11
+ # no more than ...
12
+ TOTAL=1000
13
+ find $SRC -name '*.mp3' -printf '%TY-%Tm-%Td\t%k\t%P\n' | sort | cut -f 2,3 | while read SIZE FILE ; do
14
+ TOTAL=$(($TOTAL+$SIZE))
15
+ if [ $TOTAL -gt $SPACE ] ; then
16
+ break
17
+ fi
18
+ echo $FILE
19
+ done > $LIST
20
+
21
+ rsync $RSYNC_OPTS $SRC/ $DST/ --files-from=$LIST
22
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ipod_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.12
4
+ version: 0.2.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-29 00:00:00.000000000 Z
12
+ date: 2013-07-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bindata
@@ -309,6 +309,7 @@ files:
309
309
  - lib/ipod_db/version.rb
310
310
  - lib/pretty.rb
311
311
  - lib/spread.rb
312
+ - rsync-podcasts.sh
312
313
  - spec/fuzzy_locale_spec.rb
313
314
  - spec/ipod/track_spec.rb
314
315
  - spec/ipod_db_spec.rb
@@ -334,18 +335,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
334
335
  - - ! '>='
335
336
  - !ruby/object:Gem::Version
336
337
  version: '0'
337
- segments:
338
- - 0
339
- hash: 2376881358862062808
340
338
  required_rubygems_version: !ruby/object:Gem::Requirement
341
339
  none: false
342
340
  requirements:
343
341
  - - ! '>='
344
342
  - !ruby/object:Gem::Version
345
343
  version: '0'
346
- segments:
347
- - 0
348
- hash: 2376881358862062808
349
344
  requirements: []
350
345
  rubyforge_project:
351
346
  rubygems_version: 1.8.23