<commit_before>#!/bin/bash
#
# Script to provide alerts to problems in the title database
#
# Find duplicates in the gln title database
cat ../../tdb/prod/*.tdb | ./tdbout -Aa | sort > /tmp/foo
uniq /tmp/foo > /tmp/bar
allAUs=`cat /tmp/foo | wc -l`
echo "---------------------"
echo "---------------------"
echo "GLN. AUs with all duplicates = $allAUs"
uniqAUs=`cat /tmp/bar | wc -l`
echo "GLN. AUs without duplicates = $uniqAUs"
diff /tmp/foo /tmp/bar | grep "<" | sed s/..//
echo " "
#
# Find duplicates in the clockss title database
cat ../../tdb/clockssingest/*.tdb | ./tdbout -Aa | sort > /tmp/foo
uniq /tmp/foo > /tmp/bar
allAUs=`cat /tmp/foo | wc -l`
echo "---------------------"
echo "---------------------"
echo "CLOCKSS. AUs with all duplicates = $allAUs"
uniqAUs=`cat /tmp/bar | wc -l`
echo "CLOCKSS. AUs without duplicates = $uniqAUs"
diff /tmp/foo /tmp/bar | grep "<" | sed s/..//
echo " "
#
# Find issn problems in gln title database
cat ../../tdb/prod/*.tdb | ./tdbout -t publisher,title,issn,eissn | sort -u > /tmp/foo
echo "---------------------"
echo "---------------------"
echo "GLN. ISSN issues"
./scrub_table.pl /tmp/foo
#
# Find issn problems in clockss title database
cat ../../tdb/clockssingest/*.tdb | ./tdbout -t publisher,title,issn,eissn | sort -u > /tmp/foo
echo "---------------------"
echo "---------------------"
echo "CLOCKSS. ISSN issues"
./scrub_table.pl /tmp/foo
#
# Find Muse titles that don't have attr[journal_id]
echo "---------------------"
echo "---------------------"
echo "GLN. Muse. Titles missing journal_id"
cat *.tdb | ../../scripts/tdb/tdbout -t publisher,param[journal_dir] -Q 'plugin ~ "Muse" and attr[journal_id] is not set' | sort -u<commit_msg>reorder lines. change file names<commit_after>#!/bin/bash
#
# Script to provide alerts to problems in the title database
#
# Find duplicates in the gln title database
cat ../../tdb/prod/*.tdb | ./tdbout -Aa | sort > /tmp/allAUs
uniq /tmp/allAUs > /tmp/dedupedAUs
allAUs=`cat /tmp/allAUs | wc -l`
uniqAUs=`cat /tmp/dedupedAUs | wc -l`
echo "---------------------"
echo "---------------------"
echo "GLN. AUs with all duplicates = $allAUs"
echo "GLN. AUs without duplicates = $uniqAUs"
diff /tmp/allAUs /tmp/dedupedAUs | grep "<" | sed s/..//
echo " "
#
# Find duplicates in the clockss title database
cat ../../tdb/clockssingest/*.tdb | ./tdbout -Aa | sort > /tmp/foo
uniq /tmp/allAUs > /tmp/dedupedAUs
allAUs=`cat /tmp/allAUs | wc -l`
uniqAUs=`cat /tmp/dedupedAUs | wc -l`
echo "---------------------"
echo "---------------------"
echo "CLOCKSS. AUs with all duplicates = $allAUs"
echo "CLOCKSS. AUs without duplicates = $uniqAUs"
diff /tmp/allAUs /tmp/dedupedAUs | grep "<" | sed s/..//
echo " "
#
# Find issn problems in gln title database
cat ../../tdb/prod/*.tdb | ./tdbout -t publisher,title,issn,eissn | sort -u > /tmp/issn
echo "---------------------"
echo "---------------------"
echo "GLN. ISSN issues"
./scrub_table.pl /tmp/issn
#
# Find issn problems in clockss title database
cat ../../tdb/clockssingest/*.tdb | ./tdbout -t publisher,title,issn,eissn | sort -u > /tmp/issn
echo "---------------------"
echo "---------------------"
echo "CLOCKSS. ISSN issues"
./scrub_table.pl /tmp/issn
#
# Find Muse titles that don't have attr[journal_id]
echo "---------------------"
echo "---------------------"
echo "GLN. Muse. Titles missing journal_id"
cat ../../tdb/prod/*.tdb | ./tdbout -t publisher,param[journal_dir] -Q 'plugin ~ "Muse" and attr[journal_id] is not set' | sort -u
{'fraction_non_alphanumeric': 0.2690209589434396, 'fraction_numerical': 0.0, 'mean_word_length': 2.019064124783362, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '5259205', 'n_tokens_mistral': 1275, 'n_tokens_neox': 1209, 'n_words': 361}