diff --git a/_data/whats_left/builtin_items.csv b/_data/whats_left/builtin_items.csv new file mode 100644 index 000000000..bf05fdec9 --- /dev/null +++ b/_data/whats_left/builtin_items.csv @@ -0,0 +1,37 @@ +builtin,name,is_inherited +BaseException,BaseException.__getattribute__,(inherited) +BaseException,BaseException.add_note, +NoneType,NoneType.__eq__,(inherited) +NoneType,NoneType.__ge__,(inherited) +NoneType,NoneType.__gt__,(inherited) +NoneType,NoneType.__hash__,(inherited) +NoneType,NoneType.__le__,(inherited) +NoneType,NoneType.__lt__,(inherited) +NoneType,NoneType.__ne__,(inherited) +bool,bool.__invert__,(inherited) +bytearray,bytearray.__buffer__, +bytearray,bytearray.__getattribute__,(inherited) +bytearray,bytearray.__release_buffer__, +bytearray,bytearray.__str__,(inherited) +bytes,bytes.__buffer__, +bytes,bytes.__getattribute__,(inherited) +bytes,bytes.__str__,(inherited) +classmethod,classmethod.__init__,(inherited) +complex,complex.__getattribute__,(inherited) +dict,dict.__getattribute__,(inherited) +dict_items,dict_items.__hash__,(inherited) +enumerate,enumerate.__getattribute__,(inherited) +filter,filter.__getattribute__,(inherited) +int,int.__getattribute__,(inherited) +list,list.__getattribute__,(inherited) +map,map.__getattribute__,(inherited) +memoryview,memoryview.__buffer__, +memoryview,memoryview.__getattribute__,(inherited) +memoryview,memoryview.__release_buffer__, +memoryview,memoryview._from_flags, +property,property.__getattribute__,(inherited) +range,range.__getattribute__,(inherited) +set,set.__getattribute__,(inherited) +slice,slice.__getattribute__,(inherited) +tuple,tuple.__getattribute__,(inherited) +zip,zip.__getattribute__,(inherited) diff --git a/_layouts/whats_left.html b/_layouts/whats_left.html index 2db86387f..19d382ee9 100644 --- a/_layouts/whats_left.html +++ b/_layouts/whats_left.html @@ -40,4 +40,17 @@ {% endfor %} + +
What's left: Built-in Items
+ {% assign items_by_builtin = site.data.whats_left.builtin_items | group_by: "builtin" %} + {% for group in items_by_builtin %} +

{{ group.name }}

+
+
    + {% for item in group.items %} +
  1. {{ item.name }}{% if item.is_inherited %} {{ item.is_inherited }}{% endif %}
  2. + {% endfor %} +
+
+ {% endfor %} diff --git a/scripts/whats_left_builtin_items.sh b/scripts/whats_left_builtin_items.sh new file mode 100755 index 000000000..42550ad5a --- /dev/null +++ b/scripts/whats_left_builtin_items.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -euo pipefail + +# paths where the script is located +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" + +DATA_DIR="$PROJECT_ROOT/_data" +TEMP_FILE="$DATA_DIR/whats_left.temp" +OUTPUT_DIR="$DATA_DIR/whats_left" +OUTPUT_FILE="$OUTPUT_DIR/builtin_items.csv" + +# create directory if it doesn't exist +mkdir -p "$OUTPUT_DIR" + +# exit violently if the temp file does not exist +if [ ! -f "$TEMP_FILE" ]; then + echo "error: input file $TEMP_FILE not found" >&2 + exit 1 +fi + +# generate the CSV file for builtin items from the temp file +awk -f - "$TEMP_FILE" > "$OUTPUT_FILE" <<'EOF' +BEGIN { + OFS="," + print "builtin,name,is_inherited" +} +/^# builtin items/ { in_section=1; next } +/^$/ { if (in_section) exit } +in_section { + split($1, a, ".") + rest = "" + idx = index($0, " ") + if (idx > 0) { + rest = substr($0, idx+1) + } + print a[1], $1, rest +} +EOF