Skip to content

Commit

Permalink
docs: fix docstring links path and badge color
Browse files Browse the repository at this point in the history
fix(console-script): change name now is `mdsanima-dev` for console
  • Loading branch information
mdsanima committed Apr 18, 2022
1 parent bd033fa commit 4503dab
Show file tree
Hide file tree
Showing 9 changed files with 125 additions and 110 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ indent_size = 2
[*.json]
indent_style = space
indent_size = 2

[*.js]
indent_style = space
indent_size = 2
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,31 @@

<!-- start info-mdsanima-dev -->

*Python* package [`mdsanima-dev`](https://pypi.org/project/mdsanima-dev) is for
*Python* package [mdsanima-dev](https://pypi.org/project/mdsanima-dev) is for
colorizing, adding emoji and making table on console shell print output.
You can find here *Python* modules that's make coding easier and cooler,
includes several useful modules that we use in various projects.
Also, in the future we're add more cool function on this package.

<!-- end info-mdsanima-dev -->

Docomentation available at [`GitHub Pages`][link-08], be sure to check it.
Docomentation available at [GitHub Pages][link-08], be sure to check it.

## Installation

<!-- start help-started -->

Instructions how to install the *Python* package
[`mdsanima-dev`](https://pypi.org/project/mdsanima-dev) on your system.
[mdsanima-dev](https://pypi.org/project/mdsanima-dev) on your system.

<!-- end help-started -->

<!-- start help-installation -->

Options [`PyPI`](#using-pypi), [`Setup`](#using-setup) or
[`Wheel`](#using-wheel) allows you to install the package **globally** on
Options [PyPI](#using-pypi), [Setup](#using-setup) or
[Wheel](#using-wheel) allows you to install the package **globally** on
your system. If you want to install the package in an **isolated environment**
on your system use the [`virtualenv`](#on-virtualenv) options.
on your system use the [virtualenv](#on-virtualenv) options.

<!-- end help-installation -->

Expand Down Expand Up @@ -85,7 +85,7 @@ python3 -m pip uninstall mdsanima-dev

Install the package using `easy install` options, but this is an deprecated
method and not recommend using this, instead of this method please use
[`Wheel`](#using-wheel) options for install.
[Wheel](#using-wheel) options for install.

Clone repository with all number of commits history using HTTPS:

Expand All @@ -112,15 +112,15 @@ python3 setup.py install
<!-- start help-using-wheel -->

Build package from source then install it. Clone the repository just like in
the [`Using Setup`](#using-setup) statement then type in the terminal:
the [Using Setup](#using-setup) statement then type in the terminal:

```shell
python3 setup.py sdist bdist_wheel
```

The package build creates new directories where the installation files are
located the `build` and `dist` directories. Then install the package just like
in the [`Using PyPI`](#using-pypi) statement, but instead of entering the
in the [Using PyPI](#using-pypi) statement, but instead of entering the
package name, give the path to the `.whl` file that was built earlier:

```shell
Expand Down Expand Up @@ -157,24 +157,24 @@ Finnaly install the package in virtual environment, type in the terminal:
pip install mdsanima-dev
```

Also you can use [`PyPI`](#using-pypi), [`Setup`](#using-setup) or
[`Wheel`](#using-wheel) options.
Also you can use [PyPI](#using-pypi), [Setup](#using-setup) or
[Wheel](#using-wheel) options.

Deactivate virtual environment, type in the terminal:

```shell
deactivate
```

You can use also [`venv`](https://docs.python.org/3/tutorial/venv.html) instead
of this option.
You can use also [venv](https://docs.python.org/3/tutorial/venv.html) instead
of this option, just type `python3 -m venv venv` in the terminal.

<!-- end help-on-virtualenv -->

## Develempent

Instruction for the *Python* package development. Please check the
[`documentation`][link-08] site for more information.
[documentation][link-08] site for more information.

## Showcase

Expand All @@ -197,8 +197,8 @@ These are my social media account, be sure to check it. Thanks!

## License

Python package [`mdsanima-dev`][link-02] developed by
[`Marcin Różewski`][link-10] is released under the terms of
Python package [mdsanima-dev][link-02] developed by
[Marcin Różewski][link-10] is released under the terms of
[MIT License][link-11]

[badge-pe]: https://static.pepy.tech/personalized-badge/mdsanima-dev?period=total&units=none&left_color=grey&right_color=yellowgreen&left_text=downloads
Expand Down
23 changes: 14 additions & 9 deletions docs/_static/mdsanima.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
--color-mdsanima-sky-800: #075985;
--color-mdsanima-lime-600: #65A30D;
--color-mdsanima-teal-500: #14B8A6;
--color-mdsanima-teal-600: #0D9488;
--color-mdsanima-teal-800: #115E59;
--color-mdsanima-orange-500: #F97316;
--color-mdsanima-red-500: #EF4444;
--color-mdsanima-code: #10141D;
Expand Down Expand Up @@ -48,6 +50,7 @@ body:not([data-theme=light]) {
--color-api-name: var(--color-mdsanima-sky-600); /* code function right */
--color-problematic: var(--color-mdsanima-sky-800); /* code function left */
--color-highlight-on-target: var(--color-mdsanima-code); /* target click */
--sd-color-primary-highlight: var(--color-mdsanima-sky-800); /* badge link text hover */
}

/* code block python colors */
Expand All @@ -64,10 +67,13 @@ body:not([data-theme=light]) .highlight-shell .highlight {
border-right: 0.2rem solid var(--color-mdsanima-orange-500);
}

/* no link underline */
/* a {
/* no link underline and hover color */
a {
text-decoration: none;
} */
}
a:hover {
color: var(--color-mdsanima-sky-800);
}

/* code all */
code.literal {
Expand Down Expand Up @@ -118,7 +124,6 @@ p code.literal {
}

/* badge no border */
:is(h1, h2, h3, h4, .sidebar-scroll, .toc-scroll, .related-pages, .toctree-wrapper)
:is(.sd-outline-primary, .sd-outline-secondary, .sd-outline-success, .sd-outline-info, .sd-outline-warning, .sd-outline-danger, .sd-outline-light, .sd-outline-dark) {
border-width: 0px !important;
}
Expand Down Expand Up @@ -166,21 +171,21 @@ p code.literal {
}

/* change icon color when active python modules */
.sidebar-tree .current>.reference .sd-octicon-file-code {
:is(h1 .sd-octicon-file-code, .sidebar-tree .current>.reference .sd-octicon-file-code) {
fill: var(--color-mdsanima-lime-600);
}

/* change icon color when active terminal commands */
.sidebar-tree .current>.reference .sd-octicon-file-binary {
:is(h1 .sd-octicon-file-binary, .sidebar-tree .current>.reference .sd-octicon-file-binary) {
fill: var(--color-mdsanima-orange-500);
}

/* change icon color when active project development */
.sidebar-tree .current>.reference .sd-octicon-workflow {
:is(h1 .sd-octicon-workflow, .sidebar-tree .current>.reference .sd-octicon-workflow) {
fill: var(--color-mdsanima-red-500);
}

/* animation on click */
.sidebar-tree .current-page>.reference .sd-octicon {
animation: 0.3s ease-out 0s 1 normal none running sd-slide-from-left;
:is(h1 .sd-octicon, .sidebar-tree .current-page>.reference .sd-octicon) {
animation: 0.5s ease-out 0s 1 normal none running sd-slide-from-left;
}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
},
entry_points={
"console_scripts": [
"mdsanima-dev-converts = mdsanima_dev.utils.converts:main",
"mdsanima-dev = mdsanima_dev.utils.converts:main",
],
},
)
38 changes: 19 additions & 19 deletions src/mdsanima_dev/colors.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Copyritht © 2022 Marcin Różewski MDSANIMA


"""Complex colors printed in the console output with your own text."""
"""Module ``colors`` is for print complex color in the console output with your
own texts. Also, this module is for showing example colors that's you might be
used in your project.
"""


def set_complex_color() -> str:
Expand Down Expand Up @@ -39,39 +42,34 @@ def get_color(text: str = "mdsanima", color: int = 255) -> str:
print function.
:param text: The text you want to use for color output in the console,
defaults to `mdsanima`.
defaults to ``mdsanima``.
:type text: str, optional
:param color: The color number you want to use for color output in the
console, defaults to `255`.
console, defaults to ``255``.
:type color: int, optional
:return: Colored text output in the console.
:rtype: str
:usage:
Assigning a function by calling to variable:
Assigning a function by calling to variable or assigning a function to
a variable just add after import ``mds = get_color`` and in the next
line type ``mds_a = mds("I love Python", 86)`` in your code:
.. code:: python
from mdsanima_dev.colors import get_color
mds_a = get_color("I love Python", 86)
mds_b = get_color("mdsanima", 186)
print(mds_a, mds_b)
Assigning a function to a variable:
.. code:: python
mds = get_color
mds_a = mds("I love Python", 86)
mds_b = mds("mdsanima", 186)
print(mds_a, mds_b)
Also you can use
:bdg-link-primary-line:`machine
<../module-tools/#function-machine>` function:
<../tools/#function-machine>` function:
.. code:: python
from mdsanima_dev.colors import get_color
from mdsanima_dev.utils.tools import machine
mds = get_color
mds_a = mds("I love Python", 86)
Expand All @@ -90,23 +88,24 @@ def get_complex_color(
console. Now the function works the same like print function.
:param text: The text you want to use for color output in the console,
defaults to `mdsanima`.
defaults to ``mdsanima``.
:type text: str, optional
:param color: The color number you want to use for color output in the
console, defaults to `255`.
console, defaults to ``255``.
:type color: int, optional
:param end: End of line print, defaults to `None`.
:param end: End of line print, defaults to ``None``.
:type end: str, optional
:return: Colored text output in the console.
:rtype: str
:usage:
Assigning a function to a variable `mds` then function calling
Assigning a function to a variable ``mds`` then function calling
returning printing colored text on the same line:
.. code:: python
from mdsanima_dev.colors import get_complex_color
mds = get_complex_color
mds(color=44)
mds("mdsa", 160, " ")
Expand All @@ -124,7 +123,7 @@ def get_complex_color(
def show_complex_color(number: bool = False) -> str:
"""Function prints all available colors with a number or only text.
:param number: Show color number, defaults to `False`.
:param number: Show color number, defaults to ``False``.
:type number: bool, optional
:return: Show all colors in the console output.
:rtype: str
Expand All @@ -135,6 +134,7 @@ def show_complex_color(number: bool = False) -> str:
.. code:: python
from mdsanima_dev.colors import show_complex_color
show_complex_color(False)
show_complex_color(True)
"""
Expand Down

0 comments on commit 4503dab

Please sign in to comment.