rrtf 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -7
  3. data/documentation/RRTF/CharacterFormatting.html +1002 -0
  4. data/documentation/RRTF/CharacterStyle.html +1058 -0
  5. data/documentation/RRTF/Colour.html +813 -0
  6. data/documentation/RRTF/ColourTable.html +770 -0
  7. data/documentation/RRTF/CommandNode.html +2372 -0
  8. data/documentation/RRTF/ContainerNode.html +826 -0
  9. data/documentation/RRTF/Converters/HTML/Helpers.html +272 -0
  10. data/documentation/RRTF/Converters/HTML/Node.html +364 -0
  11. data/documentation/RRTF/Converters/HTML/NodeSet.html +265 -0
  12. data/documentation/RRTF/Converters/HTML.html +337 -0
  13. data/documentation/RRTF/Converters.html +117 -0
  14. data/documentation/RRTF/Document.html +2405 -0
  15. data/documentation/RRTF/DocumentStyle.html +1367 -0
  16. data/documentation/RRTF/Font.html +790 -0
  17. data/documentation/RRTF/FontTable.html +763 -0
  18. data/documentation/RRTF/FooterNode.html +515 -0
  19. data/documentation/RRTF/HeaderNode.html +515 -0
  20. data/documentation/RRTF/ImageNode.html +1374 -0
  21. data/documentation/RRTF/Information.html +809 -0
  22. data/documentation/RRTF/LinkNode.html +264 -0
  23. data/documentation/RRTF/ListLevel.html +799 -0
  24. data/documentation/RRTF/ListLevelNode.html +612 -0
  25. data/documentation/RRTF/ListMarker.html +595 -0
  26. data/documentation/RRTF/ListNode.html +368 -0
  27. data/documentation/RRTF/ListTable.html +343 -0
  28. data/documentation/RRTF/ListTemplate.html +433 -0
  29. data/documentation/RRTF/ListTextNode.html +285 -0
  30. data/documentation/RRTF/Node.html +616 -0
  31. data/documentation/RRTF/Paper.html +624 -0
  32. data/documentation/RRTF/ParagraphFormatting.html +749 -0
  33. data/documentation/RRTF/ParagraphNode.html +275 -0
  34. data/documentation/RRTF/ParagraphStyle.html +1319 -0
  35. data/documentation/RRTF/RTFError.html +295 -0
  36. data/documentation/RRTF/Style.html +1767 -0
  37. data/documentation/RRTF/Stylesheet.html +1768 -0
  38. data/documentation/RRTF/TableCellNode.html +1704 -0
  39. data/documentation/RRTF/TableNode.html +1025 -0
  40. data/documentation/RRTF/TableRowNode.html +675 -0
  41. data/documentation/RRTF/TextNode.html +600 -0
  42. data/documentation/RRTF/Utilities.html +201 -0
  43. data/documentation/RRTF.html +129 -0
  44. data/documentation/_index.html +478 -0
  45. data/documentation/class_list.html +51 -0
  46. data/documentation/css/common.css +1 -0
  47. data/documentation/css/full_list.css +58 -0
  48. data/documentation/css/style.css +492 -0
  49. data/documentation/file.README.html +223 -0
  50. data/documentation/file_list.html +56 -0
  51. data/documentation/frames.html +17 -0
  52. data/documentation/index.html +223 -0
  53. data/documentation/js/app.js +248 -0
  54. data/documentation/js/full_list.js +216 -0
  55. data/documentation/js/jquery.js +4 -0
  56. data/documentation/method_list.html +2203 -0
  57. data/documentation/top-level-namespace.html +110 -0
  58. data/examples/01.rtf +14 -17
  59. data/examples/01_mac_word15_36.png +0 -0
  60. data/examples/01_styles_and_paragraphs.rb +3 -4
  61. data/examples/resources/json/redshirt_styles.json +4 -2
  62. data/lib/rrtf/node.rb +86 -167
  63. data/lib/rrtf/style/character_style.rb +4 -3
  64. data/lib/rrtf/style/formatting.rb +55 -11
  65. data/lib/rrtf/style/paragraph_style.rb +19 -4
  66. data/lib/rrtf/style/style.rb +15 -15
  67. data/lib/rrtf/stylesheet.rb +57 -16
  68. data/lib/rrtf/version.rb +1 -1
  69. data/rrtf.gemspec +1 -0
  70. metadata +70 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3467d6a2c8f2088bea129baf92e38489313e095a
