Skip to content

Commit

Permalink
release: v0.0.2 (#7)
Browse files Browse the repository at this point in the history
* chore: Initial commit (#3)

* add version file with initial version 0.0.1

* initial commit w/o src code

* adds src code

* update documentation for htmlwriter package and add API contents

* enhance README with project status, components, and badges

* update README and documentation for htmlwriter usage, examples, and project name

* correct capitalization of "Markdown" in usage examples and notes

* updates with suggestions

* refactor: rename project to ecifl2html (#6)

* chore: Initial commit (#3) (#4)

* add version file with initial version 0.0.1

* initial commit w/o src code

* adds src code

* update documentation for htmlwriter package and add API contents

* enhance README with project status, components, and badges

* update README and documentation for htmlwriter usage, examples, and project name

* correct capitalization of "Markdown" in usage examples and notes

* updates with suggestions

* refactor: rename package from htmlwriter to md2tag and update documentation

* refactor: remove unused htmlwriter module and update README and setup.py links

* refactor: rename package from md2tag to ecifl2html and update related documentation

* refactor: update README and documentation to reflect changes from MarkdownToHTML to FormattedTextToHTML

* refactor: update README and documentation to reflect changes from MarkdownToHTML to FormattedTextToHTML
  • Loading branch information
javhaan authored Jan 6, 2025
1 parent 580eeda commit 0c9bbb8
Show file tree
Hide file tree
Showing 9 changed files with 318 additions and 91 deletions.
124 changes: 58 additions & 66 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
# htmlwriter

![GitHub license](https://img.shields.io/github/license/ec-intl/htmlwriter)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/ec-intl/htmlwriter)
![GitHub issues](https://img.shields.io/github/issues/ec-intl/htmlwriter)
![GitHub pull requests](https://img.shields.io/github/issues-pr/ec-intl/htmlwriter)
![GitHub contributors](https://img.shields.io/github/contributors/ec-intl/htmlwriter)
![GitHub last commit](https://img.shields.io/github/last-commit/ec-intl/htmlwriter)
![GitHub commit activity](https://img.shields.io/github/commit-activity/m/ec-intl/htmlwriter)
![GitHub top language](https://img.shields.io/github/languages/top/ec-intl/htmlwriter)
![GitHub search hit counter](https://img.shields.io/github/search/ec-intl/htmlwriter/htmlwriter)
![GitHub stars](https://img.shields.io/github/stars/ec-intl/htmlwriter)
![GitHub watchers](https://img.shields.io/github/watchers/ec-intl/htmlwriter)

`htmlwriter` is a Python package for converting Markdown text to HTML. It is a simple package that provides a single class, `MarkdownToHTML`, used to convert Markdown text to HTML.
# ecifl2HTML

![GitHub license](https://img.shields.io/github/license/ec-intl/ecifl2html)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/ec-intl/ecifl2html)
![GitHub issues](https://img.shields.io/github/issues/ec-intl/ecifl2html)
![GitHub pull requests](https://img.shields.io/github/issues-pr/ec-intl/ecifl2html)
![GitHub contributors](https://img.shields.io/github/contributors/ec-intl/ecifl2html)
![GitHub last commit](https://img.shields.io/github/last-commit/ec-intl/ecifl2html)
![GitHub commit activity](https://img.shields.io/github/commit-activity/m/ec-intl/ecifl2html)
![GitHub top language](https://img.shields.io/github/languages/top/ec-intl/ecifl2html)
![GitHub search hit counter](https://img.shields.io/github/search/ec-intl/ecifl2html/ecifl2html)
![GitHub stars](https://img.shields.io/github/stars/ec-intl/ecifl2html)
![GitHub watchers](https://img.shields.io/github/watchers/ec-intl/ecifl2html)

`ecifl2html` is a Python package for converting formatted text to HTML. It is a simple package that provides a single class, `FormattedTextToHTML`, used to convert formatted text to HTML.

## Project Status

Here's the current status of our workflows:

| Workflow | Status |
|-------------------------|--------|
| Testing Suite | [![Continuous-Integration](https://github.com/ec-intl/htmlwriter/actions/workflows/ci.yml/badge.svg)](https://github.com/ec-intl/htmlwriter/actions/workflows/ci.yml) |
| Deployment Suite | [![Continuous-Deployment](https://github.com/ec-intl/htmlwriter/actions/workflows/cd.yml/badge.svg)](https://github.com/ec-intl/htmlwriter/actions/workflows/cd.yml)|
| Sphinx Documentation | [![Sphinx-docs](https://github.com/ec-intl/htmlwriter/actions/workflows/docs.yml/badge.svg)](https://github.com/ec-intl/htmlwriter/actions/workflows/docs.yml) |
| Guard Main Branch | [![Guard Main Branch](https://github.com/ec-intl/htmlwriter/actions/workflows/guard.yml/badge.svg)](https://github.com/ec-intl/htmlwriter/actions/workflows/guard.yml) |
| Code Quality Checker | [![Lint Codebase](https://github.com/ec-intl/htmlwriter/actions/workflows/super-linter.yml/badge.svg)](https://github.com/ec-intl/htmlwriter/actions/workflows/super-linter.yml) |
| Testing Suite | [![Continuous-Integration](https://github.com/ec-intl/ecifl2html/actions/workflows/ci.yml/badge.svg)](https://github.com/ec-intl/ecifl2html/actions/workflows/ci.yml) |
| Deployment Suite | [![Continuous-Deployment](https://github.com/ec-intl/ecifl2html/actions/workflows/cd.yml/badge.svg)](https://github.com/ec-intl/ecifl2html/actions/workflows/cd.yml)|
| Sphinx Documentation | [![Sphinx-docs](https://github.com/ec-intl/ecifl2html/actions/workflows/docs.yml/badge.svg)](https://github.com/ec-intl/ecifl2html/actions/workflows/docs.yml) |
| Guard Main Branch | [![Guard Main Branch](https://github.com/ec-intl/ecifl2html/actions/workflows/guard.yml/badge.svg)](https://github.com/ec-intl/ecifl2html/actions/workflows/guard.yml) |
| Code Quality Checker | [![Lint Codebase](https://github.com/ec-intl/ecifl2html/actions/workflows/super-linter.yml/badge.svg)](https://github.com/ec-intl/ecifl2html/actions/workflows/super-linter.yml) |

## Components

The htmlwriter's codebase structure is as shown below:
The ecifl2HTML's codebase structure is as shown below:

```plaintext
.
Expand All @@ -37,36 +37,33 @@ The htmlwriter's codebase structure is as shown below:
├── README.md
├── VERSION
├── build_docs
│   ├── Makefile
│   ├── __init__.py
│   ├── make.bat
│   └── src
│   ├── __init__.py
│   ├── conf.py
│   ├── htmlwriter.rst
│   └── index.rst
│   ├── index.rst
│   └── ecifl2html.rst
├── requirements
│   ├── production.txt
│   ├── staging.txt
│   └── testing.txt
├── requirements.txt
├── setup.py
└── src
├── htmlwriter
├── ecifl2html
│   ├── __init__.py
│   └── htmlwriter.py
│   └── ecifl2html.py
└── tests
├── __init__.py
│   ├── __init__.cpython-311.pyc
└── test_htmlwriter.py
└── test_ecifl2html.py
```

## Usage

To use htmlwriter you first have your Markdown text in the following format:
To use ecifl2HTML you first have your Markdown text in the following format:

| Markdown Text | HTML Equivalent |
| Formatted Text | HTML Equivalent |
|---------------|-------------|
| `h.`, `hh.` etc. | `<h1>`, `<h2>`, ... |
| `p.` | `<p>` |
Expand All @@ -75,61 +72,56 @@ To use htmlwriter you first have your Markdown text in the following format:
| ````...```` | `<pre><code>` |
| `i.` | `<img>` |

### Example Markdown
### Example Formatted Text

```python
from src.htmlwriter import htmlwriter as hw

markdown_text = """
h. Welcome to MarkdownToHTML
p. Convert Markdown-like text into HTML effortlessly.
h2. Features
#. Supports headers (e.g., h., hh., hhh.)
#. Paragraphs (e.g., p.)
#. Ordered lists (#.)
#. Unordered lists (-.)
#. Code blocks (```...```)
h2. Example
p. Here's a code block:
r```
def example():
return “Hello, MarkdownToHTML!”
r```
"""

converter = ht.MarkdownToHTML(markdown_text)
from src.ecifl2html import ecifl2html as hw

formatted_text = """
h. Welcome to FormattedTextToHTML
p. Convert formatted text into HTML effortlessly.
h2. Features
#. Supports headers (e.g., h., hh., hhh.)
#. Paragraphs (e.g., p.)
#. Ordered lists (#.)
#. Unordered lists (-.)
#. Code blocks (```...```)
h2. Example
p. Here's a code block:
r```
def example():
return “Hello, FormattedTextToHTML!”
r```
"""

converter = ht.MarkdownToHTML(formatted_text)
html_output = converter.convert()
print(html_output)
```

NB: the `r` in code block section is there for the sake of the Markdown, so in your Markdown text omit the `r`.
NB: the `r` in code block section is there for the sake of the formatted text, so in your formatted text omit the `r`.

The expected HTML output will be:

```html
<h1>Welcome to MarkdownToHTML</h1>
<p>This is a simple tool to convert Markdown-like text to HTML.</p>
<h1>Welcome to FormattedTextToHTML</h1>
<p>Convert formatted text into HTML effortlessly.</p>

<h2>Features</h2>
<ol>
<li>Converts headers (e.g., h1., h2.)</li>
<li>Supports headers (e.g., h., hh., hhh.)</li>
<li>Paragraphs (e.g., p.)</li>
<li>Ordered lists (#.)</li>
<li>Unordered lists (-.)</li>
<li>Code blocks (```...```)</li>
</ol>

<h2>Example</h2>
<p>Here's an example of an unordered list:</p>
<ul>
<li>Item 1</li>
</ul>

<p>And a code block:</p>
<p>Here's a code block:</p>
<pre><code>
def example_function():
return Hello, World!”
def example():
return "Hello, FormattedTextToHTML!"
</code></pre>
```
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.1
0.0.2
4 changes: 2 additions & 2 deletions build_docs/src/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import sys

sys.path.insert(0, os.path.abspath("../../src/htmlwriter"))
sys.path.insert(0, os.path.abspath("../../src/ecifl2html"))
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
Expand All @@ -21,7 +21,7 @@

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

project = "htmlwriter"
project = "ecifl2html"
copyright = "2025, Elizabeth Consulting International Inc."
author = "Elizabeth Consulting International Inc."

Expand Down
7 changes: 7 additions & 0 deletions build_docs/src/ecifl2html.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ecifl2html
========

.. automodule:: ecifl2html
:members:
:undoc-members:
:show-inheritance:
34 changes: 17 additions & 17 deletions build_docs/src/index.rst
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
htmlwriter
ecifl2html
==========


**htmlwriter** is a Python package for converting Markdown text to HTML. It is a simple package that provides a single class, `MarkdownToHTML`, used to convert Markdown text to HTML.
**ecifl2html** is a Python package for converting formatted text to HTML. It is a simple package that provides a single class, `FormattedTextToHTML`, used to convert formatted text to HTML.

Below, you can find more information on the MarkdownToHTML class source code.
Below, you can find more information on the FormattedTextToHTML class source code.

.. toctree::
:maxdepth: 2
:caption: API Contents:

htmlwriter
ecifl2html


Usage
-----
## Usage

To use htmlwriter you first have your markdown text in the following format:
To use ecifl2html you first have your formatted text in the following format:

+-------------------+-------------------------+
| Markdown Text | HTML Equivalent |
| Formatted Text | HTML Equivalent |
+===================+=========================+
| `h.`, `hh.`, etc. | `<h1>`, `<h2>`, ... |
+-------------------+-------------------------+
Expand All @@ -35,15 +35,15 @@ To use htmlwriter you first have your markdown text in the following format:
| `i.` | `<img>` |
+-------------------+-------------------------+

### Example Markdown
### Example Formatted Text

.. code-block:: python
from src.htmlwriter import htmlwriter as hw
from src.ecifl2html import ecifl2html as hw
markdown_text = """
h. Welcome to MarkdownToHTML
p. Convert Markdown-like text into HTML effortlessly.
formatted_text = """
h. Welcome to FormattedTextToHTML
p. Convert formatted text into HTML effortlessly.
h2. Features
#. Supports headers (e.g., h., hh., hhh.)
Expand All @@ -56,22 +56,22 @@ To use htmlwriter you first have your markdown text in the following format:
p. Here's a code block:
r```
def example():
return “Hello, MarkdownToHTML!”
return “Hello, FormattedTextToHTML!”
r```
"""
converter = ht.MarkdownToHTML(markdown_text)
converter = ht.FormattedTextToHTML(formatted_text)
html_output = converter.convert()
print(html_output)
NB: the `r` in code block section is there for the sake of the Markdown, so in your Markdown text omit the `r`.
NB: the `r` in code block section is there for the sake of the formatted text, so in your formatted text omit the `r`.

The expected HTML output will be:

.. code-block:: HTML
<h1>Welcome to MarkdownToHTML</h1>
<p>Convert Markdown-like text into HTML effortlessly.</p>
<h1>Welcome to FormattedTextToHTML</h1>
<p>Convert formatted text into HTML effortlessly.</p>

<h2>Features</h2>
<ol>
Expand All @@ -86,7 +86,7 @@ The expected HTML output will be:
<p>Here's a code block:</p>
<pre><code>
def example():
return "Hello, MarkdownToHTML!"
return "Hello, FormattedTextToHTML!"
</code></pre>

Indices and tables
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
version = version_file.read().strip()

setup(
name="htmlwriter",
name="ecifl2html",
version=version,
author="Elizabeth Consulting International Inc.",
author_email="[email protected]",
Expand All @@ -14,12 +14,12 @@
),
long_description=open("README.md", encoding="utf-8").read(),
long_description_content_type="text/markdown",
url="https://github.com/ec-intl/htmlwriter",
url="https://github.com/ec-intl/ecifl2html",
project_urls={
"Homepage": "https://github.com/ec-intl/htmlwriter",
"Issues": "https://github.com/ec-intl/htmlwriterissues",
"Homepage": "https://github.com/ec-intl/ecifl2html",
"Issues": "https://github.com/ec-intl/ecifl2html/issues",
},
packages=["htmlwriter"],
packages=["ecifl2html"],
package_dir={"": "src"},
license="Apache License 2.0",
classifiers=[
Expand Down
Empty file added src/ecifl2html/__init__.py
Empty file.
Loading

0 comments on commit 0c9bbb8

Please sign in to comment.