forked from kaitai-io/kaitai_struct_formats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathformat_lang.html.erb
48 lines (39 loc) · 1.46 KB
/
format_lang.html.erb
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
<% if @erb_usage[cur_lang] %>
<section id="format-usage" class="format">
<div class="container">
<h2>Usage</h2>
<h3>Runtime library</h3>
<p>All parsing code for <%= LANGS[cur_lang][:name] %> generated by Kaitai Struct depends on the
<a
href="https://github.com/kaitai-io/kaitai_struct_<%= LANGS[cur_lang].fetch(:canonical, {})[:id] || cur_lang %>_runtime/"
target="_blank" rel="noopener">
<%= (LANGS[cur_lang][:canonical] || LANGS[cur_lang])[:name] %> runtime library</a>. You have to
install it before you can parse data.</p>
<%= @erb_usage[cur_lang].result(binding) %>
</div>
</section>
<% end %>
<section id="format-lang" class="format">
<div class="container">
<h2>
<% if cur_lang == 'graphviz' %>
GraphViz block diagram source
<% else %>
<%= LANGS[cur_lang][:name] %> source code to parse <%= format_name %>
<% end %>
</h2>
<% src_files.each { |src| %>
<h3><%= src[:filename] %></h3>
<div class="row">
<div class="pull-right">
<p>
<a href="<%= src[:path] %>" download="<%= src[:filename] %>" class="btn btn-success">Download <i class="fa fa-download"></i></a>
</p>
</div>
</div>
<div class="row">
<%= code cur_lang, src[:src] %>
</div>
<% } %>
</div>
</section>