]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/id3/id3-docs.factor
io.streams.tee: more tests
[factor.git] / extra / id3 / id3-docs.factor
index feb110fab8daaf58382575702212f462952c8f6a..289588a49da91ae84eb72160ec8f03bd4acdfa3a 100644 (file)
@@ -1,13 +1,13 @@
 ! Copyright (C) 2008 Tim Wawrzynczak
-! See http://factorcode.org/license.txt for BSD license.
-USING: help.markup help.syntax sequences kernel accessors
-id3.private strings ;
+! See https://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax id3.private kernel sequences
+strings ;
 IN: id3
 
 HELP: mp3>id3
-{ $values 
-    { "path" "a path string" } 
-    { "id3v2-info/f" "a tuple storing ID3v2 metadata or f" } }
+{ $values
+    { "path" "a path string" }
+    { "id3/f" { $maybe "tuple storing ID3v2 metadata" } } }
     { $description "Return a tuple containing the ID3 information parsed out of the MP3 file, or " { $link f } " if no metadata is present. Words to access the ID3v1 information are here:"
         { $list
           { $link title }
@@ -22,50 +22,50 @@ HELP: mp3>id3
 
 HELP: album
 { $values
-    { "id3" id3v2-info }
-    { "album/f" "string or f" }
+    { "id3" id3 }
+    { "string/f" { $maybe string } }
 }
 { $description "Returns the album, or " { $link f } " if this field is missing, from a parsed id3 tag." } ;
 
 HELP: artist
 { $values
-    { "id3" id3v2-info }
-    { "artist/f" "string or f" }
+    { "id3" id3 }
+    { "string/f" { $maybe string } }
 }
 { $description "Returns the artist, or " { $link f } " if this field is missing, from a parsed id3 tag." } ;
 
 HELP: comment
 { $values
-    { "id3" id3v2-info }
-    { "comment/f" "string or f" }
+    { "id3" id3 }
+    { "string/f" { $maybe string } }
 }
 { $description "Returns the comment, or " { $link f } " if this field is missing, from a parsed id3 tag." } ;
 
 HELP: genre
 { $values
-    { "id3" id3v2-info }
-    { "genre/f" "string or f" }
+    { "id3" id3 }
+    { "string/f" { $maybe string } }
 }
 { $description "Returns the genre, or " { $link f } " if this field is missing, from a parsed id3 tag." } ;
 
 HELP: title
 { $values
-    { "id3" id3v2-info }
-    { "title/f" "string or f" }
+    { "id3" id3 }
+    { "string/f" { $maybe string } }
 }
 { $description "Returns the title, or " { $link f } " if this field is missing, from a parsed id3 tag." } ;
 
 HELP: year
 { $values
-    { "id3" id3v2-info }
-    { "year/f" "string or f" }
+    { "id3" id3 }
+    { "string/f" { $maybe string } }
 }
 { $description "Returns the year, or " { $link f } " if this field is missing, from a parsed id3 tag." } ;
 
 HELP: find-id3-frame
 { $values
-    { "id3" id3v2-info } { "name" string }
-    { "obj/f" "object or f" }
+    { "id3" id3 } { "name" string }
+    { "obj/f" { $maybe object } }
 }
 { $description "Returns the " { $slot "data" } " slot of the ID3 frame with the given name, or " { $link f } "." } ;
 
@@ -93,21 +93,23 @@ HELP: parse-mp3-directory
 ARTICLE: "id3" "ID3 tags"
 "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 ID3 tags for a directory of MP3s, recursively:"
-{ $subsection parse-mp3-directory }
+{ $subsections parse-mp3-directory }
 "Finding MP3 files recursively:"
-{ $subsection find-mp3s }
+{ $subsections find-mp3s }
 "Parsing a sequence of MP3 pathnames:"
-{ $subsection mp3-paths>id3s }
+{ $subsections mp3-paths>id3s }
 "Parsing an MP3 file's ID3 tags:"
-{ $subsection mp3>id3 }
+{ $subsections mp3>id3 }
 "ID3v1 frame tag accessors:"
-{ $subsection album }
-{ $subsection artist }
-{ $subsection comment }
-{ $subsection genre }
-{ $subsection title }
-{ $subsection year }
+{ $subsections
+    album
+    artist
+    comment
+    genre
+    title
+    year
+}
 "Access any frame tag:"
-{ $subsection find-id3-frame } ;
+{ $subsections find-id3-frame } ;
 
 ABOUT: "id3"