#!/bin/bash
filter_common_python_functions() {
grep -v '__len__' | grep -v '__getitem__' | awk '{split($4,a,"/"); $4=a[length(a)]; print $0}' | sort -n -k 3
}
# Function to check and process Python files in directories from PYTHONPATH
process_pythonpath() {
IFS=':' read -ra DIRS <<< "$PYTHONPATH"
for dir in "${DIRS[@]}"; do
# Check if directory contains __init__.py
if [ -f "$dir/__init__.py" ]; then
# If yes, find Python files in this directory
find "$dir" -maxdepth 1 -type f -name '*.py' -exec ctags -x {} + | grep -v namespace | grep -v variable | filter_common_python_functions
fi
done
}
cat <