]> gitweb.factorcode.org Git - factor.git/blob - basis/vocabs/metadata/metadata-docs.factor
docs: Fix help-lint-all mistakes.
[factor.git] / basis / vocabs / metadata / metadata-docs.factor
1 USING: help.markup help.syntax sequences strings ;
2 IN: vocabs.metadata
3
4 ARTICLE: "vocabs.metadata" "Vocabulary metadata"
5 "Vocabulary directories can contain text files with metadata:"
6 { $list
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." }
12 }
13 "Words for reading " { $snippet "summary.txt" } ":"
14 { $subsections
15     vocab-summary
16 }
17 "Words for reading " { $snippet "authors.txt" } ":"
18 { $subsections
19     vocab-authors
20 }
21 "Words for reading " { $snippet "tags.txt" } ":"
22 { $subsections
23     vocab-tags
24 }
25 "Words for reading " { $snippet "platforms.txt" } ":"
26 { $subsections
27     vocab-platforms
28 }
29 "Words for reading " { $snippet "resources.txt" } ":"
30 { $subsections
31     vocab-resources
32 }
33 "Getting and setting arbitrary vocabulary metadata:"
34 { $subsections
35     vocab-file-lines
36     set-vocab-file-lines
37 } ;
38
39 ABOUT: "vocabs.metadata"
40
41 HELP: vocab-file-lines
42 { $values { "vocab" "a vocabulary specifier" } { "name" string } { "lines/f" { $maybe { $sequence "lines" } } } }
43 { $description "Outputs the lines of the file named " { $snippet "name" } " from the vocabulary's directory, or " { $link f } " if the file does not exist." } ;
44
45 HELP: set-vocab-file-lines
46 { $values { "lines" { $sequence "lines" } } { "vocab" "a vocabulary specifier" } { "name" string } }
47 { $description "Stores a sequence of lines to the file named " { $snippet "name" } " from the vocabulary's directory." } ;
48
49 HELP: vocab-summary
50 { $values { "vocab" "a vocabulary specifier" } { "summary" { $maybe string } } }
51 { $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." } ;
52
53 HELP: vocab-tags
54 { $values { "vocab" "a vocabulary specifier" } { "tags" "a sequence of strings" } }
55 { $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." } ;
56
57 HELP: vocab-platforms
58 { $values { "vocab" "a vocabulary specifier" } { "platforms" "a sequence of operating system symbols" } }
59 { $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." }
60 { $notes "Operating system symbols are defined in the " { $vocab-link "system" } " vocabulary." } ;
61
62 HELP: vocab-resources
63 { $values { "vocab" "a vocabulary specifier" } { "patterns" "a sequence of glob patterns" } }
64 { $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." }
65 { $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." } ;