mirror of https://gitlab.com/bashrc2/epicyon
Merge branch 'main' of gitlab.com:bashrc2/epicyon
commit
b8e2a08ad8
4
Makefile
4
Makefile
|
|
@ -3,6 +3,8 @@ VERSION=1.1.0
|
||||||
|
|
||||||
all:
|
all:
|
||||||
debug:
|
debug:
|
||||||
|
sbom:
|
||||||
|
scanoss-py scan . > sbom.json
|
||||||
source:
|
source:
|
||||||
rm -f *.*~ *~
|
rm -f *.*~ *~
|
||||||
rm -f ontology/*~
|
rm -f ontology/*~
|
||||||
|
|
@ -17,6 +19,7 @@ source:
|
||||||
rm -f ../${APP}*.deb ../${APP}*.changes ../${APP}*.asc ../${APP}*.dsc
|
rm -f ../${APP}*.deb ../${APP}*.changes ../${APP}*.asc ../${APP}*.dsc
|
||||||
cd .. && mv ${APP} ${APP}-${VERSION} && tar -zcvf ${APP}_${VERSION}.orig.tar.gz ${APP}-${VERSION}/ && mv ${APP}-${VERSION} ${APP}
|
cd .. && mv ${APP} ${APP}-${VERSION} && tar -zcvf ${APP}_${VERSION}.orig.tar.gz ${APP}-${VERSION}/ && mv ${APP}-${VERSION} ${APP}
|
||||||
clean:
|
clean:
|
||||||
|
rm -f \#*
|
||||||
rm -f *.*~ *~ *.dot
|
rm -f *.*~ *~ *.dot
|
||||||
rm -f orgs/*~
|
rm -f orgs/*~
|
||||||
rm -f ontology/*~
|
rm -f ontology/*~
|
||||||
|
|
@ -25,6 +28,7 @@ clean:
|
||||||
rm -f theme/indymediaclassic/welcome/*~
|
rm -f theme/indymediaclassic/welcome/*~
|
||||||
rm -f theme/indymediamodern/welcome/*~
|
rm -f theme/indymediamodern/welcome/*~
|
||||||
rm -f website/EN/*~
|
rm -f website/EN/*~
|
||||||
|
rm -f cwlists/*~
|
||||||
rm -f gemini/EN/*~
|
rm -f gemini/EN/*~
|
||||||
rm -f scripts/*~
|
rm -f scripts/*~
|
||||||
rm -f deploy/*~
|
rm -f deploy/*~
|
||||||
|
|
|
||||||
10
README.md
10
README.md
|
|
@ -311,3 +311,13 @@ To run the network tests. These simulate instances exchanging messages.
|
||||||
``` bash
|
``` bash
|
||||||
python3 epicyon.py --testsnetwork
|
python3 epicyon.py --testsnetwork
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Software Bill of Materials
|
||||||
|
|
||||||
|
To update the software bill of materials:
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
sudo pip3 install scanoss
|
||||||
|
make clean
|
||||||
|
make sbom
|
||||||
|
```
|
||||||
|
|
|
||||||
|
|
@ -451,8 +451,8 @@
|
||||||
"warning": "26A0",
|
"warning": "26A0",
|
||||||
"wastebasket": "1F5D1",
|
"wastebasket": "1F5D1",
|
||||||
"watch": "231A",
|
"watch": "231A",
|
||||||
"waveman": "1F64B-1F3FE-200D-2642-FE0F",
|
"waveman": "1F64B",
|
||||||
"wavewoman": "1F64B-1F3FE-200D-2640-FE0F",
|
"wavewoman": "1F64B",
|
||||||
"wavydash": "3030",
|
"wavydash": "3030",
|
||||||
"wheelchairsymbol": "267F",
|
"wheelchairsymbol": "267F",
|
||||||
"wheelchair": "1F9BD",
|
"wheelchair": "1F9BD",
|
||||||
|
|
@ -2824,5 +2824,6 @@
|
||||||
"vegananarchism": "vegananarchism",
|
"vegananarchism": "vegananarchism",
|
||||||
"wiphala_bolivia": "wiphala_bolivia",
|
"wiphala_bolivia": "wiphala_bolivia",
|
||||||
"yayblob": "yayblob",
|
"yayblob": "yayblob",
|
||||||
"notankies": "notankies"
|
"notankies": "notankies",
|
||||||
|
"highfive": "1F64B"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
13
maps.py
13
maps.py
|
|
@ -46,17 +46,24 @@ def _geocoords_from_osm_link(url: str, osm_domain: str) -> (int, float, float):
|
||||||
def _geocoords_from_gmaps_link(url: str) -> (int, float, float):
|
def _geocoords_from_gmaps_link(url: str) -> (int, float, float):
|
||||||
"""Returns geocoordinates from a Gmaps link
|
"""Returns geocoordinates from a Gmaps link
|
||||||
"""
|
"""
|
||||||
if '/maps/@' not in url:
|
if '/maps/' not in url:
|
||||||
|
return None, None, None
|
||||||
|
coords_str = url.split('/maps', 1)[1]
|
||||||
|
if '/@' not in coords_str:
|
||||||
return None, None, None
|
return None, None, None
|
||||||
|
|
||||||
coords_str = url.split('/maps/@')[1]
|
coords_str = coords_str.split('/@', 1)[1]
|
||||||
|
if 'z' not in coords_str:
|
||||||
|
return None, None, None
|
||||||
|
coords_str = coords_str.split('z', 1)[0]
|
||||||
|
|
||||||
if ',' not in coords_str:
|
if ',' not in coords_str:
|
||||||
return None, None, None
|
return None, None, None
|
||||||
|
|
||||||
coords = coords_str.split(',')
|
coords = coords_str.split(',')
|
||||||
if len(coords) != 3:
|
if len(coords) != 3:
|
||||||
return None, None, None
|
return None, None, None
|
||||||
zoom = coords[2].replace('z', '')
|
zoom = coords[2]
|
||||||
if not zoom.isdigit():
|
if not zoom.isdigit():
|
||||||
return None, None, None
|
return None, None, None
|
||||||
latitude = coords[0]
|
latitude = coords[0]
|
||||||
|
|
|
||||||
|
|
@ -725,9 +725,9 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {},
|
||||||
str(maps_zoom) + ',normal'
|
str(maps_zoom) + ',normal'
|
||||||
location_label_with_link = \
|
location_label_with_link = \
|
||||||
'<a href="' + maps_url + '" ' + \
|
'<a href="' + maps_url + '" ' + \
|
||||||
'rel="nofollow noopener noreferrer" target="_blank">' + \
|
'rel="nofollow noopener noreferrer" target="_blank">🗺️ ' + \
|
||||||
translate['Location'] + '</a>'
|
translate['Location'] + '</a>'
|
||||||
date_and_location += '<p>\n' + \
|
date_and_location += '<br><p>\n' + \
|
||||||
edit_text_field(location_label_with_link, 'location', '',
|
edit_text_field(location_label_with_link, 'location', '',
|
||||||
'https://www.openstreetmap.org/#map=') + '</p>\n'
|
'https://www.openstreetmap.org/#map=') + '</p>\n'
|
||||||
date_and_location += end_edit_section()
|
date_and_location += end_edit_section()
|
||||||
|
|
|
||||||
|
|
@ -395,7 +395,15 @@ def html_moderation_info(css_cache: {}, translate: {},
|
||||||
blocking_filename = base_dir + '/accounts/blocking.txt'
|
blocking_filename = base_dir + '/accounts/blocking.txt'
|
||||||
if os.path.isfile(blocking_filename):
|
if os.path.isfile(blocking_filename):
|
||||||
with open(blocking_filename, 'r') as fp_block:
|
with open(blocking_filename, 'r') as fp_block:
|
||||||
blocked_str = fp_block.read()
|
blocked_lines = fp_block.readlines()
|
||||||
|
blocked_str = ''
|
||||||
|
if blocked_lines:
|
||||||
|
blocked_lines.sort()
|
||||||
|
for line in blocked_lines:
|
||||||
|
if not line:
|
||||||
|
continue
|
||||||
|
line = line.replace('\n', '').replace('\r', '').strip()
|
||||||
|
blocked_str += line + '\n'
|
||||||
info_form += '<div class="container">\n'
|
info_form += '<div class="container">\n'
|
||||||
info_form += \
|
info_form += \
|
||||||
' <br><b>' + \
|
' <br><b>' + \
|
||||||
|
|
@ -405,7 +413,7 @@ def html_moderation_info(css_cache: {}, translate: {},
|
||||||
translate[msg_str1]
|
translate[msg_str1]
|
||||||
info_form += \
|
info_form += \
|
||||||
' <textarea id="message" ' + \
|
' <textarea id="message" ' + \
|
||||||
'name="blocked" style="height:700px" spellcheck="false">' + \
|
'name="blocked" style="height:2000px" spellcheck="false">' + \
|
||||||
blocked_str + '</textarea>\n'
|
blocked_str + '</textarea>\n'
|
||||||
info_form += '</div>\n'
|
info_form += '</div>\n'
|
||||||
info_shown = True
|
info_shown = True
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,7 @@ def html_theme_designer(css_cache: {}, base_dir: str,
|
||||||
translate['Reset'] + '</button>\n' + \
|
translate['Reset'] + '</button>\n' + \
|
||||||
' <button type="submit" class="button" ' + \
|
' <button type="submit" class="button" ' + \
|
||||||
'name="submitThemeDesigner" accesskey="' + submit_key + '">' + \
|
'name="submitThemeDesigner" accesskey="' + submit_key + '">' + \
|
||||||
translate['Publish'] + '</button>\n </center>\n'
|
translate['Save'] + '</button>\n </center>\n'
|
||||||
|
|
||||||
contrast_warning = ''
|
contrast_warning = ''
|
||||||
if theme_json.get('main-bg-color'):
|
if theme_json.get('main-bg-color'):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue