Simple HTML Modification in Go

Project Tests codecov

Simple HTML Modification in Go

Do you grin at the sight of html.Node ? Me too.

Modifying HTML in Go should be simple.

🧘🏻 Human friendly: query language for humans that takes a minute to grasp.

🎓 Simplicity: no robust solution here just one single goal

Getting Started

Hello !

`) // mutate doc.Set("id=content", "Bye Bye") // get back newStringDoc := doc.String() } ">
package main
import "github.com/asaf-shitrit/go-rewrite"

func main(){

    // load
    doc := html_overwrite.Load(`
       
            
                

Hello !

`) // mutate doc.Set("id=content", "Bye Bye") // get back newStringDoc := doc.String() }

Query Language

The two html identifiers supported right now are:

  • id
  • class name
// All matchers are split up by a comma (,)

// Pattern:
[matcher]=[value],[matcher]=[value]

// Example (By ID):
id=content

// Example (By Class):
class=great-name

// Example (Multiple Matchers)
id=content,class=great-name

State

  • Will be actively developed by me based on features I require in personal projects
  • Tests will be added to each new feature release
  • Feel free to create new issues if you find any 😃
Owner
Asaf Shitrit
A gamer at heart with a passion for design and programming.
Asaf Shitrit
Similar Resources

Lightweight, Simple, Quick, Thread-Safe Golang Stack Implementation

stack Lightweight, Simple, Quick, Thread-Safe Golang Stack Implementation Purpose Provide a fast, thread safe, and generic Golang Stack API with minim

May 3, 2022

Simple profiling for Go

profile Simple profiling for Go. Easy management of Go's built-in profiling and tracing Based on the widely-used pkg/profile: mostly-compatible API Su

Sep 23, 2022

simple i18n support that relies on standard go libraries

The i18n package mainly includes a set of methods for managing the data. Start by creating a en.json file.

Jun 29, 2021

A simple thread-safe, fixed size LRU written in Go. Based on dominictarr's Hashlru Algorithm. 🔃

go-hashlru A simple thread-safe, fixed size LRU written in Go. Based on dominictarr's Hashlru Algorithm. 🔃 Uses map[interface{}]interface{} to allow

Dec 5, 2022

Simple expression evaluation engine for Go

🌶️ chili Currently in development, Unstable (API may change in future) Simple expression evaluation engine. Expression is one liner that evalutes int

Nov 8, 2022

A simple tool to auto remove unused imports in rust

rust_strip A simple tool to remove unused imports in RUST. Call Cargo build/test Process the warning logs of unused imports Then replace the involved

Oct 15, 2022

A simple business indicator tool that uses a sliding window to detect whether the indicator exceeds the threshold

melon A simple business indicator tool that uses a sliding window to detect whether the indicator exceeds the threshold Usage //create the metric //th

Jul 11, 2021

simple GitHub action to parse Markdown Links into a .yaml file for Hugo

Obsidian Link Scrapper Used by Quartz This repository comes to you in two parts. GitHub Action (scrapes links into a .yml file) Hugo Partial (turns .y

Dec 30, 2022

A simple API for computing diffs of your documents over the time built on a scalable technology stack.

Diffme API WIP - this is an API to compute diffs between documents. It serves as a way to easily create audit logs for documents in your system, think

Sep 8, 2021
Comments
  • support for high performance Set/Append operations

    support for high performance Set/Append operations

    Took a lot of inspiration from the tidewell/gjson library when working on this, the case for performing a fast mutation on an HTTP stream requires low latency which this allows for all while using the io.Reader & io.Writer interfaces.

hdq - HTML DOM Query Language for Go+

hdq - HTML DOM Query Language for Go+ Summary about hdq hdq is a Go+ package for processing HTML documents. Tutorials Collect links of a html page How

Dec 13, 2022
⚙️ Concept of Golang HTML render engine with frontend components and dynamic behavior

SSC Engine An HTML render engine concept that brings frontend-like components experience to the server side with native html/template on steroids. Sup

Nov 25, 2022
Go-generics-simple-doubly-linked-list - A simple doubly linked list implemented using generics (Golang)

Welcome to Go-Generics-Simple-Doubly-Linked-List! Hi, This repository contains a

Jun 30, 2022
Simple in Pure Go in Browser Interactive Interpreter
Simple in Pure Go in Browser Interactive Interpreter

GoBook This project is a PoC Don't take it seriously The main point of this project is the use of the library: github.com/brendonmatos/golive Maybe th

Feb 22, 2022
Simple project to demonstrate the loading of eBPF programs via florianl/go-tc.

tc-skeleton Simple project to demonstrate the loading of eBPF programs via florianl/go-tc.

Dec 23, 2022
EGo lets you build, debug und run Go apps on Intel SGX - as simple as conventional Go programming!

EGo lets you build, debug und run Go apps on Intel SGX - as simple as conventional Go programming!

Dec 28, 2022
A super simple Lodash like utility library with essential functions that empowers the development in Go
A super simple Lodash like utility library with essential functions that empowers the development in Go

A simple Utility library for Go Go does not provide many essential built in functions when it comes to the data structure such as slice and map. This

Jan 4, 2023
egg - the simple error aggregator

egg - the simple error aggregator egg ingests errors and aggregates them egg has 1st class support for sentry SDKs so you dont have to change any code

May 1, 2022
Procswap is a simple application that allows you to prioritize processes on a Windows machine.
Procswap is a simple application that allows you to prioritize processes on a Windows machine.

Procswap is a simple application that allows you to prioritize processes on a Windows machine.

Mar 8, 2022
Simple unpacking script for Ezuri ELF Crypter
Simple unpacking script for Ezuri ELF Crypter

ezuri_unpack A simple unpacking script for the Ezuri ELF Crypter. Based on the analysis done by Ofer Caspi and Fernando Martinez of AT&T Alien Labs

Dec 15, 2022