diff --git a/.gitignore b/.gitignore index 59f09cb..b45cdb3 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,10 @@ node_modules main.py # trash -.DS_Store \ No newline at end of file +.DS_Store + +# Website uses yarn; ignore npm package-lock.json +website/package-lock.json + +# Ignore .swp files +.swp diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 658dc0f..40a22b3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contribution Guide -You shouldn't edit the node class files (all files under `diagram` directory) by +You shouldn't edit the node class files (all files under `diagrams/` directory) by yourself. ## Resources @@ -55,3 +55,17 @@ Then just run the `./autogen.sh` to generate the added or updated aliases. ```shell python -m unittest tests/*.py -v ``` + +## Testing changes to the website + +The [Docusaurus](https://docusaurus.io/)-based documentation website can be run by installing dependencies, then simply running `npm run start`. + +```bash +cd website/ +npm i +npm run start +``` + +The website will be available on [http://localhost:3000](http://localhost:3000). + +Edit files in `website/` and `docs/` respectively to edit documentation. diff --git a/autogen.sh b/autogen.sh index e4fe6d5..766881b 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,8 +1,10 @@ #!/bin/bash +set -e + app_root_dir="diagrams" # NOTE: azure icon set is not latest version -providers=("onprem" "aws" "azure" "gcp" "k8s" "alibabacloud" "oci") +providers=("onprem" "aws" "azure" "gcp" "k8s" "alibabacloud" "oci" "programming") if ! [ -x "$(command -v round)" ]; then echo 'round is not installed' diff --git a/config.py b/config.py index 4ec8b94..a6dbf16 100644 --- a/config.py +++ b/config.py @@ -11,7 +11,7 @@ DIR_APP_ROOT = "diagrams" DIR_RESOURCE = "resources" DIR_TEMPLATE = "templates" -PROVIDERS = ("base", "onprem", "aws", "azure", "gcp", "k8s", "alibabacloud", "oci") +PROVIDERS = ("base", "onprem", "aws", "azure", "gcp", "k8s", "alibabacloud", "oci", "programming") ######################### # Resource Processing # @@ -32,6 +32,7 @@ FILE_PREFIXES = { "k8s": (), "alibabacloud": (), "oci": ("OCI-",), + "programming": (), } ######################### diff --git a/diagrams/programming/__init__.py b/diagrams/programming/__init__.py new file mode 100644 index 0000000..7a846e1 --- /dev/null +++ b/diagrams/programming/__init__.py @@ -0,0 +1,12 @@ +""" +Programming provides a set of programming languages and frameworks. +""" + +from diagrams import Node + + +class _Programming(Node): + _provider = "programming" + _icon_dir = "resources/programming" + + fontcolor = "#ffffff" diff --git a/diagrams/programming/framework.py b/diagrams/programming/framework.py new file mode 100644 index 0000000..c5c7afa --- /dev/null +++ b/diagrams/programming/framework.py @@ -0,0 +1,55 @@ +# This module is automatically generated by autogen.sh. DO NOT EDIT. + +from . import _Programming + + +class _Framework(_Programming): + _type = "language" + _icon_dir = "resources/programming/framework" + + +class Angular(_Framework): + _icon = "angular.png" + + +class Backbone(_Framework): + _icon = "backbone.png" + + +class Django(_Framework): + _icon = "django.png" + + +class Ember(_Framework): + _icon = "ember.png" + + +class Flask(_Framework): + _icon = "flask.png" + + +class Flutter(_Framework): + _icon = "flutter.png" + + +class Laravel(_Framework): + _icon = "laravel.png" + + +class Rails(_Framework): + _icon = "rails.png" + + +class React(_Framework): + _icon = "react.png" + + +class Spring(_Framework): + _icon = "spring.png" + + +class Vue(_Framework): + _icon = "vue.png" + + +# Aliases diff --git a/diagrams/programming/language.py b/diagrams/programming/language.py new file mode 100644 index 0000000..829fbc7 --- /dev/null +++ b/diagrams/programming/language.py @@ -0,0 +1,79 @@ +# This module is automatically generated by autogen.sh. DO NOT EDIT. + +from . import _Programming + + +class _Language(_Programming): + _type = "language" + _icon_dir = "resources/programming/language" + + +class Bash(_Language): + _icon = "bash.png" + + +class C(_Language): + _icon = "c.png" + + +class Csharp(_Language): + _icon = "csharp.png" + + +class Cpp(_Language): + _icon = "cpp.png" + + +class Dart(_Language): + _icon = "dart.png" + + +class Go(_Language): + _icon = "go.png" + + +class Java(_Language): + _icon = "java.png" + + +class Javascript(_Language): + _icon = "javascript.png" + + +class Kotlin(_Language): + _icon = "kotlin.png" + + +class Matlab(_Language): + _icon = "matlab.png" + + +class Nodejs(_Language): + _icon = "nodejs.png" + + +class PHP(_Language): + _icon = "php.png" + + +class Python(_Language): + _icon = "python.png" + + +class R(_Language): + _icon = "r.png" + + +class Ruby(_Language): + _icon = "ruby.png" + + +class Swift(_Language): + _icon = "swift.png" + + +class Typescript(_Language): + _icon = "typescript.png" + + +# Aliases diff --git a/docs/nodes/programming.md b/docs/nodes/programming.md new file mode 100644 index 0000000..3523aed --- /dev/null +++ b/docs/nodes/programming.md @@ -0,0 +1,40 @@ +--- +id: programming +title: Programming +--- + +Node classes list of programming languages, runtimes and frameworks + +## programming.language + +- **diagrams.programming.language.Bash** +- **diagrams.programming.language.C** +- **diagrams.programming.language.Csharp** +- **diagrams.programming.language.Cpp** +- **diagrams.programming.language.Dart** +- **diagrams.programming.language.Go** +- **diagrams.programming.language.Java** +- **diagrams.programming.language.Javascript** +- **diagrams.programming.language.Kotlin** +- **diagrams.programming.language.Matlab** +- **diagrams.programming.language.Nodejs** +- **diagrams.programming.language.PHP** +- **diagrams.programming.language.Python** +- **diagrams.programming.language.R** +- **diagrams.programming.language.Ruby** +- **diagrams.programming.language.Swift** +- **diagrams.programming.language.Typescript** + +## programming.framework + +- **diagrams.programming.framework.Angular** +- **diagrams.programming.framework.Backbone** +- **diagrams.programming.framework.Django** +- **diagrams.programming.framework.Ember** +- **diagrams.programming.framework.Flask** +- **diagrams.programming.framework.Flutter** +- **diagrams.programming.framework.Laravel** +- **diagrams.programming.framework.Rails** +- **diagrams.programming.framework.React** +- **diagrams.programming.framework.Spring** +- **diagrams.programming.framework.Vue** diff --git a/resources/programming/framework/angular.png b/resources/programming/framework/angular.png new file mode 100644 index 0000000..a3c9067 Binary files /dev/null and b/resources/programming/framework/angular.png differ diff --git a/resources/programming/framework/backbone.png b/resources/programming/framework/backbone.png new file mode 100644 index 0000000..b0b80d9 Binary files /dev/null and b/resources/programming/framework/backbone.png differ diff --git a/resources/programming/framework/django.png b/resources/programming/framework/django.png new file mode 100644 index 0000000..13fdc7a Binary files /dev/null and b/resources/programming/framework/django.png differ diff --git a/resources/programming/framework/ember.png b/resources/programming/framework/ember.png new file mode 100644 index 0000000..88d0c89 Binary files /dev/null and b/resources/programming/framework/ember.png differ diff --git a/resources/programming/framework/flask.png b/resources/programming/framework/flask.png new file mode 100644 index 0000000..98fe1fd Binary files /dev/null and b/resources/programming/framework/flask.png differ diff --git a/resources/programming/framework/flutter.png b/resources/programming/framework/flutter.png new file mode 100644 index 0000000..409896d Binary files /dev/null and b/resources/programming/framework/flutter.png differ diff --git a/resources/programming/framework/laravel.png b/resources/programming/framework/laravel.png new file mode 100644 index 0000000..46d44da Binary files /dev/null and b/resources/programming/framework/laravel.png differ diff --git a/resources/programming/framework/rails.png b/resources/programming/framework/rails.png new file mode 100644 index 0000000..a989a82 Binary files /dev/null and b/resources/programming/framework/rails.png differ diff --git a/resources/programming/framework/react.png b/resources/programming/framework/react.png new file mode 100644 index 0000000..cc28869 Binary files /dev/null and b/resources/programming/framework/react.png differ diff --git a/resources/programming/framework/spring.png b/resources/programming/framework/spring.png new file mode 100644 index 0000000..575a8a0 Binary files /dev/null and b/resources/programming/framework/spring.png differ diff --git a/resources/programming/framework/vue.png b/resources/programming/framework/vue.png new file mode 100644 index 0000000..69d44b0 Binary files /dev/null and b/resources/programming/framework/vue.png differ diff --git a/resources/programming/language/bash.png b/resources/programming/language/bash.png new file mode 100644 index 0000000..e817fcd Binary files /dev/null and b/resources/programming/language/bash.png differ diff --git a/resources/programming/language/c.png b/resources/programming/language/c.png new file mode 100644 index 0000000..7aeaf3a Binary files /dev/null and b/resources/programming/language/c.png differ diff --git a/resources/programming/language/cpp.png b/resources/programming/language/cpp.png new file mode 100644 index 0000000..9843cd5 Binary files /dev/null and b/resources/programming/language/cpp.png differ diff --git a/resources/programming/language/csharp.png b/resources/programming/language/csharp.png new file mode 100644 index 0000000..01d9b7a Binary files /dev/null and b/resources/programming/language/csharp.png differ diff --git a/resources/programming/language/dart.png b/resources/programming/language/dart.png new file mode 100644 index 0000000..265af16 Binary files /dev/null and b/resources/programming/language/dart.png differ diff --git a/resources/programming/language/go.png b/resources/programming/language/go.png new file mode 100644 index 0000000..cf6aa86 Binary files /dev/null and b/resources/programming/language/go.png differ diff --git a/resources/programming/language/java.png b/resources/programming/language/java.png new file mode 100644 index 0000000..366793d Binary files /dev/null and b/resources/programming/language/java.png differ diff --git a/resources/programming/language/javascript.png b/resources/programming/language/javascript.png new file mode 100644 index 0000000..954077d Binary files /dev/null and b/resources/programming/language/javascript.png differ diff --git a/resources/programming/language/kotlin.png b/resources/programming/language/kotlin.png new file mode 100644 index 0000000..f9c6f90 Binary files /dev/null and b/resources/programming/language/kotlin.png differ diff --git a/resources/programming/language/matlab.png b/resources/programming/language/matlab.png new file mode 100644 index 0000000..2b4b82a Binary files /dev/null and b/resources/programming/language/matlab.png differ diff --git a/resources/programming/language/nodejs.png b/resources/programming/language/nodejs.png new file mode 100644 index 0000000..42c22b0 Binary files /dev/null and b/resources/programming/language/nodejs.png differ diff --git a/resources/programming/language/php.png b/resources/programming/language/php.png new file mode 100644 index 0000000..3e49467 Binary files /dev/null and b/resources/programming/language/php.png differ diff --git a/resources/programming/language/python.png b/resources/programming/language/python.png new file mode 100644 index 0000000..6b7e76d Binary files /dev/null and b/resources/programming/language/python.png differ diff --git a/resources/programming/language/r.png b/resources/programming/language/r.png new file mode 100644 index 0000000..1771a5d Binary files /dev/null and b/resources/programming/language/r.png differ diff --git a/resources/programming/language/ruby.png b/resources/programming/language/ruby.png new file mode 100644 index 0000000..1253ae7 Binary files /dev/null and b/resources/programming/language/ruby.png differ diff --git a/resources/programming/language/swift.png b/resources/programming/language/swift.png new file mode 100644 index 0000000..f1f79df Binary files /dev/null and b/resources/programming/language/swift.png differ diff --git a/resources/programming/language/typescript.png b/resources/programming/language/typescript.png new file mode 100644 index 0000000..8ad6479 Binary files /dev/null and b/resources/programming/language/typescript.png differ diff --git a/scripts/generate.py b/scripts/generate.py index 4e3ef42..7ec0a87 100644 --- a/scripts/generate.py +++ b/scripts/generate.py @@ -7,7 +7,7 @@ from jinja2 import Environment, FileSystemLoader, Template import config as cfg from . import app_root_dir, doc_root_dir, resource_dir, template_dir -_usage = "Usage: generate.py " +_usage = "Usage: generate.py " def load_tmpl(tmpl: str) -> Template: diff --git a/website/i18n/en.json b/website/i18n/en.json index ce2cc95..ac75a43 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -43,6 +43,9 @@ }, "nodes/onprem": { "title": "OnPrem" + }, + "nodes/programming": { + "title": "Programming" } }, "links": { diff --git a/website/pages/en/index.js b/website/pages/en/index.js index 39ed548..cc0bdca 100644 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -106,7 +106,7 @@ class Index extends React.Component { `Diagram as Code` allows you to **track** the architecture diagram changes in any **version control** system. - Diagrams currently supports six major providers: `AWS`, `Azure`, `GCP`, `Kubernetes`, `Alibaba Cloud` and `Oracle Cloud`. It now also supports `On-Premise` nodes. + Diagrams currently supports six major providers: `AWS`, `Azure`, `GCP`, `Kubernetes`, `Alibaba Cloud` and `Oracle Cloud`. It now also supports `On-Premise` nodes as well as `Programming Languages` and `Frameworks`. ); diff --git a/website/sidebars.json b/website/sidebars.json index fa68f8d..3e80df0 100644 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -17,7 +17,8 @@ "nodes/gcp", "nodes/k8s", "nodes/alibabacloud", - "nodes/oci" + "nodes/oci", + "nodes/programming" ] } } \ No newline at end of file