Skip to content

Commit 9e788a7

Browse files
committed
add feature coverage imports
1 parent 998c96c commit 9e788a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+271
-0
lines changed

add_imports.py

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
#!/usr/bin/env python3
2+
3+
import os
4+
import glob
5+
6+
def add_import_to_file(filepath):
7+
"""Add FeatureCoverage import after frontmatter if not already present"""
8+
9+
with open(filepath, 'r', encoding='utf-8') as f:
10+
lines = f.readlines()
11+
12+
# Check if import already exists
13+
if any('import FeatureCoverage' in line for line in lines):
14+
print(f"⏭️ {os.path.basename(filepath)} - Import already exists, skipping")
15+
return False
16+
17+
# Find the end of frontmatter (second occurrence of ---)
18+
frontmatter_end = -1
19+
dash_count = 0
20+
21+
for i, line in enumerate(lines):
22+
if line.strip() == '---':
23+
dash_count += 1
24+
if dash_count == 2:
25+
frontmatter_end = i
26+
break
27+
28+
if frontmatter_end == -1:
29+
print(f"❌ {os.path.basename(filepath)} - No frontmatter found, skipping")
30+
return False
31+
32+
# Insert import after frontmatter
33+
import_line = 'import FeatureCoverage from "../../../../components/feature-coverage/FeatureCoverage";\n'
34+
35+
# Insert blank line and import
36+
lines.insert(frontmatter_end + 1, '\n')
37+
lines.insert(frontmatter_end + 2, import_line)
38+
39+
# Write back to file
40+
with open(filepath, 'w', encoding='utf-8') as f:
41+
f.writelines(lines)
42+
43+
print(f"✅ {os.path.basename(filepath)} - Import added")
44+
return True
45+
46+
def main():
47+
services_dir = "src/content/docs/aws/services"
48+
49+
if not os.path.exists(services_dir):
50+
print(f"Error: Directory {services_dir} does not exist")
51+
return
52+
53+
# Get all .mdx files
54+
mdx_files = glob.glob(f"{services_dir}/*.mdx")
55+
56+
if not mdx_files:
57+
print(f"No .mdx files found in {services_dir}")
58+
return
59+
60+
print(f"Processing {len(mdx_files)} MDX files...")
61+
62+
processed = 0
63+
skipped = 0
64+
65+
for filepath in mdx_files:
66+
if add_import_to_file(filepath):
67+
processed += 1
68+
else:
69+
skipped += 1
70+
71+
print(f"\nSummary:")
72+
print(f"✅ Processed: {processed} files")
73+
print(f"⏭️ Skipped: {skipped} files")
74+
print(f"🎉 Done!")
75+
76+
if __name__ == "__main__":
77+
main()

src/content/docs/aws/services/account.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ description: Get started with AWS Account Management on LocalStack
44
tags: ["Ultimate"]
55
---
66

7+
import FeatureCoverage from "../../../../components/feature-coverage/FeatureCoverage";
8+
79
## Introduction
810

911
Account service provides APIs to manage your AWS account.

src/content/docs/aws/services/acm.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ description: Get started with AWS Certificate Manager (ACM) on LocalStack
44
tags: ["Free"]
55
---
66

7+
import FeatureCoverage from "../../../../components/feature-coverage/FeatureCoverage";
8+
79
## Introduction
810

911
[AWS Certificate Manager (ACM)](https://aws.amazon.com/certificate-manager/) is a service that enables you to create and manage SSL/TLS certificates that can be used to secure your applications and resources in AWS.

src/content/docs/aws/services/amplify.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ tags: ["Ultimate"]
55
persistence: supported
66
---
77

8+
import FeatureCoverage from "../../../../components/feature-coverage/FeatureCoverage";
9+
810
## Introduction
911

1012
Amplify is a JavaScript-based development framework with libraries, UI components, and a standard CLI interface for building and deploying web and mobile applications.

src/content/docs/aws/services/apacheflink.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ description: >
55
tags: ["Ultimate"]
66
---
77

8+
import FeatureCoverage from "../../../../components/feature-coverage/FeatureCoverage";
9+
810
:::note
911
This service was formerly known as 'Kinesis Data Analytics for Apache Flink'.
1012
:::

src/content/docs/aws/services/apigateway.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ tags: ["Free", "Base"]
55
persistence: supported
66
---
77

8+
import FeatureCoverage from "../../../../components/feature-coverage/FeatureCoverage";
9+
810
## Introduction
911

1012
API Gateway is a managed service that enables developers to create, deploy, and manage APIs (Application Programming Interfaces).

src/content/docs/aws/services/appautoscaling.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ tags: ["Base"]
55
persistence: supported
66
---
77

8+
import FeatureCoverage from "../../../../components/feature-coverage/FeatureCoverage";
9+
810
## Introduction
911

1012
Application Auto Scaling is a centralized solution for managing automatic scaling by defining scaling policies based on specific metrics.

src/content/docs/aws/services/appconfig.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ description: Get started with AppConfig on LocalStack
44
tags: ["Base"]
55
---
66

7+
import FeatureCoverage from "../../../../components/feature-coverage/FeatureCoverage";
8+
79
AppConfig is a service provided by Amazon Web Services (AWS) that simplifies the process of managing and deploying application configurations.
810
AppConfig offers centralized management of configuration data and the ability to create, manage, and deploy configuration changes separately.
911
It allows you to avoid deploying the service repeatedly for smaller changes, enables controlled deployments to applications and includes built-in validation checks & monitoring.

src/content/docs/aws/services/appsync.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ description: Get started with AppSync on LocalStack
44
tags: ["Ultimate"]
55
---
66

7+
import FeatureCoverage from "../../../../components/feature-coverage/FeatureCoverage";
8+
79
## Introduction
810

911
AppSync is a managed service provided by Amazon Web Services (AWS) that enables you to create serverless GraphQL APIs to query databases, microservices, and other APIs.

src/content/docs/aws/services/athena.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ description: Get started with Athena on LocalStack
44
tags: ["Ultimate"]
55
---
66

7+
import FeatureCoverage from "../../../../components/feature-coverage/FeatureCoverage";
8+
79
import { Tabs, TabItem } from '@astrojs/starlight/components';
810

911
## Introduction

0 commit comments

Comments
 (0)