Lektor-html-pretify - Lektor plugin to pretify the HTML DOM using Beautiful Soup

Overview

html-pretify

PyPI version Downloads Linting Python package Upload Python Package Yamllint GitHub Actions

Lektor plugin to pretify the HTML DOM using Beautiful Soup.

How does it actually work?

  • It uses Beautiful Soup.
  • It looks for rendered .html files and pretify themi.

Installation

You can install the plugin with Lektor's installer:

lektor plugins add lektor-html-pretify

Or by hand, adding the plugin to the packages section in your lektorproject file:

[packages]
lektor-html-pretify = 1.0.5

Usage

To enable the plugin, pass the pretifyhtml flag when starting the development server or when running a build:

# build and compile css from scss
lektor build -f pretifyhtml

# edit site with new generated css
lektor server -f pretifyhtml

Python3

It is highly recommended to use this plugin with a python3 version of lektor.

Since lektor can be used as a python module it is possible to enforce this (after lektor is installed eg. with pip3 install --user --upgrade lektor) with the following command:

# run a python3 lektor server with new generated css
python3 -m lektor server -f pretifyhtml

Development

To test and/or develop on this plugin in your running lektor installation, simply place it in the packages/ Folder and have a look at the Lektor Docs

You might also like...
This python code will get requests from SET (The Stock Exchange of Thailand) a previously-close stock price and return it in Thai Baht currency using beautiful soup 4 HTML scrapper.

This python code will get requests from SET (The Stock Exchange of Thailand) a previously-close stock price and return it in Thai Baht currency using beautiful soup 4 HTML scrapper.

Facebook Group Scraping Using Beautiful Soup & Selenium

Extract Facebook group posts that are related to a specific topic and write them to a .json file.

A Web Scraper built with beautiful soup, that fetches udemy course information. Get udemy course information and convert it to json, csv or xml file
A Web Scraper built with beautiful soup, that fetches udemy course information. Get udemy course information and convert it to json, csv or xml file

Udemy Scraper A Web Scraper built with beautiful soup, that fetches udemy course information. Installation Virtual Environment Firstly, it is recommen

Generate HTML using python 3 with an API that follows the DOM standard specfication.
Generate HTML using python 3 with an API that follows the DOM standard specfication.

Generate HTML using python 3 with an API that follows the DOM standard specfication. A JavaScript API and tons of cool features. Can be used as a fast prototyping tool.

Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API

Dominate Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API. It allows you to write HTML pages in pure

A fast JSON parser/generator for C++ with both SAX/DOM style API
A fast JSON parser/generator for C++ with both SAX/DOM style API

A fast JSON parser/generator for C++ with both SAX/DOM style API Tencent is pleased to support the open source community by making RapidJSON available

A database scraper created with mechanical soup and sqlite
A database scraper created with mechanical soup and sqlite

WebscrapingDatabases a database scraper created with mechanical soup and sqlite author: Mariya Sha Watch on YouTube: This repository was created to su

A DOM-based G-Suite password sprayer and user enumerator

A DOM-based G-Suite password sprayer and user enumerator

The lektor static file content management system
The lektor static file content management system

Lektor Lektor is a static website generator. It builds out an entire project from static files into many individual HTML pages and has a built-in admi

The lektor static file content management system
The lektor static file content management system

Lektor Lektor is a static website generator. It builds out an entire project from static files into many individual HTML pages and has a built-in admi

Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.

Introduction Swagger UI allows anyone — be it your development team or your end consumers — to visualize and interact with the API’s resources without

Django-Text-to-HTML-converter - The simple Text to HTML Converter using Django framework

Django-Text-to-HTML-converter This is the simple Text to HTML Converter using Dj

A HTML-code compiler-thing that lets you reuse HTML code.

RHTML RHTML stands for Reusable-Hyper-Text-Markup-Language, and is pronounced "Rech-tee-em-el" despite how its abbreviation is. As the name stands, RH

Use minify-html, the extremely fast HTML + JS + CSS minifier, with Django.

django-minify-html Use minify-html, the extremely fast HTML + JS + CSS minifier, with Django. Requirements Python 3.8 to 3.10 supported. Django 2.2 to

That project takes as input special TXT File, divides its content into lsit of HTML objects and then creates HTML file from them.

That project takes as input special TXT File, divides its content into lsit of HTML objects and then creates HTML file from them.

