{"id":16545527,"url":"https://github.com/ctoscano/SliqueHTML","last_synced_at":"2025-10-28T15:31:28.606Z","repository":{"id":1239469,"uuid":"1177741","full_name":"ctoscano/SliqueHTML","owner":"ctoscano","description":"Python library that lets you create HTML using DOM-like objects.","archived":false,"fork":false,"pushed_at":"2011-06-18T19:05:58.000Z","size":100,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-11T14:02:47.100Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://slique.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctoscano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-12-17T17:11:50.000Z","updated_at":"2013-10-20T03:42:36.000Z","dependencies_parsed_at":"2022-08-16T12:40:39.085Z","dependency_job_id":null,"html_url":"https://github.com/ctoscano/SliqueHTML","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctoscano%2FSliqueHTML","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctoscano%2FSliqueHTML/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctoscano%2FSliqueHTML/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctoscano%2FSliqueHTML/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctoscano","download_url":"https://codeload.github.com/ctoscano/SliqueHTML/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219859195,"owners_count":16556036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T19:07:04.028Z","updated_at":"2025-10-28T15:31:28.256Z","avatar_url":"https://github.com/ctoscano.png","language":"Python","readme":"#SliqueHTML\n\nPython library that lets you generate HTML using DOM-like objects. \n\n##Purpose\n\nPrototyping HTML typically requires frequest, manual modification of HTML \nmarkup, which cause the following tasks to be very time-consuming and \nerror prone: \n\n*   keeping track of closing tags \n*   generating diffirent flavors of similar HTML for for comparison\n*   propogating changes to all relevant templates\n\nSliqueHTML generates valid HTML, uses inheritance to allow related DOM objects\nto reuse code, and inherently makes propogating UI tweaks through code reuse\nand the use of objects. \n\nSliqueHTML can be either used by designers-that-code to generate templates and \ncomps, or by developers in production.\n\n##How to use SliqueHTML\n\nOnce the SliqueHTML _src_ folder is on the path, import the _new_ object:\n\n    from slique.html.html import new\n\nYou can use the _new_ object to generate _element_ objects, that act much like\nDOM elements. \n\n    new_anchor = new.a(href=\"http://bab.as\")    # returns an element object\n    \n    # \u003ca href=\"http://bab.as\"\u003e\u003c/a\u003e\n\nYou can modify _element_ objects several ways:\n\n    new_anchor.add('Personal Homepage')         # string escaped\n    new_anchor.set(id=\"homepage_link\")          # sets id\n    \n    # modifications can be chained\n    # new_anchor.add('Personal Homepage').add(id='homepage_link')\n    \n    # \u003ca href=\"http://bab.as\" id=\"homepage_link\"\u003ePersonal Homepage\u003c/a\u003e\n    \nSome attributes are special. For example, _class_ is a python keyword, so using\nthe _set_ method would not work, so instead you can either:\n\n    new_anchor.set(cls=\"new_class\") # setting\n    # or\n    new_anchor.addClass(\"new_class\") # appending\n    # \u003ca href=\"http://bab.as\" id=\"homepage_link\" class=\"new_class\"\u003ePersonal Homepage\u003c/a\u003e\n    \nLook at the [element object definition](https://github.com/ctoscano/SliqueHTML/blob/master/src/slique/html/element.py) for more details.\n\nFinally, you can also extend element objects for convenience. Such an extension \ncould be as simple as adding helper functions to the table object, or extending \nit further to automatically place added items into a single column. \n\nSee the table object and the VerticleTable object defined [here](https://github.com/ctoscano/SliqueHTML/blob/master/src/slique/html/table.py).\n\nFor convenience, there is also another basic type, the [document](https://github.com/ctoscano/SliqueHTML/blob/master/src/slique/html/document.py) type. It can be \nused as a shell containing the doctype, as well as the html, head, and body \ntags. \n\nAn example of the document inheritance in use can be found [here](https://github.com/ctoscano/pluma/blob/master/pysrc/pluma/views/pages/__init__.py) and [here](https://github.com/ctoscano/pluma/blob/master/pysrc/pluma/views/pages/inbox.py). \n\n\nSliqueHTML is a work in progress. We are doing what we can to make it an \nefficient, effective, and pleasant way to generate HTML. Please let me know if \nyou have any comments, complaints, or suggestions we can use to make it better; \nor better yet, please share your improvements.\n\nSincerely,\nCesar Toscano \n \n\n##Security\n\nSliqueHTML by default escapes all string inputs, including element attributes. \nRaw HTML can be added by using an element's _addHTML_ method. \n\n","funding_links":[],"categories":["Libraries"],"sub_categories":["General HTML Generation"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctoscano%2FSliqueHTML","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctoscano%2FSliqueHTML","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctoscano%2FSliqueHTML/lists"}