Difference between revisions of "Devhelp"

From Gramps
Jump to: navigation, search
(28 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{stub}}
+
[[File:Devhelp-gramps-api-5.png|450px|right|thumb|Gramps and Gtk3 APIs into devhelp browser]]
  
Steps for including the [https://gramps-project.org/docs/ Gramps API] into devhelp index.
+
[http://live.gnome.org/devhelp Devhelp] is a Gtk+/Gnome browser for API documentation; it works natively with [http://www.gtk.org/gtk-doc/ gtk-doc] (which is the API reference format for Gtk+/Gnome documentation).
 
 
[[File:Devhelp-gramps-api-34.png|600px|thumb|right|Gramps and Gtk3 APIs into devhelp browser]]
 
 
 
==Devhelp==
 
  
[http://live.gnome.org/devhelp Devhelp] is a Gtk+/Gnome browser for API documentation; it works natively with [http://www.gtk.org/gtk-doc/ gtk-doc] (which is the API reference format for Gtk+/Gnome documentation).
+
How to include [https://gramps-project.org/docs/ Gramps API] into the Devhelp index.
  
 
==Paths==
 
==Paths==
  
According [http://standards.freedesktop.org/basedir-spec/latest/ base directories from freedesktop], the working patches should be:
+
According to [http://standards.freedesktop.org/basedir-spec/latest/ base directories from freedesktop], the working paths could be:
 
 
* devhelp
 
 
 
''~/.local/share/devhelp/books/gramps/gramps.devhelp''
 
 
 
''/usr/local/share/devhelp/books/gramps/gramps.devhelp''
 
 
 
* gtk-doc
 
  
''/usr/share/gtk-doc/html/gramps/gramps.devhelp''
+
$XDG_DATA_DIRS/devhelp/books
 +
$XDG_DATA_DIRS/gtk-doc/html
  
 
==Steps==
 
==Steps==
  
1. Go to ''Gramps_SVN/docs'' folder
+
1. Go to ''Gramps/docs'' folder
  
2. modifiy 'update_doc.py' for generating a devhelp file via 'devhelp' key for builder:
+
2. modify 'update_doc.py' for generating a devhelp file via 'devhelp' key for builder:
  
 
  $ sphinx-build -b devhelp .  _build/devhelp
 
  $ sphinx-build -b devhelp .  _build/devhelp
Line 39: Line 28:
 
3. run 'update_doc.py':
 
3. run 'update_doc.py':
  
eg,  
+
e.g.,  
 +
 
 +
$ cd docs
 +
$ python3 update_doc.py
 +
 
 +
4. copy the content of ''_build/devhelp'' directory into:
 +
~/.local/share/devhelp/books
 +
 
 +
Need to use the '''same name''' for the devhelp file and the top directory (e.g., Gramps)
 +
 
 +
==Updated python APIs==
 +
 
 +
Give a try to:
 +
 
 +
    git clone https://github.com/lazka/pgi-docs-devhelp.git ~/.local/share/devhelp/books
 +
    devhelp
  
$ PYTHONPATH=/usr/local/lib/python2.7/site-packages/:/home/jerome/trunk python update_doc.py
+
To update:
path for pygobject 3.3.2 (trunk): path to gramps dir
 
  
4. copy the content of ''_build/devhelp'' directory into one of the [[#Paths|above paths for devhelp index]].
+
    cd ~/.local/share/devhelp/books
 +
    git pull
  
5. run a command (which one?) or wait for the next post installation (rebuild of indexes after new package)
+
{{-}}
  
 
==See also==
 
==See also==
Line 53: Line 57:
  
 
* [https://gramps-project.org/docs/ Gramps API]
 
* [https://gramps-project.org/docs/ Gramps API]
* [http://sourceforge.net/p/gramps/source/ci/master/tree/docs/ Instructions to build the Gramps API Doc's]
+
* [https://github.com/gramps-project/gramps/tree/master/docs Instructions to build the Gramps API Doc's]
  
 
[[Category:Developers/General]]
 
[[Category:Developers/General]]
 
[[Category:Developers/Tutorials]]
 
[[Category:Developers/Tutorials]]
 
[[Category:GEPS]]
 
[[Category:GEPS]]

Revision as of 09:21, 20 April 2020

Gramps and Gtk3 APIs into devhelp browser

Devhelp is a Gtk+/Gnome browser for API documentation; it works natively with gtk-doc (which is the API reference format for Gtk+/Gnome documentation).

How to include Gramps API into the Devhelp index.

Paths

According to base directories from freedesktop, the working paths could be:

$XDG_DATA_DIRS/devhelp/books
$XDG_DATA_DIRS/gtk-doc/html

Steps

1. Go to Gramps/docs folder

2. modify 'update_doc.py' for generating a devhelp file via 'devhelp' key for builder:

$ sphinx-build -b devhelp .  _build/devhelp

could be:

$ os.system(' ' '%(program)s -b devhelp . _build/devhelp' ' ' % {'program': sphinxCmd})

in python.

3. run 'update_doc.py':

e.g.,

$ cd docs
$ python3 update_doc.py 

4. copy the content of _build/devhelp directory into:

~/.local/share/devhelp/books

Need to use the same name for the devhelp file and the top directory (e.g., Gramps)

Updated python APIs

Give a try to:

   git clone https://github.com/lazka/pgi-docs-devhelp.git ~/.local/share/devhelp/books
   devhelp

To update:

   cd ~/.local/share/devhelp/books
   git pull


See also