Skip to content

Added docs with readthedocs and minor changes to readme #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3264164
Fixed some type annotations
DenverCoder1 Oct 13, 2021
d3e10ae
Minor docs changes
DenverCoder1 Oct 13, 2021
6278112
Removed TOC
DenverCoder1 Oct 13, 2021
82f5469
Removed 3.6
DenverCoder1 Oct 13, 2021
271e0f3
Add pip install tox
DenverCoder1 Oct 13, 2021
aeb9c0e
rtd initial docs test
DenverCoder1 Oct 13, 2021
b9b1c96
link to usage and api
DenverCoder1 Oct 13, 2021
823c42f
Fix links
DenverCoder1 Oct 13, 2021
d13a0f4
Update docs
DenverCoder1 Oct 13, 2021
9ae8729
Added to API docs
DenverCoder1 Oct 13, 2021
586c9a6
Update docs for rtd and switch generate style list to rst
DenverCoder1 Oct 13, 2021
f8f4751
Move generate styles list to docs
DenverCoder1 Oct 13, 2021
752696a
Update docs dependencies
DenverCoder1 Oct 13, 2021
633f0b9
Fix dependencies
DenverCoder1 Oct 13, 2021
5da8260
Update styles link
DenverCoder1 Oct 13, 2021
038c600
Updated examples and links
DenverCoder1 Oct 13, 2021
cf2ac69
Added sphinx rtd theme to templates
DenverCoder1 Oct 13, 2021
e8fea4e
Change edit on github to view on github
DenverCoder1 Oct 13, 2021
c6bb27c
Add darkreader
DenverCoder1 Oct 13, 2021
b90f884
Added GitHub Buttons
DenverCoder1 Oct 13, 2021
7a937a7
Code formatting
DenverCoder1 Oct 13, 2021
116131c
Change theme for syntax highlighting
DenverCoder1 Oct 13, 2021
517188a
Custom styling
DenverCoder1 Oct 13, 2021
e98839b
Update link colors and footer
DenverCoder1 Oct 13, 2021
043ac06
Update readme with docs
DenverCoder1 Oct 13, 2021
f8940f6
Update readme dev commands
DenverCoder1 Oct 13, 2021
bb02934
Remove whitespace
DenverCoder1 Oct 13, 2021
00ec5db
Bump version to 0.1.3
DenverCoder1 Oct 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ instance/

# Sphinx documentation
docs/_build/
generated
docs/source/_build/

# PyBuilder
target/
Expand Down
18 changes: 18 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
formats: []

build:
image: latest

sphinx:
configuration: docs/source/conf.py
fail_on_warning: false
builder: html

python:
version: "3.8"
install:
- method: pip
path: .
extra_requirements:
- docs
41 changes: 16 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,18 @@
[![version](https://img.shields.io/pypi/v/table2ascii)](https://pypi.org/project/table2ascii/)
[![downloads](https://static.pepy.tech/personalized-badge/table2ascii?period=total&units=none&left_color=grey&right_color=orange&left_text=downloads)](https://pepy.tech/project/table2ascii)
[![license](https://img.shields.io/pypi/l/table2ascii)](https://github.com/DenverCoder1/table2ascii/blob/main/LICENSE)
[![Discord](https://img.shields.io/discord/819650821314052106?color=5865F2&logo=discord&logoColor=white "Dev Pro Tips Discussion & Support Server")](https://discord.gg/fPrdqh3Zfu)

Module for converting 2D Python lists to fancy ASCII/Unicode tables

- [table2ascii](#table2ascii)
- [📥 Installation](#-installation)
- [🧑‍💻 Usage](#-usage)
- [Convert lists to ASCII tables](#convert-lists-to-ascii-tables)
- [Set first or last column headings](#set-first-or-last-column-headings)
- [Set column widths and alignments](#set-column-widths-and-alignments)
- [Use a preset style](#use-a-preset-style)
- [Define a custom style](#define-a-custom-style)
- [🎨 Preset styles](#-preset-styles)
- [⚙️ Options](#️-options)
- [👨‍🎨 Use cases](#-use-cases)
- [Discord messages and embeds](#discord-messages-and-embeds)
- [Terminal outputs](#terminal-outputs)
- [🧰 Development](#-development)
[![discord](https://img.shields.io/discord/819650821314052106?color=5865F2&logo=discord&logoColor=white "Dev Pro Tips Discussion & Support Server")](https://discord.gg/fPrdqh3Zfu)

Library for converting 2D Python lists to fancy ASCII/Unicode tables

Documentation and examples are available at [table2ascii.rtfd.io](https://table2ascii.readthedocs.io/)

## 📥 Installation

``pip install table2ascii``
``pip install -U table2ascii``

**Requirements:** `Python 3.7+`

(For Python 3.6, installing `dataclasses` is required)

## 🧑‍💻 Usage

### Convert lists to ASCII tables
Expand Down Expand Up @@ -158,7 +143,7 @@ print(output)

## 🎨 Preset styles

See a list of all preset styles [here](https://github.com/DenverCoder1/table2ascii/tree/main/style_list).
See a list of all preset styles [here](https://table2ascii.readthedocs.io/en/latest/styles.html).

## ⚙️ Options

Expand Down Expand Up @@ -193,10 +178,16 @@ All parameters are optional.

## 🧰 Development

To run tests (pytest)
### Running tests

``tox``
1. Install `tox` with the command ``pip install -U tox``

To lint (flake8):
2. Run tests with the command ``tox``

### Linting

Run the following command to lint with flake8

``python setup.py lint``

(Note: The exact command may vary depending on your Python version and environment)
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
20 changes: 20 additions & 0 deletions docs/source/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
1 change: 1 addition & 0 deletions docs/source/_static/css/badge_only.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions docs/source/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.wy-side-nav-search > a {
font-size: 160%;
}

.wy-side-nav-search input[type="text"] {
padding: 10px 15px;
font-size: 100%;
border-radius: 10px;
}

.section a:visited,
footer a:visited {
color: #2980b9;
}

a.icon.icon-home:visited {
color: unset;
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading