1 ! Copyright (C) 2008 Tim Wawrzynczak
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: help.markup help.syntax id3.private kernel sequences
9 { "path" "a path string" }
10 { "id3/f" { $maybe "tuple storing ID3v2 metadata" } } }
11 { $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:"
20 "For other fields, use the " { $link find-id3-frame } " word."
26 { "string/f" { $maybe string } }
28 { $description "Returns the album, or " { $link f } " if this field is missing, from a parsed id3 tag." } ;
33 { "string/f" { $maybe string } }
35 { $description "Returns the artist, or " { $link f } " if this field is missing, from a parsed id3 tag." } ;
40 { "string/f" { $maybe string } }
42 { $description "Returns the comment, or " { $link f } " if this field is missing, from a parsed id3 tag." } ;
47 { "string/f" { $maybe string } }
49 { $description "Returns the genre, or " { $link f } " if this field is missing, from a parsed id3 tag." } ;
54 { "string/f" { $maybe string } }
56 { $description "Returns the title, or " { $link f } " if this field is missing, from a parsed id3 tag." } ;
61 { "string/f" { $maybe string } }
63 { $description "Returns the year, or " { $link f } " if this field is missing, from a parsed id3 tag." } ;
67 { "id3" id3 } { "name" string }
68 { "obj/f" { $maybe object } }
70 { $description "Returns the " { $slot "data" } " slot of the ID3 frame with the given name, or " { $link f } "." } ;
77 { $description "From a sequence of pathnames, parses each ID3 header and returns a sequence of key/value pairs of pathnames and ID3 objects." } ;
81 { "path" "a pathname string" }
84 { $description "Returns a sequence of MP3 pathnames from a directory and all of its subdirectories." } ;
86 HELP: parse-mp3-directory
88 { "path" "a pathname string" }
91 { $description "Returns a sequence of key/value pairs where the key is the path of an MP3 and the value is the parsed ID3 header or " { $link f } " recursively for each MP3 file in the directory and all subdirectories." } ;
93 ARTICLE: "id3" "ID3 tags"
94 "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
95 "Parsing ID3 tags for a directory of MP3s, recursively:"
96 { $subsections parse-mp3-directory }
97 "Finding MP3 files recursively:"
98 { $subsections find-mp3s }
99 "Parsing a sequence of MP3 pathnames:"
100 { $subsections mp3-paths>id3s }
101 "Parsing an MP3 file's ID3 tags:"
102 { $subsections mp3>id3 }
103 "ID3v1 frame tag accessors:"
112 "Access any frame tag:"
113 { $subsections find-id3-frame } ;