4
- data.tar.gz: e747dbf2f17843d3774d064d7de258b810c03744
3
+ metadata.gz: 4a0351a0d1b28be98c4798d675b2f7a179ad0ad4
4
+ data.tar.gz: c6861c1a5b968868ca685009a2774c97116640fd
5
5
  SHA512:
6
- metadata.gz: 25846effd9f89636439d227ab600633b50e76ee5a8554bd925367eca05350def4d32b0004dfeaa9d28bfc944270f26d8f1ada2a67b60bf3a3f286f478fc861c2
7
- data.tar.gz: 1e6372a0cc1ada21f428d7b7798690e435029e2e17a88d9690d17b7b7063bc0671faceddcc80087018d399d6ca60b122b0010958e34de9d5c6bf7bd87dd46e3b
6
+ metadata.gz: 6d64ee68829290eec6c28107e1cae8f61010e8400c4f972b8de159b6cf1c8aa364fb8b308ebe1f60be69e95430edbf2380b823d638d1e9e4b43181eed09a5fdc
7
+ data.tar.gz: 1884c08c045e80c581d5899ae990c06d4263b3251efd7a9693fd99a1f787d7fb7ef49b2132bc1ed8515f8b1e983abe87bf8e56f47b4d94b3b2fd69751c685270
data/README.md CHANGED
@@ -36,20 +36,36 @@ a hashmap array or JSON file:
36
36
  "id": "TITLE",
37
37
  "name": "Title",
38
38
  "primary": true,
39
+ "auto_update": true,
39
40
  "next_style": "BODY",
41
+ "base_style": "BODY",
40
42
  "justification": "CENTER",
41
43
  "space_after": 100,
42
44
  "bold": true,
43
45
  "underline": "DOUBLE",
46
+ "underline_color": "#ff0000",
44
47
  "uppercase": true,
45
- "font_size": 36,
46
- "underline_color": "#ff0000"
48
+ "font_size": 36
49
+ },
50
+ {
51
+ "type": "paragraph",
52
+ "id": "H1",
53
+ "name": "Heading 1",
54
+ "primary": true,
55
+ "next_style": "BODY",
56
+ "space_after": 40,
57
+ "space_before": 200,
58
+ "underline": "SINGLE",
59
+ "underline_color": "#ff0000",
60
+ "bold": true,
61
+ "font_size": 24
47
62
  },
48
63
  {
49
64
  "type": "paragraph",
50
65
  "id": "BODY",
51
- "name": "Body",
66
+ "name": "Normal",
52
67
  "primary": true,
68
+ "default": true,
53
69
  "justification": "LEFT",
54
70
  "font_size": 24,
55
71
  "hyphenate": true
@@ -61,7 +77,8 @@ a hashmap array or JSON file:
61
77
  "additive": true,
62
78
  "italic": true,
63
79
  "bold": true,
64
- "foreground_color": "#ff0000"
80
+ "foreground_color": "#ff0000",
81
+ "locked": true
65
82
  }
66
83
  ]
67
84
  ```
@@ -86,9 +103,16 @@ rtf.paragraph(styles['BODY']) do |p|
86
103
  p << "shirt, take heed and be on guard, for danger is immanent and you are "
87
104
  p << "likely expendable among the crew..."
88
105
  end
89
-
90
- File.open('01.rtf', 'w') do |file|
91
- file.write(rtf.to_rtf)
106
+ rtf.paragraph(styles['H1']) << "1. The Danger of Away Missions"
107
+ rtf.paragraph(styles['BODY']) do |p|
108
+ p << "If you're ever assigned an away mission, it's almost certain to be your doom. "
109
+ p << "The optimal strategy is to avoid away missions to begin with..."
110
+ end
111
+ rtf.paragraph(styles['H1']) << "2. Avoiding High-Ranking Officers"
112
+ rtf.paragraph(styles['BODY']) do |p|
113
+ p << "You're likely to notice an influx of unfortunate outcomes around "
114
+ p << "certain high-ranking officers. Its to your advantage to quickly identify and "
115
+ p << "avoid these officers..."
92
116
  end
93
117
  ```
94
118