blob: daff7319cb2894f3ccbfbedebf5187838023909a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
-*- mode: org -*-
#+TITLE: spine (doc_reform) shared
#+DESCRIPTION: documents - structuring, publishing in multiple formats & search
#+FILETAGS: :spine:default:shared:
#+AUTHOR: Ralph Amissah
#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]]
#+COPYRIGHT: Copyright (C) 2015 - 2020 Ralph Amissah
#+LANGUAGE: en
#+STARTUP: content hideblocks hidestars noindent entitiespretty
#+PROPERTY: header-args :exports code
#+PROPERTY: header-args+ :noweb yes
#+PROPERTY: header-args+ :eval no
#+PROPERTY: header-args+ :results no
#+PROPERTY: header-args+ :cache no
#+PROPERTY: header-args+ :padline no
[[./spine.org][spine]] [[./][org/]]
* shared
** _module template_ :module:shared:
#+BEGIN_SRC d :tangle "../src/doc_reform/share/defaults.d"
/++
shared default settings
+/
module doc_reform.share.defaults;
<<shared_messages>>
#+END_SRC
** template: messages :messages:
#+NAME: shared_messages
#+BEGIN_SRC d
template Msg() {
import std.stdio;
@safe auto Msg(I)(I doc_matters) {
struct Msg_ {
void v()(string message) {
if (!(doc_matters.opt.action.quiet) && doc_matters.opt.action.verbose) {
writeln(message);
}
}
void vv()(string message) {
if (!(doc_matters.opt.action.quiet) && doc_matters.opt.action.very_verbose) {
writeln(message);
}
}
}
return Msg_();
}
}
#+END_SRC
|