This repository has been archived by the owner on Dec 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'spellcheck' of https://github.com/smk4664/nrelabs-curri…
…culum into smk4664-spellcheck
- Loading branch information
Showing
31 changed files
with
404 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,257 @@ | ||
personal_ws-1.1 en 236 | ||
ACL | ||
APIs | ||
ActionChain | ||
ActionChain's | ||
ActionChains | ||
Ansible | ||
Arista | ||
Arista's | ||
BGP | ||
CMDB | ||
ConfigTable | ||
ConfigTables | ||
DateTime | ||
DevOps | ||
Eg | ||
FRR | ||
FactoryLoader | ||
GRPC | ||
GW | ||
Getter | ||
Git's | ||
HCL | ||
Hashicorp | ||
Hostname | ||
hostname | ||
hostnames | ||
html | ||
ICMP | ||
IDL | ||
IFA | ||
IFD | ||
IOS | ||
Idempotency | ||
Init | ||
JSON | ||
JSNAPy | ||
Javascript | ||
Jinja | ||
Junos | ||
JunosDevice | ||
MGMT | ||
MPLS | ||
MQTT | ||
MTU | ||
Mistral | ||
NAPALM's | ||
NRE | ||
NRELabs | ||
NetConf | ||
NetOps | ||
NX | ||
OpTable | ||
OpTables | ||
OperatingSystem | ||
OpenConfig | ||
OpenStack | ||
Orquesta | ||
OSPF | ||
Ok | ||
PFE | ||
PNG | ||
POSIX | ||
Peasy | ||
PyCharm | ||
PyEAPI | ||
PyEZ | ||
PyEZ's | ||
PyEz | ||
QFX | ||
RPC | ||
RPC's | ||
RPCs | ||
RPD | ||
SLAX | ||
SNMP | ||
SSL | ||
STIG | ||
STIGs | ||
StackStorm | ||
StackStorm's | ||
Stackstorm | ||
Sudhishna | ||
TBD | ||
TechLibrary | ||
Terraform | ||
Terraform's | ||
ToDD | ||
Vinayak | ||
VLAN | ||
VLANs | ||
VR | ||
XPath | ||
XSLT | ||
YAML | ||
YAML's | ||
antidotepassword | ||
asynchronously | ||
backend | ||
bgp | ||
boolean | ||
codebase | ||
configs | ||
cURL | ||
cli | ||
cmd | ||
codemirror | ||
com | ||
conf | ||
config | ||
de | ||
declaratively | ||
dev | ||
dict | ||
diff | ||
distro | ||
eAPI | ||
eBGP | ||
echofoo | ||
echos | ||
eg | ||
endpoint | ||
endpoints | ||
env | ||
etree | ||
eventd | ||
exportvar | ||
extensibility | ||
facto | ||
filesize | ||
filesystem | ||
findtext | ||
focussed | ||
foos | ||
fu | ||
getopts | ||
getter | ||
getters | ||
github | ||
greenfield | ||
gRPC | ||
iBGP | ||
ifl | ||
inet | ||
init | ||
influxdb | ||
ing | ||
integrations | ||
intf | ||
io | ||
ip | ||
ipython | ||
jinja | ||
jnpr | ||
jq | ||
jsd | ||
junos | ||
jupyter | ||
jweidley | ||
kernelspec | ||
linux | ||
markdown | ||
mayeates | ||
mimetype | ||
mtu | ||
namespace | ||
nbconvert | ||
nbformat | ||
netconf | ||
nexthop | ||
nonnative | ||
openconfig | ||
parseable | ||
pprint | ||
pre | ||
preinstalled | ||
preloaded | ||
prepopulated | ||
programmability | ||
programmatically | ||
proto | ||
protoc | ||
provisioner | ||
py | ||
pygments | ||
qfx | ||
raylam | ||
readonly | ||
repeatable | ||
repo | ||
rpc | ||
rpc's | ||
runtime | ||
scalable | ||
sh | ||
shahbhoomi | ||
sipphone | ||
situ | ||
sls | ||
snmp | ||
sourcing | ||
squeezy | ||
stackstorm | ||
stdout | ||
stp | ||
str | ||
subcommand | ||
subcommands | ||
subexecutions | ||
substring | ||
switchport | ||
syntaxes | ||
tangentially | ||
teardown | ||
templating | ||
terraform | ||
tf | ||
tmp | ||
toddproject | ||
tradeoffs | ||
txt | ||
undercase | ||
unordered | ||
untracked | ||
uplink | ||
uplinks | ||
uptime | ||
vlans | ||
vpn | ||
vQFX | ||
vqfx | ||
walkthrough | ||
xe | ||
xml | ||
xpath | ||
yaml | ||
yml | ||
reconfiguring | ||
VM | ||
TCP | ||
reachability | ||
instantiation | ||
learnt | ||
login | ||
timestamps | ||
workflow | ||
Workflow | ||
workflows | ||
workflow's | ||
Workflows | ||
API | ||
username | ||
grpc | ||
multi | ||
amongst | ||
voip | ||
timestamp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,25 @@ | ||
language: generic | ||
notifications: | ||
email: false | ||
before_install: | ||
- curl -Lo antidote.tar.gz https://github.com/nre-learning/antidote-core/releases/download/v0.6.0/antidote-linux-amd64.tar.gz && tar xvzf antidote.tar.gz | ||
install: | ||
- ./antidote validate . | ||
- ./check-changelog.sh | ||
sudo: false | ||
after_success: | ||
- ./request-preview.sh | ||
matrix: | ||
include: | ||
- language: generic | ||
notifications: | ||
email: false | ||
addons: | ||
apt: | ||
packages: | ||
- aspell | ||
- aspell-en | ||
- dictionaries-common | ||
script: | ||
- ./check-spelling.sh | ||
|
||
- language: generic | ||
notifications: | ||
email: false | ||
before_install: | ||
- curl -Lo antidote.tar.gz https://github.com/nre-learning/antidote-core/releases/download/v0.6.0/antidote-linux-amd64.tar.gz && tar xvzf antidote.tar.gz | ||
install: | ||
- ./antidote validate . | ||
- ./check-changelog.sh | ||
sudo: false | ||
after_success: | ||
- ./request-preview.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!/bin/bash | ||
# requires apt packages: aspell, aspell-en | ||
|
||
[[ "$TRAVIS_PULL_REQUEST" == "false" ]] && exit 0 # bypass script if not a pull request | ||
|
||
RED='\033[0;31m' | ||
GREEN='\033[0;32m' | ||
BLUE='\033[0;36m' | ||
NC='\033[0m' # No Color | ||
|
||
FILES_CHANGED=`(git diff --name-only $TRAVIS_COMMIT_RANGE || true) | grep guide.md && (git diff --name-only $TRAVIS_COMMIT_RANGE || true) | grep notebook.ipynb` | ||
# FILES_CHANGED=`git ls-tree -r spellcheck --name-only | grep guide.md && git ls-tree -r spellcheck --name-only | grep notebook.ipynb` | ||
|
||
if [ -z "$FILES_CHANGED" ] | ||
then | ||
echo -e "$GREEN>> No markdown file to check $NC" | ||
|
||
exit 0; | ||
fi | ||
|
||
echo -e "$BLUE>> Following guide or notebook files were changed in this pull request (commit range: $TRAVIS_COMMIT_RANGE):$NC" | ||
echo "$FILES_CHANGED" | ||
|
||
TOTAL_NB_MISSPELLED=0 | ||
echo -e "$BLUE>> Running spellchecker...$NC" | ||
for FILE in $FILES_CHANGED; do | ||
CONTENTS=`cat $(echo "$FILE" | sed -E ':a;N;$!ba;s/\n/ /g')` | ||
# delete markdown code blocks | ||
CONTENTS=$(echo "$CONTENTS" | sed '/^```/,/^```/d') | ||
# delete html pre blocks | ||
CONTENTS=$(echo "$CONTENTS" | sed '/^<pre>/,/^<\/pre>/d') | ||
# convert markdown inline code to html code | ||
CONTENTS=$(echo "$CONTENTS" | sed -E 's/(^|[^\\`])`([^`]+)`([^`]|$)/\1<code>\2<\/code>\3/g') | ||
# delete html code blocks | ||
CONTENTS=$(echo "$CONTENTS" | sed -r 's/<code>[^<]+<\/code>//g') | ||
# delete html tags | ||
CONTENTS=`echo "$CONTENTS" | sed -E 's/<([^<]+)>//g'` | ||
# delete markdown robot code blocks | ||
CONTENTS=$(echo "$CONTENTS" | sed '/^>```/,/^>```/d') | ||
|
||
#echo -e "$BLUE>> Content that will be checked:$NC" | ||
#echo "$CONTENTS" | ||
|
||
#echo -e "$BLUE>> Running spellchecker...$NC" | ||
MISSPELLED=`echo "$CONTENTS" | aspell --lang=en --encoding=utf-8 --personal=./.aspell.en.pws list | sort -u` | ||
|
||
NB_MISSPELLED=`echo "$MISSPELLED" | wc -w` | ||
|
||
if [ "$NB_MISSPELLED" -gt 0 ] | ||
then | ||
TOTAL_NB_MISSPELLED=$((TOTAL_NB_MISSPELLED+NB_MISSPELLED)) | ||
# echo -e "$RED>> Words that might be misspelled, please check:$NC" | ||
MISSPELLED=`echo "$MISSPELLED" | sed -E ':a;N;$!ba;s/\n/, /g'` | ||
# echo "$MISSPELLED" | ||
echo -e "\n$RED>> $FILE $NC" | ||
echo -e "$RED>> $NB_MISSPELLED words might be misspelled, please check them:$NC" | ||
echo -e "$MISSPELLED" | ||
fi | ||
done | ||
|
||
if [ "$TOTAL_NB_MISSPELLED" -gt 0 ] | ||
then | ||
echo -e "\nTotal Misspelled words: $TOTAL_NB_MISSPELLED" | ||
exit 1 | ||
else | ||
COMMENT="No spelling errors, congratulations!" | ||
echo -e "$GREEN>> $COMMENT $NC" | ||
fi | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.