<NME> config.ld
<BEF> project = 'KOReader'
description = 'Multi-platform ebook reader'
full_description = 'An ebook reader application supports PDF, DJVU, EPUB, FB2 and many more formats, running on Kindle, Kobo, PocketBook, Ubuntu Touch and Android devices.'
title = 'KOReader Documentation'
dir = 'html'
style = '!fixed'
use_markdown_titles = true
topics = {'../README.md', './Hacking.md', './Events.md'}
package = ''
format = 'markdown'
sort_modules = true
    './Development_guide.md',
    './Events.md',
    './Hacking.md',
    './Porting.md',
    './Unit_tests.md',
}
package = ''
format = 'markdown'
sort_modules = true
file = {
    '../frontend',
    '../plugins',
    '../base/ffi',
    '../platform/android/luajit-launcher/assets',
    exclude = {'../base/ffi/sha2.lua',
        '../base/ffi/qrencode.lua',
        '../plugins/exporter.koplugin/template/slt2.lua',
        '../plugins/newsdownloader.koplugin/lib/handler.lua',
        '../plugins/newsdownloader.koplugin/lib/xml.lua',
    },
}

<MSG> doc: add sqlite sample code

<DFF> @@ -5,7 +5,7 @@ title = 'KOReader Documentation'
 dir = 'html'
 style = '!fixed'
 use_markdown_titles = true
-topics = {'../README.md', './Hacking.md', './Events.md'}
+topics = {'../README.md', './Hacking.md', './Events.md', './DataStore.md'}
 package = ''
 format = 'markdown'
 sort_modules = true

