Dotfiles, utilities, and other apparatus.
				
			 
			
		 
		
		
		
		
		
		
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
	
	
		
			
				
				
					
						
						
							|  | #!/bin/sh | 
						
						
							|  |  | 
						
						
							|  | cd "$HOME/notes/" || exit 1 | 
						
						
							|  | 
 | 
						
						
							|  | catenate () { | 
						
						
							|  |   printf '%%%% %s {{{\n\n' "$1" | 
						
						
							|  |   cat "$1" | 
						
						
							|  |   printf '\n%%%% }}}\n\n' | 
						
						
							|  | } | 
						
						
							|  | 
 | 
						
						
							|  | pagename=$(basename "$1" .wiki) | 
						
						
							|  | printf '%%%% logs for: %s\n\n' "$pagename" | 
						
						
							|  | 
 | 
						
						
							|  | notes-links-for --target "$pagename" \ | 
						
						
							|  |   | grep -E '/(log|diary)/' \ | 
						
						
							|  |   | sort -r \ | 
						
						
							|  |   | cut -f1 -d':' \ | 
						
						
							|  |   | while read -r entry | 
						
						
							|  | do | 
						
						
							|  |   catenate "$entry" | 
						
						
							|  | done
 |