8 Commits
Author SHA1 Message Date
Yash-Handa a59d69ec3a Merge branch 'master' of github.com:Yash-Handa/logo-ls 2020-09-08 23:02:17 +05:30
Yash-Handa f776e08b70 Added basic goreleaser settings 2020-09-08 23:02:09 +05:30
Yash HandaandGitHub 28797b6281 Update README.md 2020-09-08 04:50:16 +05:30
Yash-Handa 60585a6a50 Added man page. 2020-09-07 13:48:43 +05:30
Yash HandaandGitHub 6ebebf05d6 Update README.md 2020-09-07 11:42:52 +05:30
Yash-Handa ba0f74c973 updated README.md 2020-09-07 11:41:15 +05:30
Yash-Handa 43b0e86ef2 Updated README.md 2020-09-07 06:54:19 +05:30
Yash-Handa 3c630eb4e5 Updated readme.md 2020-09-07 06:52:51 +05:30
8 changed files with 192 additions and 28 deletions
+9 -1
View File
@@ -1,9 +1,17 @@
#!/bin/bash
# build the binery
go build
# Update HELP.md file
echo -e "\`\`\`txt" > HELP.md
go run . -? >> HELP.md
./logo-ls -? >> HELP.md
echo -e "\`\`\`" >> HELP.md
exec git add HELP.md
# Update logo-ls.1.gz
help2man -N -I logo-ls.h2m -o logo-ls.1 ./logo-ls
gzip -f logo-ls.1
exec git add logo-ls.1.gz
exit 0
+6
View File
@@ -17,3 +17,9 @@
# Do not commit the executable
logo-ls
build/
# distribution directory
dist
# env stuff
*.env
+78
View File
@@ -0,0 +1,78 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
env_files:
github_token: .gh_token.env
project_name: logo-ls
before:
hooks:
# You may remove this if you don't use go modules.
- go mod download
builds:
- env:
- CGO_ENABLED=0
# supported OS
goos:
- linux
# - windows
- darwin
# supported ARCH
goarch:
- amd64
- 386
- arm64
- arm
# OS ARCH combinations to ignore
ignore:
- goos: darwin
goarch: 386
# Set the modified timestamp on the output binaries to the latest commit time.
# Required for producing Reproducible builds
mod_timestamp: '{{ .CommitTimestamp }}'
archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
# override archiving [default tar.gz]
format_overrides:
- goos: windows
format: zip
# wrap the content of archive in a dir
#so when extracting the content will be in a dir
wrap_in_directory: true
# files to be included in the archive + binary
files:
- LICENSE
- HELP.md
- logo-ls.1.gz
# - CHANGELOG.md
checksum:
name_template: '{{ .ProjectName }}_SHA512sums.txt'
algorithm: sha512
signs:
-
cmd: gpg2
# sign the checksum with Yash Handa (logo-ls) <yashhanda7@yahoo.com>
args: ["-u", "0xD9498B225223344C0205FDF528182066BCACCCB2", "--output", "${signature}", "--detach-sign", "${artifact}"]
artifacts: checksum
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
+20 -13
View File
@@ -1,7 +1,9 @@
```txt
List information about the FILEs with ICONS and GIT STATUS (the current dir
by default). Sort entries alphabetically if none of -tvSUX is specified.
Usage: logo-ls [-1?aAcdDgGhiloRrSstUvVX] [-T value] [files ...]
-1 list one file per line.
-? display this help and exit
-?, --help display this help and exit
-a, --all do not ignore entries starting with .
-A, --almost-all do not list implied . and ..
-c, --disable-color
@@ -30,16 +32,21 @@ Usage: logo-ls [-1?aAcdDgGhiloRrSstUvVX] [-T value] [files ...]
-X sort alphabetically by entry extension
Possible value for --time-style (-T)
ANSIC "Mon Jan _2 15:04:05 2006"
UnixDate "Mon Jan _2 15:04:05 MST 2006"
RubyDate "Mon Jan 02 15:04:05 -0700 2006"
RFC822 "02 Jan 06 15:04 MST"
RFC822Z "02 Jan 06 15:04 -0700"
RFC850 "Monday, 02-Jan-06 15:04:05 MST"
RFC1123 "Mon, 02 Jan 2006 15:04:05 MST"
RFC1123Z "Mon, 02 Jan 2006 15:04:05 -0700"
RFC3339 "2006-01-02T15:04:05Z07:00"
Kitchen "3:04PM"
Stamp "Mon Jan _2 15:04:05" [Default]
StampMilli "Jan _2 15:04:05.000"
ANSIC "Mon Jan _2 15:04:05 2006"
UnixDate "Mon Jan _2 15:04:05 MST 2006"
RubyDate "Mon Jan 02 15:04:05 -0700 2006"
RFC822 "02 Jan 06 15:04 MST"
RFC822Z "02 Jan 06 15:04 -0700"
RFC850 "Monday, 02-Jan-06 15:04:05 MST"
RFC1123 "Mon, 02 Jan 2006 15:04:05 MST"
RFC1123Z "Mon, 02 Jan 2006 15:04:05 -0700"
RFC3339 "2006-01-02T15:04:05Z07:00"
Kitchen "3:04PM"
Stamp "Mon Jan _2 15:04:05" [Default]
StampMilli "Jan _2 15:04:05.000"
Exit status:
0 if OK,
1 if minor problems (e.g., cannot access subdirectory),
2 if serious trouble (e.g., cannot access command-line argument).
```
+47
View File
@@ -1,9 +1,56 @@
![OpenSource](https://img.shields.io/badge/Open%20Source-000000?style=for-the-badge&logo=github)
![go](https://img.shields.io/badge/-Written%20In%20Go-00add8?style=for-the-badge&logo=Go&logoColor=ffffff)
![cli](https://img.shields.io/badge/-Build%20for%20CLI-000000?style=for-the-badge&logo=Powershell&logoColor=ffffff)
# logo-ls
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/Yash-Handa/logo-ls?style=flat-square)
![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/Yash-Handa/logo-ls?sort=semver&style=flat-square)
![PRs](https://img.shields.io/badge/PRs-welcome-56cc14?style=flat-square)
[![HitCount](http://hits.dwyl.com/{Yash-Handa}/{logo-ls}.svg)](http://hits.dwyl.com/{Yash-Handa}/{logo-ls})
modern ls command with vscode like file logos. Written in Golang
Command and Arguments supported are listed in [HELP.md](/HELP.md)
## Check the downloaded Resource
receive public key of the signing party
```cmd
$ gpg2 --keyid-format long --keyserver keyserver.ubuntu.com --recv-keys 0x28182066bcacccb2
gpg: key 28182066BCACCCB2: "Yash Handa (logo-ls) <yashhanda7@yahoo.com>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
```
check the signature on logo-ls_SHA512sums.txt
```cmd
$ gpg2 --keyid-format long --verify logo-ls_SHA512sums.txt.sig logo-ls_SHA512sums.txt
gpg: Signature made Tue 08 Sep 2020 10:21:52 PM IST
gpg: using RSA key D9498B225223344C0205FDF528182066BCACCCB2
gpg: Good signature from "Yash Handa (logo-ls) <yashhanda7@yahoo.com>" [ultimate]
```
A **Good** signature means that the checked file was definitely signed by the owner of the keyfile stated (if they didnt match, the signature would be reported as **BAD**)
Now use `logo-ls_SHA512sums.txt` file to verify the authenticity of the resource downloaded
```cmd
$ sha512sum -c logo-ls_SHA512sums.txt 2>&1 | grep OK
logo-ls_Linux_x86_64.tar.gz: OK
logo-ls_Linux_arm64.tar.gz: OK
logo-ls_Darwin_x86_64.tar.gz: OK
logo-ls_Linux_i386.tar.gz: OK
logo-ls_Linux_armv6.tar.gz: OK
```
Note: The downloaded resources to verify and `logo-ls_SHA512sums.txt` should be in the same directory
## Example Commands
<div>
BIN
View File
Binary file not shown.
+10
View File
@@ -0,0 +1,10 @@
[ENVIRONMENT]
For correct display of icons the terminal should support UTF-8 encoding
with NERD FONT <https://github.com/ryanoasis/nerd-fonts> patched font.
For correct display of colors the terminal should support TRUE COLOR.
[REPORTING BUGS]
Report Bugs to <https://github.com/Yash-Handa/logo-ls/issues>
[SEE ALSO]
Full documentation with examples at: <https://www.github.com/Yash-Handa/logo-ls>
+22 -14
View File
@@ -102,7 +102,7 @@ func main() {
f_R := getopt.BoolLong("recursive", 'R', "list subdirectories recursively")
f_T := getopt.EnumLong("time-style", 'T', []string{"Stamp", "StampMilli", "Kitchen", "ANSIC", "UnixDate", "RubyDate", "RFC1123", "RFC1123Z", "RFC3339", "RFC822", "RFC822Z", "RFC850"}, "Stamp", "time/date format with -l; see time-style below")
f_help := getopt.Bool('?', "display this help and exit")
f_help := getopt.BoolLong("help", '?', "display this help and exit")
f_V := getopt.BoolLong("version", 'V', "output version information and exit")
// using getopt.Getopt instead of parse to provide custom err
@@ -115,26 +115,35 @@ func main() {
// if f_help is provided print help and exit(0)
if *f_help {
fmt.Println("List information about the FILEs with ICONS and GIT STATUS (the current dir \nby default). Sort entries alphabetically if none of -tvSUX is specified.")
getopt.PrintUsage(os.Stdout)
fmt.Println("\nPossible value for --time-style (-T)")
fmt.Printf("%-11s %-32q\n", "ANSIC", "Mon Jan _2 15:04:05 2006")
fmt.Printf("%-11s %-32q\n", "UnixDate", "Mon Jan _2 15:04:05 MST 2006")
fmt.Printf("%-11s %-32q\n", "RubyDate", "Mon Jan 02 15:04:05 -0700 2006")
fmt.Printf("%-11s %-32q\n", "RFC822", "02 Jan 06 15:04 MST")
fmt.Printf("%-11s %-32q\n", "RFC822Z", "02 Jan 06 15:04 -0700")
fmt.Printf("%-11s %-32q\n", "RFC850", "Monday, 02-Jan-06 15:04:05 MST")
fmt.Printf("%-11s %-32q\n", "RFC1123", "Mon, 02 Jan 2006 15:04:05 MST")
fmt.Printf("%-11s %-32q\n", "RFC1123Z", "Mon, 02 Jan 2006 15:04:05 -0700")
fmt.Printf("%-11s %-32q\n", "RFC3339", "2006-01-02T15:04:05Z07:00")
fmt.Printf("%-11s %-32q\n", "Kitchen", "3:04PM")
fmt.Printf("%-11s %-32q [Default]\n", "Stamp", "Mon Jan _2 15:04:05")
fmt.Printf("%-11s %-32q\n", "StampMilli", "Jan _2 15:04:05.000")
fmt.Printf(" %-11s %-32q\n", "ANSIC", "Mon Jan _2 15:04:05 2006")
fmt.Printf(" %-11s %-32q\n", "UnixDate", "Mon Jan _2 15:04:05 MST 2006")
fmt.Printf(" %-11s %-32q\n", "RubyDate", "Mon Jan 02 15:04:05 -0700 2006")
fmt.Printf(" %-11s %-32q\n", "RFC822", "02 Jan 06 15:04 MST")
fmt.Printf(" %-11s %-32q\n", "RFC822Z", "02 Jan 06 15:04 -0700")
fmt.Printf(" %-11s %-32q\n", "RFC850", "Monday, 02-Jan-06 15:04:05 MST")
fmt.Printf(" %-11s %-32q\n", "RFC1123", "Mon, 02 Jan 2006 15:04:05 MST")
fmt.Printf(" %-11s %-32q\n", "RFC1123Z", "Mon, 02 Jan 2006 15:04:05 -0700")
fmt.Printf(" %-11s %-32q\n", "RFC3339", "2006-01-02T15:04:05Z07:00")
fmt.Printf(" %-11s %-32q\n", "Kitchen", "3:04PM")
fmt.Printf(" %-11s %-32q [Default]\n", "Stamp", "Mon Jan _2 15:04:05")
fmt.Printf(" %-11s %-32q\n", "StampMilli", "Jan _2 15:04:05.000")
fmt.Println("\nExit status:")
fmt.Println(" 0 if OK,")
fmt.Println(" 1 if minor problems (e.g., cannot access subdirectory),")
fmt.Println(" 2 if serious trouble (e.g., cannot access command-line argument).")
os.Exit(osExitCode)
}
// if f_V is provided version will be printed and exit(0)
if *f_V {
fmt.Printf("logo-ls %s\nCopyright (c) 2020 Yash Handa\nLicense MIT <https://opensource.org/licenses/MIT>.\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n", "v1.3.0")
fmt.Println("\nWritten by Yash Handa")
os.Exit(osExitCode)
}
@@ -338,7 +347,6 @@ func main() {
}
}
}
fmt.Printf("\n\n")
os.Exit(osExitCode)
}