"A Collection of Duel Commander commented games in French",
Project description
Barrin's Codex
A website about MtG Duel Commander Strategy
Special Thanks
I started working with lionel-panhaleux on a project during first lockdown (around April 2020). We worked on his Codex of the Damned (repo) to support internationalisation. The whole structure of this project is derived from his Codex, hence the name as a small tribute.
Contributing
Contributions are welcome.
- Pull Requests will be merged if they respect the general style.
- Issues will be dealt with as quickly as possible.
This site uses Flask and Babel to generate pages dynamically and handle internationalisation.
Instructions to contributors
Here are various general guidelines this website is enforcing:
- Do not talk about yourself
- Do not talk to the reader
- Do not engage the reader in the talk
- Use spaces between the call and the variable for better clarity
{{ some_variable }}
- Use mana symbols, they are emojis in the context (currently
{{ W }}
,{{ U }}
,{{ B }}
,{{ R }}
,{{ G }}
) - Use card names variables, they are in the context (example
{{ jace_the_mind_sculptor }}
forJace, the Mind Sculptor
) - If a card name doesn't compile, you are free to declare the name, it is mandatory for Adventure card and some other
Installation
To install a working developpment version of the site, use pip
:
python3 -m venv venv
source venv/bin/activate
pip install -e ".[dev]"
The first time the project is started, the page will take some time to compile a list of
cards and their scryfallId
to gain access to the card image. This script is also used
to build a JSON version of a decklist.
Run the Codex
You can run the development version of the site using the codex
entrypoint:
$ codex
* Serving Flask app "barrins_codex" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
You can set the DEBUG
environment variable to activate the debug mode:
DEBUG=1 codex
Useful tools
There are some utils provided in the codex:
Decklist Converter
Using an alphabetically sorted decklist, just put SB:
before every card in Command Zone.
cd ./barrins_codex
python ./build_deck.py PATH_TO_FILE
Google Translate
Use python and Google Translate to help with translation:
import clipboard
import pprint
import re
def pre():
s = "".join(s[1:-1] for s in clipboard.paste().split("\n"))
s = re.sub(r"%\(([^\)]*)\)s", r"§KEEP\1§", s)
clipboard.copy(s)
def post():
s = clipboard.paste()
s = pprint.pformat(re.sub(r"§KEEP([^§]*)§", r"%(\1)s", s), width=88)
s = re.sub(
r"(^')|('$)",
'"',
re.sub(r"^\s*", "", s[1:-1], flags=re.MULTILINE),
flags=re.MULTILINE
).replace("\\n", "")
clipboard.copy(s)
# usage:
# > copy paragraph to translate from the PO file
# pre()
# > copy translation
# post()
# > copy result to the PO file
Versioning
The version number take the form X.Y.Z where X, Y, and Z are non-negative integers, and do not
contain leading zeroes. X is the major version, Y is the minor version, and Z is the patch version.
Each element MUST increase numerically. For instance: 1.9.0
-> 1.10.0
-> 1.11.0
.
Given a version number MAJOR.MINOR.PATCH, I increment the:
- MAJOR version when I make a backend evolution or a design evolution,
- MINOR version when I add content, and
- PATCH version when I make bug and typo fixes.
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file vod_barrins_codex-0.0.5.tar.gz
.
File metadata
- Download URL: vod_barrins_codex-0.0.5.tar.gz
- Upload date:
- Size: 12.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 739e15d8b8b3c9031aca9f524d643cc009a370722c7958d374eba9feb0edc1e7 |
|
MD5 | 066ef6f1135aa5b087f135cb14f21578 |
|
BLAKE2b-256 | e17b937731c8fd12e64262f534ece4347321fdb6941995098e2209bdf16a1e27 |
File details
Details for the file vod_barrins_codex-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: vod_barrins_codex-0.0.5-py3-none-any.whl
- Upload date:
- Size: 12.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 086953969aee8e19259f4c119c2ae374455a64fc1f040556bf46491adf74d7fc |
|
MD5 | a820d41c458f5a356748abeab13f34c2 |
|
BLAKE2b-256 | cf6f39d0789e4a12b2b83daa56fcecf23bd4fdd96129b877518c342f8080e836 |