Discover Lino¶
Explore the demo projects¶
The Lino Book includes a collection of demo projects. Exploring them requires the contributor environment.
We recommend to try the following demo projects:
How to run a demo project¶
Initialize all demo projects in one operation by running
inv prep
in your copy of thebook
repository:$ go book $ inv prep
To run the
lino_book.projects.polly
project:$ go polly $ pm runserver
Explore the standard plugin library¶
You should also have a look into the following documents:
We recommend to look at least into:
Checkpoint¶
Exercise: Indicate "yes" in each cell of the following table where the corresponding plugin is used by the corresponding project
Plugin |
noi1r |
chatter |
polly |
roger |
---|---|---|---|---|
contacts |
||||
ledger |
||||
cal |
||||
comments |
||||
courses |
Hint: modify and then run the following code snippet in order to see the answer
>>> from importlib import import_module
>>> import rstgen
>>> rows = []
>>> projects = ["noi1r", "chatter", "polly", "roger"]
>>> plugins = ("contacts", "ledger", "cal", "comments", "courses")
>>> for pname in plugins:
... cells = [ pname ]
... for prjname in projects:
... settings_module = "lino_book.projects.{}.settings".format(prjname)
... m = import_module(settings_module)
... if not hasattr(m, "SITE"):
... m = import_module(settings_module + ".demo")
... # cells.append("yes" if m.SITE.is_installed(pname) else "no")
... cells.append("?" if m.SITE.is_installed(pname) else "?")
... rows.append(cells)
>>> header = ["Plugin"] + projects
>>> print(rstgen.table(header, rows))
========== ======= ========= ======= =======
Plugin noi1r chatter polly roger
---------- ------- --------- ------- -------
contacts ? ? ? ?
ledger ? ? ? ?
cal ? ? ? ?
comments ? ? ? ?
courses ? ? ? ?
========== ======= ========= ======= =======