View Single Post
Old 04-20-2024, 03:56 AM   #525
Jaco
Junior Member
Jaco began at the beginning.
 
Posts: 8
Karma: 10
Join Date: May 2023
Device: none
Plugin pull request

Hi everybody,

It is Jacob, from Spain (EU).

I don't know a word about programming (I am a professional editor) but I love Sigil. I am a 100% evangelist.

Recently I discovered HAML markup language, and I found it helps a lot to write HTML code faster. Some info:

https://herotofu.com/haml-converter
https://haml.info/

AI say me that pyhaml library could do it and it gives me this piece of code, but I have no idea how to program in Python.

I was wondering if there is any volunteer to write a plugin for converting HALM to HTML.

Thanks in advance.

---------

# Installation pyhaml with pip:
# pip install pyhaml

from pyhaml_jinja import Compiler

# Your HAML (change this with your code HAML)
haml_content = """
%html
%head
%title Example HAML to HTML
%body
%h1 Hello, Word!
%p Converting example HAML to HTML.
"""

# Compile HAML
compiler = Compiler()

# Convert HAML to HTML
html_content = compiler.process(haml_content)

# Print HTML
print(html_content)
Jaco is offline   Reply With Quote