Add lost files

This commit is contained in:
Joshua Goins 2023-04-13 11:45:52 -04:00
parent 6fd782c676
commit 9e51832f76
35 changed files with 152 additions and 42 deletions

View file

@ -1,4 +1,5 @@
{
"date": "2018",
"title": "Alley"
"title": "Alley",
"tags": ["3D"]
}

View file

@ -1,4 +1,5 @@
{
"date": "2018",
"title": "City Train"
"title": "City Train",
"tags": ["3D"]
}

View file

@ -1,4 +1,5 @@
{
"date": "2018",
"title": "Glass"
"title": "Glass",
"tags": ["3D"]
}

View file

@ -1,4 +1,5 @@
{
"date": "2018",
"title": "Hallway"
"title": "Hallway",
"tags": ["3D"]
}

View file

@ -1,4 +1,5 @@
{
"date": "2018",
"title": "Lemon"
"title": "Lemon",
"tags": ["3D"]
}

View file

@ -1,4 +1,5 @@
{
"date": "2016",
"title": "Cool-looking Monitor"
"title": "Cool-looking Monitor",
"tags": ["3D"]
}

View file

@ -1,4 +1,5 @@
{
"date": "2018",
"title": "Classroom"
"title": "Classroom",
"tags": ["3D"]
}

View file

@ -1,4 +1,5 @@
{
"date": "2017",
"title": "Unfinished Samus Wallpaper"
"title": "Unfinished Samus Wallpaper",
"tags": ["3D"]
}

View file

@ -4,5 +4,6 @@
],
"date": "2019",
"nsfw": false,
"title": "Sniper Girl"
"title": "Sniper Girl",
"tags": ["3D"]
}

View file

@ -1,4 +1,5 @@
{
"date": "2016",
"title": "Sniper Rifle"
"title": "Sniper Rifle",
"tags": ["3D"]
}

View file

@ -1,4 +1,5 @@
{
"date": "2016",
"title": "Spaceship"
"title": "Spaceship",
"tags": ["3D"]
}

View file

@ -1,4 +1,5 @@
{
"date": "2018",
"title": "TV"
"title": "TV",
"tags": ["3D"]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

View file

@ -57,30 +57,27 @@ menu:
- name: 'Art'
url: '/art'
weight: 2
- name: '3D'
url: '/3D'
weight: 3
- name: 'Music'
url: '/music'
weight: 4
weight: 3
- name: 'Software'
url: '/software'
weight: 5
weight: 4
- name: 'Videos'
url: 'https://tube.ryne.moe/@redchannel'
weight: 6
weight: 5
- name: 'Downloads'
url: '/downloads'
weight: 7
weight: 6
- name: 'Links'
url: '/links'
weight: 8
weight: 7
- name: 'Guestbook'
url: '/guestbook'
weight: 9
weight: 8
- name: 'About'
url: '/about'
weight: 10
weight: 9
footer:
- name: 'Blog Feed'
url: '/blog/index.xml'

View file

@ -3,6 +3,12 @@ title: Lantern
date: 2016-01-01
excludefeed: true
layout: art-detail
filename: /art/lantern.webp
filename: /3d/lantern.glb
orbit: 122.3deg 76deg 12.79m
alt_text: "A metal old-looking lantern."
slug: lantern
threed: true
arttags:
- 3d
nsfw: false
---

View file

@ -5,4 +5,6 @@ excludefeed: true
layout: art-detail
filename: /art/production-monitor.webp
slug: production-monitor
arttags:
- 3d
---

View file

@ -5,4 +5,6 @@ excludefeed: true
layout: art-detail
filename: /art/sniper-rifle.webp
slug: sniper-rifle
arttags:
- 3d
---

View file

@ -5,4 +5,6 @@ excludefeed: true
layout: art-detail
filename: /art/space.webp
slug: space
arttags:
- 3d
---

View file

@ -5,4 +5,6 @@ excludefeed: true
layout: art-detail
filename: /art/samus.webp
slug: samus
arttags:
- 3d
---

View file

@ -5,4 +5,6 @@ excludefeed: true
layout: art-detail
filename: /art/alley.webp
slug: alley
arttags:
- 3d
---

View file

@ -5,4 +5,6 @@ excludefeed: true
layout: art-detail
filename: /art/city-train.webp
slug: city-train
arttags:
- 3d
---

View file

@ -5,4 +5,6 @@ excludefeed: true
layout: art-detail
filename: /art/glass.webp
slug: glass
arttags:
- 3d
---

View file

@ -5,4 +5,6 @@ excludefeed: true
layout: art-detail
filename: /art/hallway.webp
slug: hallway
arttags:
- 3d
---

View file

@ -5,4 +5,6 @@ excludefeed: true
layout: art-detail
filename: /art/lemon.webp
slug: lemon
arttags:
- 3d
---

View file

@ -5,4 +5,6 @@ excludefeed: true
layout: art-detail
filename: /art/room.webp
slug: room
arttags:
- 3d
---

View file

@ -5,4 +5,6 @@ excludefeed: true
layout: art-detail
filename: /art/tv.webp
slug: tv
arttags:
- 3d
---

View file

@ -7,5 +7,7 @@ filename: /art/sniper-girl.webp
slug: sniper-girl
characters:
- Sniper Girl
arttags:
- 3d
nsfw: false
---

View file

@ -2,9 +2,12 @@
title: Nomadsculpt test
date: 2022-12-05
layout: art-detail
filename: /art/headsculpt.webp
filename: /3d/headsculpt.glb
alt_text: "A 3d sculpt of a short, brown haired girl. Its only a bust."
slug: headsculpt
threed: true
arttags:
- 3d
mastodon_url: https://mastodon.art/@redstrate/109459311625828312
program: Nomadsculpt
---

View file

@ -2,7 +2,7 @@
title: Art
layout: art
summary: My personal art gallery.
new_banner: You can now vote on artwork!
new_banner: You can now view select 3D pieces in your browser!
commissions: true
aliases:
- /gallery

View file

@ -1,21 +1,21 @@
---
title: Stats
layout: art-stats
total: 183
total: 187
years:
- year: 2019
num: 60
- year: 2022
num: 44
num: 46
- year: 2020
num: 29
- year: 2021
num: 27
num: 28
- year: 2023
num: 8
- year: 2018
num: 7
- year: 2016
num: 8
- year: 2018
num: 7
- year: 2017
num: 1
@ -26,12 +26,12 @@ characters:
num: 9
- name: Merume
num: 7
- name: Sakura
num: 5
- name: Mari
num: 5
- name: Asuka
num: 5
- name: Sakura
num: 4
- name: Mythra
num: 4
- name: Elisanne
@ -47,4 +47,6 @@ tags:
num: 7
- name: drawpile
num: 8
- name: 3d
num: 16
---

View file

@ -4,6 +4,6 @@
"goinghome",
"orbit-correction"
],
"new-banner": "You can now vote on artwork!",
"new-banner": "You can now view select 3D pieces in your browser!",
"commissions": true
}

