clarify/acknowledge security limitations
[tails.git] / bin / generate-call-for-manual-testers
blobba76b0f3c25849931fb68919954f7f09e337dbfb
1 #! /usr/bin/python3
3 import jinja2
4 import datetime
5 from subprocess import check_output
7 def end_date() -> str:
8     when = 'now + 24 hours'
9     cmd = ['env', 'TZ=UTC', 'date', '-d' , when,  '+%A %H:00 %Z']
10     return check_output(cmd).decode('utf8').strip()
12 def call_for_testing_contents(args) -> str:
13     jinja2_env = jinja2.Environment(  # nosec jinja2_autoescape_false
14         loader=jinja2.FileSystemLoader('config/release_management/templates'))
16     return (jinja2_env.get_template('call_for_manual_testers.mdwn').render(
17         dist=args.dist,
18         pad=args.pad,
19         version=args.version,
20         end=end_date(),
21         ))
24 if __name__ == '__main__':
25     import argparse
26     parser = argparse.ArgumentParser()
27     parser.add_argument('--dist', required=True)
28     parser.add_argument('--version', required=True)
29     parser.add_argument('--pad', required=True)
30     args = parser.parse_args()
32     print(call_for_testing_contents(args))