Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CaosDB Octave library
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
CaosDB Octave library
Commits
40ee5af3
Verified
Commit
40ee5af3
authored
3 years ago
by
Daniel Hornung
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Octave package and some documentation.
parent
6bf89972
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#10150
passed with warnings
3 years ago
Stage: setup
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pkg/doc/development.md
+17
-0
17 additions, 0 deletions
pkg/doc/development.md
pkg/inst/some_function.m
+14
-2
14 additions, 2 deletions
pkg/inst/some_function.m
pkg/utils/Make_Doc.m
+31
-0
31 additions, 0 deletions
pkg/utils/Make_Doc.m
with
62 additions
and
2 deletions
pkg/doc/development.md
0 → 100644
+
17
−
0
View file @
40ee5af3
# How to write documentation #
-
Example for texinfo documentation:
https://github.com/gnu-octave/octave/blob/default/scripts/geometry/inpolygon.m
-
Extract documentation from file:
`[txt, form] = get_help_text_from_file(make_absolute_filename('pkg/inst/some_function.m'))`
-
Generate HTML documentation from single file:
```
octave
pkg uninstall caosdb
pkg install caosdb.tar.gz
pkg load caosdb
html_help_text('some_function', './htdocs/some.html', 'octave-forge', pkgname="caosdb")
```
- Generate HTML documentation for a package:
```
octave
generate_package_html('caosdb', 'htdocs', 'octave-forge')
```
This diff is collapsed.
Click to expand it.
pkg/inst/some_function.m
+
14
−
2
View file @
40ee5af3
%
(C)
Copyright 2021 IndiScale GmbH <info@indiscale.com>
%
(C)
Copyright 2021 Daniel Hornung <d.hornung@indiscale.com>
%
Copyright
(
C
)
2021
IndiScale
GmbH
<
info
@indiscale
.
com
>
%
Copyright
(
C
)
2021
Daniel
Hornung
<
d
.
hornung
@indiscale
.
com
>
%
%
This
file
is
a
part
of
the
CaosDB
Project
.
%
...
...
@@ -16,6 +16,18 @@
%
You
should
have
received
a
copy
of
the
GNU
Affero
General
Public
License
%
along
with
this
program
.
If
not
,
see
<
https
:
//www.gnu.org/licenses/>.
%
-*
-
texinfo
-*-
%
@deftypefn
{
Function
File
}
{
@var
{
result
}
=
}
some_function
(
@var
{
arg1
},
@var
{
arg2
})
%
This
is
some
function
.
%
%
For
example
,
this
function
could
be
called
like
this
:
%
@example
%
some_function
(
1
,
2
);
%
@end
example
%
%
@seealso
{
some_function
}
%
@end
deftypefn
function
result
=
some_function
(
arg1
,
arg2
)
if
arg1
>=
arg2
error
(
"arg1 must be smaller than arg2!"
);
...
...
This diff is collapsed.
Click to expand it.
pkg/utils/Make_Doc.m
0 → 100644
+
31
−
0
View file @
40ee5af3
header
=
@
(
a_1
,
a_2
,
a_3
)
...
sprintf
([
...
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n'
,
...
' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n'
,
...
'<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">\n'
,
...
' <head>\n'
,
...
' <meta http-equiv="content-type" content="text/html; charset=utf-8" />\n'
,
...
' <meta name="date" content="2021-07-09"/>\n'
,
...
' <meta name="generator" content="generate_html 0.4.0" />\n'
,
...
' <meta name="author" content="The Octave-Forge Community" />\n'
,
...
' <meta name="description" content="Octave-Forge is a collection of packages '
,
...
'providing extra functionality for GNU Octave." />\n'
,
...
' <meta name="keywords" lang="en" content="Octave-Forge, Octave, extra packages" />\n'
,
...
' <title>The
''
caosdb
''
Package</title>\n'
,
...
' <link rel="stylesheet" type="text/css" href="../octave-forge.css" />\n'
,
...
' <script src="../fixed.js" type="text/javascript"></script>\n'
,
...
' <script src="../javascript.js" type="text/javascript"></script>\n'
,
...
' <script src="../footer.js" type="text/javascript"></script>\n'
,
...
' <link rel="shortcut icon" href="../favicon.ico" />\n'
,
...
' </head>\n'
,
...
' <body onload="javascript:fix_top_menu ();">\n'
,
...
' <script> write_docs_left_menu (
''
..
''
); </script>\n'
,
...
'<div id="doccontent">'
...
])
of_options
=
get_html_options
(
"octave-forge"
);
of_options
.
__
header__
=
header
;
% (Re)loading caosdb package
pkg
uninstall
caosdb
;
pkg
install
caosdb
.
tar
.
gz
;
pkg
load
caosdb
;
generate_package_html
(
'caosdb'
,
'htdocs'
,
of_options
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment