summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGary Kramlich <grim@reaperworld.com>2021-10-19 00:47:42 -0500
committerGary Kramlich <grim@reaperworld.com>2021-10-19 00:47:42 -0500
commitcd80d0b6d2320f0424e7d0870f6e31035dafcc0a (patch)
treed403ee1e04006e1a3dbccef308668e2bab709c35 /doc
parent04cfed0452e07db2f61940342460bbc9283992a6 (diff)
downloadpidgin-cd80d0b6d2320f0424e7d0870f6e31035dafcc0a.tar.gz
Convert the facebook documentation to gi-docgen
Testing Done: Built the docs and verified that they looked okay. Reviewed at https://reviews.imfreedom.org/r/1070/
Diffstat (limited to 'doc')
-rw-r--r--doc/reference/protocols/facebook/facebook-docs.xml32
-rw-r--r--doc/reference/protocols/facebook/facebook.toml.in48
-rw-r--r--doc/reference/protocols/facebook/meson.build59
-rw-r--r--doc/reference/protocols/facebook/urlmap.js10
4 files changed, 87 insertions, 62 deletions
diff --git a/doc/reference/protocols/facebook/facebook-docs.xml b/doc/reference/protocols/facebook/facebook-docs.xml
deleted file mode 100644
index 6fb3d60dd5..0000000000
--- a/doc/reference/protocols/facebook/facebook-docs.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
-
-<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
-<!ENTITY version SYSTEM "../../libpurple/version.xml">
-]>
-<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
- <bookinfo>
- <title>Facebook Protocol Reference Manual</title>
- <abstract>
- <title>Facebook Plugin &version;</title>
- <para>
- The Facebook Messenger protocol plugin for libpurple.
- </para>
- </abstract>
- </bookinfo>
-
- <reference label="II">
- <title>API Reference</title>
-
- <xi:include href="xml/api.xml" />
- <xi:include href="xml/data.xml" />
- <xi:include href="xml/facebook.xml" />
- <xi:include href="xml/http.xml" />
- <xi:include href="xml/id.xml" />
- <xi:include href="xml/json.xml" />
- <xi:include href="xml/mqtt.xml" />
- <xi:include href="xml/thrift.xml" />
- <xi:include href="xml/util.xml" />
- </reference>
-</book>
diff --git a/doc/reference/protocols/facebook/facebook.toml.in b/doc/reference/protocols/facebook/facebook.toml.in
new file mode 100644
index 0000000000..e9cda4e47c
--- /dev/null
+++ b/doc/reference/protocols/facebook/facebook.toml.in
@@ -0,0 +1,48 @@
+[library]
+version = "@PURPLE_VERSION@"
+browse_url = "https://keep.imfreedom.org/pidgin/pidgin/"
+repository_url = "https://keep.imfreedom.org/pidgin/pidgin/"
+website_url = "https://keep.imfreedom.org/pidgin/pidgin/"
+authors = "Pidgin Developers"
+logo_url = ""
+license = "GPL-2.0-or-later"
+description = "Purple Facebook Protocol Plugin"
+dependencies = [ "GLib-2.0", "GObject-2.0", "GModule-2.0", "Purple-3.0" ]
+devhelp = true
+search_index = true
+
+ [dependencies."GLib-2.0"]
+ name = "GLib"
+ description = "General-purpose, portable utility library."
+ docs_url = "https://docs.gtk.org/glib/"
+
+ [dependencies."GObject-2.0"]
+ name = "GObject"
+ description = "The base type system library"
+ docs_url = "https://docs.gtk.org/gobject/"
+
+ [dependencies."GModule-2.0"]
+ name = "GModule"
+ description = "Portable API for dynamically loading modules"
+ docs_url = "https://docs.gtk.org/gmodule/"
+
+ [dependencies."Purple-3.0"]
+ name = "Purple"
+ description = "Purple Universal Chat Library"
+ docs_url = "https://docs.imfreedom.org/purple3/"
+
+[theme]
+name = "basic"
+show_index_summary = true
+show_class_hierarchy = true
+
+[source-location]
+base_url = "https://keep.imfreedom.org/pidgin/pidgin/file/default/"
+
+[extra]
+# The same order will be used when generating the index
+content_files = [
+]
+content_images = [
+]
+urlmap_file = "urlmap.js"
diff --git a/doc/reference/protocols/facebook/meson.build b/doc/reference/protocols/facebook/meson.build
index 6cb31d382a..007ae7b8f4 100644
--- a/doc/reference/protocols/facebook/meson.build
+++ b/doc/reference/protocols/facebook/meson.build
@@ -1,33 +1,32 @@
-DOC_MODULE = 'facebook'
+facebook_doc_content_files = []
-# Header files or dirs to ignore when scanning. Use base file/dir names
-ignore_hfiles = [
-]
+if get_option('doc')
+ facebook_toml = configure_file(
+ input : 'facebook.toml.in',
+ output : 'facebook.toml',
+ configuration : version_conf,
+ install : true,
+ install_dir : docs_dir / 'facebook',
+ )
-# Extra options to supply to gtkdoc-scan.
-scan_args = [
- '--deprecated-guards=PURPLE_DISABLE_DEPRECATED',
- '--rebuild-types',
- '--rebuild-sections',
- '--ignore-headers=' + ' '.join(ignore_hfiles),
-]
+ facebook_doc = custom_target('facebook-doc',
+ input : [ facebook_toml, facebook_gir[0] ],
+ output : 'facebook',
+ command : [
+ gidocgen,
+ 'generate',
+ '--quiet',
+ '--fatal-warnings',
+ '--config=@INPUT0@',
+ '--output-dir=@OUTPUT@',
+ '--no-namespace-dir',
+ '--content-dir=@0@'.format(meson.current_source_dir()),
+ '@INPUT1@'
+ ],
+ depend_files : [ facebook_doc_content_files ],
+ build_by_default : true,
+ install : true,
+ install_dir : docs_dir,
+ )
+endif
-# Extra options to supply to fixxref
-fixxref_args = [
- '--extra-dir=../../libpurple',
-]
-
-# Extra SGML files that are included by $(DOC_MAIN_XML_FILE).
-content_files = [
- libpurple_version_xml,
-]
-
-facebook_doc = gnome.gtkdoc(DOC_MODULE,
- main_xml : DOC_MODULE + '-docs.xml',
- src_dir : facebook_inc,
- dependencies : facebook_dep,
- install : true,
- scan_args : scan_args,
- fixxref_args : fixxref_args,
- gobject_typesfile : DOC_MODULE + '.types',
- content_files : content_files)
diff --git a/doc/reference/protocols/facebook/urlmap.js b/doc/reference/protocols/facebook/urlmap.js
new file mode 100644
index 0000000000..208ec6baa7
--- /dev/null
+++ b/doc/reference/protocols/facebook/urlmap.js
@@ -0,0 +1,10 @@
+// SPDX-FileCopyrightText: 2021 GNOME Foundation
+// SPDX-License-Identifier: LGPL-2.1-or-later
+
+// A map between namespaces and base URLs for their online documentation
+baseURLs = [
+ [ 'GLib', 'https://docs.gtk.org/glib/' ],
+ [ 'GObject', 'https://docs.gtk.org/gobject/' ],
+ [ 'GModule', 'https://docs.gtk.org/gmodule/' ],
+ [ 'Purple3', 'https://docs.imfreedom.org/purple3/' ],
+]