<commit_before>#! /bin/bash

cd /home/maposmatic/styles

git clone https://github.com/Nakaner/OpenRailwayMap-webmap-styles

cd OpenRailwayMap-webmap-styles

carto -a $(mapnik-config -v) project.mml | sed -e 's/planet_osm_line/railmap_line/g' -e 's/comp-op="screen"//g' >  railmap.xml 2>/dev/null

sudo -u maposmatic psql gis <<EOF
DROP VIEW railmap_line;

CREATE VIEW railmap_line 
  AS SELECT *
          , tags->'usage'    AS usage
	  , tags->'razed'    AS razed 
	  , tags->'proposed' AS proposed 
       FROM planet_osm_line;
EOF

cat <<EOF >> /home/maposmatic/ocitysmap/ocitysmap.styledefs
[rail_overlay]
name: OpenRailwayMap_Overlay
description: OpenRailwayMap rail line overlay
path: /home/maposmatic/styles/OpenRailwayMap-webmap-styles/railmap.xml
EOF

echo "  rail_overlay," >> /home/maposmatic/ocitysmap/ocitysmap.overlays

<commit_msg>with the hstore-only + views schema there's no need for an extra view here anymore<commit_after>#! /bin/bash

cd /home/maposmatic/styles

git clone https://github.com/Nakaner/OpenRailwayMap-webmap-styles

cd OpenRailwayMap-webmap-styles

carto -a $(mapnik-config -v) project.mml | sed -e 's/comp-op="screen"//g' >  railmap.xml 2>/dev/null

cat <<EOF >> /home/maposmatic/ocitysmap/ocitysmap.styledefs
[rail_overlay]
name: OpenRailwayMap_Overlay
description: OpenRailwayMap rail line overlay
path: /home/maposmatic/styles/OpenRailwayMap-webmap-styles/railmap.xml
EOF

echo "  rail_overlay," >> /home/maposmatic/ocitysmap/ocitysmap.overlays


{'fraction_non_alphanumeric': 0.12121212121212122, 'fraction_numerical': 0.0013468013468013469, 'mean_word_length': 4.307142857142857, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 18, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6313540', 'n_tokens_mistral': 581, 'n_tokens_neox': 548, 'n_words': 113}