Skip to content

haturatu/ght

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ght

get-http-title

Build

Please check if the Go path is running.

which go

requirements:

go get github.com/atotto/clipboard
go get github.com/akamensky/argparse

And then compile.

go build -o ght main.go

or you can use the Makefile to build it.

make

Install

You can install it to /usr/local/bin with the following command.

sudo make install

Uninstall

sudo make uninstall

Usage

URL in $1.

$ ght --help
usage: ght [-h|--help] [-u|--url "<value>"] [-m|--markdown] [-c|--copy]

           Get HTML Title

Arguments:

  -h  --help      Print help information
  -u  --url       URL to fetch
  -m  --markdown  Output in Markdown format
  -c  --copy      Copy to clipboard

exec

$ ght "https://google.com/"
Google

Copy to clipboard

$ ght -mc "https://google.com/"
[Google](https://google.com/)

Done!

for example

If you have a file called urls with URLs listed.

https://www.google.com/
https://soulminingrig.com/
https://soulminingrig.com/ab/

Single proccessing

cat urls | while read -r url ; do ght $url ; done

Parallel processing with xargs

cat urls | xargs -P 4 -I {} ght {}

Makefile

  • make build: Build the binary.
  • make install: Install the binary to /usr/local/bin.
  • make uninstall: Uninstall the binary.
  • make clean: Remove the binary.
  • make fmt: Format the code.
  • make vet: Run go vet.
  • make test: Run tests.

About

get-http-title Get website title

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published