diff --git a/autogen.sh b/autogen.sh index 3b105ada4..b5dc831d1 100755 --- a/autogen.sh +++ b/autogen.sh @@ -4,7 +4,7 @@ set -e app_root_dir="diagrams" # NOTE: azure icon set is not latest version -providers=("onprem" "aws" "azure" "gcp" "firebase" "k8s" "alibabacloud" "oci" "programming") +providers=("onprem" "aws" "azure" "gcp" "firebase" "k8s" "alibabacloud" "oci" "programming" "saas") if ! [ -x "$(command -v round)" ]; then echo 'round is not installed' diff --git a/config.py b/config.py index 8809a2667..275baaabe 100644 --- a/config.py +++ b/config.py @@ -11,7 +11,7 @@ DIR_RESOURCE = "resources" DIR_TEMPLATE = "templates" -PROVIDERS = ("base", "onprem", "aws", "azure", "gcp", "firebase", "k8s", "alibabacloud", "oci", "programming") +PROVIDERS = ("base", "onprem", "aws", "azure", "gcp", "firebase", "k8s", "alibabacloud", "oci", "programming", "saas") ######################### # Resource Processing # @@ -34,6 +34,7 @@ "alibabacloud": (), "oci": ("OCI-",), "programming": (), + "saas": (), } ######################### @@ -354,4 +355,5 @@ "Typescript": "TypeScript" }, }, + "saas": {}, } diff --git a/diagrams/saas/__init__.py b/diagrams/saas/__init__.py new file mode 100644 index 000000000..ecae1d803 --- /dev/null +++ b/diagrams/saas/__init__.py @@ -0,0 +1,12 @@ +""" +Saas provides a set of general saas services. +""" + +from diagrams import Node + + +class _Saas(Node): + _provider = "saas" + _icon_dir = "resources/saas" + + fontcolor = "#ffffff" diff --git a/diagrams/saas/chat.py b/diagrams/saas/chat.py new file mode 100644 index 000000000..ebdf0532f --- /dev/null +++ b/diagrams/saas/chat.py @@ -0,0 +1,19 @@ +# This module is automatically generated by autogen.sh. DO NOT EDIT. + +from . import _Saas + + +class _Chat(_Saas): + _type = "chat" + _icon_dir = "resources/saas/chat" + + +class Slack(_Chat): + _icon = "slack.png" + + +class Telegram(_Chat): + _icon = "telegram.png" + + +# Aliases diff --git a/diagrams/saas/social.py b/diagrams/saas/social.py new file mode 100644 index 000000000..6ad326db5 --- /dev/null +++ b/diagrams/saas/social.py @@ -0,0 +1,19 @@ +# This module is automatically generated by autogen.sh. DO NOT EDIT. + +from . import _Saas + + +class _Social(_Saas): + _type = "social" + _icon_dir = "resources/saas/social" + + +class Facebook(_Social): + _icon = "facebook.png" + + +class Twitter(_Social): + _icon = "twitter.png" + + +# Aliases diff --git a/docs/nodes/saas.md b/docs/nodes/saas.md new file mode 100644 index 000000000..4e7ae8828 --- /dev/null +++ b/docs/nodes/saas.md @@ -0,0 +1,16 @@ +--- +id: saas +title: Saas +--- + +Node classes list of saas provider. + +## saas.chat + +- **diagrams.saas.chat.Slack** +- **diagrams.saas.chat.Telegram** + +## saas.social + +- **diagrams.saas.social.Facebook** +- **diagrams.saas.social.Twitter** diff --git a/resources/saas/chat/slack.png b/resources/saas/chat/slack.png new file mode 100644 index 000000000..b2cf219e8 Binary files /dev/null and b/resources/saas/chat/slack.png differ diff --git a/resources/saas/chat/telegram.png b/resources/saas/chat/telegram.png new file mode 100644 index 000000000..d52b904cb Binary files /dev/null and b/resources/saas/chat/telegram.png differ diff --git a/resources/saas/social/facebook.png b/resources/saas/social/facebook.png new file mode 100755 index 000000000..3ffb63c6c Binary files /dev/null and b/resources/saas/social/facebook.png differ diff --git a/resources/saas/social/twitter.png b/resources/saas/social/twitter.png new file mode 100644 index 000000000..8320d575b Binary files /dev/null and b/resources/saas/social/twitter.png differ diff --git a/scripts/generate.py b/scripts/generate.py index 412def774..a7e04b780 100644 --- a/scripts/generate.py +++ b/scripts/generate.py @@ -7,7 +7,7 @@ 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/scripts/resource.py b/scripts/resource.py index 138533a8d..41e44130e 100644 --- a/scripts/resource.py +++ b/scripts/resource.py @@ -94,6 +94,10 @@ def cleaner_programming(f): return f.lower() +def cleaner_saas(f): + return f.lower() + + cleaners = { "onprem": cleaner_onprem, "aws": cleaner_aws, @@ -104,6 +108,7 @@ def cleaner_programming(f): "alibabacloud": cleaner_alibabacloud, "oci": cleaner_oci, "programming": cleaner_programming, + "saas": cleaner_saas, }