Skip to content

Commit

Permalink
Renamed the project
Browse files Browse the repository at this point in the history
  • Loading branch information
trag1c committed Jul 12, 2022
1 parent 8b8a24f commit c9d725e
Show file tree
Hide file tree
Showing 13 changed files with 77 additions and 77 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Supported Python Versions](https://img.shields.io/pypi/pyversions/camellia)](https://pypi.python.org/pypi/camellia)
[![PyPI version](https://badge.fury.io/py/camellia.svg)](https://badge.fury.io/py/camellia)
[![Documentation Status](https://readthedocs.org/projects/camellia/badge/?version=latest)](https://camellia.readthedocs.io/en/latest/?badge=latest)
# Camellia
[![Supported Python Versions](https://img.shields.io/pypi/pyversions/dahlia)](https://pypi.python.org/pypi/dahlia)
[![PyPI version](https://badge.fury.io/py/dahlia.svg)](https://badge.fury.io/py/dahlia)
[![Documentation Status](https://readthedocs.org/projects/dahlia/badge/?version=latest)](https://dahlia.readthedocs.io/en/latest/?badge=latest)
# Dahlia
12 changes: 6 additions & 6 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Camellia API Reference
Dahlia API Reference
==================

.. _api:

.. currentmodule:: camellia
.. currentmodule:: dahlia

camellia
dahlia
----
.. autofunction:: camellia
.. autofunction:: dahlia

cprint
------
Expand All @@ -25,6 +25,6 @@ test
----
.. autofunction:: test

CamelliaError
DahliaError
---------
.. autoexception:: camellia.camellia.CamelliaError
.. autoexception:: dahlia.dahlia.DahliaError
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# -- Project information -----------------------------------------------------

project = 'camellia'
project = 'dahlia'
copyright = '2022, trag1c'
author = 'trag1c'

Expand All @@ -36,10 +36,10 @@

html_static_path = ['_static']
html_css_files = [
'camellia.css'
'dahlia.css'
]
html_js_files = [
'camellia.js'
'dahlia.js'
]

# -- Extension configuration -------------------------------------------------
Expand Down
20 changes: 10 additions & 10 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
Camellia Documentation
Dahlia Documentation
==================


.. image:: https://img.shields.io/pypi/pyversions/camellia
:target: https://pypi.python.org/pypi/camellia
.. image:: https://img.shields.io/pypi/pyversions/dahlia
:target: https://pypi.python.org/pypi/dahlia
:alt: Python Versions

.. image:: https://badge.fury.io/py/camellia.svg
:target: https://badge.fury.io/py/camellia
.. image:: https://badge.fury.io/py/dahlia.svg
:target: https://badge.fury.io/py/dahlia
:alt: pypi package

.. image:: https://readthedocs.org/projects/camellia/badge/?version=latest
:target: https://camellia.readthedocs.io/en/latest/?badge=latest
.. image:: https://readthedocs.org/projects/dahlia/badge/?version=latest
:target: https://dahlia.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

What is Camellia?
What is Dahlia?
-------------

Camelllia is a simple text formatting package, inspired by text formatting in the game Minecraft.

Text can be similar to the in the game, text can be formatting by typing a special character (``&`` for Camellia) followed by a format code and finally the text to be formatted.
Text can be similar to the in the game, text can be formatting by typing a special character (``&`` for Dahlia) followed by a format code and finally the text to be formatted.


.. raw:: html

<div class="notranslate">
<div class="highlight">
<pre><span class="o">&gt;&gt;</span> <span class="nb">print</span><span class="p">(</span><span class="n">camellia</span><span class="p">(</span><span class="s2">"&amp;aHello World"</span><span class="p">))</span>
<pre><span class="o">&gt;&gt;</span> <span class="nb">print</span><span class="p">(</span><span class="n">dahlia</span><span class="p">(</span><span class="s2">"&amp;aHello World"</span><span class="p">))</span>
<span class="&a">Hello World</span></pre>
</div>
</div>
Expand Down
26 changes: 13 additions & 13 deletions docs/usage/cli.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
Camellia CLI
Dahlia CLI
========

Camellia can be used via its CLI to provide formatting.
It is invoked using ``camellia``.
Dahlia can be used via its CLI to provide formatting.
It is invoked using ``dahlia``.


To see that Camellia is installed correctly and working, run the test command.
To see that Dahlia is installed correctly and working, run the test command.
This shows all the formatting codes and their resulting formatting.

.. code-block:: bash
$ camellia --test
$ dahlia --test
.. raw:: html

Expand All @@ -25,12 +25,12 @@ This shows all the formatting codes and their resulting formatting.
Basic Use
---------

Just like programmatic Camellia, the CLI uses the same methods of formatting.
Just like programmatic Dahlia, the CLI uses the same methods of formatting.
The primary argument is the text to be formatted.

.. code-block:: bash
$ camellia "&aw&co&3o&~0&6l"
$ dahlia "&aw&co&3o&~0&6l"
.. raw:: html

Expand All @@ -51,7 +51,7 @@ See :ref:`Format Reference <formatref>` for what the depths correspond to.

.. code-block:: bash
$ camellia "&~0&624&7-&abit" --depth 24
$ dahlia "&~0&624&7-&abit" --depth 24
.. raw:: html

Expand All @@ -63,12 +63,12 @@ See :ref:`Format Reference <formatref>` for what the depths correspond to.

Clean
_____
``--clean``/``-c`` removes all Camellia formatting sequences from a string.
``--clean``/``-c`` removes all Dahlia formatting sequences from a string.

.. code-block:: bash
$ camellia "&aw&co&3o&~0&6l"
camellia
$ dahlia "&aw&co&3o&~0&6l"
dahlia
Clean Ansi
Expand All @@ -79,7 +79,7 @@ _____

<div class="highlight-bash notranslate">
<div class="highlight">
<pre>$ camellia "<span class="&a">w</span><span class="&c">o</span><span class="&3">o</span><span class="&~0 &6">l</span>"
camellia</pre>
<pre>$ dahlia "<span class="&a">w</span><span class="&c">o</span><span class="&3">o</span><span class="&~0 &6">l</span>"
dahlia</pre>
</div>
</div>
28 changes: 14 additions & 14 deletions docs/usage/programmatic.rst
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
Programmatic Camellia
Programmatic Dahlia
=================

The two ways camellia can be used with Python are with the functions :func:`~camellia.camellia` and :func:`~camellia.wprint`.
The two ways dahlia can be used with Python are with the functions :func:`~dahlia.dahlia` and :func:`~dahlia.dprint`.

The difference between the two is :func:`~camellia.wprint` will print the value while :func:`~camellia.camellia` will return it.
The underlying usage is the same. For brevity, the examples will mostly be using ``wprint``.
The difference between the two is :func:`~dahlia.dprint` will print the value while :func:`~dahlia.dahlia` will return it.
The underlying usage is the same. For brevity, the examples will mostly be using ``dprint``.

.. note::

For a full reference of each code, see :ref:`Format Reference <formatref>`

Formatting is done in camellia by prefixing with ``&`` followed by a format code. (ex: ``&a``)
Formatting is done in dahlia by prefixing with ``&`` followed by a format code. (ex: ``&a``)
The primary color codes are a number from ``0`` through ``9`` or a letter from ``a`` through ``g``.
To apply the coloring to the background, insert a ``~`` between. (ex: ``&~a`` )


.. code-block:: python
from camellia import wprint
wprint("&dHello There")
wprint("&aw&co&3o&6l")
wprint("&~0&bblack background")
from dahlia import dprint
dprint("&dHello There")
dprint("&aw&co&3o&6l")
dprint("&~0&bblack background")
.. raw:: html

Expand All @@ -37,8 +37,8 @@ Text can also be bold, strikethrough, underline, italic, or removed of formattin

.. code-block:: python
from camellia import wprint
wprint("&lBold &r&nUnderline&r &oItalics&r &mStrikethrough")
from dahlia import dprint
dprint("&lBold &r&nUnderline&r &oItalics&r &mStrikethrough")
.. raw:: html
Expand All @@ -50,12 +50,12 @@ Text can also be bold, strikethrough, underline, italic, or removed of formattin
</div>


Terminals support a wide range of colors that are not covered by the base format codes. Camellia can use hex codes to display a specific color as well.
Terminals support a wide range of colors that are not covered by the base format codes. Dahlia can use hex codes to display a specific color as well.

.. code-block:: python
from camellia import wprint
wprint("use &[#1793d1]ars&r")
from dahlia import dprint
dprint("use &[#1793d1]ars&r")
.. raw:: html
Expand Down
10 changes: 5 additions & 5 deletions docs/usage/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@ Quickstart
Installation
------------

Camellia is available on PyPI and can be installed with pip (or any other package manager)
Dahlia is available on PyPI and can be installed with pip (or any other package manager)



.. code-block:: bash
$ pip install camellia
$ pip install dahlia
.. note::
On some systems, you may need to use either ``pip3``, ``python -m pip`` or ``py -m pip`` instead of ``pip``


Seeing if camellia is working
Seeing if dahlia is working
-------------------------

In the terminal, simply run the test command. If there is an error or the formatting does not appear, there may be an issue with your Camellia install.
In the terminal, simply run the test command. If there is an error or the formatting does not appear, there may be an issue with your Dahlia install.

.. raw:: html

<div class="highlight-bash notranslate">
<div class="highlight">
<pre>$ camellia --test
<pre>$ dahlia --test
<span class="&0">0</span><span class="&1">1</span><span class="&2">2</span><span class="&3">3</span><span class="&4">4</span><span class="&5">5</span><span class="&6">6</span><span class="&7">7</span><span class="&8">8</span><span class="&9">9</span><span class="&a">a</span><span class="&b">b</span><span class="&c">c</span><span class="&d">d</span><span class="&e">e</span><span class="&f">f</span><span class="&g">g</span><span class="&l &f">l</span><span class="&m &f">m</span><span class="&n &f">n</span><span class="&o &f">o</span></pre>
</div>
</div>
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[tool.poetry]
name = "camellia"
name = "dahlia"
version = "1.0.0"
description = "A library allowing you to use Minecraft format codes in strings."
authors = ["trag1c <[email protected]>"]
license = "MIT"
documentation = "https://camellia.readthedocs.io/en/latest"
repository = "https://github.com/trag1c/Camellia"
documentation = "https://dahlia.readthedocs.io/en/latest"
repository = "https://github.com/trag1c/Dahlia"

[tool.poetry.dependencies]
python = "^3.8"

[tool.poetry.scripts]
camellia = "camellia.__main__:main"
dahlia = "dahlia.__main__:main"

[tool.poetry.dev-dependencies]

Expand Down
3 changes: 0 additions & 3 deletions src/camellia/__init__.py

This file was deleted.

3 changes: 3 additions & 0 deletions src/dahlia/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .dahlia import clean, clean_ansi, config, test, dahlia, dprint

__all__ = ("clean", "clean_ansi", "config", "test", "dahlia", "dprint")
6 changes: 3 additions & 3 deletions src/camellia/__main__.py → src/dahlia/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from argparse import ArgumentParser

from .camellia import clean, clean_ansi, config, test, wprint
from .dahlia import clean, clean_ansi, config, test, dprint


def parse_args() -> tuple[str, bool, bool]:
Expand Down Expand Up @@ -33,7 +33,7 @@ def parse_args() -> tuple[str, bool, bool]:
if args.test:
test()
elif args.version:
print("Camellia 1.0.0")
print("Dahlia 1.0.0")
exit()
return args.string, args.clean, args.clean_ansi

Expand All @@ -45,7 +45,7 @@ def main() -> None:
elif clean_ansi_:
print(clean_ansi(string))
else:
wprint(string)
dprint(string)


if __name__ == "__main__":
Expand Down
File renamed without changes.
Loading

0 comments on commit c9d725e

Please sign in to comment.