| 
									
										
										
										
											2013-02-08 15:33:43 +04:00
										 |  |  | #!/bin/bash | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-04-30 11:06:35 +02:00
										 |  |  | # Check written text for the passive voice, weasel words and duplicate words. | 
					
						
							| 
									
										
										
										
											2013-02-08 15:33:43 +04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-04-30 11:06:35 +02:00
										 |  |  | # http://matt.might.net/articles/shell-scripts-for-passive-voice-weasel-words-duplicates/ | 
					
						
							| 
									
										
										
										
											2013-02-08 15:33:43 +04:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Common stuff | 
					
						
							|  |  |  | CYAN="$(tput setaf 6)" | 
					
						
							|  |  |  | UNDERLINE="$(tput sgr 0 1)" | 
					
						
							|  |  |  | NOCOLOR="$(tput sgr0)" | 
					
						
							|  |  |  | function header() { | 
					
						
							|  |  |  | 	echo -e "$UNDERLINE$CYAN$1$NOCOLOR" | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if [ "$1" = "" ]; then | 
					
						
							|  |  |  | 	echo "Usage: `basename $0` <file> ..." | 
					
						
							|  |  |  | 	exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | header "Weasel words" | 
					
						
							|  |  |  | weasel $1 | 
					
						
							|  |  |  | echo | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | header "Passive voice" | 
					
						
							|  |  |  | passive $1 | 
					
						
							|  |  |  | echo | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | header "Duplicates" | 
					
						
							|  |  |  | dups $1 |