Skip to content

Commit

Permalink
generate: Add description and syntax
Browse files Browse the repository at this point in the history
Close processing-r/Processing.R#93

Signed-off-by: Ce Gao <ce.gao@outlook.com>
  • Loading branch information
gaocegege committed Jun 6, 2017
1 parent 783be91 commit 4098164
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 3 additions & 2 deletions docs/arc.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,12 @@
<tr class="">
<th scope="row">Description</th>
<td>

Draws an arc to the screen. Arcs are drawn along the outer edge of an ellipse defined by the <b>a</b>, <b>b</b>, <b>c</b>, and <b>d</b> parameters. The origin of the arc's ellipse may be changed with the <b>ellipseMode()</b> function. Use the <b>start</b> and <b>stop</b> parameters to specify the angles (in radians) at which to draw the arc.<br /> <br /> There are three ways to draw an arc; the rendering technique used is defined by the optional seventh paramter. The three options, depicted in the above examples, are PIE, OPEN, and CHORD. The default mode is the OPEN stroke with a PIE fill.
</td>
</tr>

<tr class=""><th scope="row">Syntax</th><td><pre></pre></td></tr>
<tr class=""><th scope="row">Syntax</th><td><pre>arc(<c>a</c>, <c>b</c>, <c>c</c>, <c>d</c>, <c>start</c>, <c>stop</c>)
arc(<c>a</c>, <c>b</c>, <c>c</c>, <c>d</c>, <c>start</c>, <c>stop</c>, <c>mode</c>) </pre></td></tr>



Expand Down
9 changes: 7 additions & 2 deletions src/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,13 @@ def parse_categary(self):
raw_yaml_doc = f.read()
yaml_obj = yaml.load(raw_yaml_doc)
self.category = yaml_obj['category']
self.subcategory = yaml_obj['subcategory']

if 'subcategory' in yaml_obj:
self.subcategory = yaml_obj['subcategory']
if 'description' in yaml_obj:
self.description = yaml_obj['description']
if 'syntax' in yaml_obj:
self.syntax = yaml_obj['syntax']

def parse_reference_item(self):
for filename in os.listdir(self.item_dir):
sketchFile = '%s/%s/%s.rpde' % (self.item_dir, filename, filename)
Expand Down

0 comments on commit 4098164

Please # to comment.