diff --git a/Makefile b/Makefile
index e8ab3aa..b844182 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,9 @@ setup: ## Establish local environment with dependencies installed
.venv/bin/pip install -r requirements.txt
mkdir -p data/uploads
+setup-dev: ## Install development dependencies
+ .venv/bin/pip install -r requirements-dev.txt
+
build: ## Build containers
docker-compose build
diff --git a/nerochan/cli.py b/nerochan/cli.py
index 0309572..bdd8e60 100644
--- a/nerochan/cli.py
+++ b/nerochan/cli.py
@@ -1,4 +1,6 @@
import click
+import lorem
+
from os import path, makedirs
from urllib.request import urlopen
@@ -28,7 +30,23 @@ def cli(app):
'wallet': '77toDDnVmSrWMZ5tS17UWXcxQVkD6LtNSArVwzsWdE176oDbYtPTiAqExjDZWGE5KwKPY7Kd1BcWYfCnJuL2RfcqA1gzoEj',
'art': [
'https://www.monerochan.art/commissions/hammock.png',
- 'https://www.monerochan.art/commissions/assaultrifle.png'
+ 'https://www.monerochan.art/commissions/assaultrifle.png',
+ 'https://www.monerochan.art/thumbnails/vtubing.png',
+ 'https://www.monerochan.art/commissions/ribbons.jpg',
+ 'https://www.monerochan.art/commissions/mining.jpg',
+ 'https://www.monerochan.art/commissions/wownerochan_headpat.png',
+ 'https://www.monerochan.art/commissions/wownerochan.jpg'
+ ]
+ },
+ 'gemini': {
+ 'wallet': '78TanhCTvw4V8HkY3vD49A5EiyeGCzCHQUm59sByukTcffZPf3QHoK8PDg8WpMUc6VGwqxTu65HvwCUfB2jZutb6NKpjArk',
+ 'art': [
+ 'https://www.monerochan.art/commissions/cheerleader.jpg',
+ 'https://www.monerochan.art/commissions/maidnero-chan.png',
+ 'https://www.monerochan.art/commissions/dandelion.png',
+ 'https://www.monerochan.art/commissions/volleyball_1.jpg',
+ 'https://www.monerochan.art/commissions/volleyball_2.jpg',
+ 'https://www.monerochan.art/commissions/virgin_killer.png'
]
}
}
@@ -59,8 +77,8 @@ def cli(app):
creator=_user,
image=bn,
approved=True,
- title=f'i made {bn}',
- description=''
+ title=lorem.sentence(),
+ description=lorem.sentence()
)
artwork.save()
click.echo(f'[+] Created artwork {artwork.id} for {bn}')
diff --git a/nerochan/models.py b/nerochan/models.py
index 3463c26..e5f2926 100644
--- a/nerochan/models.py
+++ b/nerochan/models.py
@@ -25,7 +25,7 @@ class User(pw.Model):
register_date = pw.DateTimeField(default=datetime.utcnow)
last_login_date = pw.DateTimeField(default=datetime.utcnow)
handle = pw.CharField(unique=True)
- wallet_address = pw.CharField(unique=True)
+ wallet_address = pw.CharField(unique=True, null=False)
challenge = pw.CharField(default=gen_challenge)
is_admin = pw.BooleanField(default=False)
is_mod = pw.BooleanField(default=False)
@@ -82,13 +82,16 @@ class Artwork(pw.Model):
id = pw.AutoField()
creator = pw.ForeignKeyField(User)
image = pw.CharField()
- thumbnail = pw.CharField(null=True)
upload_date = pw.DateTimeField(default=datetime.utcnow)
last_edit_date = pw.DateTimeField(default=datetime.utcnow)
approved = pw.BooleanField(default=False)
hidden = pw.BooleanField(default=False)
title = pw.CharField()
description = pw.TextField(null=True)
+
+ @property
+ def thumbnail(self):
+ return f'thumbnail-{self.image}'
def generate_thumbnail(self):
is_gif = self.image.endswith('.gif')
@@ -113,7 +116,7 @@ class Artwork(pw.Model):
_image.save(t, format=image.format, save_all=True, append_images=list(_frames), disposal=2)
else:
image.thumbnail(size, Image.ANTIALIAS)
- image.save(t, format=image.format, quality=75)
+ image.save(t, format=image.format)
image.close()
self.thumbnail = _t
self.save()
diff --git a/nerochan/routes/artwork.py b/nerochan/routes/artwork.py
index 4a76124..a29f8de 100644
--- a/nerochan/routes/artwork.py
+++ b/nerochan/routes/artwork.py
@@ -6,6 +6,10 @@ from nerochan.models import Artwork, User
bp = Blueprint('artwork', 'artwork', url_prefix='/artwork')
+@bp.route('')
+def list():
+ return 'show all artwork'
+
@bp.route('/ nerochan, uwu
+ This site is dedicated to the Monero communities' favorite e-girl, Monero-Chan.
+
+ Made with <3 by @lza_menace.
+ Send him a tip: 49awrmn61ExDUZrV5wJxMM54fxVzHABUYUBNBskLJbxzVwk1KqfrFvdcPNK6RKY2qyfGbcpXP3mbofmnMmFKiFHSCB6jLFA
+ {{ artwork.creator.handle }} {{ artwork.description }} {{ artwork.creator.wallet_address }} Handle: {{ user.handle }} Challenge: {{ user.challenge }} Wallet Address: {{ user.wallet_address }} Handle: {{ user.handle }} Challenge: {{ user.challenge }} Wallet Address: {{ user.wallet_address }}
- {% for category, message in messages %}
- {{ message }} - {{ category }}about
-about
+ {{ artwork.title }}
- {{ artwork.title }}
+
+ Posted by {{ artwork.creator.handle }} - {{ artwork.upload_date | humanize }}
+
+
+ Send a Tip
+
+
+
+
+
+
+
+ TXID
+ XMR
+ Date
+
+
+ e599...5429
+ .05
+ 3 days ago
+
+
+
+ 681a...e264
+ .25
+ 28 days ago
+ Challenge
-challenge
+ Login
-{% include 'includes/form.html' %}
+login
+ {% include 'includes/form.html' %}
+ Register
+ Register
-{% include 'includes/form.html' %}
+
+register
+ {% include 'includes/form.html' %}
+ Login
+ {{ config.SITE_NAME }}
-
-
+ {% for category, message in messages %} +
{{ message }} - {{ category }}
+ {% endfor %} + + {% endif %} +{% endwith %} +