spfy 0.1.1 → 0.1.2
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 +1 -5
- data/lib/spfy.rb +7 -9
- data/spfy.gemspec +3 -3
- metadata +4 -4
data/README.md
CHANGED
@@ -31,7 +31,7 @@ For example:
|
|
31
31
|
..will produce the following output (where ~/music contains one audio file with valid metadata):
|
32
32
|
|
33
33
|
<?xml version="1.0" encoding="UTF-8"?>
|
34
|
-
<playlist version="1" xmlns="http
|
34
|
+
<playlist version="1" xmlns="http://xspf.org/ns/0/">
|
35
35
|
<trackList>
|
36
36
|
<track>
|
37
37
|
<title>A Stitch In Time</title>
|
@@ -47,13 +47,9 @@ Command-line arguments are available to output to a file on disk or suppress unw
|
|
47
47
|
-t, --no-title Suppress track title in output
|
48
48
|
-a, --no-artist Suppress artist name in output
|
49
49
|
-l, --no-album Suppress album name in output
|
50
|
-
-n, --no-tracknum Suppress track number in output
|
51
50
|
|
52
51
|
For additional options use `spfy --help`.
|
53
52
|
|
54
|
-
##API Reference
|
55
|
-
An API is forthcoming in a future release.
|
56
|
-
|
57
53
|
##License
|
58
54
|
Spfy is licensed under the [GNU General Public License v3.0](http://www.gnu.org/licenses/gpl.html).
|
59
55
|
|
data/lib/spfy.rb
CHANGED
@@ -24,7 +24,7 @@ require "optparse"
|
|
24
24
|
require "ostruct"
|
25
25
|
require "taglib"
|
26
26
|
|
27
|
-
$version = "0.1.
|
27
|
+
$version = "0.1.2"
|
28
28
|
$dirs = []
|
29
29
|
|
30
30
|
# The main Spfy class
|
@@ -94,11 +94,10 @@ class Spfy
|
|
94
94
|
tag = fileref.tag
|
95
95
|
|
96
96
|
# skip files with no tags
|
97
|
-
next if tag.title.empty? and tag.artist.empty? and tag.album.empty?
|
97
|
+
next if tag.title.empty? and tag.artist.empty? and tag.album.empty?
|
98
98
|
|
99
99
|
# write track metadata
|
100
100
|
xmlFile.write("\t\t<track>\n")
|
101
|
-
#xmlFile.write("\t\t<location>file:/#{path}#{file}</location>\n")
|
102
101
|
xmlFile.write("\t\t\t<title>#{tag.title}</title>\n") if !options.hide_title and !tag.title.empty?
|
103
102
|
xmlFile.write("\t\t\t<creator>#{tag.artist}</creator>\n") if !options.hide_artist and !tag.artist.empty?
|
104
103
|
xmlFile.write("\t\t\t<album>#{tag.album}</album>\n") if !options.hide_album and !tag.album.empty?
|
@@ -132,21 +131,20 @@ class Spfy
|
|
132
131
|
next if file.start_with? '.'
|
133
132
|
|
134
133
|
begin
|
135
|
-
# FIX THIS AS IT MAY NOT WORK MULTIPLATFORM!!!
|
136
134
|
TagLib::FileRef.open(path + "/" + file) do |fileref|
|
137
135
|
|
138
136
|
tag = fileref.tag
|
139
137
|
|
140
138
|
# skip files with no tags
|
141
|
-
next if tag.title.empty? and tag.artist.empty? and tag.album.empty?
|
139
|
+
next if tag.title.empty? and tag.artist.empty? and tag.album.empty?
|
142
140
|
|
143
141
|
# write track metadata
|
144
142
|
puts "\t\t<track>\n"
|
145
|
-
|
146
|
-
puts "\t\t\t<
|
147
|
-
puts "\t\t\t<
|
148
|
-
puts "\t\t\t<album>#{tag.album}</album>\n" if !options.hide_album and !tag.album.empty?
|
143
|
+
puts "\t\t\t<title>#{tag.title}</title>\n"
|
144
|
+
puts "\t\t\t<creator>#{tag.artist}</creator>\n"
|
145
|
+
puts "\t\t\t<album>#{tag.album}</album>\n"
|
149
146
|
puts "\t\t</track>\n"
|
147
|
+
|
150
148
|
end
|
151
149
|
rescue Exception => e
|
152
150
|
next
|
data/spfy.gemspec
CHANGED
@@ -21,9 +21,9 @@
|
|
21
21
|
|
22
22
|
Gem::Specification.new do |s|
|
23
23
|
s.name = 'spfy'
|
24
|
-
s.version = '0.1.
|
25
|
-
s.date = '2012-05-
|
26
|
-
s.summary = 'XSPF playlist generator
|
24
|
+
s.version = '0.1.2'
|
25
|
+
s.date = '2012-05-06'
|
26
|
+
s.summary = 'XSPF playlist generator'
|
27
27
|
s.description = 'Spfy is a simple command-line ruby tool for generating XSPF playlists from metadata stored in several popular audio formats.'
|
28
28
|
s.authors = ["Marc Ransome"]
|
29
29
|
s.email = 'marc.ransome@fidgetbox.co.uk'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spfy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
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: 2012-05-
|
12
|
+
date: 2012-05-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: taglib-ruby
|
@@ -61,8 +61,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
61
|
version: '0'
|
62
62
|
requirements: []
|
63
63
|
rubyforge_project:
|
64
|
-
rubygems_version: 1.8.
|
64
|
+
rubygems_version: 1.8.24
|
65
65
|
signing_key:
|
66
66
|
specification_version: 3
|
67
|
-
summary: XSPF playlist generator
|
67
|
+
summary: XSPF playlist generator
|
68
68
|
test_files: []
|