3
# Produce a summary of the statuses of all of the .page topics
4
# (Not done properly, but it's OK for a rough estimate)
6
# How to use the status tags:
7
# none - no status has been assigned
8
# stub - contains little to no real content
9
# incomplete - outline of all information, but lacking content
10
# draft - all content available, but unpolished
11
# outdated - was once complete or nearly complete, but needs to
12
# be revised to reflect changes
13
# review - ready to be reviewed by editors
14
# candidate - reviewed and awaiting a final approval
15
# final - approved and ready for publication or distribution
19
PREVIOUS_UBUNTU_VERSIONS=( "4.10" "5.04" "5.10" "6.06" "6.10" "7.04" "7.10" "8.04" "8.10" "9.04" "9.10" "10.04" "10.10" "11.04" "11.10" "12.04" "12.10" "13.04" );
20
CURRENT_UBUNTU_VERSION="13.10"
22
if [ "x$1" = "x" -o "x$1" = "x--none" ]; then
25
grep -l "$CURRENT_UBUNTU_VERSION.*status=\"none" *.page
27
if [ "x$1" = "x" -o "x$1" = "x--stub" ]; then
30
grep -l "$CURRENT_UBUNTU_VERSION.*status=\"stub" *
32
if [ "x$1" = "x" -o "x$1" = "x--incomplete" ]; then
34
echo "== INCOMPLETE =="
35
grep -l "$CURRENT_UBUNTU_VERSION.*status=\"incomplete" *.page
37
if [ "x$1" = "x" -o "x$1" = "x--draft" ]; then
40
grep -l "$CURRENT_UBUNTU_VERSION.*status=\"draft" *.page
42
if [ "x$1" = "x" -o "x$1" = "x--review" ]; then
45
grep -l "$CURRENT_UBUNTU_VERSION.*status=\"review" *.page
47
if [ "x$1" = "x" -o "x$1" = "x--candidate" ]; then
49
echo "== CANDIDATE =="
50
grep -l "$CURRENT_UBUNTU_VERSION.*status=\"candidate" *.page
52
if [ "x$1" = "x" -o "x$1" = "x--final" ]; then
55
grep -l "$CURRENT_UBUNTU_VERSION.*status=\"final" *.page
57
if [ "x$1" = "x" -o "x$1" = "x--outdated" ]; then
60
grep -l "$CURRENT_UBUNTU_VERSION.*status=\"outdated" *.page
65
for item in "${PREVIOUS_UBUNTU_VERSIONS[@]}"; do grep -l "revision version=\"$item" *.page; done;
67
if [ "x$1" = "x" ]; then
70
if [ "x$1" = "x" -o "x$1" = "x--summary" ]; then
73
echo " None: " `grep "$CURRENT_UBUNTU_VERSION.*status=\"none" *.page | wc -l`
74
echo " Stub: " `grep "$CURRENT_UBUNTU_VERSION.*status=\"stub" * | wc -l`
75
echo "Incomplete: " `grep "$CURRENT_UBUNTU_VERSION.*status=\"incomplete" *.page | wc -l`
76
echo " Draft: " `grep "$CURRENT_UBUNTU_VERSION.*status=\"draft" *.page | wc -l`
77
echo " Review: " `grep "$CURRENT_UBUNTU_VERSION.*status=\"review" *.page | wc -l`
78
echo " Candidate: " `grep "$CURRENT_UBUNTU_VERSION.*status=\"candidate" *.page | wc -l`
79
echo " Final: " `grep "$CURRENT_UBUNTU_VERSION.*status=\"final" *.page | wc -l`
80
echo " Outdated: " `grep "$CURRENT_UBUNTU_VERSION.*status=\"outdated" *.page | wc -l`
81
echo " Extinct: " `for item in "${PREVIOUS_UBUNTU_VERSIONS[@]}"; do grep -l "revision version=\"$item" *.page; done | wc -l`