Plugin for generating HTML reports for pytest results
Plugin for generating HTML reports for pytest results

pytest-html pytest-html is a plugin for pytest that generates a HTML report for test results. Resources Documentation Release Notes Issue Tracker Code

BuddyPress is an open source WordPress plugin to build a community site. In releases of BuddyPress from 5.0.0 before 7.2.1 it's possible for a non-privileged, regular user to obtain administrator rights by exploiting an issue in the REST API members endpoint. The vulnerability has been fixed in BuddyPress 7.2.1. Existing installations of the plugin should be updated to this version to mitigate the issue.
Protect your eyes from eye strain using this simple and beautiful, yet extensible break reminder

Protect your eyes from eye strain using this simple and beautiful, yet extensible break reminder

Python module for drawing and rendering beautiful atoms and molecules using Blender.

Batoms is a Python package for editing and rendering atoms and molecules objects using blender. A Python interface that allows for automating workflows.

Comments
  • fix deprecation warning

    fix deprecation warning

    /usr/lib/python3.10/site-packages/lektor/pluginsystem.py:174: DeprecationWarning: The plugin "html-pretify" function "on_after_build_all" does not accept extra_flags. It should be updated to accept `**extra` so that it will not break if new parameters are passed to it by newer versions of Lektor.
      warnings.warn()
    
    opened by DO1JLR 0
Releases(1.0.7)
  • 1.0.7(Oct 24, 2022)

    What's Changed

    • Update README.md by @DO1JLR in https://github.com/chaos-bodensee/lektor-html-pretify/pull/8
    • Codecs by @DO1JLR in https://github.com/chaos-bodensee/lektor-html-pretify/pull/9

    Full Changelog: https://github.com/chaos-bodensee/lektor-html-pretify/compare/1.0.6...1.0.7

    Source code(tar.gz)
    Source code(zip)
  • 1.0.6(May 8, 2022)

    What's Changed

    • Improve startpage badges by @DO1JLR in https://github.com/chaos-bodensee/lektor-html-pretify/pull/6
    • pylint and cleanup lektor plugin by @DO1JLR in https://github.com/chaos-bodensee/lektor-html-pretify/pull/7

    Full Changelog: https://github.com/chaos-bodensee/lektor-html-pretify/compare/1.0.5...1.0.6

    Source code(tar.gz)
    Source code(zip)
  • 1.0.5(Jan 26, 2022)

    What's Changed

    • Fix really fix url layout by @DO1JLR in https://github.com/chaos-bodensee/lektor-html-pretify/pull/5

    Full Changelog: https://github.com/chaos-bodensee/lektor-html-pretify/compare/1.0.4...1.0.5

    Source code(tar.gz)
    Source code(zip)
  • 1.0.4(Jan 26, 2022)

    What's Changed

    • Fix korrekt url layout by @DO1JLR in https://github.com/chaos-bodensee/lektor-html-pretify/pull/4

    Full Changelog: https://github.com/chaos-bodensee/lektor-html-pretify/compare/1.0.3...1.0.4

    Source code(tar.gz)
    Source code(zip)
  • 1.0.3(Jan 26, 2022)

    What's Changed

    • fix deprecation warning by @DO1JLR in https://github.com/chaos-bodensee/lektor-html-pretify/pull/3

    Full Changelog: https://github.com/chaos-bodensee/lektor-html-pretify/compare/1.0.2...1.0.3

    Source code(tar.gz)
    Source code(zip)
  • 1.0.2(Jan 26, 2022)

    What's Changed

    • Update version in README too by @DO1JLR in https://github.com/chaos-bodensee/lektor-html-pretify/pull/2

    Full Changelog: https://github.com/chaos-bodensee/lektor-html-pretify/compare/1.0.1...1.0.2

    Source code(tar.gz)
    Source code(zip)
  • 1.0.1(Jan 26, 2022)

    What's Changed

    • test releasing by @DO1JLR in https://github.com/chaos-bodensee/lektor-html-pretify/pull/1

    New Contributors

    • @DO1JLR made their first contribution in https://github.com/chaos-bodensee/lektor-html-pretify/pull/1

    Full Changelog: https://github.com/chaos-bodensee/lektor-html-pretify/compare/1.0.0...1.0.1

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Jan 26, 2022)

