Begin adding character infog
6
characters/merume.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"name": "Merume",
|
||||
"description": "A four-armed succubus with long elven ears, and a tail. She usually ties her blue hair into pigtails. She enjoys cooking (only when she's by herself) and of course, playing way too much video games in her free time.",
|
||||
"age": "???",
|
||||
"pronouns": "she/her"
|
||||
}
|
6
characters/mysterious-swordswoman.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"name": "Mysterious Swordswoman",
|
||||
"description": "She is a talented swordsman and nomad that travels from town to town in the countryside.",
|
||||
"age": "???",
|
||||
"pronouns": "she/her"
|
||||
}
|
8
content/characters/merume/_index.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
layout: art-character
|
||||
title: Merume
|
||||
age: ???
|
||||
pronouns: she/her
|
||||
slug: merume
|
||||
---
|
||||
A four-armed succubus with long elven ears, and a tail. She usually ties her blue hair into pigtails. She enjoys cooking (only when she's by herself) and of course, playing way too much video games in her free time.
|
8
content/characters/mysterious-swordswoman/_index.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
layout: art-character
|
||||
title: Mysterious Swordswoman
|
||||
age: ???
|
||||
pronouns: she/her
|
||||
slug: mysterious-swordswoman
|
||||
---
|
||||
She is a talented swordsman and nomad that travels from town to town in the countryside.
|
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 527 KiB |
After Width: | Height: | Size: 261 KiB |
After Width: | Height: | Size: 409 KiB |
After Width: | Height: | Size: 498 KiB |
After Width: | Height: | Size: 486 KiB |
After Width: | Height: | Size: 431 KiB |
After Width: | Height: | Size: 197 KiB |
After Width: | Height: | Size: 362 KiB |
After Width: | Height: | Size: 469 KiB |
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 428 KiB |
After Width: | Height: | Size: 193 KiB |
After Width: | Height: | Size: 138 KiB |
|
@ -113,15 +113,50 @@ def parse_art_json(output_directory, filename, json_file, threed = False, animat
|
|||
return (year, characters, tags)
|
||||
|
||||
|
||||
def parse_character_json(output_directory, filename, json_file):
|
||||
print(f"parsed character: {filename}")
|
||||
|
||||
json_data = json.load(json_file)
|
||||
|
||||
base_directory = os.path.join(characters_output_directory, filename)
|
||||
if not os.path.exists(base_directory):
|
||||
os.mkdir(base_directory)
|
||||
|
||||
with open(os.path.join(base_directory, '_index.md'), 'w') as f:
|
||||
f.write('---\n')
|
||||
|
||||
write_field(f, 'layout', 'art-character')
|
||||
|
||||
write_field(f, 'title', json_data["name"])
|
||||
|
||||
if "age" in json_data:
|
||||
write_field(f, 'age', json_data["age"])
|
||||
|
||||
if "pronouns" in json_data:
|
||||
write_field(f, 'pronouns', json_data["pronouns"])
|
||||
|
||||
write_field(f, 'slug', filename)
|
||||
|
||||
f.write('---\n')
|
||||
|
||||
if "description" in json_data:
|
||||
f.write(json_data["description"])
|
||||
f.write('\n')
|
||||
|
||||
art_data_directory = '../art'
|
||||
threed_data_directory = '../3d'
|
||||
animation_data_directory = '../animation'
|
||||
characters_data_directory = '../characters'
|
||||
art_output_directory = '../content/art'
|
||||
guest_art_data_directory = '../guestart'
|
||||
characters_output_directory = '../content/characters'
|
||||
|
||||
shutil.rmtree(art_output_directory)
|
||||
os.mkdir(art_output_directory)
|
||||
|
||||
shutil.rmtree(characters_output_directory)
|
||||
os.mkdir(characters_output_directory)
|
||||
|
||||
collected_years = set()
|
||||
year_stats = {}
|
||||
total_art = 0
|
||||
|
@ -162,6 +197,18 @@ for filename in os.listdir(art_data_directory):
|
|||
collected_years.add(year)
|
||||
total_art += 1
|
||||
|
||||
for filename in os.listdir(characters_data_directory):
|
||||
f = os.path.join(characters_data_directory, filename)
|
||||
|
||||
if os.path.isfile(f):
|
||||
filename_without_ext = os.path.splitext(filename)[0]
|
||||
|
||||
if filename_without_ext == ".DS_Store" or filename_without_ext == ".directory":
|
||||
continue
|
||||
|
||||
with open(f, "r") as file:
|
||||
parse_character_json(characters_data_directory, filename_without_ext, file)
|
||||
|
||||
for filename in os.listdir(threed_data_directory):
|
||||
f = os.path.join(threed_data_directory, filename)
|
||||
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
{{ define "main" }}
|
||||
<h2>{{ .Title }}</h2>
|
||||
<hr>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Age</th>
|
||||
<td>{{ .Params.age }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Pronouns</th>
|
||||
<td>{{ .Params.pronouns }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{{ partial "art-tag" . }}
|
||||
{{ end }}
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
<h2>{{ .Title }}</h2>
|
||||
<hr>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
{{ partial "art-gallery" . }}
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
{{ define "main" }}
|
||||
<h2>{{ .Title }}</h2>
|
||||
<hr>
|
||||
|
||||
{{ partial "art-tag" . }}
|
||||
{{ end }}
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
{{ define "main" }}
|
||||
<h2>{{ .Title }}</h2>
|
||||
<hr>
|
||||
|
||||
{{ partial "art-tag" . }}
|
||||
{{ end }}
|
||||
|
|