Rizin
unix-like reverse engineering framework and cli tools
make_dist_html Namespace Reference

Functions

def version (tag)
 
def major_minor (tag)
 
def row_for (tag)
 
def group_for (tags)
 
def groups_for (groups, n=4)
 

Variables

string HTML
 
string GROUPS
 
string GROUP
 
string ROW
 
string GPG
 
string EXE
 
 tags = subprocess.check_output(['git', 'tag'])
 
 key
 
 version
 
 reverse
 
list groups = [group_for(list(g)) for _, g in itertools.groupby(tags, major_minor)]
 
string html = HTML.format(groups=groups).strip()
 

Function Documentation

◆ group_for()

def make_dist_html.group_for (   tags)

Definition at line 102 of file make_dist_html.py.

102 def group_for(tags):
103  rows = ''.join(row_for(tag) for tag in tags)
104  return GROUP.format(rows=rows)
105 
106 # Partition in groups of |n|.
def row_for(tag)
def group_for(tags)

References row_for().

◆ groups_for()

def make_dist_html.groups_for (   groups,
  n = 4 
)

Definition at line 107 of file make_dist_html.py.

107 def groups_for(groups, n=4):
108  html = ''
109  groups = groups[:] + [''] * (n - 1)
110  while len(groups) >= n:
111  html += GROUPS.format(groups=groups)
112  groups = groups[n:]
113  return html
114 
size_t len
Definition: 6502dis.c:15
def groups_for(groups, n=4)

References len.

◆ major_minor()

def make_dist_html.major_minor (   tag)

Definition at line 89 of file make_dist_html.py.

89 def major_minor(tag):
90  return version(tag)[:2]
91 
static char * major_minor(const char *s)
Definition: lib.c:331

◆ row_for()

def make_dist_html.row_for (   tag)

Definition at line 92 of file make_dist_html.py.

92 def row_for(tag):
93  maybe_gpg = ''
94  maybe_exe = ''
95  # We didn't start signing releases and producing Windows installers
96  # until v1.7.0.
97  if version(tag) >= version('v1.7.0'):
98  maybe_gpg = GPG.format(**locals())
99  maybe_exe = EXE.format(**locals())
100  return ROW.format(**locals())
101 

Referenced by group_for().

◆ version()

def make_dist_html.version (   tag)

Definition at line 86 of file make_dist_html.py.

86 def version(tag):
87  return map(int, re.match('^v(\d+)\.(\d+)\.(\d+)', tag).groups())
88 
static char * version
Definition: acr.h:4
size_t map(int syms, int left, int len)
Definition: enough.c:237

References groups, map(), and version.

Variable Documentation

◆ EXE

string make_dist_html.EXE
Initial value:
1 = r'''
2 <a href="http://dist.libuv.org/dist/{tag}/">exe</a>
3 '''

Definition at line 82 of file make_dist_html.py.

◆ GPG

string make_dist_html.GPG
Initial value:
1 = r'''
2 <a href="http://dist.libuv.org/dist/{tag}/libuv-{tag}.tar.gz.sign">gpg</a>
3 '''

Definition at line 77 of file make_dist_html.py.

◆ GROUP

string make_dist_html.GROUP
Initial value:
1 = r'''
2 <table>
3  <tr>
4  <th>version</th>
5  <th>tarball</th>
6  <th>gpg</th>
7  <th>windows</th>
8  </tr>
9  {rows}
10 </table>
11 '''

Definition at line 52 of file make_dist_html.py.

◆ GROUPS

string make_dist_html.GROUPS
Initial value:
1 = r'''
2 <tr>
3  <td>{groups[0]}</td>
4  <td>{groups[1]}</td>
5  <td>{groups[2]}</td>
6  <td>{groups[3]}</td>
7 </tr>
8 '''

Definition at line 43 of file make_dist_html.py.

◆ groups

def make_dist_html.groups = [group_for(list(g)) for _, g in itertools.groupby(tags, major_minor)]

◆ HTML

string make_dist_html.HTML

Definition at line 10 of file make_dist_html.py.

◆ html

make_dist_html.html = HTML.format(groups=groups).strip()

Definition at line 122 of file make_dist_html.py.

Referenced by annotated_hexdump(), and get_body().

◆ key

make_dist_html.key

Definition at line 119 of file make_dist_html.py.

◆ reverse

make_dist_html.reverse

Definition at line 119 of file make_dist_html.py.

Referenced by make_decode_table(), rz_vector_sort(), and vector_quick_sort().

◆ ROW

string make_dist_html.ROW
Initial value:
1 = r'''
2 <tr>
3  <td>
4  <a href="http://dist.libuv.org/dist/{tag}/">{tag}</a>
5  </td>
6  <td>
7  <a href="http://dist.libuv.org/dist/{tag}/libuv-{tag}.tar.gz">tarball</a>
8  </td>
9  <td>{maybe_gpg}</td>
10  <td>{maybe_exe}</td>
11 </tr>
12 '''

Definition at line 64 of file make_dist_html.py.

◆ tags

list make_dist_html.tags = subprocess.check_output(['git', 'tag'])

Definition at line 117 of file make_dist_html.py.

Referenced by spp_proc_list_kw(), spp_proc_set(), and spp_run().

◆ version

make_dist_html.version

Definition at line 119 of file make_dist_html.py.

Referenced by version().