deplate 0.8.4 → 0.8.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.TXT +118 -0
- data/NEWS.TXT +6 -21
- data/VERSION.TXT +1 -1
- data/etc/deplate.ini +15 -2
- data/lib/action_view/helpers/deplate.rb +0 -0
- data/lib/deplate/abstract-class.rb +3 -2
- data/lib/deplate/bib.rb +3 -2
- data/lib/deplate/builtin.rb +3 -2
- data/lib/deplate/cache.rb +3 -2
- data/lib/deplate/commands.rb +3 -11
- data/lib/deplate/common.rb +7 -2
- data/lib/deplate/compat.rb +21 -0
- data/lib/deplate/compat/parsedate.rb +24 -0
- data/lib/deplate/converter.rb +3 -2
- data/lib/deplate/core.rb +135 -103
- data/lib/deplate/counters.rb +3 -2
- data/lib/deplate/css/article.css +2 -2
- data/lib/deplate/css/doc.css +3 -2
- data/lib/deplate/css/heading-navbar.css +2 -2
- data/lib/deplate/css/highlight.css +0 -0
- data/lib/deplate/css/layout-deplate-print.css +2 -2
- data/lib/deplate/css/layout-deplate.css +2 -2
- data/lib/deplate/css/presentation.css +2 -2
- data/lib/deplate/css/sans-serif.css +2 -2
- data/lib/deplate/css/screenplay.css +0 -0
- data/lib/deplate/css/serif-e.css +2 -2
- data/lib/deplate/css/serif-rel.css +3 -2
- data/lib/deplate/css/serif.css +2 -2
- data/lib/deplate/css/slides.css +3 -2
- data/lib/deplate/css/tabbar-top.css +2 -2
- data/lib/deplate/css/text-sans-serif.css +3 -2
- data/lib/deplate/css/text-serif.css +2 -2
- data/lib/deplate/css/website.css +0 -0
- data/lib/deplate/define.rb +3 -2
- data/lib/deplate/deplate-string.rb +3 -2
- data/lib/deplate/docbook.rb +4 -14
- data/lib/deplate/elements.rb +37 -4
- data/lib/deplate/encoding.rb +57 -0
- data/lib/deplate/etc.rb +7 -5
- data/lib/deplate/external.rb +5 -13
- data/lib/deplate/fmt/dbk-article-4.1.2.rb +3 -2
- data/lib/deplate/fmt/dbk-article.rb +3 -2
- data/lib/deplate/fmt/dbk-book.rb +3 -2
- data/lib/deplate/fmt/dbk-ref.rb +3 -2
- data/lib/deplate/fmt/dbk-slides.rb +3 -2
- data/lib/deplate/fmt/dbk-snippet.rb +3 -2
- data/lib/deplate/fmt/html-snippet.rb +3 -2
- data/lib/deplate/fmt/html.rb +40 -27
- data/lib/deplate/fmt/htmlsite.rb +3 -2
- data/lib/deplate/fmt/htmlslides.rb +3 -2
- data/lib/deplate/fmt/htmlwebsite.rb +3 -2
- data/lib/deplate/fmt/latex-dramatist.rb +2 -1
- data/lib/deplate/fmt/latex-snippet.rb +3 -2
- data/lib/deplate/fmt/latex.rb +88 -67
- data/lib/deplate/fmt/null.rb +3 -2
- data/lib/deplate/fmt/php.rb +3 -2
- data/lib/deplate/fmt/phpsite.rb +3 -2
- data/lib/deplate/fmt/plain.rb +4 -3
- data/lib/deplate/fmt/sweave.rb +104 -0
- data/lib/deplate/fmt/template.rb +3 -2
- data/lib/deplate/fmt/xhtml10t.rb +82 -2
- data/lib/deplate/fmt/xhtml11m.rb +3 -2
- data/lib/deplate/formatter-snippet.rb +3 -2
- data/lib/deplate/formatter.rb +203 -29
- data/lib/deplate/guesslanguage.rb +3 -2
- data/lib/deplate/input.rb +9 -8
- data/lib/deplate/input/deplate-headings.rb +3 -2
- data/lib/deplate/input/deplate-restricted.rb +3 -2
- data/lib/deplate/input/deplate.rb +3 -2
- data/lib/deplate/input/play.rb +3 -2
- data/lib/deplate/input/rdoc.rb +3 -2
- data/lib/deplate/input/template.rb +3 -2
- data/lib/deplate/lib/Makefile.config +8 -0
- data/lib/deplate/locale/de.latin1 +6 -0
- data/lib/deplate/macros.rb +4 -2
- data/lib/deplate/messages.rb +9 -5
- data/lib/deplate/metadata.rb +3 -2
- data/lib/deplate/metadata/marshal.rb +3 -2
- data/lib/deplate/metadata/xml.rb +3 -2
- data/lib/deplate/metadata/yaml.rb +3 -2
- data/lib/deplate/mod/anyword.rb +3 -2
- data/lib/deplate/mod/babelfish.rb +3 -2
- data/lib/deplate/mod/code-coderay.rb +3 -2
- data/lib/deplate/mod/code-gvim.rb +3 -2
- data/lib/deplate/mod/code-gvim71.rb +3 -2
- data/lib/deplate/mod/code-highlight.rb +3 -2
- data/lib/deplate/mod/colored-log.rb +3 -2
- data/lib/deplate/mod/encode.rb +33 -0
- data/lib/deplate/mod/endnotes.rb +3 -2
- data/lib/deplate/mod/entities-decode.rb +2 -1
- data/lib/deplate/mod/entities-encode.rb +2 -1
- data/lib/deplate/mod/guesslanguage.rb +3 -2
- data/lib/deplate/mod/html-asciimath.rb +3 -2
- data/lib/deplate/mod/html-deplate-button.rb +3 -2
- data/lib/deplate/mod/html-headings-navbar.rb +3 -2
- data/lib/deplate/mod/html-highstep.rb +3 -2
- data/lib/deplate/mod/html-jsmath.rb +3 -2
- data/lib/deplate/mod/html-mathml.rb +2 -1
- data/lib/deplate/mod/html-obfuscate-email.rb +3 -2
- data/lib/deplate/mod/html-sidebar.rb +3 -2
- data/lib/deplate/mod/htmlslides-navbar-fh.rb +3 -2
- data/lib/deplate/mod/iconv.rb +3 -2
- data/lib/deplate/mod/imgurl.rb +4 -3
- data/lib/deplate/mod/inlatex-compound.rb +3 -2
- data/lib/deplate/mod/koma.rb +3 -2
- data/lib/deplate/mod/lang-de.rb +3 -2
- data/lib/deplate/mod/lang-en.rb +3 -2
- data/lib/deplate/mod/lang-ru-koi8-r.rb +3 -2
- data/lib/deplate/mod/lang-ru.rb +3 -2
- data/lib/deplate/mod/lang-zh_CN-autospace.rb +3 -2
- data/lib/deplate/mod/lang-zh_CN.rb +3 -2
- data/lib/deplate/mod/latex-emph-table-head.rb +3 -2
- data/lib/deplate/mod/latex-styles.rb +3 -2
- data/lib/deplate/mod/latex-verbatim-small.rb +3 -2
- data/lib/deplate/mod/linkmap.rb +2 -1
- data/lib/deplate/mod/makefile.rb +39 -46
- data/lib/deplate/mod/mark-external-urls.rb +3 -2
- data/lib/deplate/mod/markup-1-warn.rb +3 -2
- data/lib/deplate/mod/markup-1.rb +3 -2
- data/lib/deplate/mod/navbar-png.rb +3 -2
- data/lib/deplate/mod/noindent.rb +3 -2
- data/lib/deplate/mod/numpara.rb +3 -2
- data/lib/deplate/mod/particle-math.rb +3 -2
- data/lib/deplate/mod/php-extra.rb +3 -2
- data/lib/deplate/mod/pstoedit.rb +3 -2
- data/lib/deplate/mod/recode.rb +3 -2
- data/lib/deplate/mod/smart-dash.rb +3 -2
- data/lib/deplate/mod/smiley.rb +3 -2
- data/lib/deplate/mod/soffice.rb +3 -2
- data/lib/deplate/mod/symbols-latin1.rb +8 -2
- data/lib/deplate/mod/symbols-od-utf-8.rb +3 -2
- data/lib/deplate/mod/symbols-plain.rb +3 -2
- data/lib/deplate/mod/symbols-sgml.rb +6 -5
- data/lib/deplate/mod/symbols-utf-8.rb +6 -5
- data/lib/deplate/mod/symbols-xml.rb +3 -2
- data/lib/deplate/mod/syntax-region-alt.rb +3 -2
- data/lib/deplate/mod/utf8.rb +3 -2
- data/lib/deplate/mod/validate-html.rb +3 -2
- data/lib/deplate/mod/xmlrpc.rb +3 -2
- data/lib/deplate/nukumi2.rb +3 -2
- data/lib/deplate/once-method.rb +3 -2
- data/lib/deplate/output.rb +3 -2
- data/lib/deplate/particles.rb +12 -6
- data/lib/{ps2ppm.rb → deplate/ps2ppm.rb} +11 -11
- data/lib/deplate/regions.rb +75 -52
- data/lib/deplate/skeletons.rb +3 -2
- data/lib/deplate/structured.rb +8 -24
- data/lib/deplate/template.rb +3 -2
- data/lib/deplate/themes/presentation.html/css/presentation.css +2 -2
- data/lib/deplate/themes/presentation.html/prelude.txt +1 -1
- data/lib/deplate/themes/presentation.html/resources/spacer.png +0 -0
- data/lib/deplate/themes/s5.xhtml/README.TXT +2 -0
- data/lib/deplate/themes/s5.xhtml/templates/s5.xhtml +42 -0
- data/lib/deplate/themes/s5.xhtml/theme.ini +11 -0
- data/lib/deplate/variables.rb +12 -2
- data/lib/deplate/wiki-markup.rb +3 -2
- data/lib/deplate/xml.rb +19 -21
- data/lib/deplate/zh_CN.rb +3 -2
- data/man/man1/deplate.1 +83 -128
- metadata +16 -4
data/lib/deplate/counters.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
+
# encoding: ASCII
|
1
2
|
# counters.rb
|
2
3
|
# @Author: Thomas Link (micathom AT gmail com)
|
3
4
|
# @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
|
4
5
|
# @Created: 31-Dez-2005.
|
5
|
-
# @Last Change:
|
6
|
-
# @Revision: 0.
|
6
|
+
# @Last Change: 2009-02-02.
|
7
|
+
# @Revision: 0.17
|
7
8
|
|
8
9
|
class Deplate::Counters
|
9
10
|
def initialize(deplate)
|
data/lib/deplate/css/article.css
CHANGED
data/lib/deplate/css/doc.css
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
+
# encoding: ISO-8859-1
|
1
2
|
/* Layout and decoration */
|
2
3
|
/* @Author: Thomas Link (samul AT web.de) */
|
3
4
|
/* @Created: 13-Apr-2004. */
|
4
|
-
/* @Last Change: 2008-
|
5
|
-
/* @Revision: 0.
|
5
|
+
/* @Last Change: 2008-12-04. */
|
6
|
+
/* @Revision: 0.1218 */
|
6
7
|
|
7
8
|
body {
|
8
9
|
padding: 1px;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* Layout and decoration */
|
2
2
|
/* @Author: Thomas Link (micathom AT gmail com) */
|
3
3
|
/* @Created: 13-Apr-2004. */
|
4
|
-
/* @Last Change:
|
5
|
-
/* @Revision: 0.
|
4
|
+
/* @Last Change: 2008-12-04. */
|
5
|
+
/* @Revision: 0.1065 */
|
6
6
|
|
7
7
|
table.navbar {
|
8
8
|
border-top: 0;
|
File without changes
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* Text style: sans-serif */
|
2
2
|
/* @Author: Thomas Link (samul AT web.de) */
|
3
3
|
/* @Created: 13-Apr-2004. */
|
4
|
-
/* @Last Change: 2008-
|
5
|
-
/* @Revision: 0.
|
4
|
+
/* @Last Change: 2008-12-04. */
|
5
|
+
/* @Revision: 0.638 */
|
6
6
|
|
7
7
|
body, table, div {
|
8
8
|
/* font-family: Georgia, Bookman, Times, Serif; */
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* Text style: sans-serif */
|
2
2
|
/* @Author: Thomas Link (micathom AT gmail com) */
|
3
3
|
/* @Created: 13-Apr-2004. */
|
4
|
-
/* @Last Change:
|
5
|
-
/* @Revision: 0.
|
4
|
+
/* @Last Change: 2008-12-04. */
|
5
|
+
/* @Revision: 0.598 */
|
6
6
|
|
7
7
|
body, table, div {
|
8
8
|
/* font-family: Verdana, Geneva, Sans-Serif; */
|
File without changes
|
data/lib/deplate/css/serif-e.css
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
/* Text style: sans-serif */
|
2
2
|
/* @Author: Thomas Link (micathom AT gmail com) */
|
3
3
|
/* @Created: 13-Apr-2004. */
|
4
|
-
/* @Last Change:
|
5
|
-
/* @Revision: 0.
|
4
|
+
/* @Last Change: 2008-12-04. */
|
5
|
+
/* @Revision: 0.618 */
|
6
6
|
|
7
7
|
body, table, div {
|
8
8
|
/* font-family: Georgia, Bookman, Times, Serif; */
|
@@ -1,8 +1,9 @@
|
|
1
|
+
# encoding: ISO-8859-1
|
1
2
|
/* Text style: sans-serif */
|
2
3
|
/* @Author: Thomas Link (micathom AT gmail com) */
|
3
4
|
/* @Created: 13-Apr-2004. */
|
4
|
-
/* @Last Change:
|
5
|
-
/* @Revision: 0.
|
5
|
+
/* @Last Change: 2008-12-04. */
|
6
|
+
/* @Revision: 0.633 */
|
6
7
|
|
7
8
|
body, table, div {
|
8
9
|
font-family: Georgia, Minion Web, Palatino, Book Antiqua, Utopia, Times New Roman, serif;
|
data/lib/deplate/css/serif.css
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
/* Text style: sans-serif */
|
2
2
|
/* @Author: Thomas Link (micathom AT gmail com) */
|
3
3
|
/* @Created: 13-Apr-2004. */
|
4
|
-
/* @Last Change:
|
5
|
-
/* @Revision: 0.
|
4
|
+
/* @Last Change: 2008-12-04. */
|
5
|
+
/* @Revision: 0.627 */
|
6
6
|
|
7
7
|
body, table, div {
|
8
8
|
/* font-family: Georgia, Bookman, Times, Serif; */
|
data/lib/deplate/css/slides.css
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
+
# encoding: ISO-8859-1
|
1
2
|
/* A sample style sheet for use with deplate generated html files */
|
2
3
|
/* @Author: Thomas Link (micathom AT gmail com) */
|
3
4
|
/* @Created: 13-Apr-2004. */
|
4
|
-
/* @Last Change:
|
5
|
-
/* @Revision: 0.
|
5
|
+
/* @Last Change: 2008-12-04. */
|
6
|
+
/* @Revision: 0.551 */
|
6
7
|
|
7
8
|
@import url(text-serif.css) print;
|
8
9
|
@import url(text-sans-serif.css) screen;
|
@@ -1,8 +1,9 @@
|
|
1
|
+
# encoding: ISO-8859-1
|
1
2
|
/* Text style: sans-serif */
|
2
3
|
/* @Author: Thomas Link (micathom AT gmail com) */
|
3
4
|
/* @Created: 13-Apr-2004. */
|
4
|
-
/* @Last Change:
|
5
|
-
/* @Revision: 0.
|
5
|
+
/* @Last Change: 2008-12-04. */
|
6
|
+
/* @Revision: 0.588 */
|
6
7
|
|
7
8
|
body, table, div {
|
8
9
|
/* font-family: Verdana, Geneva, Sans-Serif; */
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* Text style: sans-serif */
|
2
2
|
/* @Author: Thomas Link (micathom AT gmail com) */
|
3
3
|
/* @Created: 13-Apr-2004. */
|
4
|
-
/* @Last Change:
|
5
|
-
/* @Revision: 0.
|
4
|
+
/* @Last Change: 2008-12-04. */
|
5
|
+
/* @Revision: 0.586 */
|
6
6
|
|
7
7
|
body, table, div {
|
8
8
|
font-family : Serif;
|
data/lib/deplate/css/website.css
CHANGED
File without changes
|
data/lib/deplate/define.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
+
# encoding: ASCII
|
1
2
|
# define.rb
|
2
3
|
# @Author: Thomas Link (micathom AT gmail com)
|
3
4
|
# @Website: http://deplate.sf.net/
|
4
5
|
# @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
|
5
6
|
# @Created: 19-Okt-2004.
|
6
|
-
# @Last Change:
|
7
|
-
# @Revision: 0.
|
7
|
+
# @Last Change: 2009-02-02.
|
8
|
+
# @Revision: 0.550
|
8
9
|
|
9
10
|
require 'deplate/commands'
|
10
11
|
require 'deplate/macros'
|
@@ -1,10 +1,11 @@
|
|
1
|
+
# encoding: ASCII
|
1
2
|
#!/usr/bin/env ruby
|
2
3
|
# deplate-string.rb
|
3
4
|
# @Author: Thomas Link (micathom AT gmail com)
|
4
5
|
# @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
|
5
6
|
# @Created: 31-Dez-2005.
|
6
|
-
# @Last Change:
|
7
|
-
# @Revision: 0.
|
7
|
+
# @Last Change: 2009-02-02.
|
8
|
+
# @Revision: 0.42
|
8
9
|
|
9
10
|
require 'deplate/converter'
|
10
11
|
|
data/lib/deplate/docbook.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
+
# encoding: ASCII
|
1
2
|
# docbook.rb
|
2
3
|
# @Author: Thomas Link (micathom AT gmail com)
|
3
4
|
# @Website: http://deplate.sf.net/
|
4
5
|
# @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
|
5
6
|
# @Created: 17-M�r-2004.
|
6
|
-
# @Last Change:
|
7
|
-
# @Revision: 0.
|
7
|
+
# @Last Change: 2009-02-05.
|
8
|
+
# @Revision: 0.2756
|
8
9
|
|
9
10
|
require 'deplate/xml'
|
10
11
|
|
@@ -382,17 +383,6 @@ class Deplate::Formatter::Docbook < Deplate::Formatter::XML
|
|
382
383
|
s
|
383
384
|
end
|
384
385
|
|
385
|
-
def clean_tags(text, *tags)
|
386
|
-
if text
|
387
|
-
tags = tags.empty? ? '\w+' : tags.join('|')
|
388
|
-
t = text.gsub(/<(#{tags}).*?>.*?<\/\1>|<(#{tags}).*?\/>/, '')
|
389
|
-
t.gsub!(/^\s*$/, '')
|
390
|
-
t.gsub!(/^\n\s*/, '')
|
391
|
-
t.gsub!(/\n\s*$/, '')
|
392
|
-
t
|
393
|
-
end
|
394
|
-
end
|
395
|
-
|
396
386
|
def get_item_paragraph(args, item, text)
|
397
387
|
formatted_inline('para', text)
|
398
388
|
end
|
@@ -540,7 +530,7 @@ class Deplate::Formatter::Docbook < Deplate::Formatter::XML
|
|
540
530
|
acc = [img]
|
541
531
|
alt = args['alt']
|
542
532
|
if alt
|
543
|
-
acc << formatted_inline('textobject', formatted_inline('phrase', alt))
|
533
|
+
acc << formatted_inline('textobject', formatted_inline('phrase', plain_text(alt)))
|
544
534
|
end
|
545
535
|
img = join_blocks(acc)
|
546
536
|
if inline
|
data/lib/deplate/elements.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
+
# encoding: ASCII
|
1
2
|
# elements.rb
|
2
3
|
# @Author: Thomas Link (micathom AT gmail com)
|
3
4
|
# @Website: http://deplate.sf.net/
|
4
5
|
# @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
|
5
6
|
# @Created: 26-M�r-2004.
|
6
|
-
# @Last Change:
|
7
|
-
# @Revision: 0.
|
7
|
+
# @Last Change: 2009-02-02.
|
8
|
+
# @Revision: 0.4603
|
8
9
|
|
9
10
|
require "deplate/abstract-class"
|
10
11
|
|
@@ -43,6 +44,7 @@ class Deplate::Element < Deplate::BaseElement
|
|
43
44
|
|
44
45
|
# class methods & variables
|
45
46
|
class << self
|
47
|
+
|
46
48
|
def match(text)
|
47
49
|
return self.rx.match(text)
|
48
50
|
end
|
@@ -97,6 +99,7 @@ class Deplate::Element < Deplate::BaseElement
|
|
97
99
|
i -= 1
|
98
100
|
end
|
99
101
|
rescue Exception => e
|
102
|
+
# p e.backtrace
|
100
103
|
Deplate::Core.log(['Error when running command', e], :error, src)
|
101
104
|
end
|
102
105
|
run_accumulation_hooks(@@accumulate_post[self], src, array, deplate, text, *args)
|
@@ -293,6 +296,16 @@ class Deplate::Element < Deplate::BaseElement
|
|
293
296
|
end
|
294
297
|
end
|
295
298
|
|
299
|
+
def format_contained(container, *args)
|
300
|
+
unless @postponed_preformat.empty?
|
301
|
+
container.postponed_preformat |= @postponed_preformat
|
302
|
+
end
|
303
|
+
unless @postponed_format.empty?
|
304
|
+
container.postponed_format |= @postponed_format
|
305
|
+
end
|
306
|
+
format_current(*args)
|
307
|
+
end
|
308
|
+
|
296
309
|
def format_current(formatting_method=nil)
|
297
310
|
formatting_method ||= self.class.formatter
|
298
311
|
if formatting_method
|
@@ -560,6 +573,27 @@ class Deplate::Element < Deplate::BaseElement
|
|
560
573
|
end
|
561
574
|
|
562
575
|
|
576
|
+
class Deplate::Element::PseudoElement < Deplate::Element
|
577
|
+
|
578
|
+
def initialize(deplate, src, container, &formatter)
|
579
|
+
super(deplate, src, text, [])
|
580
|
+
@formatter = formatter
|
581
|
+
@container = container
|
582
|
+
end
|
583
|
+
|
584
|
+
def process
|
585
|
+
@container.process_etc
|
586
|
+
# @container.process
|
587
|
+
self
|
588
|
+
end
|
589
|
+
|
590
|
+
def format_special
|
591
|
+
return @formatter.call(self)
|
592
|
+
end
|
593
|
+
|
594
|
+
end
|
595
|
+
|
596
|
+
|
563
597
|
# Don't register Paragraph in @@elements -- it's assigned if nothing else
|
564
598
|
# matches
|
565
599
|
class Deplate::Element::Paragraph < Deplate::Element
|
@@ -808,7 +842,7 @@ end
|
|
808
842
|
|
809
843
|
class Deplate::List::Itemize < Deplate::List
|
810
844
|
register_element
|
811
|
-
set_rx(/^(([[:blank:]]+)([
|
845
|
+
set_rx(/^(([[:blank:]]+)([-+*])[[:blank:]]+)(.+)$/)
|
812
846
|
self.listtype = "Itemize"
|
813
847
|
end
|
814
848
|
|
@@ -859,7 +893,6 @@ class Deplate::List::Task < Deplate::List
|
|
859
893
|
rv[:done] = true
|
860
894
|
end
|
861
895
|
if due =~ /^\s*x?([0-9-]+%?)/
|
862
|
-
# rv[:due] = ParseDate::parsedate($1, true)
|
863
896
|
rv[:due] = $1
|
864
897
|
end
|
865
898
|
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# encoding.rb
|
2
|
+
# @Author: Thomas Link (micathom AT gmail com)
|
3
|
+
# @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
|
4
|
+
# @Created: 2009-02-04.
|
5
|
+
# @Last Change: 2009-02-05.
|
6
|
+
# @Revision: 0.0.4
|
7
|
+
|
8
|
+
# require ''
|
9
|
+
|
10
|
+
module Deplate::Encoding
|
11
|
+
|
12
|
+
module_function
|
13
|
+
|
14
|
+
def ruby_enc_name(enc)
|
15
|
+
case enc.downcase
|
16
|
+
when 'latin-1', 'latin1', 'l1', 'isolat1', 'iso-8859-1'
|
17
|
+
cen = 'iso-8859-1'
|
18
|
+
when 'latin-9', 'latin9', 'l9', 'isolat9', 'iso-8859-15'
|
19
|
+
cen = 'iso-8859-15'
|
20
|
+
when 'gb2312', 'gbk'
|
21
|
+
cen = 'gb2312'
|
22
|
+
when 'koi8-r'
|
23
|
+
cen = 'koi8-r'
|
24
|
+
when 'utf8', 'utf-8'
|
25
|
+
cen = 'utf-8'
|
26
|
+
else
|
27
|
+
log(['Unsupported ruby encoding', enc], :anyway)
|
28
|
+
cen = enc
|
29
|
+
end
|
30
|
+
return cen
|
31
|
+
end
|
32
|
+
|
33
|
+
def canonic_enc_name(enc, table=@encodings)
|
34
|
+
case enc.downcase
|
35
|
+
when 'latin-1', 'latin1', 'l1', 'isolat1', 'iso-8859-1'
|
36
|
+
cen = 'latin1'
|
37
|
+
when 'latin-9', 'latin9', 'l9', 'isolat9', 'iso-8859-15'
|
38
|
+
cen = 'latin9'
|
39
|
+
when 'gb2312', 'gbk'
|
40
|
+
cen = 'gb2312'
|
41
|
+
when 'koi8-r'
|
42
|
+
cen = 'koi8-r'
|
43
|
+
when 'utf8', 'utf-8'
|
44
|
+
cen = 'utf-8'
|
45
|
+
else
|
46
|
+
log(['Unsupported encoding', enc], :anyway)
|
47
|
+
cen = enc
|
48
|
+
end
|
49
|
+
return (table && table[cen]) || cen
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
|
55
|
+
# Local Variables:
|
56
|
+
# revisionRx: REVISION\s\+=\s\+\'
|
57
|
+
# End:
|
data/lib/deplate/etc.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
+
# encoding: ASCII
|
1
2
|
# etc.rb
|
2
3
|
# @Author: Thomas Link (micathom AT gmail com)
|
3
4
|
# @Website: http://deplate.sf.net/
|
4
5
|
# @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
|
5
6
|
# @Created: 16-Okt-2005.
|
6
|
-
# @Last Change:
|
7
|
-
# @Revision: 0.
|
7
|
+
# @Last Change: 2009-02-02.
|
8
|
+
# @Revision: 0.327
|
8
9
|
|
9
10
|
require 'deplate/common'
|
10
11
|
|
@@ -249,9 +250,10 @@ class Deplate::Symbols < Deplate::CommonObject
|
|
249
250
|
%{ }
|
250
251
|
end
|
251
252
|
|
252
|
-
def symbol_paragraph(invoker)
|
253
|
-
|
254
|
-
|
253
|
+
# def symbol_paragraph(invoker)
|
254
|
+
# # %{§}
|
255
|
+
# %{�}
|
256
|
+
# end
|
255
257
|
|
256
258
|
def format_symbol(invoker, sym)
|
257
259
|
return @formatter.plain_text(sym)
|
data/lib/deplate/external.rb
CHANGED
@@ -1,21 +1,13 @@
|
|
1
|
+
# encoding: ASCII
|
1
2
|
# external.rb
|
2
3
|
# @Author: Thomas Link (micathom AT gmail com)
|
3
4
|
# @Website: http://deplate.sf.net/
|
4
5
|
# @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
|
5
6
|
# @Created: 04-Sep-2004.
|
6
|
-
# @Last Change:
|
7
|
-
# @Revision: 0.
|
8
|
-
|
9
|
-
require "ps2ppm"
|
10
|
-
|
11
|
-
# Description:
|
12
|
-
#
|
13
|
-
# Usage:
|
14
|
-
#
|
15
|
-
# TODO:
|
16
|
-
#
|
17
|
-
# CHANGES:
|
18
|
-
#
|
7
|
+
# @Last Change: 2009-02-02.
|
8
|
+
# @Revision: 0.222
|
9
|
+
|
10
|
+
require "deplate/ps2ppm"
|
19
11
|
|
20
12
|
module Deplate::External
|
21
13
|
@@apps = {}
|