View file

@ -7,7 +7,7 @@ def write_field(f, key, value):
f.write(key + ": " + value + "\n")
def parse_art_json(output_directory, filename, json_file):
def parse_art_json(output_directory, filename, json_file, threed = False):
json_data = json.load(json_file)
year = None
@ -36,6 +36,16 @@ def parse_art_json(output_directory, filename, json_file):
write_field(f, 'excludefeed', "true")
write_field(f, 'layout', 'art-detail')
if threed:
write_field(f, 'filename', '/3d/' + filename + '.glb')
if "camera-orbit" in json_data:
write_field(f, 'orbit', json_data["camera-orbit"])
if "camera-target" in json_data:
write_field(f, 'target', json_data["camera-target"])
if "camera-fov" in json_data:
write_field(f, 'fov', json_data["camera-fov"])
else:
write_field(f, 'filename', '/art/' + filename + '.webp')
if "alt_text" in json_data:
@ -44,6 +54,9 @@ def parse_art_json(output_directory, filename, json_file):
write_field(f, 'slug', filename)
if threed:
write_field(f, 'threed', 'true')
characters = []
if "characters" in json_data:
f.write("characters:\n")
@ -83,6 +96,7 @@ def parse_art_json(output_directory, filename, json_file):
art_data_directory = '../art'
threed_data_directory = '../3d'
art_output_directory = '../content/art'
shutil.rmtree(art_output_directory)
@ -125,6 +139,35 @@ for filename in os.listdir(art_data_directory):
collected_years.add(year)
total_art += 1
for filename in os.listdir(threed_data_directory):
f = os.path.join(threed_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, 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')

View file

@ -433,6 +433,8 @@ pre {
}
model-viewer {
width: 640px;
height: 480px;
height: 100vh;
width: 100%;
margin-left: auto;
margin-right: auto;
}

View file

@ -4,8 +4,15 @@
<hr>
{{ with resources.Get .Params.filename }}
{{ if $.Params.threed }}
{{ $cameraorbit := $.Params.orbit }}
{{ $cameratarget := $.Params.target }}
{{ $fov := $.Params.fov }}
<model-viewer src="{{ .RelPermalink }}" shadow-intensity="1" camera-controls touch-action="pan-y" camera-orbit="{{ $cameraorbit }}" camera-target="{{ $cameratarget }}" field-of-view="{{ $fov }}"></model-viewer>
{{ else }}
<img class="article-img" style="display: block; max-height: 1000px; margin-left: auto; margin-right: auto;" alt="{{ $.Params.alt_text }}" title="{{ $.Params.alt_text }}" src="{{ .RelPermalink }}"/>
{{ end }}
{{ end }}
<table>
<tr>
@ -90,5 +97,13 @@
</p>
{{ end }}
{{ if .Params.threed }}
{{ $site := resources.Get "js/model-viewer.min.js" }}
{{ if hugo.IsProduction }}
{{ $site = $site | fingerprint | resources.PostProcess }}
{{ end }}
<script type="module" src="{{ $site.RelPermalink }}" integrity="{{ $site.Data.Integrity }}"></script>
{{ end }}
{{ partial "comments" . }}
{{ end }}

View file

@ -1,4 +1,9 @@
{{ $full := resources.Get (printf "art/%s.webp" .Params.slug) }}
{{ $base := "art" }}
{{ if .Params.threed }}
{{ $base = "3d" }}
{{ end }}
{{ $full := resources.Get (printf "%s/%s.webp" $base .Params.slug) }}
{{ if $full }}
{{ $filename_without_ext := .Params.slug }}
@ -13,9 +18,10 @@
{{ end }}
<a class="no-decoration" href="{{ .Permalink }}">
{{ $path := printf "/art/%d/%.2d/%s" (int $year) (int $month) $filename_without_ext}}
{{ $path := printf "/%s/%d/%.2d/%s" $base (int $year) (int $month) $filename_without_ext}}
{{ $title := .Params.title }}
{{ $image := (resources.Get (printf "art/%s.webp" .Params.slug)).Resize "400x" }}
{{ $image := (resources.Get (printf "%s/%s.webp" $base .Params.slug)).Resize "400x" }}
{{ if .Params.nsfw }}
{{ $image = $image | images.Filter (images.GaussianBlur 6) (images.Pixelate 8) }}
@ -29,7 +35,7 @@
</a>
{{ else }}
<em>CANNOT FIND {{.Params.slug }}</em>
<em>CANNOT FIND {{ .Params.slug }}</em>
{{ end }}
`