shlomi-fish-homepage / bin / t2_html_spell_check.bash

#!/bin/bash

# This is a temporary filter until I find out how to get rid of them there
# exactly.
temp_filter()
{
    grep -vP '(humour/human-hacking/hebrew-v2|humour/humanity/buy-the-fish-in-hebrew|humour/humanity/ongoing-text-hebrew\.html|humour/Pope/The-Pope-Died-on-Sunday--Hebrew-Text)' |
    grep -vP '^(dest/t2-homepage/index\.html)' |
    grep -vP '^(dest/t2-homepage/old-news\.html)' |
    grep -vP '^(dest/t2-homepage/lecture/)' |
    grep -vP '^(dest/t2-homepage/philosophy/politics/define-zionism/heb/index\.html)' |
    grep -vP '^(dest/t2-homepage/philosophy/politics/drug-legalisation/hebrew\.html)'
    cat
}

temp_only_from_reached()
{
    perl -lne 'print if m{t2-homepage/prog-evolution}..1'
}

old_find_quotes_filter()
{
    grep -vP '(catb-heb|WebMetaLecture/slides/examples|t2-homepage/rewrite\.html|humour/by-others/|humour/bits/COBOL-the-New-Age|humour/bits/Mastering-Cat|humour/fortunes/nyh-sigs|humour/fortunes/sharp-perl|humour/fortunes/sharp-programming|humour/fortunes/|humour/human-hacking/arabic-v2|humour/human-hacking/human-hacking-field-guide/|humour/human-hacking/human-hacking-field-guide-v2-arabic/|humour/TheEnemy/TheEnemy_eng\.html|humour/TheEnemy/The-Enemy-English-rev4\.html|humour/TheEnemy/The-Enemy-English-rev5\.html|humour/TheEnemy/The-Enemy-English-rev6\.html|humour/TheEnemy/The-Enemy-English-v7/|humour/TheEnemy/The-Enemy-Hebrew-v7\.html|humour/TheEnemy/The-Enemy-English-v7\.html|humour/TheEnemy/TheEnemy\.html|humour/TheEnemy/The-Enemy-rev[456]\.html|me/resumes/Shlomi-Fish-Heb-Resume\.html)' | 
    grep -vP 'meta/copyrights/index\.html' | # Contains rel="nofollow"
    grep -vP 'open-source/anti/php/index\.html' | # Contains code
    grep -vP 'open-source/bits-and-bobs/greasemonkey/grease\.html' | # Contains HTML markup
    grep -vP 'open-source/projects/Module-Format/index\.html' | # contains code
    grep -vP 'open-source/projects/XML-Grammar/Fiction/index\.html' | # contains markup
    grep -vP 'open-source/projects/Spark/mission/' | # contains code
    grep -vP 'philosophy/by-others/mashhoor--10-reasons--hebrew\.html' | # contains code
    grep -vP 'philosophy/computers/high-quality-software/index\.html$' | # old essay
    grep -vP 'philosophy/computers/high-quality-software/rev2/index\.html$' | # contains output
    grep -vP 'philosophy/computers/high-quality-software/rev2/what-makes-software-high-quality-rev2/freecell-solvers-quality\.html$' | # contains output
    grep -vP 'philosophy/computers/high-quality-software/rev2/what-makes-software-high-quality-rev2/parameters-of-quality\.html$' | # contains output
    grep -vP 'philosophy/computers/high-quality-software/what-makes-software-high-quality/' | # old
    grep -vP 'philosophy/computers/optimizing-code-for-speed/index\.html$' | # old
    grep -vP 'philosophy/computers/perl/joy-of-perl/joy-of-perl\.html$' | # contains some code
    grep -vP 'philosophy/computers/software-management/perfect-workplace/perfect-it-workplace(/|\.xhtml$)' | # old
    grep -vP 'philosophy/computers/web/create-a-great-personal-homesite/index\.html' | # in code
    grep -vP 'philosophy/computers/web/create-a-great-personal-homesite/rev2\.html' | # in code
    grep -vP 'philosophy/computers/web/online-communities/index\.html' | # in code
    grep -vP 'philosophy/foss-other-beasts/revision-2/' | # in code
    grep -vP 'philosophy/obj-oss/objectivism-and-open-source/' | # old
    grep -vP 'philosophy/politics/drug-legalisation/case-for-drug-legalisation/' | # old
    grep -vP 'rindolf/rindolf-spec/' # old and contains code
}

find dest/t2-homepage/ -regextype posix-extended -regex '.*x?html' -print | 
    grep -vP '/catb-heb\.html$' | # HTML - not XHTML file.
    grep -vP 'WebMetaLecture/slides/examples' | # HTML - not XHTML files.
    grep -vP '/rewrite\.html$' | # HTML - not XHTML files.
    sort | 
    xargs -d '\n' perl bin/html-check-spelling-xmlp.pl
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.