Last active
          June 14, 2019 18:18 
        
      - 
      
- 
        Save palashkulsh/a963c3478735bb4c32d2e81904d1bc1d to your computer and use it in GitHub Desktop. 
    how to use aws icons in plantuml
  
        
  
    
      This file contains hidden or 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
    
  
  
    
  | #https://github.com/milo-minderbinder/AWS-PlantUML | |
| ##to extract all the alias for usable format use | |
| find dist/ -iname "*.puml" -exec grep -H "\!define " {} \; | sed 's_dist/\(.*\).puml:!define \([A-Z0-9a-z_]*\).*_!include <aws/\1>\n\2(varname,"icon heading")\n\n_g' | |
| ##along with file name | |
| find dist/ -iname "*.puml" -exec grep -H "\!define " {} \; | sed 's_dist/\(.*\)/\(.*\).puml:!define \([A-Z0-9a-z_]*\).*_\2\n!include <aws/\1/\2>\n\3(var-name,"icon heading")\n\n_g' | |
| #more good table | |
| echo "" > /tmp/awstest.html && echo "<table><thead><th>name</th><th>Include Statement</th><th>Usage</th></thead><tbody>" >> /tmp/awstest.html && find dist/ -iname "*.puml" -type f \( ! -iname "*common.puml" \) -exec grep -H "\!define " {} \; | sed 's_dist/\(.*\)/\(.*\).puml:!define \([A-Z0-9a-z_]*\).*_<tr>\n<td>\2</td>\n<td>!include \<aws/\1/\2\></td>\n<td>\3(var-name,"icon heading")</td></tr>\n\n_g' >> /tmp/awstest.html && echo "</tbody></table>" >> /tmp/awstest.html | |
| @startuml | |
| !include <aws/common> | |
| !include <aws/Storage/AmazonS3/AmazonS3> | |
| !include <aws/Compute/AmazonEC2/Instances/instances> | |
| !include <aws/Storage/AmazonS3/bucket/bucket> | |
| !include <aws/Compute/ElasticLoadBalancing/ElasticLoadBalancing> | |
| !include <aws/Compute/ElasticLoadBalancing/ApplicationLoadBalancer/ApplicationLoadBalancer> | |
| COMPUTE_ELASTICLOADBALANCING_APPLICATIONLOADBALANCER(ALB) | |
| ELASTICLOADBALANCING(instance) | |
| AMAZONS3(s3_internal) | |
| AMAZONS3(s3_partner,"Vendor's S3") | |
| s3_internal <- s3_partner | |
| @enduml | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment