[tracker/wip/carlosg/doc-updates: 1/7] docs: Remove hack to embed files




commit 3839d75568d983359af81e668030a9d64ddb3d2e
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Mar 13 23:08:23 2022 +0100

    docs: Remove hack to embed files
    
    This is something hotdoc can do for us, there is no need for an
    script here.

 docs/reference/libtracker-sparql/embed-files.py    | 25 -----------------
 .../{examples.md.in => examples.md}                | 32 ++++++++++++++--------
 docs/reference/libtracker-sparql/meson.build       | 20 +-------------
 3 files changed, 21 insertions(+), 56 deletions(-)
---
diff --git a/docs/reference/libtracker-sparql/examples.md.in b/docs/reference/libtracker-sparql/examples.md
similarity index 92%
rename from docs/reference/libtracker-sparql/examples.md.in
rename to docs/reference/libtracker-sparql/examples.md
index 6a60320a7..bf60aaee9 100644
--- a/docs/reference/libtracker-sparql/examples.md.in
+++ b/docs/reference/libtracker-sparql/examples.md
@@ -34,9 +34,11 @@ main loop is not blocked while these operations are executed.
 Once you end up with the query, remember to call [](tracker_sparql_cursor_close).
 The same applies to [](tracker_sparql_connection_close) when no longer needed.
 
-```c
-{{examples/connection-example.c}}
-```
+<div class="gi-lang-c">
+
+{{ examples/connection-example.c }}
+
+</div>
 
 ## Creating a private database
 
@@ -58,9 +60,11 @@ main loop is not blocked while these operations are executed.
 Once you no longer need the connection, remember to call
 [](tracker_sparql_connection_close) on the [](TrackerSparqlConnection).
 
-```c
-{{examples/private-store-example.c}}
-```
+<div class="gi-lang-c">
+
+{{ examples/private-store-example.c }}
+
+</div>
 
 ## Creating a SPARQL endpoint
 
@@ -73,9 +77,11 @@ concretely the creation of a D-Bus endpoint, that other applications
 may query e.g. through a connection created with
 [](tracker_sparql_connection_bus_new).
 
-```c
-{{examples/endpoint-example.c}}
-```
+<div class="gi-lang-c">
+
+{{ examples/endpoint-example.c }}
+
+</div>
 
 ## Receiving notification on changes
 
@@ -88,6 +94,8 @@ on changes of certain RDF classes (Those with the
 This example demonstrates the use of [](TrackerNotifier) to receive
 notifications on database updates.
 
-```c
-{{examples/notifier-example.c}}
-```
+<div class="gi-lang-c">
+
+{{ examples/notifier-example.c }}
+
+</div>
diff --git a/docs/reference/libtracker-sparql/meson.build b/docs/reference/libtracker-sparql/meson.build
index 64254ddf3..edfa6e22b 100644
--- a/docs/reference/libtracker-sparql/meson.build
+++ b/docs/reference/libtracker-sparql/meson.build
@@ -9,25 +9,6 @@ endif
 
 hotdoc = import('hotdoc')
 
-documents_with_examples = [
-  [ 'examples.md.in', 'examples.md' ],
-]
-examples = []
-
-foreach doc : documents_with_examples
-  examples += custom_target(
-    'examples-generate',
-    input: doc[0],
-    output: doc[1],
-    command: [
-      'embed-files.py',
-      '@INPUT@',
-      '@OUTPUT@',
-    ],
-    depend_files: [ doc[0] ],
-    build_by_default: true)
-endforeach
-
 base_ontology_docs = custom_target('ontology-docgen',
     output: ['dc-ontology.md'],
     command: [tracker_docgen,
@@ -53,6 +34,7 @@ nepomuk_ontology_docs = custom_target('nepomuk-docgen',
 
 content = [
   'overview.md',
+  'examples.md',
   'ontologies.md',
   'limits.md',
   'performance.md',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]