{'commit': 'diff --git a/README.md b/README.md\nindex ec51b370..a703be37 100644\n--- a/README.md\n+++ b/README.md\n@@ -283,7 +283,7 @@ http://ccache.samba.org\n \n \n [base-readme]:https://github.com/koreader/koreader-base/blob/master/README.md\n-[nb-script]:https://github.com/koreader/koreader-misc/blob/master/koreader-nightlybuild/koreader-nightlybuild.sh\n+[nb-script]:https://gitlab.com/koreader/nightly-builds/blob/master/build_release.sh\n [travis-badge]:https://travis-ci.org/koreader/koreader.svg?branch=master\n [travis-link]:https://travis-ci.org/koreader/koreader\n [travis-conf]:https://github.com/koreader/koreader-base/blob/master/.travis.yml\ndiff --git a/doc/DataStore.md b/doc/DataStore.md\nnew file mode 100644\nindex 00000000..e438b73a\n--- /dev/null\n+++ b/doc/DataStore.md\n@@ -0,0 +1,73 @@\n+Data Store\n+==========\n+\n+LuaSettings\n+-----------\n+\n+TODO\n+\n+\n+DocSettings\n+-----------\n+\n+TODO\n+\n+\n+SQLite3\n+-------\n+\n+KOReader ships with the SQLite3 library, which is a great embedded database for\n+desktop and mobile applications.\n+\n+[lua-ljsqlite3][ljsq3] is used to export SQLite3 C interfaces as LUA functions.\n+Following is a quick example:\n+\n+```lua\n+local SQ3 = require("lua-ljsqlite3/init")\n+\n+local conn = SQ3.open("/path/to/database.sqlite3")\n+\n+-- Execute SQL commands separated by the \';\' character:\n+conn:exec([[\n+-- time is in unit of seconds\n+CREATE TABLE IF NOT EXISTS page_read_time(page INTEGER, time INTEGER);\n+CREATE TABLE IF NOT EXISTS book_property(title TEXT, author TEXT, language TEXT);\n+]])\n+\n+-- Prepared statements are supported, with this you can bind different values\n+-- to the same statement. Let\'s set the read time for the first 10 pages in the\n+-- book to 5 seconds\n+local stmt = conn:prepare("INSERT INTO page_read_time VALUES(?, ?)")\n+for i=1,10 do\n+  stmt:reset():bind(i, 5):step()\n+end\n+\n+-- Now we can retrieve all read time stats for the first 10 pages:\n+local results = conn:exec("SELECT * FROM page_read_time") -- Records are by column.\n+-- Access to results via column numbers or names:\n+assert(results[1] == results.page)\n+assert(results[2] == results.time)\n+-- Nested indexing corresponds to the record(row) number, access value for 4th page:\n+assert(results[1][4] == 4)\n+assert(results[2][4] == 5)\n+-- access value for 2nd page:\n+assert(results.page[2] == 2)\n+assert(results.time[2] == 5)\n+\n+-- Convenience function returns multiple values for one record:\n+local page, time = conn:rowexec("SELECT * FROM page_read_time WHERE page==3")\n+print(page, time) --> 3 5\n+\n+-- We can also use builtin aggregate functions to do simple analytic task\n+local total_time = conn:rowexec("SELECT SUM(time) FROM page_read_time")\n+print(total_time) --> 50\n+\n+conn:close() -- Do not forget to close stmt after you are done\n+```\n+\n+For more information on supported SQL quries, check out [SQLite3\'s official\n+documentation][sq3-doc].\n+\n+\n+[ljsq3]:http://scilua.org/ljsqlite3.html\n+[sq3-doc]:https://www.sqlite.org/docs.html\ndiff --git a/doc/config.ld b/doc/config.ld\nindex c78c36fa..bec363b4 100644\n--- a/doc/config.ld\n+++ b/doc/config.ld\n@@ -5,7 +5,7 @@ title = \'KOReader Documentation\'\n dir = \'html\'\n style = \'!fixed\'\n use_markdown_titles = true\n-topics = {\'../README.md\', \'./Hacking.md\', \'./Events.md\'}\n+topics = {\'../README.md\', \'./Hacking.md\', \'./Events.md\', \'./DataStore.md\'}\n package = \'\'\n format = \'markdown\'\n sort_modules = true\n', 'commit_subject': 'doc: add sqlite sample code', 'repo_name': 'koreader/koreader', 'committer': {'name': 'Qingping Hou', 'email': '333fd10814a9caf78fd740457f76aba4fa74a157@gmail.com', 'time_sec': '1479586527', 'tz_offset': '-480', 'date': {'seconds': '1479586527'}}, 'commit_tree': '2160c5e989bb2087164111908affb1e1353f75d7', 'commit_message': 'doc: add sqlite sample code\n', 'language_name': 'Python', 'license': 'agpl-3.0', 'hunks': "@@ -5,7 +5,7 @@ title = 'KOReader Documentation'\n dir = 'html'\n style = '!fixed'\n use_markdown_titles = true\n-topics = {'../README.md', './Hacking.md', './Events.md'}\n+topics = {'../README.md', './Hacking.md', './Events.md', './DataStore.md'}\n package = ''\n format = 'markdown'\n sort_modules = true\n", 'addition_count': 1, 'deletion_count': 1, 'src_file': 'a/doc/config.ld', 'tgt_file': 'b/doc/config.ld', 'file_extension': '.ld', 'before_file': "project = 'KOReader'\ndescription = 'Multi-platform ebook reader'\nfull_description = 'An ebook reader application supports PDF, DJVU, EPUB, FB2 and many more formats, running on Kindle, Kobo, PocketBook, Ubuntu Touch and Android devices.'\ntitle = 'KOReader Documentation'\ndir = 'html'\nstyle = '!fixed'\nuse_markdown_titles = true\ntopics = {'../README.md', './Hacking.md', './Events.md'}\npackage = ''\nformat = 'markdown'\nsort_modules = true\n    './Development_guide.md',\n    './Events.md',\n    './Hacking.md',\n    './Porting.md',\n    './Unit_tests.md',\n}\npackage = ''\nformat = 'markdown'\nsort_modules = true\nfile = {\n    '../frontend',\n    '../plugins',\n    '../base/ffi',\n    '../platform/android/luajit-launcher/assets',\n    exclude = {'../base/ffi/sha2.lua',\n        '../base/ffi/qrencode.lua',\n        '../plugins/exporter.koplugin/template/slt2.lua',\n        '../plugins/newsdownloader.koplugin/lib/handler.lua',\n        '../plugins/newsdownloader.koplugin/lib/xml.lua',\n    },\n}\n", 'message': 'doc: add sqlite sample code\n', 'author_name': 'Qingping Hou', 'lang': 'ld'}