fix: [tool] update gen_website_communities script

pull/8135/head
Christophe Vandeplas 2022-02-06 18:39:16 +01:00 committed by Alexandre Dulaunoy
parent 618c7ddb77
commit 397114cdb7
No known key found for this signature in database
GPG Key ID: 09E2CD4944E6CBCD
1 changed files with 12 additions and 10 deletions

View File

@ -19,6 +19,9 @@ permalink: /communities/
toc: true
---
<!-- DO NOT EDIT THIS PAGE MANUALLY -->
<!-- This page is generated by the gen_website_communities.py script located in the MISP/tools/ folder. -->
MISP is an open source software and it is also a large community of MISP users creating, maintaining and operating communities of users or organizations sharing information about threats or cyber security indicators worldwide. The MISP project doesn't maintain an exhaustive list of all communities relying on MISP especially that some communities use MISP internally or privately.
## Known Existing and Public MISP Communities
@ -47,9 +50,9 @@ MISP URL location is [https://www.circl.lu/doc/misp/feed-osint](https://www.circ
### Botvrij.eu OSINT feed
[Botvrij.eu](http://www.botvrij.eu/) provides a MISP OSINT feed out of public report.
[Botvrij.eu](https://www.botvrij.eu/) provides a MISP OSINT feed out of public report.
MISP URL location is [http://www.botvrij.eu/data/feed-osint](http://www.botvrij.eu/data/feed-osint).
MISP URL location is [https://www.botvrij.eu/data/feed-osint](https://www.botvrij.eu/data/feed-osint).
'''
@ -60,17 +63,18 @@ with open(code_communities_filename, 'r') as f_in:
entries = json.load(f_in)
with open(website_communities_filename, 'w') as f_out:
f_out.write(communities_header)
for entry in entries:
for entry in sorted(entries, key=lambda kv: kv['name']):
f_out.write(f'### {entry["name"]}')
f_out.write(vetted_image if entry.get('misp_project_vetted') else '\n')
if entry.get('logo'):
f_out.write(f'![Logo]({entry["logo"]} "{{class=\'community_logo\'}}")\n')
if entry.get('url'):
f_out.write(f'- Website: {entry["url"]}\n')
if entry.get('type'):
f_out.write(f'- Type: {entry["type"]}\n')
# if entry.get('type'):
# f_out.write(f'- Type: {entry["type"]}\n')
if entry.get('sector'):
f_out.write(f'- Sector: {entry["sector"]}\n')
if entry.get('scope'):
@ -78,12 +82,10 @@ with open(website_communities_filename, 'w') as f_out:
if entry.get('nationality'):
f_out.write(f'- Nationality: {entry["nationality"]}\n')
if entry.get('description'):
f_out.write(f'- Description: {entry["description"]}\n')
if entry.get('org'):
f_out.write(f'- Managed by: {entry["org"]}\n')
if entry.get('email'):
f_out.write(f'\n\n{entry["description"]}\n')
if entry.get('email') and entry.get('email') != 'undefined':
f_out.write(f'- Contact: {entry["email"]}')
if entry.get('pgp_key'):
if entry.get('pgp_key') and entry.get('pgp_key') != 'undefined':
f_out.write('\n<details><summary>GPG key</summary>\n\n```')
f_out.write(entry['pgp_key'])
f_out.write('```\n</details>\n')