Skip to content

Commit

Permalink
Merge pull request #102 from singlestore-labs/fs/add-new-card-images
Browse files Browse the repository at this point in the history
Add new card/header images
  • Loading branch information
fcmsilva authored Jun 21, 2024
2 parents 0a6c6ec + 6e2f318 commit a8b14f2
Show file tree
Hide file tree
Showing 19 changed files with 16 additions and 0 deletions.
Binary file added common/images/card-header-icons/ai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/images/card-header-icons/ingest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/images/card-header-icons/integrations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/images/card-header-icons/kai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/images/card-header-icons/notebook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/images/card-header-icons/python-sdk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/images/card-header-icons/real-time.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/images/preview-header-icons/ai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/images/preview-header-icons/ingest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/images/preview-header-icons/kai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/images/preview-header-icons/notebook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/images/preview-header-icons/python-sdk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/images/preview-header-icons/real-time.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions resources/toml-check.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#!/usr/bin/env python3
import os
import re
import sys
import tomllib


def kebab_case(string):
# Naive implementation of kebab case to find icon names from lesson areas
return re.sub(r'[^a-zA-Z0-9]+', '-', string.strip()).lower()


def error(msg):
print('ERROR:', msg, file=sys.stderr)
sys.exit(1)
Expand Down Expand Up @@ -69,3 +75,13 @@ def error(msg):

if destinations and [x for x in destinations if x != 'spaces']:
error(f'Only "spaces" is allowed in `destinations` in {f}')

card_icons = os.listdir('common/images/card-header-icons')
preview_icons = os.listdir('common/images/preview-header-icons')

for lesson_area in meta['lesson_areas']:
expected_icon_name = f'{kebab_case(lesson_area)}.png'
if expected_icon_name not in card_icons:
error(f'Lesson area {lesson_area} not found in card icons')
if expected_icon_name not in preview_icons:
error(f'Lesson area {lesson_area} not found in preview icons')

0 comments on commit a8b14f2

Please sign in to comment.