Add comic support, add latest artwork
This commit is contained in:
parent
f81ecab924
commit
edf819f2d4
7 changed files with 108 additions and 7 deletions
BIN
assets/comic.png
Normal file
BIN
assets/comic.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
24
comic/big-bunny.json
Normal file
24
comic/big-bunny.json
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"date": "2024-03-30",
|
||||
"title": "Big Bunny 🐰",
|
||||
"tags": ["Comic"],
|
||||
"characters": ["Mysterious Swordswoman"],
|
||||
"mastodon_url": "https://mastodon.art/@redstrate/112187076950789997",
|
||||
"pixiv_url": "https://www.pixiv.net/artworks/117405970",
|
||||
"newgrounds_url": "https://www.newgrounds.com/art/view/redstrate/big-bunny",
|
||||
"program": "Krita",
|
||||
"pages": [
|
||||
{
|
||||
"filename": "big-bunny",
|
||||
"alt_text": "Comic strip made up of four panels. The first panel has one girl putting up a poster on the side of a store wall. Another woman is walking nearby, but the other says 'Huh?' and 'Ma'am! Please wait!' The second panel has the first girl asking 'Would you please try on something for me?' while looking amazed. The other girl asks the following in the next two panels, as the first holds up her hands to imagine a picture. 'Well I dunno, is it gaudy?' 'I'm not exactly the fancy-type' and finally, 'I don't have any money.' The first woman replies 'I just need someone to try it on. That's all!'"
|
||||
},
|
||||
{
|
||||
"filename": "big-bunny2",
|
||||
"alt_text": "Two panels make up this comic. The first bubble sets up that it's 'Some time later...' The other woman is now clothed in a one-piece dark bunny suit, with long white gloves. The other girl is behind her, with a measurement tape. She asks 'See? Isn't it cute? ❤︎' and the other respons 'Sure, but it barely fits me.' 'Really? I'm sure I fit it correctly.' In the next panel, the woman in the bunnysuit is eating a carrot. She says 'A carrot too? It's pretty dry.' Off-panel, the other girl says 'Ma'am, that's for decoration...' In the last panel it's a drawing of a door, specifically the bell above it ringing as it swings open."
|
||||
},
|
||||
{
|
||||
"filename": "big-bunny3",
|
||||
"alt_text": "This comic is made up of one panel. Behind the woman in the bunnysuit, there stands a gigantic bunny monster with large red eyes. It has both of it's sharp claws in the air. The woman says 'Did someone come in?' and also 'Hey, have you noticed how high your ceilings are?' The last bubble is 'She quickly regretted leaving her sword at the inn.'"
|
||||
}
|
||||
]
|
||||
}
|
23
content/art/2024/big-bunny.md
Normal file
23
content/art/2024/big-bunny.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
title: "Big Bunny 🐰"
|
||||
date: 2024-03-30
|
||||
layout: art-detail
|
||||
filename: /art/big-bunny.webp
|
||||
comic: true
|
||||
pages:
|
||||
- filename: big-bunny
|
||||
alt_text: Comic strip made up of four panels. The first panel has one girl putting up a poster on the side of a store wall. Another woman is walking nearby, but the other says 'Huh?' and 'Ma'am! Please wait!' The second panel has the first girl asking 'Would you please try on something for me?' while looking amazed. The other girl asks the following in the next two panels, as the first holds up her hands to imagine a picture. 'Well I dunno, is it gaudy?' 'I'm not exactly the fancy-type' and finally, 'I don't have any money.' The first woman replies 'I just need someone to try it on. That's all!'
|
||||
- filename: big-bunny2
|
||||
alt_text: Two panels make up this comic. The first bubble sets up that it's 'Some time later...' The other woman is now clothed in a one-piece dark bunny suit, with long white gloves. The other girl is behind her, with a measurement tape. She asks 'See? Isn't it cute? ❤︎' and the other respons 'Sure, but it barely fits me.' 'Really? I'm sure I fit it correctly.' In the next panel, the woman in the bunnysuit is eating a carrot. She says 'A carrot too? It's pretty dry.' Off-panel, the other girl says 'Ma'am, that's for decoration...' In the last panel it's a drawing of a door, specifically the bell above it ringing as it swings open.
|
||||
- filename: big-bunny3
|
||||
alt_text: This comic is made up of one panel. Behind the woman in the bunnysuit, there stands a gigantic bunny monster with large red eyes. It has both of it's sharp claws in the air. The woman says 'Did someone come in?' and also 'Hey, have you noticed how high your ceilings are?' The last bubble is 'She quickly regretted leaving her sword at the inn.'
|
||||
slug: big-bunny
|
||||
characters:
|
||||
- Mysterious Swordswoman
|
||||
arttags:
|
||||
- comic
|
||||
mastodon_url: https://mastodon.art/@redstrate/112187076950789997
|
||||
pixiv_url: https://www.pixiv.net/artworks/117405970
|
||||
newgrounds_url: https://www.newgrounds.com/art/view/redstrate/big-bunny
|
||||
program: Krita
|
||||
---
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Stats
|
||||
layout: art-stats
|
||||
total: 226
|
||||
total: 227
|
||||
years:
|
||||
- year: 2019
|
||||
num: 60
|
||||
|
@ -14,7 +14,7 @@ years:
|
|||
- year: 2021
|
||||
num: 27
|
||||
- year: 2024
|
||||
num: 12
|
||||
num: 13
|
||||
- year: 2018
|
||||
num: 7
|
||||
- year: 2016
|
||||
|
@ -23,7 +23,7 @@ years:
|
|||
num: 1
|
||||
characters:
|
||||
- name: Mysterious Swordswoman
|
||||
num: 15
|
||||
num: 16
|
||||
- name: Juritta
|
||||
num: 14
|
||||
- name: Merume
|
||||
|
@ -45,10 +45,10 @@ characters:
|
|||
tags:
|
||||
- name: technical
|
||||
num: 1
|
||||
- name: comic
|
||||
num: 2
|
||||
- name: animation
|
||||
num: 2
|
||||
- name: comic
|
||||
num: 3
|
||||
- name: oil painting
|
||||
num: 4
|
||||
- name: artfight
|
||||
|
|
|
@ -10,7 +10,7 @@ def write_field(f, key, value):
|
|||
f.write(key + ": " + value + "\n")
|
||||
|
||||
|
||||
def parse_art_json(output_directory, filename, json_file, threed = False, animation = False, guest = False):
|
||||
def parse_art_json(output_directory, filename, json_file, threed = False, animation = False, guest = False, comic = False):
|
||||
print(filename)
|
||||
|
||||
json_data = json.load(json_file)
|
||||
|
@ -63,6 +63,13 @@ def parse_art_json(output_directory, filename, json_file, threed = False, animat
|
|||
else:
|
||||
write_field(f, 'filename', '/art/' + filename + '.webp')
|
||||
|
||||
if comic:
|
||||
write_field(f, 'comic', 'true')
|
||||
f.write('pages:\n')
|
||||
for page in json_data["pages"]:
|
||||
f.write('- filename: ' + page["filename"] + "\n")
|
||||
f.write(' alt_text: ' + page["alt_text"] + "\n")
|
||||
|
||||
if "alt_text" in json_data:
|
||||
write_field(f, 'alt_text',
|
||||
"\"" + json_data["alt_text"].replace('\n', '').replace('"', '\\"') + "\"")
|
||||
|
@ -153,6 +160,7 @@ characters_data_directory = '../characters'
|
|||
art_output_directory = '../content/art'
|
||||
guest_art_data_directory = '../guestart'
|
||||
characters_output_directory = '../content/characters'
|
||||
comic_data_directory = '../comic'
|
||||
|
||||
shutil.rmtree(art_output_directory)
|
||||
os.mkdir(art_output_directory)
|
||||
|
@ -270,6 +278,35 @@ for filename in os.listdir(animation_data_directory):
|
|||
collected_years.add(year)
|
||||
total_art += 1
|
||||
|
||||
for filename in os.listdir(comic_data_directory):
|
||||
f = os.path.join(comic_data_directory, filename)
|
||||
|
||||
if os.path.isfile(f):
|
||||
filename_without_ext = os.path.splitext(filename)[0]
|
||||
|
||||
with open(f, "r") as file:
|
||||
year, characters, tags = parse_art_json(art_output_directory, filename_without_ext, file, False, False, False, True)
|
||||
|
||||
if year in year_stats:
|
||||
year_stats[year] += 1
|
||||
else:
|
||||
year_stats[year] = 1
|
||||
|
||||
for character in characters:
|
||||
if character in character_stats:
|
||||
character_stats[character] += 1
|
||||
else:
|
||||
character_stats[character] = 1
|
||||
|
||||
for tag in tags:
|
||||
if tag in tag_stats:
|
||||
tag_stats[tag] += 1
|
||||
else:
|
||||
tag_stats[tag] = 1
|
||||
|
||||
collected_years.add(year)
|
||||
total_art += 1
|
||||
|
||||
for year in collected_years:
|
||||
with open(os.path.join(art_output_directory, str(year), '_index.md'), 'w') as f:
|
||||
f.write('---\n')
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
{{ $month = int (index $split 3) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (ge (int $year) 2023) (and (not $.Params.animation) (and (not (in .File.Dir "art/guest")) (not $.Params.threed)) ) }}
|
||||
{{ if and (ge (int $year) 2023) (and (not $.Params.animation) (and (not (in .File.Dir "art/guest")) (and (not $.Params.threed) (not $.Params.comic) )) ) }}
|
||||
{{ $full := printf "https://images.redstrate.com/art/%s.avif" $.Params.slug }}
|
||||
{{ $jpeg := printf "https://images.redstrate.com/art/%s.jpg" $.Params.slug }}
|
||||
|
||||
|
@ -44,6 +44,17 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $.Params.comic }}
|
||||
{{ range $.Params.pages }}
|
||||
{{ $full := printf "https://images.redstrate.com/art/%s.avif" .filename }}
|
||||
{{ $jpeg := printf "https://images.redstrate.com/art/%s.jpg" .filename}}
|
||||
|
||||
<picture>
|
||||
<source srcset="{{ $full }}" type="image/avif"/>
|
||||
<img class="gallery-img" style="display: block; max-height: 1000px; margin-left: auto; margin-right: auto; width: auto; margin-top: 10px; margin-bottom: 10px; max-width: 100%; height: auto" alt="{{ .alt_text }}" src="{{ $jpeg }}"/>
|
||||
</picture>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "voting" . }}
|
||||
|
||||
|
|
|
@ -49,6 +49,12 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $.Params.comic }}
|
||||
{{ with resources.Get "comic.png" }}
|
||||
<img alt="Comic icon" title="Viewable Comic" style="z-index: 1; position: absolute; left: 10px; top: 10px; border: none" src="{{ .RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $.Params.animation }}
|
||||
{{ with resources.Get "play-circle.png" }}
|
||||
<img alt="Play animation icon" title="Viewable Animation" style="z-index: 1; position: absolute; left: 10px; top: 10px; border: none" src="{{ .RelPermalink }}">
|
||||
|
|
Loading…
Add table
Reference in a new issue