Skip to content

Floflis/mlq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

21 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

mlq

jq, but HTML instead of JSON ๐Ÿงš


Reading the content inside a given tag by id

mlq -r '#imAnID' file.html

More usage, in the next lines; so please continue reading. Let's focus first in the first:

Installing

Easy (option 1)

Open the Withcraft/Terminal/Prompt and type + press [ENTER]:

curl --proto '=https' --tlsv1.3 -sSf https://raw.githubusercontent.com/Floflis/mlq/main/install.sh | sh

Locally (option 2)

If you don't trust downloading+executing a script, you can do it locally.

Open terminal and type following by pressing [ENTER]:

Floflis, Floflis-based distros such as UniOS and any other that uses nu shell:

git clone https://github.com/Floflis/mlq.git ; cd mlq

After reviewing the code of install.sh:

chmod +x install.sh ; sh ./install.sh

Any other *nix distro (Ubuntu/Arch/MacOS/etc):

git clone https://github.com/Floflis/mlq.git && cd mlq

After reviewing the code of install.sh:

chmod +x install.sh && sh ./install.sh

Writing any desired content inside a given tag by id on-the-fly:

mlq '#imAnID = "<desired>CONTENT</desired>"' file.html

You can write out the output to any file/place; its up to your creativity.

Writing any desired content inside a given tag by id, writing directly to the file (be cautious):

contents="$(mlq '#imAnID = "<desired>CONTENT</desired>"' file.html)" && \
echo "${contents}" > file.html

Note: this tool isn't professional nor native. You are free to make a program with the same name (mlq) in Rust, then ask us to replace this by yours; but a better idea would be to contribute to/complete something existing: htmlq

The positive points about mlq:

  • short name/command
  • lower entry barrier, as there are more Bash than C/Rust/Perl developers (so it can have more features than others and developed in a faster pace)

mlq is used by:

About

jq, but HTML instead of JSON ๐Ÿงš

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published