You've already forked Openterface_assets
mirror of
https://github.com/TechxArtisanStudio/Openterface_assets.git
synced 2025-12-17 14:02:32 -08:00
upload images
This commit is contained in:
@@ -11,7 +11,7 @@ from pathlib import Path
|
|||||||
|
|
||||||
def find_image_files(directory):
|
def find_image_files(directory):
|
||||||
"""Find all image files that would be converted to WebP."""
|
"""Find all image files that would be converted to WebP."""
|
||||||
image_extensions = {'.png', '.jpg', '.jpeg'}
|
image_extensions = {'.png', '.jpg', '.jpeg', '.webp'}
|
||||||
svg_extensions = {'.svg'}
|
svg_extensions = {'.svg'}
|
||||||
image_files = []
|
image_files = []
|
||||||
svg_files = []
|
svg_files = []
|
||||||
@@ -35,8 +35,11 @@ def generate_markdown_links(image_files, base_url="https://assets.openterface.co
|
|||||||
markdown_lines = []
|
markdown_lines = []
|
||||||
|
|
||||||
for image_path in image_files:
|
for image_path in image_files:
|
||||||
# Convert to WebP extension
|
# If already WebP, keep as is; otherwise convert to WebP extension
|
||||||
webp_path = image_path.with_suffix('.webp')
|
if image_path.suffix.lower() == '.webp':
|
||||||
|
webp_path = image_path
|
||||||
|
else:
|
||||||
|
webp_path = image_path.with_suffix('.webp')
|
||||||
|
|
||||||
# Create the full URL
|
# Create the full URL
|
||||||
full_url = f"{base_url}/images/{webp_path}"
|
full_url = f"{base_url}/images/{webp_path}"
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ Copy and paste these links into your markdown files:
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
@@ -42,6 +44,8 @@ Copy and paste these links into your markdown files:
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
@@ -84,6 +88,8 @@ Copy and paste these links into your markdown files:
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
@@ -100,12 +106,28 @@ Copy and paste these links into your markdown files:
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
@@ -154,6 +176,8 @@ Copy and paste these links into your markdown files:
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
@@ -162,6 +186,8 @@ Copy and paste these links into your markdown files:
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 902 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 333 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 384 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.3 MiB |
Reference in New Issue
Block a user