Owner
Chaos Bodensee
Chaos-Wesen um den Bodensee, vereinigt euch!
Chaos Bodensee
A jquery-like library for python

pyquery: a jquery-like library for python pyquery allows you to make jquery queries on xml documents. The API is as much as possible the similar to jq

Gael Pasgrimaud 2.2k Dec 29, 2022
The awesome document factory

The Awesome Document Factory WeasyPrint is a smart solution helping web developers to create PDF documents. It turns simple HTML pages into gorgeous s

Kozea 5.4k Jan 07, 2023
inscriptis -- HTML to text conversion library, command line client and Web service

inscriptis -- HTML to text conversion library, command line client and Web service A python based HTML to text conversion library, command line client

webLyzard technology 122 Jan 07, 2023
Converts XML to Python objects

untangle Documentation Converts XML to a Python object. Siblings with similar names are grouped into a list. Children can be accessed with parent.chil

Christian Stefanescu 567 Nov 30, 2022
A python HTML builder library.

PyML A python HTML builder library. Goals Fully functional html builder similar to the javascript node manipulation. Implement an html parser that ret

Arjix 8 Jul 04, 2022
That project takes as input special TXT File, divides its content into lsit of HTML objects and then creates HTML file from them.

That project takes as input special TXT File, divides its content into lsit of HTML objects and then creates HTML file from them.

1 Jan 10, 2022
A library for converting HTML into PDFs using ReportLab

XHTML2PDF The current release of xhtml2pdf is xhtml2pdf 0.2.5. Release Notes can be found here: Release Notes As with all open-source software, its us

2k Dec 27, 2022
The lxml XML toolkit for Python

What is lxml? lxml is the most feature-rich and easy-to-use library for processing XML and HTML in the Python language. It's also very fast and memory

2.3k Jan 02, 2023
Safely add untrusted strings to HTML/XML markup.

MarkupSafe MarkupSafe implements a text object that escapes characters so it is safe to use in HTML and XML. Characters that have special meanings are

The Pallets Projects 514 Dec 31, 2022
Modded MD conversion to HTML

MDPortal A module to convert a md-eqsue lang to html Basically I ruined md in an attempt to convert it to html Overview Here is a demo file from parse

Zeb 1 Nov 27, 2021
Python module that makes working with XML feel like you are working with JSON

xmltodict xmltodict is a Python module that makes working with XML feel like you are working with JSON, as in this "spec": print(json.dumps(xmltod

Martín Blech 5k Jan 04, 2023
Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API

Dominate Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API. It allows you to write HTML pages in pure

Tom Flanagan 1.5k Jan 09, 2023
Generate HTML using python 3 with an API that follows the DOM standard specfication.

Generate HTML using python 3 with an API that follows the DOM standard specfication. A JavaScript API and tons of cool features. Can be used as a fast prototyping tool.

byteface 114 Dec 14, 2022
Lektor-html-pretify - Lektor plugin to pretify the HTML DOM using Beautiful Soup

html-pretify Lektor plugin to pretify the HTML DOM using Beautiful Soup. How doe

Chaos Bodensee 2 Nov 08, 2022
Bleach is an allowed-list-based HTML sanitizing library that escapes or strips markup and attributes

Bleach Bleach is an allowed-list-based HTML sanitizing library that escapes or strips markup and attributes. Bleach can also linkify text safely, appl

Mozilla 2.5k Dec 29, 2022
A HTML-code compiler-thing that lets you reuse HTML code.

RHTML RHTML stands for Reusable-Hyper-Text-Markup-Language, and is pronounced "Rech-tee-em-el" despite how its abbreviation is. As the name stands, RH

Duckie 4 Nov 15, 2021
Pythonic HTML Parsing for Humans™

Requests-HTML: HTML Parsing for Humans™ This library intends to make parsing HTML (e.g. scraping the web) as simple and intuitive as possible. When us

Python Software Foundation 12.9k Jan 01, 2023
Python binding to Modest engine (fast HTML5 parser with CSS selectors).

A fast HTML5 parser with CSS selectors using Modest engine. Installation From PyPI using pip: pip install selectolax Development version from github:

Artem Golubin 710 Jan 04, 2023
Standards-compliant library for parsing and serializing HTML documents and fragments in Python

html5lib html5lib is a pure-python library for parsing HTML. It is designed to conform to the WHATWG HTML specification, as is implemented by all majo

1k Dec 27, 2022