gobject: Add outline guestfs-gobject(3) manual page.

Since we removed gtk doc, we might as well replace it with a
manual page explaining the basics of how to run gjs.
This commit is contained in:
Richard W.M. Jones
2017-06-29 11:57:50 +01:00
parent f5f7f00a46
commit f30b2065a2
13 changed files with 98 additions and 1 deletions

2
.gitignore vendored
View File

@@ -293,6 +293,8 @@ Makefile.in
/gobject/bindtests.js
/gobject/Guestfs-1.0.gir
/gobject/Guestfs-1.0.typelib
/gobject/guestfs-gobject.3
/gobject/stamp-guestfs-gobject.pod
/golang/bindtests.go
/golang/examples/guestfs-golang.3
/golang/examples/stamp-guestfs-golang.pod

View File

@@ -722,6 +722,7 @@ L<guestfs(3)>,
L<guestfish(1)>,
L<guestfs-examples(3)>,
L<guestfs-erlang(3)>,
L<guestfs-gobject(3)>,
L<guestfs-golang(3)>,
L<guestfs-java(3)>,
L<guestfs-lua(3)>,

View File

@@ -96,6 +96,7 @@ C<Arg> is the name of the unknown argument.
L<guestfs(3)>,
L<guestfs-examples(3)>,
L<guestfs-gobject(3)>,
L<guestfs-golang(3)>,
L<guestfs-java(3)>,
L<guestfs-lua(3)>,

View File

@@ -31,6 +31,7 @@ EXTRA_DIST = \
TODO.txt \
.gitignore \
bindtests-retvalues.js \
guestfs-gobject.pod \
tests-misc.js \
run-tests \
run-tests-retvalues \
@@ -88,6 +89,8 @@ gir_DATA = $(INTROSPECTION_GIRS)
typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
# Tests.
TESTS = \
run-tests \
run-tests-retvalues
@@ -103,3 +106,19 @@ $(TESTS): $(typelib_DATA)
CLEANFILES += $(gir_DATA) $(typelib_DATA)
endif HAVE_INTROSPECTION
# Documentation.
man_MANS = guestfs-gobject.3
noinst_DATA = $(top_builddir)/website/guestfs-gobject.3.html
guestfs-gobject.3 $(top_builddir)/website/guestfs-gobject.3.html: stamp-guestfs-gobject.pod
stamp-guestfs-gobject.pod: guestfs-gobject.pod
$(PODWRAPPER) \
--section 3 \
--man guestfs-gobject.3 \
--html $(top_builddir)/website/guestfs-gobject.3.html \
--license examples \
$<
touch $@

View File

@@ -0,0 +1,64 @@
=head1 NAME
guestfs-gobject - How to use libguestfs with the GObject bindings
=head1 SYNOPSIS
From Javascript using gjs:
const Guestfs = imports.gi.Guestfs;
var g = new Guestfs.Session();
g.add_drive('disk.img', null);
g.launch();
g.close();
=head1 DESCRIPTION
This manual page documents how to call libguestfs using GObject
bindings, especially from Javascript.
Note that the GObject bindings have problems handling 64 bit values.
You should not use the GObject bindings if there are native bindings
for your language. For example, to use libguestfs from Python you are
strongly advised to use the Python native bindings instead (see
L<guestfs-python(3)>).
This page just documents the differences from the C API and gives some
examples. If you are not familiar with using libguestfs, you also
need to read L<guestfs(3)>.
=head1 JAVASCRIPT
Using gjs, you can write a C<.js> file containing:
const Guestfs = imports.gi.Guestfs;
var g = new Guestfs.Session();
g.add_drive('disk.img', null);
g.launch();
g.close();
and then run it using:
gjs program.js
=head1 SEE ALSO
L<guestfs(3)>,
L<guestfs-examples(3)>,
L<guestfs-erlang(3)>,
L<guestfs-golang(3)>,
L<guestfs-java(3)>,
L<guestfs-lua(3)>,
L<guestfs-perl(3)>,
L<guestfs-python(3)>,
L<guestfs-recipes(1)>,
L<guestfs-ruby(3)>,
L<http://libguestfs.org/>.
=head1 AUTHORS
Richard W.M. Jones (C<rjones at redhat dot com>)
=head1 COPYRIGHT
Copyright (C) 2012-2017 Red Hat Inc.

View File

@@ -78,6 +78,7 @@ UUIDs are not returned in structures.
L<guestfs(3)>,
L<guestfs-examples(3)>,
L<guestfs-erlang(3)>,
L<guestfs-gobject(3)>,
L<guestfs-java(3)>,
L<guestfs-lua(3)>,
L<guestfs-ocaml(3)>,

View File

@@ -161,6 +161,7 @@ on the class path, as well as the path of your program. For example:
L<guestfs(3)>,
L<guestfs-examples(3)>,
L<guestfs-erlang(3)>,
L<guestfs-gobject(3)>,
L<guestfs-golang(3)>,
L<guestfs-lua(3)>,
L<guestfs-ocaml(3)>,

View File

@@ -1141,7 +1141,9 @@ See L<guestfs-erlang(3)>.
=item B<GObject>
Experimental GObject bindings (with GObject Introspection support) are
available. See the C<gobject> directory in the source.
available.
See L<guestfs-gobject(3)>.
=item B<Go>
@@ -3393,6 +3395,7 @@ L<guestfs-examples(3)>.
Language bindings:
L<guestfs-erlang(3)>,
L<guestfs-gobject(3)>,
L<guestfs-golang(3)>,
L<guestfs-java(3)>,
L<guestfs-lua(3)>,

View File

@@ -138,6 +138,7 @@ returned when you registered the callback:
L<guestfs(3)>,
L<guestfs-examples(3)>,
L<guestfs-erlang(3)>,
L<guestfs-gobject(3)>,
L<guestfs-golang(3)>,
L<guestfs-java(3)>,
L<guestfs-ocaml(3)>,

View File

@@ -82,6 +82,7 @@ function that you called.
L<guestfs(3)>,
L<guestfs-examples(3)>,
L<guestfs-erlang(3)>,
L<guestfs-gobject(3)>,
L<guestfs-golang(3)>,
L<guestfs-java(3)>,
L<guestfs-lua(3)>,

View File

@@ -41,6 +41,7 @@ L<Sys::Guestfs(3)>,
L<guestfs(3)>,
L<guestfs-examples(3)>,
L<guestfs-erlang(3)>,
L<guestfs-gobject(3)>,
L<guestfs-golang(3)>,
L<guestfs-java(3)>,
L<guestfs-lua(3)>,

View File

@@ -65,6 +65,7 @@ You can use it like this:
L<guestfs(3)>,
L<guestfs-examples(3)>,
L<guestfs-erlang(3)>,
L<guestfs-gobject(3)>,
L<guestfs-golang(3)>,
L<guestfs-java(3)>,
L<guestfs-lua(3)>,

View File

@@ -36,6 +36,7 @@ string).
L<guestfs(3)>,
L<guestfs-examples(3)>,
L<guestfs-erlang(3)>,
L<guestfs-gobject(3)>,
L<guestfs-golang(3)>,
L<guestfs-java(3)>,
L<guestfs-lua(3)>,