spiff up id3 docs a bit, and fix help-lint
parent
b2cd8a2ace
commit
bac9705da1
|
|
@ -3,15 +3,15 @@
|
||||||
USING: help.markup help.syntax sequences kernel ;
|
USING: help.markup help.syntax sequences kernel ;
|
||||||
IN: id3
|
IN: id3
|
||||||
|
|
||||||
HELP: id3-parse-mp3-file
|
HELP: file-id3-tags
|
||||||
{ $values
|
{ $values
|
||||||
{ "path" "a path string" }
|
{ "path" "a path string" }
|
||||||
{ "object/f" "either a tuple consisting of the data from an MP3 file, or an f indicating this file has no (supported) ID3 information." } }
|
{ "object/f" "a tuple storing ID3 metadata or f" } }
|
||||||
{ $description "Return a tuple containing the ID3 information parsed out of the MP3 file" } ;
|
{ $description "Return a tuple containing the ID3 information parsed out of the MP3 file, or " { $link f } " if no metadata is present." } ;
|
||||||
|
|
||||||
ARTICLE: "id3" "ID3 tags"
|
ARTICLE: "id3" "ID3 tags"
|
||||||
{ $emphasis "ID3" } " tags are textual data that is used to describe the information (title, artist, etc.) in an .MP3 file"
|
"The " { $vocab-link "id3" } " vocabulary contains words for parsing " { $emphasis "ID3" } " tags, which are textual fields storing an MP3's title, artist, and other metadata." $nl
|
||||||
"Parsing an MP3 file: "
|
"Parsing ID3 tags from an MP3 file:"
|
||||||
{ $subsection id3-parse-mp3-file } ;
|
{ $subsection file-id3-tags } ;
|
||||||
|
|
||||||
ABOUT: "id3"
|
ABOUT: "id3"
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ IN: id3.tests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
] [ "resource:extra/id3/tests/blah3.mp3" id3-parse-mp3-file ] unit-test
|
] [ "resource:extra/id3/tests/blah3.mp3" file-id3-tags ] unit-test
|
||||||
|
|
||||||
[
|
[
|
||||||
T{ mp3v2-file
|
T{ mp3v2-file
|
||||||
|
|
@ -159,7 +159,7 @@ IN: id3.tests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
] [ "resource:extra/id3/tests/blah2.mp3" id3-parse-mp3-file ] unit-test
|
] [ "resource:extra/id3/tests/blah2.mp3" file-id3-tags ] unit-test
|
||||||
|
|
||||||
[
|
[
|
||||||
T{ mp3v1-file
|
T{ mp3v1-file
|
||||||
|
|
@ -178,5 +178,5 @@ IN: id3.tests
|
||||||
}
|
}
|
||||||
{ genre 89 }
|
{ genre 89 }
|
||||||
}
|
}
|
||||||
] [ "resource:extra/id3/tests/blah.mp3" id3-parse-mp3-file ] unit-test
|
] [ "resource:extra/id3/tests/blah.mp3" file-id3-tags ] unit-test
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ PRIVATE>
|
||||||
|
|
||||||
! main stuff
|
! main stuff
|
||||||
|
|
||||||
: id3-parse-mp3-file ( path -- object )
|
: file-id3-tags ( path -- object/f )
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
{ [ dup id3v2? ] [ read-v2-tag-data ] } ! ( ? -- mp3v2-file )
|
{ [ dup id3v2? ] [ read-v2-tag-data ] } ! ( ? -- mp3v2-file )
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue