(extract-image-name image-path)Extracts the image name from a URL or file path.
This function takes a URL or file path as input and returns the base name of the image file. It handles both URLs and local file paths.
Example: (extract-image-name "https://example.com/images/minecraft_skin.png") ;=> "minecraft_skin.png"
(extract-image-name "local_image.jpg") ;=> "local_image.jpg"
Extracts the image name from a URL or file path. This function takes a URL or file path as input and returns the base name of the image file. It handles both URLs and local file paths. Example: (extract-image-name "https://example.com/images/minecraft_skin.png") ;=> "minecraft_skin.png" (extract-image-name "local_image.jpg") ;=> "local_image.jpg"
(generate-minecraft-skin-url image-filename)Generates a URL for turning an image into a Minecraft skin on supermaker.ai.
Takes an image filename (or URL) as input and returns the complete URL. The filename should be relative to the image directory or a full URL.
Example: (generate-minecraft-skin-url "my_image.png") ;=> "https://supermaker.ai/image/skin?image=my_image.png"
(generate-minecraft-skin-url "https://example.com/my_image.png") ;=> "https://supermaker.ai/image/skin?image=https://example.com/my_image.png"
Generates a URL for turning an image into a Minecraft skin on supermaker.ai. Takes an image filename (or URL) as input and returns the complete URL. The filename should be relative to the image directory or a full URL. Example: (generate-minecraft-skin-url "my_image.png") ;=> "https://supermaker.ai/image/skin?image=my_image.png" (generate-minecraft-skin-url "https://example.com/my_image.png") ;=> "https://supermaker.ai/image/skin?image=https://example.com/my_image.png"
(mock-skin-data image-name)Generates mock data representing a Minecraft skin.
This function creates a map containing mock data related to a Minecraft skin, including the image URL, skin name, and upload date. Useful for testing and demonstration purposes.
Example: (mock-skin-data "steve.png") ;=> {:image-url "https://example.com/steve.png", ; :skin-name "steve", ; :upload-date "2024-01-01"}
Generates mock data representing a Minecraft skin.
This function creates a map containing mock data related to a Minecraft skin,
including the image URL, skin name, and upload date. Useful for testing
and demonstration purposes.
Example:
(mock-skin-data "steve.png")
;=> {:image-url "https://example.com/steve.png",
; :skin-name "steve",
; :upload-date "2024-01-01"}cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |