vocabs.metadata: removing words not used anymore
parent
72807720f2
commit
f8e34c7392
|
@ -1,4 +1,4 @@
|
||||||
USING: help.markup help.syntax strings ;
|
USING: help.markup help.syntax sequences strings ;
|
||||||
IN: vocabs.metadata
|
IN: vocabs.metadata
|
||||||
|
|
||||||
ARTICLE: "vocabs.metadata" "Vocabulary metadata"
|
ARTICLE: "vocabs.metadata" "Vocabulary metadata"
|
||||||
|
@ -10,31 +10,25 @@ ARTICLE: "vocabs.metadata" "Vocabulary metadata"
|
||||||
{ { $snippet "summary.txt" } " - a one-line description." }
|
{ { $snippet "summary.txt" } " - a one-line description." }
|
||||||
{ { $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." }
|
{ { $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." }
|
||||||
}
|
}
|
||||||
"Words for reading and writing " { $snippet "summary.txt" } ":"
|
"Words for reading " { $snippet "summary.txt" } ":"
|
||||||
{ $subsections
|
{ $subsections
|
||||||
vocab-summary
|
vocab-summary
|
||||||
set-vocab-summary
|
|
||||||
}
|
}
|
||||||
"Words for reading and writing " { $snippet "authors.txt" } ":"
|
"Words for reading " { $snippet "authors.txt" } ":"
|
||||||
{ $subsections
|
{ $subsections
|
||||||
vocab-authors
|
vocab-authors
|
||||||
set-vocab-authors
|
|
||||||
}
|
}
|
||||||
"Words for reading and writing " { $snippet "tags.txt" } ":"
|
"Words for reading " { $snippet "tags.txt" } ":"
|
||||||
{ $subsections
|
{ $subsections
|
||||||
vocab-tags
|
vocab-tags
|
||||||
set-vocab-tags
|
|
||||||
add-vocab-tags
|
|
||||||
}
|
}
|
||||||
"Words for reading and writing " { $snippet "platforms.txt" } ":"
|
"Words for reading " { $snippet "platforms.txt" } ":"
|
||||||
{ $subsections
|
{ $subsections
|
||||||
vocab-platforms
|
vocab-platforms
|
||||||
set-vocab-platforms
|
|
||||||
}
|
}
|
||||||
"Words for reading and writing " { $snippet "resources.txt" } ":"
|
"Words for reading " { $snippet "resources.txt" } ":"
|
||||||
{ $subsections
|
{ $subsections
|
||||||
vocab-resources
|
vocab-resources
|
||||||
set-vocab-resources
|
|
||||||
}
|
}
|
||||||
"Getting and setting arbitrary vocabulary metadata:"
|
"Getting and setting arbitrary vocabulary metadata:"
|
||||||
{ $subsections
|
{ $subsections
|
||||||
|
@ -56,33 +50,16 @@ HELP: vocab-summary
|
||||||
{ $values { "vocab" "a vocabulary specifier" } { "summary" { $maybe string } } }
|
{ $values { "vocab" "a vocabulary specifier" } { "summary" { $maybe string } } }
|
||||||
{ $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." } ;
|
{ $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." } ;
|
||||||
|
|
||||||
HELP: set-vocab-summary
|
|
||||||
{ $values { "string" { $maybe string } } { "vocab" "a vocabulary specifier" } }
|
|
||||||
{ $description "Stores a one-line string description of the vocabulary to the " { $snippet "summary.txt" } " file in the vocabulary's directory." } ;
|
|
||||||
|
|
||||||
HELP: vocab-tags
|
HELP: vocab-tags
|
||||||
{ $values { "vocab" "a vocabulary specifier" } { "tags" "a sequence of strings" } }
|
{ $values { "vocab" "a vocabulary specifier" } { "tags" "a sequence of strings" } }
|
||||||
{ $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." } ;
|
{ $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." } ;
|
||||||
|
|
||||||
HELP: set-vocab-tags
|
|
||||||
{ $values { "tags" "a sequence of strings" } { "vocab" "a vocabulary specifier" } }
|
|
||||||
{ $description "Stores a list of short tags classifying the vocabulary to the " { $snippet "tags.txt" } " file in the vocabulary's directory." } ;
|
|
||||||
|
|
||||||
HELP: vocab-platforms
|
HELP: vocab-platforms
|
||||||
{ $values { "vocab" "a vocabulary specifier" } { "platforms" "a sequence of operating system symbols" } }
|
{ $values { "vocab" "a vocabulary specifier" } { "platforms" "a sequence of operating system symbols" } }
|
||||||
{ $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." }
|
{ $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." }
|
||||||
{ $notes "Operating system symbols are defined in the " { $vocab-link "system" } " vocabulary." } ;
|
{ $notes "Operating system symbols are defined in the " { $vocab-link "system" } " vocabulary." } ;
|
||||||
|
|
||||||
HELP: set-vocab-platforms
|
|
||||||
{ $values { "platforms" "a sequence of operating system symbols" } { "vocab" "a vocabulary specifier" } }
|
|
||||||
{ $description "Stores a list of operating systems supported by " { $snippet "vocab" } " to the " { $snippet "platforms.txt" } " file in the vocabulary's directory." }
|
|
||||||
{ $notes "Operating system symbols are defined in the " { $vocab-link "system" } " vocabulary." } ;
|
|
||||||
|
|
||||||
HELP: vocab-resources
|
HELP: vocab-resources
|
||||||
{ $values { "vocab" "a vocabulary specifier" } { "patterns" "a sequence of glob patterns" } }
|
{ $values { "vocab" "a vocabulary specifier" } { "patterns" "a sequence of glob patterns" } }
|
||||||
{ $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." }
|
{ $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." }
|
||||||
{ $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." } ;
|
{ $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." } ;
|
||||||
|
|
||||||
HELP: set-vocab-resources
|
|
||||||
{ $values { "patterns" "a sequence of glob patterns" } { "vocab" "a vocabulary specifier" } }
|
|
||||||
{ $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." } ;
|
|
||||||
|
|
|
@ -31,9 +31,6 @@ MEMO: vocab-file-contents ( vocab name -- seq )
|
||||||
: vocab-resources ( vocab -- patterns )
|
: vocab-resources ( vocab -- patterns )
|
||||||
dup vocab-resources-path vocab-file-contents ;
|
dup vocab-resources-path vocab-file-contents ;
|
||||||
|
|
||||||
: set-vocab-resources ( patterns vocab -- )
|
|
||||||
dup vocab-resources-path set-vocab-file-contents ;
|
|
||||||
|
|
||||||
: vocab-summary-path ( vocab -- string )
|
: vocab-summary-path ( vocab -- string )
|
||||||
vocab-dir "summary.txt" append-path ;
|
vocab-dir "summary.txt" append-path ;
|
||||||
|
|
||||||
|
@ -55,35 +52,18 @@ M: vocab summary
|
||||||
|
|
||||||
M: vocab-link summary vocab-summary ;
|
M: vocab-link summary vocab-summary ;
|
||||||
|
|
||||||
: set-vocab-summary ( string vocab -- )
|
|
||||||
[ 1array ] dip
|
|
||||||
dup vocab-summary-path
|
|
||||||
set-vocab-file-contents ;
|
|
||||||
|
|
||||||
: vocab-tags-path ( vocab -- string )
|
: vocab-tags-path ( vocab -- string )
|
||||||
vocab-dir "tags.txt" append-path ;
|
vocab-dir "tags.txt" append-path ;
|
||||||
|
|
||||||
: vocab-tags ( vocab -- tags )
|
: vocab-tags ( vocab -- tags )
|
||||||
dup vocab-tags-path vocab-file-contents ;
|
dup vocab-tags-path vocab-file-contents ;
|
||||||
|
|
||||||
: set-vocab-tags ( tags vocab -- )
|
|
||||||
dup vocab-tags-path set-vocab-file-contents ;
|
|
||||||
|
|
||||||
: add-vocab-tags ( tags vocab -- )
|
|
||||||
[ vocab-tags append members ] keep set-vocab-tags ;
|
|
||||||
|
|
||||||
: remove-vocab-tags ( tags vocab -- )
|
|
||||||
[ vocab-tags swap diff ] keep set-vocab-tags ;
|
|
||||||
|
|
||||||
: vocab-authors-path ( vocab -- string )
|
: vocab-authors-path ( vocab -- string )
|
||||||
vocab-dir "authors.txt" append-path ;
|
vocab-dir "authors.txt" append-path ;
|
||||||
|
|
||||||
: vocab-authors ( vocab -- authors )
|
: vocab-authors ( vocab -- authors )
|
||||||
dup vocab-authors-path vocab-file-contents ;
|
dup vocab-authors-path vocab-file-contents ;
|
||||||
|
|
||||||
: set-vocab-authors ( authors vocab -- )
|
|
||||||
dup vocab-authors-path set-vocab-file-contents ;
|
|
||||||
|
|
||||||
: vocab-platforms-path ( vocab -- string )
|
: vocab-platforms-path ( vocab -- string )
|
||||||
vocab-dir "platforms.txt" append-path ;
|
vocab-dir "platforms.txt" append-path ;
|
||||||
|
|
||||||
|
@ -93,10 +73,6 @@ ERROR: bad-platform name ;
|
||||||
dup vocab-platforms-path vocab-file-contents
|
dup vocab-platforms-path vocab-file-contents
|
||||||
[ dup "system" lookup-word [ ] [ bad-platform ] ?if ] map ;
|
[ dup "system" lookup-word [ ] [ bad-platform ] ?if ] map ;
|
||||||
|
|
||||||
: set-vocab-platforms ( platforms vocab -- )
|
|
||||||
[ [ name>> ] map ] dip
|
|
||||||
dup vocab-platforms-path set-vocab-file-contents ;
|
|
||||||
|
|
||||||
: supported-platform? ( platforms -- ? )
|
: supported-platform? ( platforms -- ? )
|
||||||
[ t ] [ [ os swap class<= ] any? ] if-empty ;
|
[ t ] [ [ os swap class<= ] any? ] if-empty ;
|
||||||
|
|
||||||
|
@ -106,9 +82,6 @@ ERROR: bad-platform name ;
|
||||||
[ vocab-platforms supported-platform? not ]
|
[ vocab-platforms supported-platform? not ]
|
||||||
} 1|| ;
|
} 1|| ;
|
||||||
|
|
||||||
: filter-don't-load ( vocabs -- vocabs' )
|
|
||||||
[ vocab-name don't-load? ] reject ;
|
|
||||||
|
|
||||||
: don't-test? ( vocab -- ? )
|
: don't-test? ( vocab -- ? )
|
||||||
vocab-tags "not tested" swap member? ;
|
vocab-tags "not tested" swap member? ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue