DocumentationOverview.jl
Summary
Name | Summary |
---|---|
API | An object passed to include callback of table . |
find | List APIs in module . |
list | Show the list of APIs. |
list_md | A shorthand for Markdown.MD(DocumentationOverview.list(args...; options...)) . |
table | Show the table of APIs. |
table_md | A shorthand for Markdown.MD(DocumentationOverview.table(args...; options...)) . |
The above table is generated using
```@eval
using DocumentationOverview
DocumentationOverview.table_md(
DocumentationOverview;
signature = :name,
apicolumn = "Name",
)
```
For more examples, see Gallery.
Documentation
DocumentationOverview.table
— FunctionDocumentationOverview.table(module::Module; ...) -> table
DocumentationOverview.table(fullnames::Expr; ...) -> table
DocumentationOverview.table(apis; ...) -> table
Show the table of APIs.
The table
object returned from this function supports show
method with text/plain
, text/markdown
, and text/html
MIME types.
To preprocess the list of APIs, get a vector of API
s from find
, process it, and pass it to DocumentationOverview.table
as an iterable of API
s. See also list
.
See the Gallery for example outputs.
Extended help
Arguments
The first argument specifies the list of APIs to be shown:
module::Module
: APIs discovered withfind(module::Module; ...)
fullnames::Expr
: APIs are specified by the list of expression of form:[a.b.c, d.e.f, ...]
apis
: an iterable that producesAPI
s
Keyword Arguments
apicolumn::AbstractString = "**API**"
: The title for the API column.signature
: following values are supported:nothing
(default): use the default signature.:name
: useapi.name
; i.e.,A.B.C.f(x, y)
becomesf
.:strip_namespace
: strip the namespace part; i.e.,A.B.C.f(x, y)
becomesf(x, y)
.- a callabel object: it must map an
API
to aString
which is used as a signature.
Keyword arguments for find
can also be passed with the method that takes module::Module
.
Examples
julia> using DocumentationOverview
julia> DocumentationOverview.table(DocumentationOverview)
... a table of API printed ...
DocumentationOverview.table
also takes an expression (notice :
before [
) to manually list the APIs:
julia> using DocumentationOverview
julia> table = DocumentationOverview.table(:[ # ⇐ notice the `:` here
DocumentationOverview.table,
DocumentationOverview.API,
]);
The list of APIs retrieved using PublicAPI.jl API can also be used with DocumentationOverview.table
:
julia> using PublicAPI
julia> table = DocumentationOverview.table(PublicAPI.of(DocumentationOverview));
DocumentationOverview.list
— FunctionDocumentationOverview.list(module::Module; ...) -> list
DocumentationOverview.list(fullnames::Expr; ...) -> list
DocumentationOverview.list(apis; ...) -> list
Show the list of APIs.
The list
object returned from this function supports show
method with text/plain
, text/markdown
, and text/html
MIME types.
To preprocess the list of APIs, get a vector of API
s from find
, process it, and pass it to DocumentationOverview.list
as an iterable of API
s. See also table
.
See the Gallery for example outputs.
Extended help
Arguments
The first argument specifies the list of APIs to be shown:
module::Module
: APIs discovered withfind(module::Module; ...)
fullnames::Expr
: APIs are specified by the list of expression of form:[a.b.c, d.e.f, ...]
apis
: an iterable that producesAPI
s
Keyword Arguments
signature
: following values are supported:nothing
(default): use the default signature.:name
: useapi.name
; i.e.,A.B.C.f(x, y)
becomesf
.:strip_namespace
: strip the namespace part; i.e.,A.B.C.f(x, y)
becomesf(x, y)
.- a callabel object: it must map an
API
to aString
which is used as a signature.
Keyword arguments for find
can also be passed with the method that takes module::Module
.
Examples
julia> using DocumentationOverview
julia> DocumentationOverview.list(DocumentationOverview)
... a list of API printed ...
DocumentationOverview.list
also takes an expression (notice :
before [
) to manually list the APIs:
julia> using DocumentationOverview
julia> list = DocumentationOverview.list(:[ # ⇐ notice the `:` here
DocumentationOverview.list,
DocumentationOverview.API,
]);
The list of APIs retrieved using PublicAPI.jl API can also be used with DocumentationOverview.list
:
julia> using PublicAPI
julia> list = DocumentationOverview.list(PublicAPI.of(DocumentationOverview));
DocumentationOverview.table_md
— FunctionDocumentationOverview.table_md(args...; options...) -> md::Markdown.MD
A shorthand for Markdown.MD(DocumentationOverview.table(args...; options...))
.
DocumentationOverview.list_md
— FunctionDocumentationOverview.list_md(args...; options...) -> md::Markdown.MD
A shorthand for Markdown.MD(DocumentationOverview.list(args...; options...))
.
DocumentationOverview.find
— FunctionDocumentationOverview.find(module::Module; [include]) -> apis::Vector{<:API}
List APIs in module
.
Extended help
Keyword Arguments
include
: a callable of forminclude(api::API) -> should_include::Bool
. Theapi
s are included in the output if and only if this function returnstrue
. The default function is equivalent toapi -> api.hasdoc
.
Examples
julia> using DocumentationOverview
julia> for api in DocumentationOverview.find(DocumentationOverview)
@show api.name
end
api.name = :API
api.name = :find
api.name = :table
DocumentationOverview.API
— TypeDocumentationOverview.API
An object passed to include
callback of table
.
API
has the following properties settable using Accessors.@set
:
module::Module
: the module in which the API is discovered.name::Symbol
: the name of the API.exported::Bool
:true
iff the API is exported fromapi.module
.signature::String
: "signature" of the API; ifapi.hasdoc
(see below), it defaults to the first line of the docstring; otherwise, it defaults to the fully qualified name of the API.
It also has the following derived properties that are not settable with Accessors.@set
:
hasdoc::Bool
: indicate if the API has a docstring.doc::Union{Markdown.MD,Nothing}
: docstring of the API.api.value
: equivalent togetproperty(api.module, api.value)
; may throw.api.maybevalue
: evaluates toSome(api.value)
if it does not throw ornothing
otherwise