1 USING: help.markup help.syntax strings ;
4 ARTICLE: "vocabs.metadata" "Vocabulary metadata"
5 "Vocabulary directories can contain text files with metadata:"
7 { { $snippet "authors.txt" } " - a series of lines, with one author name per line. These are listed under " { $link "vocab-authors" } "." }
8 { { $snippet "platforms.txt" } " - a series of lines, with one operating system name per line." }
9 { { $snippet "resources.txt" } " - a series of lines, with one file glob pattern per line. Files inside the vocabulary directory whose names match any of these glob patterns will be included with the compiled application as " { $link "deploy-resources" } "." }
10 { { $snippet "summary.txt" } " - a one-line description." }
11 { { $snippet "tags.txt" } " - a series of lines, with one tag per line. Tags help classify the vocabulary. Consult " { $link "vocab-tags" } " for a list of existing tags you can reuse." }
13 "Words for reading and writing " { $snippet "summary.txt" } ":"
18 "Words for reading and writing " { $snippet "authors.txt" } ":"
23 "Words for reading and writing " { $snippet "tags.txt" } ":"
29 "Words for reading and writing " { $snippet "platforms.txt" } ":"
34 "Words for reading and writing " { $snippet "resources.txt" } ":"
39 "Getting and setting arbitrary vocabulary metadata:"
42 set-vocab-file-contents
45 ABOUT: "vocabs.metadata"
47 HELP: vocab-file-contents
48 { $values { "vocab" "a vocabulary specifier" } { "name" string } { "seq" { $maybe "a sequence of lines" } } }
49 { $description "Outputs the contents of the file named " { $snippet "name" } " from the vocabulary's directory, or " { $link f } " if the file does not exist." } ;
51 HELP: set-vocab-file-contents
52 { $values { "seq" "a sequence of lines" } { "vocab" "a vocabulary specifier" } { "name" string } }
53 { $description "Stores a sequence of lines to the file named " { $snippet "name" } " from the vocabulary's directory." } ;
56 { $values { "vocab" "a vocabulary specifier" } { "summary" { $maybe string } } }
57 { $description "Outputs a one-line string description of the vocabulary's intended purpose from the " { $snippet "summary.txt" } " file in the vocabulary's directory. Outputs " { $link f } " if the file does not exist." } ;
59 HELP: set-vocab-summary
60 { $values { "string" { $maybe string } } { "vocab" "a vocabulary specifier" } }
61 { $description "Stores a one-line string description of the vocabulary to the " { $snippet "summary.txt" } " file in the vocabulary's directory." } ;
64 { $values { "vocab" "a vocabulary specifier" } { "tags" "a sequence of strings" } }
65 { $description "Outputs a list of short tags classifying the vocabulary from the " { $snippet "tags.txt" } " file in the vocabulary's directory. Outputs " { $link f } " if the file does not exist." } ;
68 { $values { "tags" "a sequence of strings" } { "vocab" "a vocabulary specifier" } }
69 { $description "Stores a list of short tags classifying the vocabulary to the " { $snippet "tags.txt" } " file in the vocabulary's directory." } ;
72 { $values { "vocab" "a vocabulary specifier" } { "platforms" "a sequence of operating system symbols" } }
73 { $description "Outputs a list of operating systems supported by " { $snippet "vocab" } ", as specified by the " { $snippet "platforms.txt" } " file in the vocabulary's directory. Outputs an empty array if the file doesn't exist." }
74 { $notes "Operating system symbols are defined in the " { $vocab-link "system" } " vocabulary." } ;
76 HELP: set-vocab-platforms
77 { $values { "platforms" "a sequence of operating system symbols" } { "vocab" "a vocabulary specifier" } }
78 { $description "Stores a list of operating systems supported by " { $snippet "vocab" } " to the " { $snippet "platforms.txt" } " file in the vocabulary's directory." }
79 { $notes "Operating system symbols are defined in the " { $vocab-link "system" } " vocabulary." } ;
82 { $values { "vocab" "a vocabulary specifier" } { "patterns" "a sequence of glob patterns" } }
83 { $description "Outputs a list of glob patterns matching files that will be deployed with an application that includes " { $snippet "vocab" } ", as specified by the " { $snippet "resources.txt" } " file in the vocabulary's directory. Outputs an empty array if the file doesn't exist." }
84 { $notes "The " { $vocab-link "vocabs.metadata.resources" } " vocabulary contains words that will expand the glob patterns and directory names in " { $snippet "patterns" } " and return all the matching files." } ;
86 HELP: set-vocab-resources
87 { $values { "patterns" "a sequence of glob patterns" } { "vocab" "a vocabulary specifier" } }
88 { $description "Stores a list of glob patterns matching files that will be deployed with an application that includes " { $snippet "vocab" } " to the " { $snippet "resources.txt" } " file in the vocabulary's directory." } ;