json, an output representation, first pass
[software/sisu] / lib / sisu / json_parts.rb
1 # encoding: utf-8
2 =begin
3
4 * Name: SiSU
5
6 ** Description: documents, structuring, processing, publishing, search
7 *** shared xml parts
8
9 ** Author: Ralph Amissah
10 [ralph@amissah.com]
11 [ralph.amissah@gmail.com]
12
13 ** Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
14 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Ralph Amissah,
15 All Rights Reserved.
16
17 ** License: GPL 3 or later:
18
19 SiSU, a framework for document structuring, publishing and search
20
21 Copyright (C) Ralph Amissah
22
23 This program is free software: you can redistribute it and/or modify it
24 under the terms of the GNU General Public License as published by the Free
25 Software Foundation, either version 3 of the License, or (at your option)
26 any later version.
27
28 This program is distributed in the hope that it will be useful, but WITHOUT
29 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
30 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
31 more details.
32
33 You should have received a copy of the GNU General Public License along with
34 this program. If not, see [http://www.gnu.org/licenses/].
35
36 If you have Internet connection, the latest version of the GPL should be
37 available at these locations:
38 [http://www.fsf.org/licensing/licenses/gpl.html]
39 [http://www.gnu.org/licenses/gpl.html]
40
41 ** SiSU uses:
42 * Standard SiSU markup syntax,
43 * Standard SiSU meta-markup syntax, and the
44 * Standard SiSU object citation numbering and system
45
46 ** Hompages:
47 [http://www.jus.uio.no/sisu]
48 [http://www.sisudoc.org]
49
50 ** Git
51 [http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary]
52 [http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=lib/sisu/json_parts.rb;hb=HEAD]
53
54 =end
55 module SiSU_Parts_JSON
56 require_relative 'generic_parts' # generic_parts.rb
57 include SiSU_Parts_Generic
58 def the_line_break
59 '<br>'
60 end
61 def the_table_close
62 '</td></tr>
63 </table>'
64 end
65 def the_url_decoration
66 def xml_open #'&lt;'
67 Dx[:url_o]
68 end
69 def xml_close #'&gt;'
70 Dx[:url_c]
71 end
72 def txt_open
73 '['
74 end
75 def txt_close
76 ']'
77 end
78 self
79 end
80 end
81 module SiSU_Proj_XML
82 require_relative 'html_parts' # html_parts.rb
83 require_relative 'se' # se.rb
84 include SiSU_Env
85 class Bits < SiSU_Proj_HTML::Bits
86 end
87 end
88 __END__