Commit 59594e9b authored by Pierre Dittgen's avatar Pierre Dittgen
Browse files

Add normalized region, type and collab to websites.csv

parent 985c6d8f
Pipeline #1640 passed with stages
in 152 minutes and 8 seconds
......@@ -31,9 +31,15 @@ generate_organizations_csv() {
generate_websites_csv() {
echo "Generating websites.csv"
WS_TEMP_DIR=$CACHE_DIR/website
WS_TEMP_DIR=$CACHE_DIR/websites
mkdir -p $WS_TEMP_DIR
$CSV_CUT -c "nom,url,techno,porteur,contact,twitter" $ODF_PTF_FILE > $OBS_BUILD_DIR/websites.csv
(echo "regcode,reg-code"; $CSV_CUT -c regcode $ODF_PTF_FILE | $SED "1d" | sort -u | $SED -e 's/\([A-Z]*-\([0-9]*\)\)/\1,\2/') > $WS_TEMP_DIR/odf_ws_1.csv
$CSV_JOIN -c "reg-code,regcode" $WS_TEMP_DIR/odf_ws_1.csv $CACHE_DIR/cog_region.csv > $WS_TEMP_DIR/odf_ws_2.csv
$CSV_JOIN -c "regcode,regcode" $ODF_PTF_FILE $WS_TEMP_DIR/odf_ws_2.csv > $WS_TEMP_DIR/odf_ws_3.csv
WEBSITES_HEADER="nom,reg-code,reg-nom,type,collab,url,techno,porteur,contact,twitter"
(echo $WEBSITES_HEADER && $CSV_CUT -c "nom,reg-code,regnom,type,collab,url,techno,porteur,contact,twitter" $WS_TEMP_DIR/odf_ws_3.csv | $SED "1d") > $OBS_BUILD_DIR/websites.csv
rm -fR $WS_TEMP_DIR
}
generate_datasets_datagouv_csv() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment