mirror of
https://github.com/evennia/evennia.git
synced 2026-04-01 21:47:17 +02:00
Dec2022 Devblog
This commit is contained in:
parent
e5c9bb5bc5
commit
51c0fe260d
14 changed files with 833 additions and 536 deletions
|
|
@ -20,22 +20,24 @@ Here starts the main text ...
|
|||
"""
|
||||
|
||||
import glob
|
||||
from dataclasses import dataclass
|
||||
from collections import defaultdict
|
||||
from dateutil import parser as dateparser
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime
|
||||
from os import symlink, remove, chdir
|
||||
from os.path import abspath, dirname, join as pathjoin, sep
|
||||
from os import chdir, remove, symlink
|
||||
from os.path import abspath, dirname
|
||||
from os.path import join as pathjoin
|
||||
from os.path import sep
|
||||
|
||||
import jinja2
|
||||
import rfeed
|
||||
|
||||
import mistletoe
|
||||
from mistletoe import HTMLRenderer, BaseRenderer
|
||||
import rfeed
|
||||
from dateutil import parser as dateparser
|
||||
from mistletoe import HTMLRenderer
|
||||
from pygments import highlight
|
||||
from pygments.styles import get_style_by_name as get_style
|
||||
from pygments.lexers import get_lexer_by_name as get_lexer, guess_lexer
|
||||
from pygments.formatters.html import HtmlFormatter
|
||||
|
||||
from pygments.lexers import get_lexer_by_name as get_lexer
|
||||
from pygments.lexers import guess_lexer
|
||||
from pygments.styles import get_style_by_name as get_style
|
||||
|
||||
CURRDIR = dirname(abspath(__file__))
|
||||
SOURCE_DIR = pathjoin(CURRDIR, "markdown")
|
||||
|
|
@ -66,6 +68,7 @@ class BlogPost:
|
|||
A single blog post.
|
||||
|
||||
"""
|
||||
|
||||
title: str
|
||||
blurb: str
|
||||
permalink: str
|
||||
|
|
@ -86,6 +89,7 @@ class BlogPage:
|
|||
Represents one year/html page of blog posts.
|
||||
|
||||
"""
|
||||
|
||||
year: int
|
||||
permalink: str
|
||||
posts: list
|
||||
|
|
@ -97,10 +101,11 @@ class PygmentsRenderer(HTMLRenderer):
|
|||
Custom syntax highlighter for misteltoe (based on
|
||||
https://github.com/miyuchina/mistletoe/blob/master/contrib/pygments_renderer.py)
|
||||
"""
|
||||
|
||||
formatter = HtmlFormatter()
|
||||
formatter.noclasses = True
|
||||
|
||||
def __init__(self, *extras, style='default'):
|
||||
def __init__(self, *extras, style="default"):
|
||||
super().__init__(*extras)
|
||||
self.formatter.style = get_style(style)
|
||||
|
||||
|
|
@ -183,7 +188,7 @@ def md2html():
|
|||
pass
|
||||
else:
|
||||
meta = lines[:meta_end]
|
||||
lines = lines[meta_end + 1:]
|
||||
lines = lines[meta_end + 1 :]
|
||||
for line in meta:
|
||||
line = line.strip()
|
||||
if line.startswith("title:"):
|
||||
|
|
@ -196,16 +201,15 @@ def md2html():
|
|||
|
||||
# get first paragraph as blurb
|
||||
markdown_blurb = "\n".join(
|
||||
[line for line in lines if line and not line.startswith("!")][:3])
|
||||
[line for line in lines if line and not line.startswith("!")][:3]
|
||||
)
|
||||
markdown_post = "\n".join(lines)
|
||||
# convert markdown to html
|
||||
blurb = mistletoe.markdown(markdown_blurb, BaseRenderer)
|
||||
blurb = mistletoe.markdown(markdown_blurb)
|
||||
html = mistletoe.markdown(markdown_post, PygmentsRenderer)
|
||||
|
||||
# build the permalink
|
||||
anchor = "{}".format(
|
||||
date.strftime("%Y-%m-%d-" + "-".join(title.strip().lower().split()))
|
||||
)
|
||||
anchor = "{}".format(date.strftime("%Y-%m-%d-" + "-".join(title.strip().lower().split())))
|
||||
pagelink = OUTFILE_TEMPLATE.format(year=date.year)
|
||||
permalink = "{}#{}".format(pagelink, anchor)
|
||||
|
||||
|
|
@ -219,12 +223,10 @@ def md2html():
|
|||
date_short=date.strftime("%b %e"),
|
||||
date_sort=date.toordinal(),
|
||||
image_copyrights=image_copyrights,
|
||||
html=html
|
||||
html=html,
|
||||
)
|
||||
# populate template with jinja and readd to blogpost
|
||||
context = {
|
||||
"blogpost": blogpost
|
||||
}
|
||||
context = {"blogpost": blogpost}
|
||||
blogpost.html = post_template.render(context)
|
||||
|
||||
# store
|
||||
|
|
@ -241,7 +243,7 @@ def md2html():
|
|||
year=year,
|
||||
permalink=OUTFILE_TEMPLATE.format(year=year),
|
||||
posts=blogposts,
|
||||
calendar=calendar
|
||||
calendar=calendar,
|
||||
)
|
||||
)
|
||||
|
||||
|
|
@ -262,7 +264,7 @@ def md2html():
|
|||
"latest_blurb": latest_blurb,
|
||||
"pageyear": blogpage.year,
|
||||
"blogpage": blogpage,
|
||||
"blogpages": blogpages
|
||||
"blogpages": blogpages,
|
||||
}
|
||||
|
||||
html_page = blog_template.render(context)
|
||||
|
|
@ -271,6 +273,7 @@ def md2html():
|
|||
|
||||
return html_pages, rss_feed
|
||||
|
||||
|
||||
def build_pages(blog_pages):
|
||||
"""
|
||||
Generate devblog pages.
|
||||
|
|
@ -304,11 +307,11 @@ def build_pages(blog_pages):
|
|||
if year > latest_year:
|
||||
latest_year = year
|
||||
latest_page = filename.rsplit(sep, 1)[1] if sep in filename else filename
|
||||
with open(filename, 'w') as fil:
|
||||
with open(filename, "w") as fil:
|
||||
fil.write(html_page)
|
||||
|
||||
# build rss file
|
||||
with open(pathjoin(OUTDIR, RSS_FEED_FILE), 'w') as fil:
|
||||
with open(pathjoin(OUTDIR, RSS_FEED_FILE), "w") as fil:
|
||||
fil.write(rss_feed)
|
||||
|
||||
# link static resources and the start page
|
||||
|
|
|
|||
54
devblog/_src/markdown/2022-12-03-Evennia-1.0-released.md
Normal file
54
devblog/_src/markdown/2022-12-03-Evennia-1.0-released.md
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
title: Evennia 1.0 released!
|
||||
copyright: Griatch
|
||||
|
||||
---
|
||||
|
||||
|
||||

|
||||
<br>
|
||||
|
||||
As of today, [Evennia 1.0 released](https://github.com/evennia/evennia/discussions/3017)! This has been a long time coming. Not only were there a lot of fixes and features to add, we also moved to a completely new documentation system. With many moving parts and my wish to get as much as possible into this release, it took a while to get things aligned.
|
||||
|
||||
This release is also the first one where we distribute Evennia on Pypi, so you can install with `pip install evennia`. This also led to a lot of new work and documentation to write.
|
||||
|
||||
That said, it would have taken even longer if I had been alone - and I was not. The Evennia community is growing ever more active, and we now have a regular influx of PRs. I even get help fixing bugs at times! Not to mention a bunch of very sweet new contribs and implemented features. It feels super-luxurious to wake up and find a bug has been fixed for me!
|
||||
|
||||
Thanks a lot, everyone!
|
||||
|
||||
## Moving forward
|
||||
|
||||
The linked announcement above covers the new features of 1.0. Check it out - there's a lot of fun stuff. In this dev-blog, I wanted to talk a little bit about the future instead.
|
||||
|
||||
### Main is where it's at
|
||||
|
||||
As usual when the `develop` branch merges, activity shifts. So moving forward, the `main` branch (which is now what we use instead of `master`) will be the 'active' branch.
|
||||
|
||||
All new PRs and features should now be made against `main`. The `develop` branch will likely make its return as the bleeding-edge, but I hope that it will be mainly for testing individual complex features rather than for a huge new version like in the past.
|
||||
|
||||
### Versioning
|
||||
|
||||
In the past we have made big version changes: `0.5->0.6->0.7->0.8->0.9`. Then we got sort of stuck preparing for `1.0`, and there was an interim `0.9.5` release just to hold us over. In the end, `1.0` took almost two years to complete.
|
||||
|
||||
Having the `develop` branch open for this long is not good. Users of `0.9.5` were stuck with the old docs (just a plain import from the github wiki) since I couldn't maintain both. It meant stagnation for people downloading `master` branch. And while people in the know eventually switched to use `develop` branch (helping a lot of with testing!) it's still not an ideal state of affairs. I don't want something similar to happen leading up to 2.0.
|
||||
|
||||
So for that reason I plan to move Evennia to [semantic versioning](https://semver.org/) going forward. Semantic versioning means that we'll use `Major.Minor.Patch` versioning. For you as a developer of an Evennia game (using `pip install` - if you follow `main` on git, it's less relevant, you'll have bleeding edge), this versioning means
|
||||
|
||||
- `1.0.x` - changes (`1.0.1`, `1.0.2` etc) are _patches_. Bug fixes. Security fixes. Should always be safe to upgrade to without anything breaking.
|
||||
- `1.x.0` - changes (`1.1.0`, `1.2.0` etc) are _minor version changes_. This can introduce new functionality that is _backwards compatible_. So a new default command, a new contrib, stuff like that. Maybe bigger bug fixes and refactoring that don't change existing functionality. So Minor versions are also usually worthwhile to update to.
|
||||
- `x.0.0` - changes (`2.0.0`, `3.0.0` etc) are _major version changes_. These versions include changes that are _backwards-incompatible_. The change may still be small! The gist of it is that they are changes that require you to take some action.
|
||||
|
||||
With semantic versioning, Evennia 2.0, 3.0 etc may happen sooner than you may think - even changing how a setting should be written is technically a backwards-incompatible change. I think this will help make those major versions be less daunting too - meaning we won't get stuck at 1.9.5 again.
|
||||
|
||||
### Finishing the beginner tutorial
|
||||
|
||||
The new [Beginner Tutorial](https://www.evennia.com/docs/latest/Howtos/Howtos-Overview.html#beginner-tutorial) is not ready yet.
|
||||
|
||||
As mentioned in my previous devblog, I had to pause work on it or 1.0 wouldn't get out this year. That said, I think the first two parts that are finished are already useful to newcomers. In the coming months I will continue with the tutorial-game and finish all the code. In the end I aim to have the reader make a complete little MUD from scratch if they follow the tutorial from beginning to end.
|
||||
|
||||
## Onward!
|
||||
|
||||
After the 1.0 release we are now officially in the 'bug fix and cleanup' phase. So report all the issues you find - especially with the new docs!
|
||||
|
||||
So moving forward, I expect to mainly do patches and minor versions for a while. I don't intend to start any major work until after the beginner-tutorial is complete.
|
||||
|
||||
For now though, let's just be happy that 1.0 is out! :D
|
||||
Loading…
Add table
Add a link
Reference in a new issue