summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
Diffstat (limited to 'README')
-rw-r--r--README57
1 files changed, 57 insertions, 0 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..80988ff
--- /dev/null
+++ b/README
@@ -0,0 +1,57 @@
+guile-wikidata
+==============
+
+This package provides wikidata-query functions to query and print
+data the public wikidata APIs at wikidata.org from Guile Scheme.
+
+It is inspired by guile-sparql, python-wikidata_guessing and python-Wikidata.
+
+It currently has the following dependencies besides guile:
+
+* guile-json
+* guix (only the 2 procedures in (guix import json) for alist functionality.
+
+## Use as module
+
+It is exported as "wikidata". It can be imported with:
+
+```
+(use-modules (wikidata))
+```
+
+## Example usage
+
+To search on wikidata and get back an alist with the 10 first results
+with each element being an alist of label, desc, qid, do this:
+
+```
+(extract-result "Guix")
+```
+
+Example output:
+
+scheme@(guile-user) [2]> (load "wikidata.scm")
+scheme@(guile-user) [2]> ,use(wikidata)
+scheme@(guile-user) [2]> (extract-result "Guix")
+$1 = ((("label" . "GNU Guix") ("description" . "a purely functional
+package manager for the GNU system") ("id" . "Q18968627")) (("label"
+. "Guixe\
+rs") ("description" . #f) ("id" . "Q1905661")) (("label" . "Guixi")
+("description" . "county-level city") ("id" . "Q1335331")) (("label"
+. "Guixi\
+ng Qiu") ("description" . #f) ("id" . "Q39066155")) (("label"
+. "GuixSD") ("description" . "distribution of the GNU system via the
+Guix package m\
+anager, project maintained by the GNU Project") ("id" . "Q19597382"))
+(("label" . "Guixi Railway Station") ("description" . "railway station
+in G\
+uixi, Yingtan") ("id" . "Q24835612")) (("label" . "Guixi Subdistrict")
+("description" . "subdistrict in Wuhou, Chengdu") ("id"
+. "Q11111703")) ((\
+"label" . "Guixiang") ("description" . "military general, father of
+Longyu") ("id" . "Q8172534")) (("label" . "Guixia Zhao")
+("description" . #f)\
+ ("id" . "Q56528602")) (("label" . "Guixue Wang") ("description" . #f)
+ ("id" . "Q45902385")))
+
+