33 Commits
Author SHA1 Message Date
Yash-Handa e9103c7b9f bumped up version to 1.3.7 2021-01-19 14:46:25 +05:30
Yash Handa a63c74a66b fixed windows os display 2021-01-19 14:03:52 +05:30
Yash-Handa 2492038848 optamization of -D (git status) command 2020-12-29 12:24:40 +05:30
Yash-Handa 50b0a296ec Updated snapshort for change from white to noColor 2020-12-28 20:46:20 +05:30
Yash HandaandGitHub f05b146afe Merge pull request #17 from Ortiye/master
Fix colors
2020-12-28 19:19:50 +05:30
Yash HandaandGitHub 77afdeb394 removed reference of white 2020-12-28 19:15:07 +05:30
Yash-Handa c32decf6d5 Go build passing 2020-12-28 19:08:42 +05:30
Yash-Handa 8495741d5f Made recursion alphabetic for re-producability 2020-12-28 19:06:25 +05:30
Yash HandaandGitHub 24436936f0 Create go.yml 2020-12-28 18:40:49 +05:30
Yash-Handa 81e700ab5d Added end to end tests for commands 2020-12-28 18:36:43 +05:30
Yash HandaandGitHub 9972f5644a Merge pull request #18 from komem3/shellwidth
Supported for terminals that do not support 'TIOCGWINSZ'
2020-11-01 18:15:49 +05:30
Yash-Handa c6c7cf7b1f Added support for sub-extentions for files.
The list of sub-extentions added are :
routing.ts, routing.tsx, routing.js, routing.jsx, routes.ts, routes.tsx, routes.js, routes.jsx, sln.dotsettings, d.ts, vcxitems.filters, vcxproj.filters, js.map, mjs.map, css.map, spec.ts, e2e-spec.ts, test.ts, ts.snap, spec.tsx, test.tsx, tsx.snap, spec.jsx, test.jsx, jsx.snap, spec.js, e2e-spec.js, test.js, js.snap, tf.json, blade.php, inky.php, gitlab-ci.yml, stories.js, stories.jsx, story.js, story.jsx, stories.ts, stories.tsx, story.ts, story.tsx, azure-pipelines.yml, azure-pipelines.yaml
2020-11-01 17:38:01 +05:30
Yash HandaandGitHub 483c3a3060 Merge pull request #6 from mattn/windows
Support Windows
2020-11-01 06:34:29 +05:30
Yash HandaandGitHub 9542954447 Merge pull request #14 from EugeneChung/patch-1
change Mac OS man page
2020-11-01 05:57:57 +05:30
Yasuhiro Matsumoto bd000027bf Merge branch 'master' into windows 2020-10-05 23:46:45 +09:00
komem3 023e18fcb3 Supported for terminals that do not support 'TIOCGWINSZ'
Not all terminals can use 'TIOCGWINSZ' to get the size of the terminal.
That's why I used the "COLUMNS" variable to get the size when the width is zero.
2020-10-01 19:46:39 +09:00
Ortiye e0da5f56f6 fix colors 2020-09-30 22:07:27 +02:00
Eugene ChungandGitHub f43afd530a change Mac OS man page
to /usr/local/share/man/man1/

sudo cp logo-ls.1.gz /usr/share/man/man1/
cp: /usr/share/man/man1/logo-ls.1.gz: Read-only file system
(On Catalina 10.15.7)
2020-09-30 14:11:48 +09:00
Yash-Handa ea3572135b Added some code refactoring 2020-09-29 11:30:48 +05:30
Yash-Handa 8af73ba6b1 Executable files retain Icons with green color 2020-09-29 10:04:39 +05:30
Yash-Handa 15930b8262 Complete Revamp of File Struct(No end user change) 2020-09-29 09:10:44 +05:30
Yash HandaandGitHub c45daabca1 Merge pull request #8 from JojiiOfficial/master
Add AUR badge
2020-09-24 17:33:46 +05:30
Yash HandaandGitHub 5fdfaab1cf Update README.md 2020-09-24 17:33:07 +05:30
JojiiOfficialandGitHub a710756d07 Add TOC entry for Arch linux installation 2020-09-24 12:59:05 +02:00
JojiiOfficialandGitHub 288cc5531e Update README.md 2020-09-24 12:53:46 +02:00
JojiiOfficialandGitHub d5abf25cc9 Update README.md 2020-09-23 14:04:18 +02:00
Yasuhiro Matsumoto 503f937cf3 Fix .goreleaser.yml 2020-09-23 11:24:06 +09:00
Yasuhiro Matsumoto 1b76d79de4 Support Windows 2020-09-23 10:42:45 +09:00
Yash-Handa f6f6bee415 minor fixes 2020-09-16 20:01:48 +05:30
Yash-Handa 8be883a8de Added go get and Build from Source to README.md 2020-09-16 18:05:24 +05:30
Yash-Handa 3548235135 fixed a bug on list of very long file names 2020-09-16 17:16:33 +05:30
Yash-Handa e7baa8cbbd Added go.mod to .github dir 2020-09-16 13:47:41 +05:30
Yash-Handa 916334088e bumped up version to 1.3.4 2020-09-10 15:13:51 +05:30
44 changed files with 2680 additions and 1886 deletions
-43
View File
@@ -1,43 +0,0 @@
# #!/bin/sh
# R_NAME=$1
# R_URL=$2
# error_exit()
# {
# if [ "$?" != "0" ]; then
# nl=$'\n'
# echo "$1""$nl""$2""$nl""$nl""Aborting push to ""$R_NAME"" (""$R_URL"")" 1>&2
# exit 1
# fi
# }
# # Build binary for variety of arch
# # linux amd64
# ERROR=$(go env -w GOOS=linux GOARCH=amd64 2>&1 > /dev/null)
# error_exit "Cannot set GOOS=linux and GOARCH=amd64:" "$ERROR"
# ERROR=$(go build -o build/logo-ls-linux-amd64 2>&1 > /dev/null)
# error_exit "Cannot build logo-ls-linux-amd64:" "$ERROR"
# # linux arm64
# ERROR=$(go env -w GOOS=linux GOARCH=arm64 2>&1 > /dev/null)
# error_exit "Cannot set GOOS=linux and GOARCH=arm64:" "$ERROR"
# ERROR=$(go build -o build/logo-ls-linux-arm64 2>&1 > /dev/null)
# error_exit "Cannot build logo-ls-linux-arm64:" "$ERROR"
# # linux 386
# ERROR=$(go env -w GOOS=linux GOARCH=386 2>&1 > /dev/null)
# error_exit "Cannot set GOOS=linux and GOARCH=386:" "$ERROR"
# ERROR=$(go build -o build/logo-ls-linux-386 2>&1 > /dev/null)
# error_exit "Cannot build logo-ls-linux-386:" "$ERROR"
# # darwin amd64
# ERROR=$(go env -w GOOS=darwin GOARCH=amd64 2>&1 > /dev/null)
# error_exit "Cannot set GOOS=darwin and GOARCH=amd64:" "$ERROR"
# ERROR=$(go build -o build/logo-ls-darwin-amd64 2>&1 > /dev/null)
# error_exit "Cannot build logo-ls-darwin-amd64:" "$ERROR"
# # reset env to default
# go env -u GOOS GOARCH
# exit 0
+1
View File
@@ -0,0 +1 @@
// An empty go.mod file to refrain this dir to be distributed with the cli tool
+36
View File
@@ -0,0 +1,36 @@
name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.15
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
+4 -1
View File
@@ -23,4 +23,7 @@ dist
# env stuff
*.env
.gh_token
.gh_token
# test related data
testdata/dirEnv*
+3 -3
View File
@@ -2,7 +2,7 @@
# Make sure to check the documentation at http://goreleaser.com
env_files:
github_token: '{{ .Env.PWD }}.gh_token'
github_token: ~/Projects/Golang_Stuff/logo-ls/.gh_token
project_name: logo-ls
@@ -17,7 +17,7 @@ builds:
# supported OS
goos:
- linux
# - windows
- windows
- darwin
# supported ARCH
goarch:
@@ -98,4 +98,4 @@ nfpms:
recommends:
- golang
files:
"logo-ls.1.gz": "/usr/share/man/man1/logo-ls.1.gz"
"logo-ls.1.gz": "/usr/share/man/man1/logo-ls.1.gz"
+79 -4
View File
@@ -7,11 +7,12 @@
![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})
![AUR](https://img.shields.io/aur/version/logo-ls?style=flat-square&logo=Arch-Linux&labelColor=abcdef&label=AUR)
![deb](https://img.shields.io/badge/-Deb%20Package-A81D33?style=flat-square&logo=Debian&link=https://github.com/Yash-Handa/logo-ls/releases/)
![rpm](https://img.shields.io/badge/-RPM%20Package-EE0000?style=flat-square&logo=Red-Hat&link=https://github.com/Yash-Handa/logo-ls/releases/)
![linux](https://img.shields.io/badge/-Linux%20Binary-FCC624?style=flat-square&logo=Linux&logoColor=000000&link=https://github.com/Yash-Handa/logo-ls/releases/)
![apple](https://img.shields.io/badge/-Darwin%20Binary-999999?style=flat-square&logo=Apple&logoColor=ffffff&link=https://github.com/Yash-Handa/logo-ls/releases/)
![Go](https://github.com/Yash-Handa/logo-ls/workflows/Go/badge.svg)
modern ls command with beautiful Icons and Git Integrations . Written in Golang
@@ -45,9 +46,12 @@ Command and Arguments supported are listed in [HELP.md](/HELP.md)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Debian (.deb package)](#debian-deb-package)
- [Arch Linux (AUR)](#arch-linux)
- [Red Hat (.rpm package)](#red-hat-rpm-package)
- [MacOS (Darwin)](#macos-darwin)
- [Linux](#linux)
- [go get](#go-get)
- [Build from Source](#build-from-source)
- [Check the downloaded Resource](#check-the-downloaded-resource)
- [Recommended configurations](#recommended-configurations)
- [Updating](#updating)
@@ -248,6 +252,16 @@ Download the `.rpm` package from [Github Release Page](https://github.com/Yash-H
Use the `rpm -i path/to/downloaded/resource/` to install the binary and the manpage
### Arch linux
Simply run `yay -S logo-ls`. (Or use the AUR helper of your choice)<br><br>
Alternatively you can clone the PKGBUILD and build the package manually:
```bash
git clone https://aur.archlinux.org/logo-ls.git
cd logo-ls
makepkg -si
```
### MacOS (Darwin)
To install `logo-ls` on darwin you have to download the binary. Support for Homebrew will come soon
@@ -277,10 +291,10 @@ $ sudo cp logo-ls /usr/local/bin
#### Step 4
If you want the man page of `logo-ls` place `logo-ls.1.gz` in `/usr/share/man/man1/`
If you want the man page of `logo-ls` place `logo-ls.1.gz` in `/usr/local/share/man/man1/`
```cmd
$ sudo cp logo-ls.1.gz /usr/share/man/man1/
$ sudo cp logo-ls.1.gz /usr/local/share/man/man1/
```
### Linux
@@ -318,9 +332,70 @@ If you want the man page of `logo-ls` place `logo-ls.1.gz` in `/usr/share/man/ma
$ sudo cp logo-ls.1.gz /usr/share/man/man1/
```
### go get
If you have [Golang](https://golang.org/) installed on your system then the `logo-ls` can be downloaded and installed using the the `go` cli tool provided by the language
#### Step 1
The `go` cli installs the binary in the directory specified by `$GOBIN` env variable [default: `~/go/bin/`]. In order to call `logo-ls` from anywhere in user-space, this directory which holds the binary must be present in `$PATH` env variable.
```cmd
$ echo $PATH
```
#### Step 2
Now simply install the binary using `go get` in home directory
```cmd
$ cd ~
$ go get github.com/Yash-Handa/logo-ls
```
### Build from Source
It is quite simple to build the command from source. You should have [Golang](https://golang.org/) installed on your system.
#### Step 1
Clone this repository.
```cmd
$ git clone https://github.com/Yash-Handa/logo-ls.git
```
#### Step 2
`cd` into the directory `logo-ls`. Then run `go mod tidy` to download the dependencies and after that `go build` to build your system specific binary
```cmd
$ cd logo-ls
$ go mod tidy
$ go build
```
the `go build` command will produce `logo-ls` executable binary in the current directory.
#### Step 3
Place the `logo-ls` executable in a directory reachable from `$PATH` env variable.
```cmd
$ sudo cp logo-ls /usr/local/bin
```
#### Step 4
If you want the man page of `logo-ls` place `logo-ls.1.gz` in `/usr/share/man/man1/`
```cmd
$ sudo cp logo-ls.1.gz /usr/share/man/man1/
```
### Check the downloaded Resource
After downloading the Resource(s) from the [Github Release Page](https://github.com/Yash-Handa/logo-ls/releases) follow the bellow steps to check its authenticity.
After downloading the Resource(s) from the [Github Release Page](https://github.com/Yash-Handa/logo-ls/releases) follow the below steps to check its authenticity.
#### Step 1
+61
View File
@@ -0,0 +1,61 @@
package assets
var Icon_Dir = map[string]*Icon_Info{
"config": Icon_Set["dir-config"],
".config": Icon_Set["dir-config"],
"configs": Icon_Set["dir-config"],
"configuration": Icon_Set["dir-config"],
"configurations": Icon_Set["dir-config"],
"settings": Icon_Set["dir-config"],
".settings": Icon_Set["dir-config"],
"META-INF": Icon_Set["dir-config"],
"controller": Icon_Set["dir-controller"],
"controllers": Icon_Set["dir-controller"],
"service": Icon_Set["dir-controller"],
"services": Icon_Set["dir-controller"],
"provider": Icon_Set["dir-controller"],
"providers": Icon_Set["dir-controller"],
".git": Icon_Set["dir-git"],
"githooks": Icon_Set["dir-git"],
".githooks": Icon_Set["dir-git"],
"submodules": Icon_Set["dir-git"],
".submodules": Icon_Set["dir-git"],
".github": Icon_Set["dir-github"],
"node_modules": Icon_Set["dir-npm"],
"include": Icon_Set["dir-include"],
"includes": Icon_Set["dir-include"],
"_includes": Icon_Set["dir-include"],
"import": Icon_Set["dir-import"],
"imports": Icon_Set["dir-import"],
"imported": Icon_Set["dir-import"],
"uploads": Icon_Set["dir-upload"],
"upload": Icon_Set["dir-upload"],
"downloads": Icon_Set["dir-download"],
"download": Icon_Set["dir-download"],
"auth": Icon_Set["dir-secure"],
"authentication": Icon_Set["dir-secure"],
"secure": Icon_Set["dir-secure"],
"security": Icon_Set["dir-secure"],
"cert": Icon_Set["dir-secure"],
"certs": Icon_Set["dir-secure"],
"certificate": Icon_Set["dir-secure"],
"certificates": Icon_Set["dir-secure"],
"ssl": Icon_Set["dir-secure"],
"images": Icon_Set["dir-images"],
"image": Icon_Set["dir-images"],
"pics": Icon_Set["dir-images"],
"pic": Icon_Set["dir-images"],
"pictures": Icon_Set["dir-images"],
"picture": Icon_Set["dir-images"],
"img": Icon_Set["dir-images"],
"icons": Icon_Set["dir-images"],
"icon": Icon_Set["dir-images"],
"ico": Icon_Set["dir-images"],
"screenshot": Icon_Set["dir-images"],
"screenshots": Icon_Set["dir-images"],
".env": Icon_Set["dir-environment"],
".environment": Icon_Set["dir-environment"],
"env": Icon_Set["dir-environment"],
"environment": Icon_Set["dir-environment"],
"environments": Icon_Set["dir-environment"],
}
+536
View File
@@ -0,0 +1,536 @@
package assets
var Icon_Ext = map[string]*Icon_Info{
"htm": Icon_Set["html"],
"html": Icon_Set["html"],
"xhtml": Icon_Set["html"],
"html_vm": Icon_Set["html"],
"asp": Icon_Set["html"],
"jade": Icon_Set["pug"],
"pug": Icon_Set["pug"],
"md": Icon_Set["markdown"],
"markdown": Icon_Set["markdown"],
"rst": Icon_Set["markdown"],
"blink": Icon_Set["blink"],
"css": Icon_Set["css"],
"scss": Icon_Set["sass"],
"sass": Icon_Set["sass"],
"less": Icon_Set["less"],
"json": Icon_Set["json"],
"tsbuildinfo": Icon_Set["json"],
"json5": Icon_Set["json"],
"jsonl": Icon_Set["json"],
"ndjson": Icon_Set["json"],
"jinja": Icon_Set["jinja"],
"jinja2": Icon_Set["jinja"],
"j2": Icon_Set["jinja"],
"jinja-html": Icon_Set["jinja"],
"sublime-project": Icon_Set["sublime"],
"sublime-workspace": Icon_Set["sublime"],
"yaml": Icon_Set["yaml"],
"yaml-tmlanguage": Icon_Set["yaml"],
"yml": Icon_Set["yaml"],
"xml": Icon_Set["xml"],
"plist": Icon_Set["xml"],
"xsd": Icon_Set["xml"],
"dtd": Icon_Set["xml"],
"xsl": Icon_Set["xml"],
"xslt": Icon_Set["xml"],
"resx": Icon_Set["xml"],
"iml": Icon_Set["xml"],
"xquery": Icon_Set["xml"],
"tmLanguage": Icon_Set["xml"],
"manifest": Icon_Set["xml"],
"project": Icon_Set["xml"],
"png": Icon_Set["image"],
"jpeg": Icon_Set["image"],
"jpg": Icon_Set["image"],
"gif": Icon_Set["image"],
"ico": Icon_Set["image"],
"tif": Icon_Set["image"],
"tiff": Icon_Set["image"],
"psd": Icon_Set["image"],
"psb": Icon_Set["image"],
"ami": Icon_Set["image"],
"apx": Icon_Set["image"],
"bmp": Icon_Set["image"],
"bpg": Icon_Set["image"],
"brk": Icon_Set["image"],
"cur": Icon_Set["image"],
"dds": Icon_Set["image"],
"dng": Icon_Set["image"],
"exr": Icon_Set["image"],
"fpx": Icon_Set["image"],
"gbr": Icon_Set["image"],
"img": Icon_Set["image"],
"jbig2": Icon_Set["image"],
"jb2": Icon_Set["image"],
"jng": Icon_Set["image"],
"jxr": Icon_Set["image"],
"pbm": Icon_Set["image"],
"pgf": Icon_Set["image"],
"pic": Icon_Set["image"],
"raw": Icon_Set["image"],
"webp": Icon_Set["image"],
"eps": Icon_Set["image"],
"afphoto": Icon_Set["image"],
"ase": Icon_Set["image"],
"aseprite": Icon_Set["image"],
"clip": Icon_Set["image"],
"cpt": Icon_Set["image"],
"heif": Icon_Set["image"],
"heic": Icon_Set["image"],
"kra": Icon_Set["image"],
"mdp": Icon_Set["image"],
"ora": Icon_Set["image"],
"pdn": Icon_Set["image"],
"reb": Icon_Set["image"],
"sai": Icon_Set["image"],
"tga": Icon_Set["image"],
"xcf": Icon_Set["image"],
"js": Icon_Set["javascript"],
"esx": Icon_Set["javascript"],
"mj": Icon_Set["javascript"],
"jsx": Icon_Set["react"],
"tsx": Icon_Set["react_ts"],
"ini": Icon_Set["settings"],
"dlc": Icon_Set["settings"],
"dll": Icon_Set["settings"],
"config": Icon_Set["settings"],
"conf": Icon_Set["settings"],
"properties": Icon_Set["settings"],
"prop": Icon_Set["settings"],
"settings": Icon_Set["settings"],
"option": Icon_Set["settings"],
"props": Icon_Set["settings"],
"toml": Icon_Set["settings"],
"prefs": Icon_Set["settings"],
"dotsettings": Icon_Set["settings"],
"cfg": Icon_Set["settings"],
"ts": Icon_Set["typescript"],
"marko": Icon_Set["markojs"],
"pdf": Icon_Set["pdf"],
"xlsx": Icon_Set["table"],
"xls": Icon_Set["table"],
"csv": Icon_Set["table"],
"tsv": Icon_Set["table"],
"vscodeignore": Icon_Set["vscode"],
"vsixmanifest": Icon_Set["vscode"],
"vsix": Icon_Set["vscode"],
"code-workplace": Icon_Set["vscode"],
"csproj": Icon_Set["visualstudio"],
"ruleset": Icon_Set["visualstudio"],
"sln": Icon_Set["visualstudio"],
"suo": Icon_Set["visualstudio"],
"vb": Icon_Set["visualstudio"],
"vbs": Icon_Set["visualstudio"],
"vcxitems": Icon_Set["visualstudio"],
"vcxproj": Icon_Set["visualstudio"],
"pdb": Icon_Set["database"],
"sql": Icon_Set["mysql"],
"pks": Icon_Set["database"],
"pkb": Icon_Set["database"],
"accdb": Icon_Set["database"],
"mdb": Icon_Set["database"],
"sqlite": Icon_Set["sqlite"],
"sqlite3": Icon_Set["sqlite"],
"pgsql": Icon_Set["postgresql"],
"postgres": Icon_Set["postgresql"],
"psql": Icon_Set["postgresql"],
"cs": Icon_Set["csharp"],
"csx": Icon_Set["csharp"],
"qs": Icon_Set["qsharp"],
"zip": Icon_Set["zip"],
"tar": Icon_Set["zip"],
"gz": Icon_Set["zip"],
"xz": Icon_Set["zip"],
"br": Icon_Set["zip"],
"bzip2": Icon_Set["zip"],
"gzip": Icon_Set["zip"],
"brotli": Icon_Set["zip"],
"7z": Icon_Set["zip"],
"rar": Icon_Set["zip"],
"tgz": Icon_Set["zip"],
"vala": Icon_Set["vala"],
"zig": Icon_Set["zig"],
"exe": Icon_Set["exe"],
"msi": Icon_Set["exe"],
"java": Icon_Set["java"],
"jar": Icon_Set["java"],
"jsp": Icon_Set["java"],
"c": Icon_Set["c"],
"m": Icon_Set["c"],
"i": Icon_Set["c"],
"mi": Icon_Set["c"],
"h": Icon_Set["h"],
"cc": Icon_Set["cpp"],
"cpp": Icon_Set["cpp"],
"cxx": Icon_Set["cpp"],
"c++": Icon_Set["cpp"],
"cp": Icon_Set["cpp"],
"mm": Icon_Set["cpp"],
"mii": Icon_Set["cpp"],
"ii": Icon_Set["cpp"],
"hh": Icon_Set["hpp"],
"hpp": Icon_Set["hpp"],
"hxx": Icon_Set["hpp"],
"h++": Icon_Set["hpp"],
"hp": Icon_Set["hpp"],
"tcc": Icon_Set["hpp"],
"inl": Icon_Set["hpp"],
"go": Icon_Set["go"],
"py": Icon_Set["python"],
"pyc": Icon_Set["python-misc"],
"whl": Icon_Set["python-misc"],
"url": Icon_Set["url"],
"sh": Icon_Set["console"],
"ksh": Icon_Set["console"],
"csh": Icon_Set["console"],
"tcsh": Icon_Set["console"],
"zsh": Icon_Set["console"],
"bash": Icon_Set["console"],
"bat": Icon_Set["console"],
"cmd": Icon_Set["console"],
"awk": Icon_Set["console"],
"fish": Icon_Set["console"],
"ps1": Icon_Set["powershell"],
"psm1": Icon_Set["powershell"],
"psd1": Icon_Set["powershell"],
"ps1xml": Icon_Set["powershell"],
"psc1": Icon_Set["powershell"],
"pssc": Icon_Set["powershell"],
"gradle": Icon_Set["gradle"],
"doc": Icon_Set["word"],
"docx": Icon_Set["word"],
"rtf": Icon_Set["word"],
"cer": Icon_Set["certificate"],
"cert": Icon_Set["certificate"],
"crt": Icon_Set["certificate"],
"pub": Icon_Set["key"],
"key": Icon_Set["key"],
"pem": Icon_Set["key"],
"asc": Icon_Set["key"],
"gpg": Icon_Set["key"],
"woff": Icon_Set["font"],
"woff2": Icon_Set["font"],
"ttf": Icon_Set["font"],
"eot": Icon_Set["font"],
"suit": Icon_Set["font"],
"otf": Icon_Set["font"],
"bmap": Icon_Set["font"],
"fnt": Icon_Set["font"],
"odttf": Icon_Set["font"],
"ttc": Icon_Set["font"],
"font": Icon_Set["font"],
"fonts": Icon_Set["font"],
"sui": Icon_Set["font"],
"ntf": Icon_Set["font"],
"mrf": Icon_Set["font"],
"lib": Icon_Set["lib"],
"bib": Icon_Set["lib"],
"rb": Icon_Set["ruby"],
"erb": Icon_Set["ruby"],
"fs": Icon_Set["fsharp"],
"fsx": Icon_Set["fsharp"],
"fsi": Icon_Set["fsharp"],
"fsproj": Icon_Set["fsharp"],
"swift": Icon_Set["swift"],
"ino": Icon_Set["arduino"],
"dockerignore": Icon_Set["docker"],
"dockerfile": Icon_Set["docker"],
"tex": Icon_Set["tex"],
"sty": Icon_Set["tex"],
"dtx": Icon_Set["tex"],
"ltx": Icon_Set["tex"],
"pptx": Icon_Set["powerpoint"],
"ppt": Icon_Set["powerpoint"],
"pptm": Icon_Set["powerpoint"],
"potx": Icon_Set["powerpoint"],
"potm": Icon_Set["powerpoint"],
"ppsx": Icon_Set["powerpoint"],
"ppsm": Icon_Set["powerpoint"],
"pps": Icon_Set["powerpoint"],
"ppam": Icon_Set["powerpoint"],
"ppa": Icon_Set["powerpoint"],
"webm": Icon_Set["video"],
"mkv": Icon_Set["video"],
"flv": Icon_Set["video"],
"vob": Icon_Set["video"],
"ogv": Icon_Set["video"],
"ogg": Icon_Set["video"],
"gifv": Icon_Set["video"],
"avi": Icon_Set["video"],
"mov": Icon_Set["video"],
"qt": Icon_Set["video"],
"wmv": Icon_Set["video"],
"yuv": Icon_Set["video"],
"rm": Icon_Set["video"],
"rmvb": Icon_Set["video"],
"mp4": Icon_Set["video"],
"m4v": Icon_Set["video"],
"mpg": Icon_Set["video"],
"mp2": Icon_Set["video"],
"mpeg": Icon_Set["video"],
"mpe": Icon_Set["video"],
"mpv": Icon_Set["video"],
"m2v": Icon_Set["video"],
"vdi": Icon_Set["virtual"],
"vbox": Icon_Set["virtual"],
"vbox-prev": Icon_Set["virtual"],
"ics": Icon_Set["email"],
"mp3": Icon_Set["audio"],
"flac": Icon_Set["audio"],
"m4a": Icon_Set["audio"],
"wma": Icon_Set["audio"],
"aiff": Icon_Set["audio"],
"coffee": Icon_Set["coffee"],
"cson": Icon_Set["coffee"],
"iced": Icon_Set["coffee"],
"txt": Icon_Set["document"],
"graphql": Icon_Set["graphql"],
"gql": Icon_Set["graphql"],
"rs": Icon_Set["rust"],
"raml": Icon_Set["raml"],
"xaml": Icon_Set["xaml"],
"hs": Icon_Set["haskell"],
"kt": Icon_Set["kotlin"],
"kts": Icon_Set["kotlin"],
"patch": Icon_Set["git"],
"lua": Icon_Set["lua"],
"clj": Icon_Set["clojure"],
"cljs": Icon_Set["clojure"],
"cljc": Icon_Set["clojure"],
"groovy": Icon_Set["groovy"],
"r": Icon_Set["r"],
"rmd": Icon_Set["r"],
"dart": Icon_Set["dart"],
"as": Icon_Set["actionscript"],
"mxml": Icon_Set["mxml"],
"ahk": Icon_Set["autohotkey"],
"swf": Icon_Set["flash"],
"swc": Icon_Set["swc"],
"cmake": Icon_Set["cmake"],
"asm": Icon_Set["assembly"],
"a51": Icon_Set["assembly"],
"inc": Icon_Set["assembly"],
"nasm": Icon_Set["assembly"],
"s": Icon_Set["assembly"],
"ms": Icon_Set["assembly"],
"agc": Icon_Set["assembly"],
"ags": Icon_Set["assembly"],
"aea": Icon_Set["assembly"],
"argus": Icon_Set["assembly"],
"mitigus": Icon_Set["assembly"],
"binsource": Icon_Set["assembly"],
"vue": Icon_Set["vue"],
"ml": Icon_Set["ocaml"],
"mli": Icon_Set["ocaml"],
"cmx": Icon_Set["ocaml"],
"lock": Icon_Set["lock"],
"hbs": Icon_Set["handlebars"],
"mustache": Icon_Set["handlebars"],
"pm": Icon_Set["perl"],
"raku": Icon_Set["perl"],
"hx": Icon_Set["haxe"],
"pp": Icon_Set["puppet"],
"ex": Icon_Set["elixir"],
"exs": Icon_Set["elixir"],
"eex": Icon_Set["elixir"],
"leex": Icon_Set["elixir"],
"erl": Icon_Set["erlang"],
"twig": Icon_Set["twig"],
"jl": Icon_Set["julia"],
"elm": Icon_Set["elm"],
"pure": Icon_Set["purescript"],
"purs": Icon_Set["purescript"],
"tpl": Icon_Set["smarty"],
"styl": Icon_Set["stylus"],
"merlin": Icon_Set["merlin"],
"v": Icon_Set["verilog"],
"vhd": Icon_Set["verilog"],
"sv": Icon_Set["verilog"],
"svh": Icon_Set["verilog"],
"robot": Icon_Set["robot"],
"sol": Icon_Set["solidity"],
"yang": Icon_Set["yang"],
"mjml": Icon_Set["mjml"],
"tf": Icon_Set["terraform"],
"tfvars": Icon_Set["terraform"],
"tfstate": Icon_Set["terraform"],
"applescript": Icon_Set["applescript"],
"ipa": Icon_Set["applescript"],
"cake": Icon_Set["cake"],
"nim": Icon_Set["nim"],
"nimble": Icon_Set["nim"],
"apib": Icon_Set["apiblueprint"],
"apiblueprint": Icon_Set["apiblueprint"],
"pcss": Icon_Set["postcss"],
"sss": Icon_Set["postcss"],
"todo": Icon_Set["todo"],
"nix": Icon_Set["nix"],
"slim": Icon_Set["slim"],
"http": Icon_Set["http"],
"rest": Icon_Set["http"],
"apk": Icon_Set["android"],
"env": Icon_Set["tune"],
"jenkinsfile": Icon_Set["jenkins"],
"jenkins": Icon_Set["jenkins"],
"log": Icon_Set["log"],
"ejs": Icon_Set["ejs"],
"djt": Icon_Set["django"],
"pot": Icon_Set["i18n"],
"po": Icon_Set["i18n"],
"mo": Icon_Set["i18n"],
"d": Icon_Set["d"],
"mdx": Icon_Set["mdx"],
"gd": Icon_Set["godot"],
"godot": Icon_Set["godot-assets"],
"tres": Icon_Set["godot-assets"],
"tscn": Icon_Set["godot-assets"],
"azcli": Icon_Set["azure"],
"vagrantfile": Icon_Set["vagrant"],
"cshtml": Icon_Set["razor"],
"vbhtml": Icon_Set["razor"],
"ad": Icon_Set["asciidoc"],
"adoc": Icon_Set["asciidoc"],
"asciidoc": Icon_Set["asciidoc"],
"edge": Icon_Set["edge"],
"ss": Icon_Set["scheme"],
"scm": Icon_Set["scheme"],
"stl": Icon_Set["3d"],
"obj": Icon_Set["3d"],
"ac": Icon_Set["3d"],
"blend": Icon_Set["3d"],
"mesh": Icon_Set["3d"],
"mqo": Icon_Set["3d"],
"pmd": Icon_Set["3d"],
"pmx": Icon_Set["3d"],
"skp": Icon_Set["3d"],
"vac": Icon_Set["3d"],
"vdp": Icon_Set["3d"],
"vox": Icon_Set["3d"],
"svg": Icon_Set["svg"],
"vimrc": Icon_Set["vim"],
"gvimrc": Icon_Set["vim"],
"exrc": Icon_Set["vim"],
"moon": Icon_Set["moonscript"],
"iso": Icon_Set["disc"],
"f": Icon_Set["fortran"],
"f77": Icon_Set["fortran"],
"f90": Icon_Set["fortran"],
"f95": Icon_Set["fortran"],
"f03": Icon_Set["fortran"],
"f08": Icon_Set["fortran"],
"tcl": Icon_Set["tcl"],
"liquid": Icon_Set["liquid"],
"p": Icon_Set["prolog"],
"pro": Icon_Set["prolog"],
"coco": Icon_Set["coconut"],
"sketch": Icon_Set["sketch"],
"opam": Icon_Set["opam"],
"dhallb": Icon_Set["dhall"],
"pwn": Icon_Set["pawn"],
"amx": Icon_Set["pawn"],
"dhall": Icon_Set["dhall"],
"pas": Icon_Set["pascal"],
"unity": Icon_Set["shaderlab"],
"nupkg": Icon_Set["nuget"],
"command": Icon_Set["command"],
"dsc": Icon_Set["denizenscript"],
"deb": Icon_Set["debian"],
"rpm": Icon_Set["redhat"],
"snap": Icon_Set["ubuntu"],
"ebuild": Icon_Set["gentoo"],
"pkg": Icon_Set["applescript"],
"openbsd": Icon_Set["freebsd"],
// "ls": Icon_Set["livescript"],
// "re": Icon_Set["reason"],
// "rei": Icon_Set["reason"],
// "cmj": Icon_Set["bucklescript"],
// "nb": Icon_Set["mathematica"],
// "wl": Icon_Set["wolframlanguage"],
// "wls": Icon_Set["wolframlanguage"],
// "njk": Icon_Set["nunjucks"],
// "nunjucks": Icon_Set["nunjucks"],
// "au3": Icon_Set["autoit"],
// "haml": Icon_Set["haml"],
// "feature": Icon_Set["cucumber"],
// "riot": Icon_Set["riot"],
// "tag": Icon_Set["riot"],
// "vfl": Icon_Set["vfl"],
// "kl": Icon_Set["kl"],
// "cfml": Icon_Set["coldfusion"],
// "cfc": Icon_Set["coldfusion"],
// "lucee": Icon_Set["coldfusion"],
// "cfm": Icon_Set["coldfusion"],
// "cabal": Icon_Set["cabal"],
// "rql": Icon_Set["restql"],
// "restql": Icon_Set["restql"],
// "kv": Icon_Set["kivy"],
// "graphcool": Icon_Set["graphcool"],
// "sbt": Icon_Set["sbt"],
// "cr": Icon_Set["crystal"],
// "ecr": Icon_Set["crystal"],
// "cu": Icon_Set["cuda"],
// "cuh": Icon_Set["cuda"],
// "def": Icon_Set["dotjs"],
// "dot": Icon_Set["dotjs"],
// "jst": Icon_Set["dotjs"],
// "pde": Icon_Set["processing"],
// "wpy": Icon_Set["wepy"],
// "hcl": Icon_Set["hcl"],
// "san": Icon_Set["san"],
// "red": Icon_Set["red"],
// "fxp": Icon_Set["foxpro"],
// "prg": Icon_Set["foxpro"],
// "wat": Icon_Set["webassembly"],
// "wasm": Icon_Set["webassembly"],
// "ipynb": Icon_Set["jupyter"],
// "bal": Icon_Set["ballerina"],
// "balx": Icon_Set["ballerina"],
// "rkt": Icon_Set["racket"],
// "bzl": Icon_Set["bazel"],
// "bazel": Icon_Set["bazel"],
// "mint": Icon_Set["mint"],
// "vm": Icon_Set["velocity"],
// "fhtml": Icon_Set["velocity"],
// "vtl": Icon_Set["velocity"],
// "prisma": Icon_Set["prisma"],
// "abc": Icon_Set["abc"],
// "lisp": Icon_Set["lisp"],
// "lsp": Icon_Set["lisp"],
// "cl": Icon_Set["lisp"],
// "fast": Icon_Set["lisp"],
// "svelte": Icon_Set["svelte"],
// "prw": Icon_Set["advpl_prw"],
// "prx": Icon_Set["advpl_prw"],
// "ptm": Icon_Set["advpl_ptm"],
// "tlpp": Icon_Set["advpl_tlpp"],
// "ch": Icon_Set["advpl_include"],
// "4th": Icon_Set["forth"],
// "fth": Icon_Set["forth"],
// "frt": Icon_Set["forth"],
// "iuml": Icon_Set["uml"],
// "pu": Icon_Set["uml"],
// "puml": Icon_Set["uml"],
// "plantuml": Icon_Set["uml"],
// "wsd": Icon_Set["uml"],
// "sml": Icon_Set["sml"],
// "mlton": Icon_Set["sml"],
// "mlb": Icon_Set["sml"],
// "sig": Icon_Set["sml"],
// "fun": Icon_Set["sml"],
// "cm": Icon_Set["sml"],
// "lex": Icon_Set["sml"],
// "use": Icon_Set["sml"],
// "grm": Icon_Set["sml"],
// "imba": Icon_Set["imba"],
// "drawio": Icon_Set["drawio"],
// "dio": Icon_Set["drawio"],
// "sas": Icon_Set["sas"],
// "sas7bdat": Icon_Set["sas"],
// "sashdat": Icon_Set["sas"],
// "astore": Icon_Set["sas"],
// "ast": Icon_Set["sas"],
// "sast": Icon_Set["sas"],
}
+414
View File
@@ -0,0 +1,414 @@
package assets
var Icon_FileName = map[string]*Icon_Info{
".pug-lintrc": Icon_Set["pug"],
".pug-lintrc.js": Icon_Set["pug"],
".pug-lintrc.json": Icon_Set["pug"],
".jscsrc": Icon_Set["json"],
".jshintrc": Icon_Set["json"],
"composer.lock": Icon_Set["json"],
".jsbeautifyrc": Icon_Set["json"],
".esformatter": Icon_Set["json"],
"cdp.pid": Icon_Set["json"],
".mjmlconfig": Icon_Set["json"],
".htaccess": Icon_Set["xml"],
".jshintignore": Icon_Set["settings"],
".buildignore": Icon_Set["settings"],
".mrconfig": Icon_Set["settings"],
".yardopts": Icon_Set["settings"],
"manifest.mf": Icon_Set["settings"],
".clang-format": Icon_Set["settings"],
".clang-tidy": Icon_Set["settings"],
"go.mod": Icon_Set["go-mod"],
"go.sum": Icon_Set["go-mod"],
"requirements.txt": Icon_Set["python-misc"],
"pipfile": Icon_Set["python-misc"],
".python-version": Icon_Set["python-misc"],
"manifest.in": Icon_Set["python-misc"],
"gradle.properties": Icon_Set["gradle"],
"gradlew": Icon_Set["gradle"],
"gradle-wrapper.properties": Icon_Set["gradle"],
"license": Icon_Set["certificate"],
"license.md": Icon_Set["certificate"],
"license.txt": Icon_Set["certificate"],
"licence": Icon_Set["certificate"],
"licence.md": Icon_Set["certificate"],
"licence.txt": Icon_Set["certificate"],
"unlicense": Icon_Set["certificate"],
"unlicense.md": Icon_Set["certificate"],
"unlicense.txt": Icon_Set["certificate"],
".htpasswd": Icon_Set["key"],
"gemfile": Icon_Set["gemfile"],
"dockerfile": Icon_Set["docker"],
"dockerfile.prod": Icon_Set["docker"],
"dockerfile.production": Icon_Set["docker"],
"docker-compose.yml": Icon_Set["docker"],
"docker-compose.yaml": Icon_Set["docker"],
"docker-compose.dev.yml": Icon_Set["docker"],
"docker-compose.local.yml": Icon_Set["docker"],
"docker-compose.ci.yml": Icon_Set["docker"],
"docker-compose.override.yml": Icon_Set["docker"],
"docker-compose.staging.yml": Icon_Set["docker"],
"docker-compose.prod.yml": Icon_Set["docker"],
"docker-compose.production.yml": Icon_Set["docker"],
"docker-compose.test.yml": Icon_Set["docker"],
".mailmap": Icon_Set["email"],
".graphqlconfig": Icon_Set["graphql"],
".gitignore": Icon_Set["git"],
".gitconfig": Icon_Set["git"],
".gitattributes": Icon_Set["git"],
".gitmodules": Icon_Set["git"],
".gitkeep": Icon_Set["git"],
"git-history": Icon_Set["git"],
".luacheckrc": Icon_Set["lua"],
".Rhistory": Icon_Set["r"],
"cmakelists.txt": Icon_Set["cmake"],
"cmakecache.txt": Icon_Set["cmake"],
"vue.config.js": Icon_Set["vue-config"],
"vue.config.ts": Icon_Set["vue-config"],
"nuxt.config.js": Icon_Set["nuxt"],
"nuxt.config.ts": Icon_Set["nuxt"],
"security.md": Icon_Set["lock"],
"security.txt": Icon_Set["lock"],
"security": Icon_Set["lock"],
"vercel.json": Icon_Set["vercel"],
".vercelignore": Icon_Set["vercel"],
"now.json": Icon_Set["vercel"],
".nowignore": Icon_Set["vercel"],
"postcss.config.js": Icon_Set["postcss"],
".postcssrc.js": Icon_Set["postcss"],
".postcssrc": Icon_Set["postcss"],
".postcssrc.json": Icon_Set["postcss"],
".postcssrc.yml": Icon_Set["postcss"],
"CNAME": Icon_Set["http"],
"webpack.js": Icon_Set["webpack"],
"webpack.ts": Icon_Set["webpack"],
"webpack.base.js": Icon_Set["webpack"],
"webpack.base.ts": Icon_Set["webpack"],
"webpack.config.js": Icon_Set["webpack"],
"webpack.config.ts": Icon_Set["webpack"],
"webpack.common.js": Icon_Set["webpack"],
"webpack.common.ts": Icon_Set["webpack"],
"webpack.config.common.js": Icon_Set["webpack"],
"webpack.config.common.ts": Icon_Set["webpack"],
"webpack.config.common.babel.js": Icon_Set["webpack"],
"webpack.config.common.babel.ts": Icon_Set["webpack"],
"webpack.dev.js": Icon_Set["webpack"],
"webpack.dev.ts": Icon_Set["webpack"],
"webpack.development.js": Icon_Set["webpack"],
"webpack.development.ts": Icon_Set["webpack"],
"webpack.config.dev.js": Icon_Set["webpack"],
"webpack.config.dev.ts": Icon_Set["webpack"],
"webpack.config.dev.babel.js": Icon_Set["webpack"],
"webpack.config.dev.babel.ts": Icon_Set["webpack"],
"webpack.prod.js": Icon_Set["webpack"],
"webpack.prod.ts": Icon_Set["webpack"],
"webpack.production.js": Icon_Set["webpack"],
"webpack.production.ts": Icon_Set["webpack"],
"webpack.server.js": Icon_Set["webpack"],
"webpack.server.ts": Icon_Set["webpack"],
"webpack.client.js": Icon_Set["webpack"],
"webpack.client.ts": Icon_Set["webpack"],
"webpack.config.server.js": Icon_Set["webpack"],
"webpack.config.server.ts": Icon_Set["webpack"],
"webpack.config.client.js": Icon_Set["webpack"],
"webpack.config.client.ts": Icon_Set["webpack"],
"webpack.config.production.babel.js": Icon_Set["webpack"],
"webpack.config.production.babel.ts": Icon_Set["webpack"],
"webpack.config.prod.babel.js": Icon_Set["webpack"],
"webpack.config.prod.babel.ts": Icon_Set["webpack"],
"webpack.config.prod.js": Icon_Set["webpack"],
"webpack.config.prod.ts": Icon_Set["webpack"],
"webpack.config.production.js": Icon_Set["webpack"],
"webpack.config.production.ts": Icon_Set["webpack"],
"webpack.config.staging.js": Icon_Set["webpack"],
"webpack.config.staging.ts": Icon_Set["webpack"],
"webpack.config.babel.js": Icon_Set["webpack"],
"webpack.config.babel.ts": Icon_Set["webpack"],
"webpack.config.base.babel.js": Icon_Set["webpack"],
"webpack.config.base.babel.ts": Icon_Set["webpack"],
"webpack.config.base.js": Icon_Set["webpack"],
"webpack.config.base.ts": Icon_Set["webpack"],
"webpack.config.staging.babel.js": Icon_Set["webpack"],
"webpack.config.staging.babel.ts": Icon_Set["webpack"],
"webpack.config.coffee": Icon_Set["webpack"],
"webpack.config.test.js": Icon_Set["webpack"],
"webpack.config.test.ts": Icon_Set["webpack"],
"webpack.config.vendor.js": Icon_Set["webpack"],
"webpack.config.vendor.ts": Icon_Set["webpack"],
"webpack.config.vendor.production.js": Icon_Set["webpack"],
"webpack.config.vendor.production.ts": Icon_Set["webpack"],
"webpack.test.js": Icon_Set["webpack"],
"webpack.test.ts": Icon_Set["webpack"],
"webpack.dist.js": Icon_Set["webpack"],
"webpack.dist.ts": Icon_Set["webpack"],
"webpackfile.js": Icon_Set["webpack"],
"webpackfile.ts": Icon_Set["webpack"],
"ionic.config.json": Icon_Set["ionic"],
".io-config.json": Icon_Set["ionic"],
"gulpfile.js": Icon_Set["gulp"],
"gulpfile.mjs": Icon_Set["gulp"],
"gulpfile.ts": Icon_Set["gulp"],
"gulpfile.babel.js": Icon_Set["gulp"],
"package.json": Icon_Set["nodejs"],
"package-lock.json": Icon_Set["nodejs"],
".nvmrc": Icon_Set["nodejs"],
".esmrc": Icon_Set["nodejs"],
".node-version": Icon_Set["nodejs"],
".npmignore": Icon_Set["npm"],
".npmrc": Icon_Set["npm"],
".yarnrc": Icon_Set["yarn"],
"yarn.lock": Icon_Set["yarn"],
".yarnclean": Icon_Set["yarn"],
".yarn-integrity": Icon_Set["yarn"],
"yarn-error.log": Icon_Set["yarn"],
".yarnrc.yml": Icon_Set["yarn"],
".yarnrc.yaml": Icon_Set["yarn"],
"androidmanifest.xml": Icon_Set["android"],
".env.defaults": Icon_Set["tune"],
".env.example": Icon_Set["tune"],
".env.sample": Icon_Set["tune"],
".env.schema": Icon_Set["tune"],
".env.local": Icon_Set["tune"],
".env.dev": Icon_Set["tune"],
".env.development": Icon_Set["tune"],
".env.qa": Icon_Set["tune"],
".env.prod": Icon_Set["tune"],
".env.production": Icon_Set["tune"],
".env.staging": Icon_Set["tune"],
".env.preview": Icon_Set["tune"],
".env.test": Icon_Set["tune"],
".env.testing": Icon_Set["tune"],
".env.development.local": Icon_Set["tune"],
".env.qa.local": Icon_Set["tune"],
".env.production.local": Icon_Set["tune"],
".env.staging.local": Icon_Set["tune"],
".env.test.local": Icon_Set["tune"],
".babelrc": Icon_Set["babel"],
".babelrc.js": Icon_Set["babel"],
".babelrc.json": Icon_Set["babel"],
"babel.config.json": Icon_Set["babel"],
"babel.config.js": Icon_Set["babel"],
"contributing.md": Icon_Set["contributing"],
"readme.md": Icon_Set["readme"],
"readme.txt": Icon_Set["readme"],
"readme": Icon_Set["readme"],
"changelog": Icon_Set["changelog"],
"changelog.md": Icon_Set["changelog"],
"changelog.txt": Icon_Set["changelog"],
"changes": Icon_Set["changelog"],
"changes.md": Icon_Set["changelog"],
"changes.txt": Icon_Set["changelog"],
"credits": Icon_Set["credits"],
"credits.txt": Icon_Set["credits"],
"credits.md": Icon_Set["credits"],
"authors": Icon_Set["authors"],
"authors.md": Icon_Set["authors"],
"authors.txt": Icon_Set["authors"],
"favicon.ico": Icon_Set["favicon"],
"karma.conf.js": Icon_Set["karma"],
"karma.conf.ts": Icon_Set["karma"],
"karma.conf.coffee": Icon_Set["karma"],
"karma.config.js": Icon_Set["karma"],
"karma.config.ts": Icon_Set["karma"],
"karma-main.js": Icon_Set["karma"],
"karma-main.ts": Icon_Set["karma"],
".travis.yml": Icon_Set["travis"],
".codecov.yml": Icon_Set["codecov"],
"codecov.yml": Icon_Set["codecov"],
"protractor.conf.js": Icon_Set["protractor"],
"protractor.conf.ts": Icon_Set["protractor"],
"protractor.conf.coffee": Icon_Set["protractor"],
"protractor.config.js": Icon_Set["protractor"],
"protractor.config.ts": Icon_Set["protractor"],
"procfile": Icon_Set["heroku"],
"procfile.windows": Icon_Set["heroku"],
".bowerrc": Icon_Set["bower"],
"bower.json": Icon_Set["bower"],
".eslintrc.js": Icon_Set["eslint"],
".eslintrc.cjs": Icon_Set["eslint"],
".eslintrc.yaml": Icon_Set["eslint"],
".eslintrc.yml": Icon_Set["eslint"],
".eslintrc.json": Icon_Set["eslint"],
".eslintrc": Icon_Set["eslint"],
".eslintignore": Icon_Set["eslint"],
".eslintcache": Icon_Set["eslint"],
"code_of_conduct.md": Icon_Set["conduct"],
"code_of_conduct.txt": Icon_Set["conduct"],
"mocha.opts": Icon_Set["mocha"],
".mocharc.yml": Icon_Set["mocha"],
".mocharc.yaml": Icon_Set["mocha"],
".mocharc.js": Icon_Set["mocha"],
".mocharc.json": Icon_Set["mocha"],
".mocharc.jsonc": Icon_Set["mocha"],
"jenkinsfile": Icon_Set["jenkins"],
"firebase.json": Icon_Set["firebase"],
".firebaserc": Icon_Set["firebase"],
"firestore.rules": Icon_Set["firebase"],
"firestore.indexes.json": Icon_Set["firebase"],
".stylelintrc": Icon_Set["stylelint"],
"stylelint.config.js": Icon_Set["stylelint"],
".stylelintrc.json": Icon_Set["stylelint"],
".stylelintrc.yaml": Icon_Set["stylelint"],
".stylelintrc.yml": Icon_Set["stylelint"],
".stylelintrc.js": Icon_Set["stylelint"],
".stylelintignore": Icon_Set["stylelint"],
".codeclimate.yml": Icon_Set["code-climate"],
".prettierrc": Icon_Set["prettier"],
"prettier.config.js": Icon_Set["prettier"],
".prettierrc.js": Icon_Set["prettier"],
".prettierrc.json": Icon_Set["prettier"],
".prettierrc.yaml": Icon_Set["prettier"],
".prettierrc.yml": Icon_Set["prettier"],
".prettierignore": Icon_Set["prettier"],
"gruntfile.js": Icon_Set["grunt"],
"gruntfile.ts": Icon_Set["grunt"],
"gruntfile.coffee": Icon_Set["grunt"],
"gruntfile.babel.js": Icon_Set["grunt"],
"gruntfile.babel.ts": Icon_Set["grunt"],
"gruntfile.babel.coffee": Icon_Set["grunt"],
"jest.config.js": Icon_Set["jest"],
"jest.config.ts": Icon_Set["jest"],
"jest.config.cjs": Icon_Set["jest"],
"jest.config.mjs": Icon_Set["jest"],
"jest.config.json": Icon_Set["jest"],
"jest.e2e.config.js": Icon_Set["jest"],
"jest.e2e.config.ts": Icon_Set["jest"],
"jest.e2e.config.cjs": Icon_Set["jest"],
"jest.e2e.config.mjs": Icon_Set["jest"],
"jest.e2e.config.json": Icon_Set["jest"],
"jest.setup.js": Icon_Set["jest"],
"jest.setup.ts": Icon_Set["jest"],
"jest.json": Icon_Set["jest"],
".jestrc": Icon_Set["jest"],
".jestrc.js": Icon_Set["jest"],
".jestrc.json": Icon_Set["jest"],
"jest.teardown.js": Icon_Set["jest"],
"fastfile": Icon_Set["fastlane"],
"appfile": Icon_Set["fastlane"],
".helmignore": Icon_Set["helm"],
"makefile": Icon_Set["makefile"],
".releaserc": Icon_Set["semantic-release"],
".releaserc.yaml": Icon_Set["semantic-release"],
".releaserc.yml": Icon_Set["semantic-release"],
".releaserc.json": Icon_Set["semantic-release"],
".releaserc.js": Icon_Set["semantic-release"],
"release.config.js": Icon_Set["semantic-release"],
"bitbucket-pipelines.yaml": Icon_Set["bitbucket"],
"bitbucket-pipelines.yml": Icon_Set["bitbucket"],
"azure-pipelines.yml": Icon_Set["azure-pipelines"],
"azure-pipelines.yaml": Icon_Set["azure-pipelines"],
"vagrantfile": Icon_Set["vagrant"],
"tailwind.js": Icon_Set["tailwindcss"],
"tailwind.config.js": Icon_Set["tailwindcss"],
"codeowners": Icon_Set["codeowners"],
".gcloudignore": Icon_Set["gcp"],
".huskyrc": Icon_Set["husky"],
"husky.config.js": Icon_Set["husky"],
".huskyrc.json": Icon_Set["husky"],
".huskyrc.js": Icon_Set["husky"],
".huskyrc.yaml": Icon_Set["husky"],
".huskyrc.yml": Icon_Set["husky"],
".commitlintrc": Icon_Set["commitlint"],
".commitlintrc.js": Icon_Set["commitlint"],
"commitlint.config.js": Icon_Set["commitlint"],
".commitlintrc.json": Icon_Set["commitlint"],
".commitlint.yaml": Icon_Set["commitlint"],
".commitlint.yml": Icon_Set["commitlint"],
"dune": Icon_Set["dune"],
"dune-project": Icon_Set["dune"],
"roadmap.md": Icon_Set["roadmap"],
"roadmap.txt": Icon_Set["roadmap"],
"timeline.md": Icon_Set["roadmap"],
"timeline.txt": Icon_Set["roadmap"],
"milestones.md": Icon_Set["roadmap"],
"milestones.txt": Icon_Set["roadmap"],
"nuget.config": Icon_Set["nuget"],
".nuspec": Icon_Set["nuget"],
"nuget.exe": Icon_Set["nuget"],
"stryker.conf.js": Icon_Set["stryker"],
"stryker.conf.json": Icon_Set["stryker"],
".modernizrrc": Icon_Set["modernizr"],
".modernizrrc.js": Icon_Set["modernizr"],
".modernizrrc.json": Icon_Set["modernizr"],
"routing.ts": Icon_Set["routing"],
"routing.tsx": Icon_Set["routing"],
"routing.js": Icon_Set["routing"],
"routing.jsx": Icon_Set["routing"],
"routes.ts": Icon_Set["routing"],
"routes.tsx": Icon_Set["routing"],
"routes.js": Icon_Set["routing"],
"routes.jsx": Icon_Set["routing"],
// ".vfl": Icon_Set["vfl"],
// ".kl": Icon_Set["kl"],
// "project.graphcool": Icon_Set["graphcool"],
// ".flowconfig": Icon_Set["flow"],
// ".bithoundrc": Icon_Set["bithound"],
// ".appveyor.yml": Icon_Set["appveyor"],
// "appveyor.yml": Icon_Set["appveyor"],
// "fuse.js": Icon_Set["fusebox"],
// ".editorconfig": Icon_Set["editorconfig"],
// ".watchmanconfig": Icon_Set["watchman"],
// "aurelia.json": Icon_Set["aurelia"],
// "rollup.config.js": Icon_Set["rollup"],
// "rollup.config.ts": Icon_Set["rollup"],
// "rollup-config.js": Icon_Set["rollup"],
// "rollup-config.ts": Icon_Set["rollup"],
// "rollup.config.common.js": Icon_Set["rollup"],
// "rollup.config.common.ts": Icon_Set["rollup"],
// "rollup.config.base.js": Icon_Set["rollup"],
// "rollup.config.base.ts": Icon_Set["rollup"],
// "rollup.config.prod.js": Icon_Set["rollup"],
// "rollup.config.prod.ts": Icon_Set["rollup"],
// "rollup.config.dev.js": Icon_Set["rollup"],
// "rollup.config.dev.ts": Icon_Set["rollup"],
// "rollup.config.prod.vendor.js": Icon_Set["rollup"],
// "rollup.config.prod.vendor.ts": Icon_Set["rollup"],
// ".hhconfig": Icon_Set["hack"],
// "apollo.config.js": Icon_Set["apollo"],
// "nodemon.json": Icon_Set["nodemon"],
// "nodemon-debug.json": Icon_Set["nodemon"],
// ".hintrc": Icon_Set["webhint"],
// "browserslist": Icon_Set["browserlist"],
// ".browserslistrc": Icon_Set["browserlist"],
// ".snyk": Icon_Set["snyk"],
// ".drone.yml": Icon_Set["drone"],
// ".sequelizerc": Icon_Set["sequelize"],
// "gatsby.config.js": Icon_Set["gatsby"],
// "gatsby-config.js": Icon_Set["gatsby"],
// "gatsby-node.js": Icon_Set["gatsby"],
// "gatsby-browser.js": Icon_Set["gatsby"],
// "gatsby-ssr.js": Icon_Set["gatsby"],
// ".wakatime-project": Icon_Set["wakatime"],
// "circle.yml": Icon_Set["circleci"],
// ".cfignore": Icon_Set["cloudfoundry"],
// "wallaby.js": Icon_Set["wallaby"],
// "wallaby.conf.js": Icon_Set["wallaby"],
// "stencil.config.js": Icon_Set["stencil"],
// "stencil.config.ts": Icon_Set["stencil"],
// ".bazelignore": Icon_Set["bazel"],
// ".bazelrc": Icon_Set["bazel"],
// "prisma.yml": Icon_Set["prisma"],
// ".nycrc": Icon_Set["istanbul"],
// ".nycrc.json": Icon_Set["istanbul"],
// "buildkite.yml": Icon_Set["buildkite"],
// "buildkite.yaml": Icon_Set["buildkite"],
// "netlify.json": Icon_Set["netlify"],
// "netlify.yml": Icon_Set["netlify"],
// "netlify.yaml": Icon_Set["netlify"],
// "netlify.toml": Icon_Set["netlify"],
// "nest-cli.json": Icon_Set["nest"],
// ".nest-cli.json": Icon_Set["nest"],
// "nestconfig.json": Icon_Set["nest"],
// ".nestconfig.json": Icon_Set["nest"],
// ".percy.yml": Icon_Set["percy"],
// ".gitpod.yml": Icon_Set["gitpod"],
// "tiltfile": Icon_Set["tilt"],
// "capacitor.config.json": Icon_Set["capacitor"],
// ".adonisrc.json": Icon_Set["adonis"],
// "ace": Icon_Set["adonis"],
// "meson.build": Icon_Set["meson"],
// ".buckconfig": Icon_Set["buck"],
// "nx.json": Icon_Set["nrwl"],
// ".slugignore": Icon_Set["slug"],
}
+359
View File
@@ -0,0 +1,359 @@
// assets contains all the Icon glyphs info
package assets
import "fmt"
// Icon_Info (icon information)
type Icon_Info struct {
i string
c [3]uint8 // represents the color in rgb (default 0,0,0 is black)
e bool // whether or not the file is executable [true = is executable]
}
func (i *Icon_Info) GetGlyph() string {
return i.i
}
func (i *Icon_Info) GetColor(f uint8) string {
if i.e {
return "\033[38;2;76;175;080m"
} else if f == 1 {
return fmt.Sprintf("\033[38;2;%03d;%03d;%03dm", i.c[0], i.c[1], i.c[2])
}
return fmt.Sprintf("\033[38;2;%03d;%03d;%03dm", i.c[0], i.c[1], i.c[2])
}
func (i *Icon_Info) MakeExe() {
i.e = true
}
var Icon_Set = map[string]*Icon_Info{
"html": {i: "\uf13b", c: [3]uint8{228, 79, 57}}, // html
"markdown": {i: "\uf853", c: [3]uint8{66, 165, 245}}, // markdown
"css": {i: "\uf81b", c: [3]uint8{66, 165, 245}}, // css
"css-map": {i: "\ue749", c: [3]uint8{66, 165, 245}}, // css-map
"sass": {i: "\ue603", c: [3]uint8{237, 80, 122}}, // sass
"less": {i: "\ue60b", c: [3]uint8{2, 119, 189}}, // less
"json": {i: "\ue60b", c: [3]uint8{251, 193, 60}}, // json
"yaml": {i: "\ue60b", c: [3]uint8{244, 68, 62}}, // yaml
"xml": {i: "\uf72d", c: [3]uint8{64, 153, 69}}, // xml
"image": {i: "\uf71e", c: [3]uint8{48, 166, 154}}, // image
"javascript": {i: "\ue74e", c: [3]uint8{255, 202, 61}}, // javascript
"javascript-map": {i: "\ue781", c: [3]uint8{255, 202, 61}}, // javascript-map
"test-jsx": {i: "\uf595", c: [3]uint8{35, 188, 212}}, // test-jsx
"test-js": {i: "\uf595", c: [3]uint8{255, 202, 61}}, // test-js
"react": {i: "\ue7ba", c: [3]uint8{35, 188, 212}}, // react
"react_ts": {i: "\ue7ba", c: [3]uint8{36, 142, 211}}, // react_ts
"settings": {i: "\uf013", c: [3]uint8{66, 165, 245}}, // settings
"typescript": {i: "\ue628", c: [3]uint8{3, 136, 209}}, // typescript
"typescript-def": {i: "\ufbe4", c: [3]uint8{3, 136, 209}}, // typescript-def
"test-ts": {i: "\uf595", c: [3]uint8{3, 136, 209}}, // test-ts
"pdf": {i: "\uf724", c: [3]uint8{244, 68, 62}}, // pdf
"table": {i: "\uf71a", c: [3]uint8{139, 195, 74}}, // table
"visualstudio": {i: "\ue70c", c: [3]uint8{173, 99, 188}}, // visualstudio
"database": {i: "\ue706", c: [3]uint8{255, 202, 61}}, // database
"mysql": {i: "\ue704", c: [3]uint8{1, 94, 134}}, // mysql
"postgresql": {i: "\ue76e", c: [3]uint8{49, 99, 140}}, // postgresql
"sqlite": {i: "\ue7c4", c: [3]uint8{1, 57, 84}}, // sqlite
"csharp": {i: "\uf81a", c: [3]uint8{2, 119, 189}}, // csharp
"zip": {i: "\uf410", c: [3]uint8{175, 180, 43}}, // zip
"exe": {i: "\uf2d0", c: [3]uint8{229, 77, 58}}, // exe
"java": {i: "\uf675", c: [3]uint8{244, 68, 62}}, // java
"c": {i: "\ufb70", c: [3]uint8{2, 119, 189}}, // c
"cpp": {i: "\ufb71", c: [3]uint8{2, 119, 189}}, // cpp
"go": {i: "\ufcd1", c: [3]uint8{32, 173, 194}}, // go
"go-mod": {i: "\ufcd1", c: [3]uint8{237, 80, 122}}, // go-mod
"go-test": {i: "\ufcd1", c: [3]uint8{255, 213, 79}}, // go-test
"python": {i: "\uf81f", c: [3]uint8{52, 102, 143}}, // python
"python-misc": {i: "\uf820", c: [3]uint8{130, 61, 28}}, // python-misc
"url": {i: "\uf836", c: [3]uint8{66, 165, 245}}, // url
"console": {i: "\uf68c", c: [3]uint8{250, 111, 66}}, // console
"word": {i: "\uf72b", c: [3]uint8{1, 87, 155}}, // word
"certificate": {i: "\uf623", c: [3]uint8{249, 89, 63}}, // certificate
"key": {i: "\uf805", c: [3]uint8{48, 166, 154}}, // key
"font": {i: "\uf031", c: [3]uint8{244, 68, 62}}, // font
"lib": {i: "\uf831", c: [3]uint8{139, 195, 74}}, // lib
"ruby": {i: "\ue739", c: [3]uint8{229, 61, 58}}, // ruby
"gemfile": {i: "\ue21e", c: [3]uint8{229, 61, 58}}, // gemfile
"fsharp": {i: "\ue7a7", c: [3]uint8{55, 139, 186}}, // fsharp
"swift": {i: "\ufbe3", c: [3]uint8{249, 95, 63}}, // swift
"docker": {i: "\uf308", c: [3]uint8{1, 135, 201}}, // docker
"powerpoint": {i: "\uf726", c: [3]uint8{209, 71, 51}}, // powerpoint
"video": {i: "\uf72a", c: [3]uint8{253, 154, 62}}, // video
"virtual": {i: "\uf822", c: [3]uint8{3, 155, 229}}, // virtual
"email": {i: "\uf6ed", c: [3]uint8{66, 165, 245}}, // email
"audio": {i: "\ufb75", c: [3]uint8{239, 83, 80}}, // audio
"coffee": {i: "\uf675", c: [3]uint8{66, 165, 245}}, // coffee
"document": {i: "\uf718", c: [3]uint8{66, 165, 245}}, // document
"rust": {i: "\ue7a8", c: [3]uint8{250, 111, 66}}, // rust
"raml": {i: "\ue60b", c: [3]uint8{66, 165, 245}}, // raml
"xaml": {i: "\ufb72", c: [3]uint8{66, 165, 245}}, // xaml
"haskell": {i: "\ue61f", c: [3]uint8{254, 168, 62}}, // haskell
"git": {i: "\ue702", c: [3]uint8{229, 77, 58}}, // git
"lua": {i: "\ue620", c: [3]uint8{66, 165, 245}}, // lua
"clojure": {i: "\ue76a", c: [3]uint8{100, 221, 23}}, // clojure
"groovy": {i: "\uf2a6", c: [3]uint8{41, 198, 218}}, // groovy
"r": {i: "\ufcd2", c: [3]uint8{25, 118, 210}}, // r
"dart": {i: "\ue798", c: [3]uint8{87, 182, 240}}, // dart
"mxml": {i: "\uf72d", c: [3]uint8{254, 168, 62}}, // mxml
"assembly": {i: "\uf471", c: [3]uint8{250, 109, 63}}, // assembly
"vue": {i: "\ufd42", c: [3]uint8{65, 184, 131}}, // vue
"vue-config": {i: "\ufd42", c: [3]uint8{58, 121, 110}}, // vue-config
"lock": {i: "\uf83d", c: [3]uint8{255, 213, 79}}, // lock
"handlebars": {i: "\ue60f", c: [3]uint8{250, 111, 66}}, // handlebars
"perl": {i: "\ue769", c: [3]uint8{149, 117, 205}}, // perl
"elixir": {i: "\ue62d", c: [3]uint8{149, 117, 205}}, // elixir
"erlang": {i: "\ue7b1", c: [3]uint8{244, 68, 62}}, // erlang
"twig": {i: "\ue61c", c: [3]uint8{155, 185, 47}}, // twig
"julia": {i: "\ue624", c: [3]uint8{134, 82, 159}}, // julia
"elm": {i: "\ue62c", c: [3]uint8{96, 181, 204}}, // elm
"smarty": {i: "\uf834", c: [3]uint8{255, 207, 60}}, // smarty
"stylus": {i: "\ue600", c: [3]uint8{192, 202, 51}}, // stylus
"verilog": {i: "\ufb19", c: [3]uint8{250, 111, 66}}, // verilog
"robot": {i: "\ufba7", c: [3]uint8{249, 89, 63}}, // robot
"solidity": {i: "\ufcb9", c: [3]uint8{3, 136, 209}}, // solidity
"yang": {i: "\ufb7e", c: [3]uint8{66, 165, 245}}, // yang
"vercel": {i: "\uf47e", c: [3]uint8{207, 216, 220}}, // vercel
"applescript": {i: "\uf302", c: [3]uint8{120, 144, 156}}, // applescript
"cake": {i: "\uf5ea", c: [3]uint8{250, 111, 66}}, // cake
"nim": {i: "\uf6a4", c: [3]uint8{255, 202, 61}}, // nim
"todo": {i: "\uf058", c: [3]uint8{124, 179, 66}}, // todo
"nix": {i: "\uf313", c: [3]uint8{80, 117, 193}}, // nix
"http": {i: "\uf484", c: [3]uint8{66, 165, 245}}, // http
"webpack": {i: "\ufc29", c: [3]uint8{142, 214, 251}}, // webpack
"ionic": {i: "\ue7a9", c: [3]uint8{79, 143, 247}}, // ionic
"gulp": {i: "\ue763", c: [3]uint8{229, 61, 58}}, // gulp
"nodejs": {i: "\uf898", c: [3]uint8{139, 195, 74}}, // nodejs
"npm": {i: "\ue71e", c: [3]uint8{203, 56, 55}}, // npm
"yarn": {i: "\uf61a", c: [3]uint8{44, 142, 187}}, // yarn
"android": {i: "\uf531", c: [3]uint8{139, 195, 74}}, // android
"tune": {i: "\ufb69", c: [3]uint8{251, 193, 60}}, // tune
"contributing": {i: "\uf64d", c: [3]uint8{255, 202, 61}}, // contributing
"readme": {i: "\uf7fb", c: [3]uint8{66, 165, 245}}, // readme
"changelog": {i: "\ufba6", c: [3]uint8{139, 195, 74}}, // changelog
"credits": {i: "\uf75f", c: [3]uint8{156, 204, 101}}, // credits
"authors": {i: "\uf0c0", c: [3]uint8{244, 68, 62}}, // authors
"favicon": {i: "\ue623", c: [3]uint8{255, 213, 79}}, // favicon
"karma": {i: "\ue622", c: [3]uint8{60, 190, 174}}, // karma
"travis": {i: "\ue77e", c: [3]uint8{203, 58, 73}}, // travis
"heroku": {i: "\ue607", c: [3]uint8{105, 99, 185}}, // heroku
"gitlab": {i: "\uf296", c: [3]uint8{226, 69, 57}}, // gitlab
"bower": {i: "\ue61a", c: [3]uint8{239, 88, 60}}, // bower
"conduct": {i: "\uf64b", c: [3]uint8{205, 220, 57}}, // conduct
"jenkins": {i: "\ue767", c: [3]uint8{240, 214, 183}}, // jenkins
"code-climate": {i: "\uf7f4", c: [3]uint8{238, 238, 238}}, // code-climate
"log": {i: "\uf719", c: [3]uint8{175, 180, 43}}, // log
"ejs": {i: "\ue618", c: [3]uint8{255, 202, 61}}, // ejs
"grunt": {i: "\ue611", c: [3]uint8{251, 170, 61}}, // grunt
"django": {i: "\ue71d", c: [3]uint8{67, 160, 71}}, // django
"makefile": {i: "\uf728", c: [3]uint8{239, 83, 80}}, // makefile
"bitbucket": {i: "\uf171", c: [3]uint8{31, 136, 229}}, // bitbucket
"d": {i: "\ue7af", c: [3]uint8{244, 68, 62}}, // d
"mdx": {i: "\uf853", c: [3]uint8{255, 202, 61}}, // mdx
"azure-pipelines": {i: "\uf427", c: [3]uint8{20, 101, 192}}, // azure-pipelines
"azure": {i: "\ufd03", c: [3]uint8{31, 136, 229}}, // azure
"razor": {i: "\uf564", c: [3]uint8{66, 165, 245}}, // razor
"asciidoc": {i: "\uf718", c: [3]uint8{244, 68, 62}}, // asciidoc
"edge": {i: "\uf564", c: [3]uint8{239, 111, 60}}, // edge
"scheme": {i: "\ufb26", c: [3]uint8{244, 68, 62}}, // scheme
"3d": {i: "\ue79b", c: [3]uint8{40, 182, 246}}, // 3d
"svg": {i: "\ufc1f", c: [3]uint8{255, 181, 62}}, // svg
"vim": {i: "\ue62b", c: [3]uint8{67, 160, 71}}, // vim
"moonscript": {i: "\uf186", c: [3]uint8{251, 193, 60}}, // moonscript
"codeowners": {i: "\uf507", c: [3]uint8{175, 180, 43}}, // codeowners
"disc": {i: "\ue271", c: [3]uint8{176, 190, 197}}, // disc
"fortran": {i: "F", c: [3]uint8{250, 111, 66}}, // fortran
"tcl": {i: "\ufbd1", c: [3]uint8{239, 83, 80}}, // tcl
"liquid": {i: "\ue275", c: [3]uint8{40, 182, 246}}, // liquid
"prolog": {i: "\ue7a1", c: [3]uint8{239, 83, 80}}, // prolog
"husky": {i: "\uf8e8", c: [3]uint8{229, 229, 229}}, // husky
"coconut": {i: "\uf5d2", c: [3]uint8{141, 110, 99}}, // coconut
"sketch": {i: "\uf6c7", c: [3]uint8{255, 194, 61}}, // sketch
"pawn": {i: "\ue261", c: [3]uint8{239, 111, 60}}, // pawn
"commitlint": {i: "\ufc16", c: [3]uint8{43, 150, 137}}, // commitlint
"dhall": {i: "\uf448", c: [3]uint8{120, 144, 156}}, // dhall
"dune": {i: "\uf7f4", c: [3]uint8{244, 127, 61}}, // dune
"shaderlab": {i: "\ufbad", c: [3]uint8{25, 118, 210}}, // shaderlab
"command": {i: "\ufb32", c: [3]uint8{175, 188, 194}}, // command
"stryker": {i: "\uf05b", c: [3]uint8{239, 83, 80}}, // stryker
"modernizr": {i: "\ue720", c: [3]uint8{234, 72, 99}}, // modernizr
"roadmap": {i: "\ufb6d", c: [3]uint8{48, 166, 154}}, // roadmap
"debian": {i: "\uf306", c: [3]uint8{211, 61, 76}}, // debian
"ubuntu": {i: "\uf31c", c: [3]uint8{214, 73, 53}}, // ubuntu
"arch": {i: "\uf303", c: [3]uint8{33, 142, 202}}, // arch
"redhat": {i: "\uf316", c: [3]uint8{231, 61, 58}}, // redhat
"gentoo": {i: "\uf30d", c: [3]uint8{148, 141, 211}}, // gentoo
"linux": {i: "\ue712", c: [3]uint8{238, 207, 55}}, // linux
"raspberry-pi": {i: "\uf315", c: [3]uint8{208, 60, 76}}, // raspberry-pi
"manjaro": {i: "\uf312", c: [3]uint8{73, 185, 90}}, // manjaro
"opensuse": {i: "\uf314", c: [3]uint8{111, 180, 36}}, // opensuse
"fedora": {i: "\uf30a", c: [3]uint8{52, 103, 172}}, // fedora
"freebsd": {i: "\uf30c", c: [3]uint8{175, 44, 42}}, // freebsd
"centOS": {i: "\uf304", c: [3]uint8{157, 83, 135}}, // centOS
"alpine": {i: "\uf300", c: [3]uint8{14, 87, 123}}, // alpine
"mint": {i: "\uf30f", c: [3]uint8{125, 190, 58}}, // mint
"routing": {i: "\ufb40", c: [3]uint8{67, 160, 71}}, // routing
"laravel": {i: "\ue73f", c: [3]uint8{248, 80, 81}}, // laravel
"pug": {i: "\ue60e", c: [3]uint8{239, 204, 163}}, // pug (Not supported by nerdFont)
"blink": {i: "\uf72a", c: [3]uint8{249, 169, 60}}, // blink (The Foundry Nuke) (Not supported by nerdFont)
"postcss": {i: "\uf81b", c: [3]uint8{244, 68, 62}}, // postcss (Not supported by nerdFont)
"jinja": {i: "\ue000", c: [3]uint8{174, 44, 42}}, // jinja (Not supported by nerdFont)
"sublime": {i: "\ue7aa", c: [3]uint8{239, 148, 58}}, // sublime (Not supported by nerdFont)
"markojs": {i: "\uf13b", c: [3]uint8{2, 119, 189}}, // markojs (Not supported by nerdFont)
"vscode": {i: "\ue70c", c: [3]uint8{33, 150, 243}}, // vscode (Not supported by nerdFont)
"qsharp": {i: "\uf292", c: [3]uint8{251, 193, 60}}, // qsharp (Not supported by nerdFont)
"vala": {i: "\uf7ab", c: [3]uint8{149, 117, 205}}, // vala (Not supported by nerdFont)
"zig": {i: "Z", c: [3]uint8{249, 169, 60}}, // zig (Not supported by nerdFont)
"h": {i: "h", c: [3]uint8{2, 119, 189}}, // h (Not supported by nerdFont)
"hpp": {i: "h", c: [3]uint8{2, 119, 189}}, // hpp (Not supported by nerdFont)
"powershell": {i: "\ufcb5", c: [3]uint8{5, 169, 244}}, // powershell (Not supported by nerdFont)
"gradle": {i: "\ufcc4", c: [3]uint8{29, 151, 167}}, // gradle (Not supported by nerdFont)
"arduino": {i: "\ue255", c: [3]uint8{35, 151, 156}}, // arduino (Not supported by nerdFont)
"tex": {i: "\uf783", c: [3]uint8{66, 165, 245}}, // tex (Not supported by nerdFont)
"graphql": {i: "\ue284", c: [3]uint8{237, 80, 122}}, // graphql (Not supported by nerdFont)
"kotlin": {i: "\ue70e", c: [3]uint8{139, 195, 74}}, // kotlin (Not supported by nerdFont)
"actionscript": {i: "\ufb25", c: [3]uint8{244, 68, 62}}, // actionscript (Not supported by nerdFont)
"autohotkey": {i: "\uf812", c: [3]uint8{76, 175, 80}}, // autohotkey (Not supported by nerdFont)
"flash": {i: "\uf740", c: [3]uint8{198, 52, 54}}, // flash (Not supported by nerdFont)
"swc": {i: "\ufbd3", c: [3]uint8{198, 52, 54}}, // swc (Not supported by nerdFont)
"cmake": {i: "\uf425", c: [3]uint8{178, 178, 179}}, // cmake (Not supported by nerdFont)
"nuxt": {i: "\ue2a6", c: [3]uint8{65, 184, 131}}, // nuxt (Not supported by nerdFont)
"ocaml": {i: "\uf1ce", c: [3]uint8{253, 154, 62}}, // ocaml (Not supported by nerdFont)
"haxe": {i: "\uf425", c: [3]uint8{246, 137, 61}}, // haxe (Not supported by nerdFont)
"puppet": {i: "\uf595", c: [3]uint8{251, 193, 60}}, // puppet (Not supported by nerdFont)
"purescript": {i: "\uf670", c: [3]uint8{66, 165, 245}}, // purescript (Not supported by nerdFont)
"merlin": {i: "\uf136", c: [3]uint8{66, 165, 245}}, // merlin (Not supported by nerdFont)
"mjml": {i: "\ue714", c: [3]uint8{249, 89, 63}}, // mjml (Not supported by nerdFont)
"terraform": {i: "\ue20f", c: [3]uint8{92, 107, 192}}, // terraform (Not supported by nerdFont)
"apiblueprint": {i: "\uf031", c: [3]uint8{66, 165, 245}}, // apiblueprint (Not supported by nerdFont)
"slim": {i: "\uf24e", c: [3]uint8{245, 129, 61}}, // slim (Not supported by nerdFont)
"babel": {i: "\uf5a0", c: [3]uint8{253, 217, 59}}, // babel (Not supported by nerdFont)
"codecov": {i: "\ue37c", c: [3]uint8{237, 80, 122}}, // codecov (Not supported by nerdFont)
"protractor": {i: "\uf288", c: [3]uint8{229, 61, 58}}, // protractor (Not supported by nerdFont)
"eslint": {i: "\ufbf6", c: [3]uint8{121, 134, 203}}, // eslint (Not supported by nerdFont)
"mocha": {i: "\uf6a9", c: [3]uint8{161, 136, 127}}, // mocha (Not supported by nerdFont)
"firebase": {i: "\ue787", c: [3]uint8{251, 193, 60}}, // firebase (Not supported by nerdFont)
"stylelint": {i: "\ufb76", c: [3]uint8{207, 216, 220}}, // stylelint (Not supported by nerdFont)
"prettier": {i: "\uf8e2", c: [3]uint8{86, 179, 180}}, // prettier (Not supported by nerdFont)
"jest": {i: "J", c: [3]uint8{244, 85, 62}}, // jest (Not supported by nerdFont)
"storybook": {i: "\ufd2c", c: [3]uint8{237, 80, 122}}, // storybook (Not supported by nerdFont)
"fastlane": {i: "\ufbff", c: [3]uint8{149, 119, 232}}, // fastlane (Not supported by nerdFont)
"helm": {i: "\ufd31", c: [3]uint8{32, 173, 194}}, // helm (Not supported by nerdFont)
"i18n": {i: "\uf7be", c: [3]uint8{121, 134, 203}}, // i18n (Not supported by nerdFont)
"semantic-release": {i: "\uf70f", c: [3]uint8{245, 245, 245}}, // semantic-release (Not supported by nerdFont)
"godot": {i: "\ufba7", c: [3]uint8{79, 195, 247}}, // godot (Not supported by nerdFont)
"godot-assets": {i: "\ufba7", c: [3]uint8{129, 199, 132}}, // godot-assets (Not supported by nerdFont)
"vagrant": {i: "\uf27d", c: [3]uint8{20, 101, 192}}, // vagrant (Not supported by nerdFont)
"tailwindcss": {i: "\ufc8b", c: [3]uint8{77, 182, 172}}, // tailwindcss (Not supported by nerdFont)
"gcp": {i: "\uf662", c: [3]uint8{70, 136, 250}}, // gcp (Not supported by nerdFont)
"opam": {i: "\uf1ce", c: [3]uint8{255, 213, 79}}, // opam (Not supported by nerdFont)
"pascal": {i: "\uf8da", c: [3]uint8{3, 136, 209}}, // pascal (Not supported by nerdFont)
"nuget": {i: "\ue77f", c: [3]uint8{3, 136, 209}}, // nuget (Not supported by nerdFont)
"denizenscript": {i: "D", c: [3]uint8{255, 213, 79}}, // denizenscript (Not supported by nerdFont)
// "riot": {i:"\u", c:[3]uint8{255, 255, 255}}, // riot
// "autoit": {i:"\u", c:[3]uint8{255, 255, 255}}, // autoit
// "livescript": {i:"\u", c:[3]uint8{255, 255, 255}}, // livescript
// "reason": {i:"\u", c:[3]uint8{255, 255, 255}}, // reason
// "bucklescript": {i:"\u", c:[3]uint8{255, 255, 255}}, // bucklescript
// "mathematica": {i:"\u", c:[3]uint8{255, 255, 255}}, // mathematica
// "wolframlanguage": {i:"\u", c:[3]uint8{255, 255, 255}}, // wolframlanguage
// "nunjucks": {i:"\u", c:[3]uint8{255, 255, 255}}, // nunjucks
// "haml": {i:"\u", c:[3]uint8{255, 255, 255}}, // haml
// "cucumber": {i:"\u", c:[3]uint8{255, 255, 255}}, // cucumber
// "vfl": {i:"\u", c:[3]uint8{255, 255, 255}}, // vfl
// "kl": {i:"\u", c:[3]uint8{255, 255, 255}}, // kl
// "coldfusion": {i:"\u", c:[3]uint8{255, 255, 255}}, // coldfusion
// "cabal": {i:"\u", c:[3]uint8{255, 255, 255}}, // cabal
// "restql": {i:"\u", c:[3]uint8{255, 255, 255}}, // restql
// "kivy": {i:"\u", c:[3]uint8{255, 255, 255}}, // kivy
// "graphcool": {i:"\u", c:[3]uint8{255, 255, 255}}, // graphcool
// "sbt": {i:"\u", c:[3]uint8{255, 255, 255}}, // sbt
// "flow": {i:"\u", c:[3]uint8{255, 255, 255}}, // flow
// "bithound": {i:"\u", c:[3]uint8{255, 255, 255}}, // bithound
// "appveyor": {i:"\u", c:[3]uint8{255, 255, 255}}, // appveyor
// "fusebox": {i:"\u", c:[3]uint8{255, 255, 255}}, // fusebox
// "editorconfig": {i:"\u", c:[3]uint8{255, 255, 255}}, // editorconfig
// "watchman": {i:"\u", c:[3]uint8{255, 255, 255}}, // watchman
// "aurelia": {i:"\u", c:[3]uint8{255, 255, 255}}, // aurelia
// "rollup": {i:"\u", c:[3]uint8{255, 255, 255}}, // rollup
// "hack": {i:"\u", c:[3]uint8{255, 255, 255}}, // hack
// "apollo": {i:"\u", c:[3]uint8{255, 255, 255}}, // apollo
// "nodemon": {i:"\u", c:[3]uint8{255, 255, 255}}, // nodemon
// "webhint": {i:"\u", c:[3]uint8{255, 255, 255}}, // webhint
// "browserlist": {i:"\u", c:[3]uint8{255, 255, 255}}, // browserlist
// "crystal": {i:"\u", c:[3]uint8{255, 255, 255}}, // crystal
// "snyk": {i:"\u", c:[3]uint8{255, 255, 255}}, // snyk
// "drone": {i:"\u", c:[3]uint8{255, 255, 255}}, // drone
// "cuda": {i:"\u", c:[3]uint8{255, 255, 255}}, // cuda
// "dotjs": {i:"\u", c:[3]uint8{255, 255, 255}}, // dotjs
// "sequelize": {i:"\u", c:[3]uint8{255, 255, 255}}, // sequelize
// "gatsby": {i:"\u", c:[3]uint8{255, 255, 255}}, // gatsby
// "wakatime": {i:"\u", c:[3]uint8{255, 255, 255}}, // wakatime
// "circleci": {i:"\u", c:[3]uint8{255, 255, 255}}, // circleci
// "cloudfoundry": {i:"\u", c:[3]uint8{255, 255, 255}}, // cloudfoundry
// "processing": {i:"\u", c:[3]uint8{255, 255, 255}}, // processing
// "wepy": {i:"\u", c:[3]uint8{255, 255, 255}}, // wepy
// "hcl": {i:"\u", c:[3]uint8{255, 255, 255}}, // hcl
// "san": {i:"\u", c:[3]uint8{255, 255, 255}}, // san
// "wallaby": {i:"\u", c:[3]uint8{255, 255, 255}}, // wallaby
// "stencil": {i:"\u", c:[3]uint8{255, 255, 255}}, // stencil
// "red": {i:"\u", c:[3]uint8{255, 255, 255}}, // red
// "webassembly": {i:"\u", c:[3]uint8{255, 255, 255}}, // webassembly
// "foxpro": {i:"\u", c:[3]uint8{255, 255, 255}}, // foxpro
// "jupyter": {i:"\u", c:[3]uint8{255, 255, 255}}, // jupyter
// "ballerina": {i:"\u", c:[3]uint8{255, 255, 255}}, // ballerina
// "racket": {i:"\u", c:[3]uint8{255, 255, 255}}, // racket
// "bazel": {i:"\u", c:[3]uint8{255, 255, 255}}, // bazel
// "mint": {i:"\u", c:[3]uint8{255, 255, 255}}, // mint
// "velocity": {i:"\u", c:[3]uint8{255, 255, 255}}, // velocity
// "prisma": {i:"\u", c:[3]uint8{255, 255, 255}}, // prisma
// "abc": {i:"\u", c:[3]uint8{255, 255, 255}}, // abc
// "istanbul": {i:"\u", c:[3]uint8{255, 255, 255}}, // istanbul
// "lisp": {i:"\u", c:[3]uint8{255, 255, 255}}, // lisp
// "buildkite": {i:"\u", c:[3]uint8{255, 255, 255}}, // buildkite
// "netlify": {i:"\u", c:[3]uint8{255, 255, 255}}, // netlify
// "svelte": {i:"\u", c:[3]uint8{255, 255, 255}}, // svelte
// "nest": {i:"\u", c:[3]uint8{255, 255, 255}}, // nest
// "percy": {i:"\u", c:[3]uint8{255, 255, 255}}, // percy
// "gitpod": {i:"\u", c:[3]uint8{255, 255, 255}}, // gitpod
// "advpl_prw": {i:"\u", c:[3]uint8{255, 255, 255}}, // advpl_prw
// "advpl_ptm": {i:"\u", c:[3]uint8{255, 255, 255}}, // advpl_ptm
// "advpl_tlpp": {i:"\u", c:[3]uint8{255, 255, 255}}, // advpl_tlpp
// "advpl_include": {i:"\u", c:[3]uint8{255, 255, 255}}, // advpl_include
// "tilt": {i:"\u", c:[3]uint8{255, 255, 255}}, // tilt
// "capacitor": {i:"\u", c:[3]uint8{255, 255, 255}}, // capacitor
// "adonis": {i:"\u", c:[3]uint8{255, 255, 255}}, // adonis
// "forth": {i:"\u", c:[3]uint8{255, 255, 255}}, // forth
// "uml": {i:"\u", c:[3]uint8{255, 255, 255}}, // uml
// "meson": {i:"\u", c:[3]uint8{255, 255, 255}}, // meson
// "buck": {i:"\u", c:[3]uint8{255, 255, 255}}, // buck
// "sml": {i:"\u", c:[3]uint8{255, 255, 255}}, // sml
// "nrwl": {i:"\u", c:[3]uint8{255, 255, 255}}, // nrwl
// "imba": {i:"\u", c:[3]uint8{255, 255, 255}}, // imba
// "drawio": {i:"\u", c:[3]uint8{255, 255, 255}}, // drawio
// "sas": {i:"\u", c:[3]uint8{255, 255, 255}}, // sas
// "slug": {i:"\u", c:[3]uint8{255, 255, 255}}, // slug
"dir-config": {i: "\ue5fc", c: [3]uint8{32, 173, 194}}, // dir-config
"dir-controller": {i: "\ue5fc", c: [3]uint8{255, 194, 61}}, // dir-controller
"dir-git": {i: "\ue5fb", c: [3]uint8{250, 111, 66}}, // dir-git
"dir-github": {i: "\ue5fd", c: [3]uint8{84, 110, 122}}, // dir-github
"dir-npm": {i: "\ue5fa", c: [3]uint8{203, 56, 55}}, // dir-npm
"dir-include": {i: "\uf756", c: [3]uint8{3, 155, 229}}, // dir-include
"dir-import": {i: "\uf756", c: [3]uint8{175, 180, 43}}, // dir-import
"dir-upload": {i: "\uf758", c: [3]uint8{250, 111, 66}}, // dir-upload
"dir-download": {i: "\uf74c", c: [3]uint8{76, 175, 80}}, // dir-download
"dir-secure": {i: "\uf74f", c: [3]uint8{249, 169, 60}}, // dir-secure
"dir-images": {i: "\uf74e", c: [3]uint8{43, 150, 137}}, // dir-images
"dir-environment": {i: "\uf74e", c: [3]uint8{102, 187, 106}}, // dir-environment
}
// default icons in case nothing can be found
var Icon_Def = map[string]*Icon_Info{
"dir": {i: "\uf74a", c: [3]uint8{224, 177, 77}},
"diropen": {i: "\ufc6e", c: [3]uint8{224, 177, 77}},
"hiddendir": {i: "\uf755", c: [3]uint8{224, 177, 77}},
"exe": {i: "\uf713", c: [3]uint8{76, 175, 80}},
"file": {i: "\uf723", c: [3]uint8{65, 129, 190}},
"hiddenfile": {i: "\ufb12", c: [3]uint8{65, 129, 190}},
}
+47
View File
@@ -0,0 +1,47 @@
package assets
var Icon_SubExt = map[string]*Icon_Info{
"routing.ts": Icon_Set["routing"],
"routing.tsx": Icon_Set["routing"],
"routing.js": Icon_Set["routing"],
"routing.jsx": Icon_Set["routing"],
"routes.ts": Icon_Set["routing"],
"routes.tsx": Icon_Set["routing"],
"routes.js": Icon_Set["routing"],
"routes.jsx": Icon_Set["routing"],
"sln.dotsettings": Icon_Set["settings"],
"d.ts": Icon_Set["typescript-def"],
"vcxitems.filters": Icon_Set["visualstudio"],
"vcxproj.filters": Icon_Set["visualstudio"],
"js.map": Icon_Set["javascript-map"],
"mjs.map": Icon_Set["javascript-map"],
"css.map": Icon_Set["css-map"],
"spec.ts": Icon_Set["test-ts"],
"e2e-spec.ts": Icon_Set["test-ts"],
"test.ts": Icon_Set["test-ts"],
"ts.snap": Icon_Set["test-ts"],
"spec.tsx": Icon_Set["test-jsx"],
"test.tsx": Icon_Set["test-jsx"],
"tsx.snap": Icon_Set["test-jsx"],
"spec.jsx": Icon_Set["test-jsx"],
"test.jsx": Icon_Set["test-jsx"],
"jsx.snap": Icon_Set["test-jsx"],
"spec.js": Icon_Set["test-js"],
"e2e-spec.js": Icon_Set["test-js"],
"test.js": Icon_Set["test-js"],
"js.snap": Icon_Set["test-js"],
"tf.json": Icon_Set["terraform"],
"blade.php": Icon_Set["laravel"],
"inky.php": Icon_Set["laravel"],
"gitlab-ci.yml": Icon_Set["gitlab"],
"stories.js": Icon_Set["storybook"],
"stories.jsx": Icon_Set["storybook"],
"story.js": Icon_Set["storybook"],
"story.jsx": Icon_Set["storybook"],
"stories.ts": Icon_Set["storybook"],
"stories.tsx": Icon_Set["storybook"],
"story.ts": Icon_Set["storybook"],
"story.tsx": Icon_Set["storybook"],
"azure-pipelines.yml": Icon_Set["azure-pipelines"],
"azure-pipelines.yaml": Icon_Set["azure-pipelines"],
}
+18 -19
View File
@@ -1,4 +1,4 @@
package main
package assets_test
import (
"bytes"
@@ -9,7 +9,8 @@ import (
"sort"
"testing"
"github.com/Yash-Handa/logo-ls/ctw"
"github.com/Yash-Handa/logo-ls/assets"
"github.com/Yash-Handa/logo-ls/internal/ctw"
"golang.org/x/crypto/ssh/terminal"
)
@@ -17,41 +18,40 @@ func TestFileIcons(t *testing.T) {
log.Println("Printing each supported file name and ext by the icon pack")
// get terminal width
var e error = nil
terminalWidth, _, e = terminal.GetSize(int(os.Stdout.Fd()))
terminalWidth, _, e := terminal.GetSize(int(os.Stdout.Fd()))
if e != nil {
terminalWidth = 80
}
ks := make([]string, 0)
for k := range iSet {
for k := range assets.Icon_Set {
ks = append(ks, k)
}
sort.Strings(ks)
for _, v := range ks {
t.Run("Testing icon: "+v, func(st *testing.T) {
i := iSet[v]
i := assets.Icon_Set[v]
fmt.Fprintln(os.Stderr)
buf := bytes.NewBuffer([]byte(""))
log.Println("Printing files of type", i.getColor(1)+v+"\033[38;2;255;255;255m")
log.Println("Printing files of type", i.GetColor(1)+v+"\033[0m")
w := ctw.New(terminalWidth)
for f, d := range Icon_FileName {
for f, d := range assets.Icon_FileName {
if d == i {
w.AddRow(" ", d.getGlyph(), f, "")
w.IconColor(d.getColor(1))
w.AddRow(" ", d.GetGlyph(), f, "")
w.IconColor(d.GetColor(1))
}
}
w.Flush(buf)
io.Copy(os.Stderr, buf)
buf = bytes.NewBuffer([]byte(""))
log.Println("Printing extentions of type", i.getColor(1)+v+"\033[38;2;255;255;255m")
log.Println("Printing extentions of type", i.GetColor(1)+v+"\033[0m")
w = ctw.New(terminalWidth)
for e, d := range Icon_Ext {
for e, d := range assets.Icon_Ext {
if d == i {
w.AddRow(" ", d.getGlyph(), e, "")
w.IconColor(d.getColor(1))
w.AddRow(" ", d.GetGlyph(), e, "")
w.IconColor(d.GetColor(1))
}
}
w.Flush(buf)
@@ -62,13 +62,12 @@ func TestFileIcons(t *testing.T) {
func TestIconDisplay(t *testing.T) {
// get terminal width
var e error = nil
terminalWidth, _, e = terminal.GetSize(int(os.Stdout.Fd()))
terminalWidth, _, e := terminal.GetSize(int(os.Stdout.Fd()))
if e != nil {
terminalWidth = 80
}
temp := [2]map[string]*iInfo{iSet, iDef}
temp := [2]map[string]*assets.Icon_Info{assets.Icon_Set, assets.Icon_Def}
for i, set := range temp {
t.Run(fmt.Sprintf("Icon Set %d", i+1), func(st *testing.T) {
@@ -83,8 +82,8 @@ func TestIconDisplay(t *testing.T) {
buf := bytes.NewBuffer([]byte("\n"))
w := ctw.New(terminalWidth)
for _, v := range ks {
w.AddRow(" ", set[v].getGlyph(), v, "")
w.IconColor(set[v].getColor(1))
w.AddRow(" ", set[v].GetGlyph(), v, "")
w.IconColor(set[v].GetColor(1))
}
w.Flush(buf)
io.Copy(os.Stdout, buf)
+86
View File
@@ -0,0 +1,86 @@
# The below list of icons are not included as are not currently supported by nerd fonts, If you are interested consider opening PRs on Nerd Fonts repo
icons:
- riot
- autoit
- livescript
- reason
- bucklescript
- mathematica
- wolframlanguage
- nunjucks
- haml
- cucumber
- vfl
- kl
- coldfusion
- cabal
- restql
- kivy
- graphcool
- sbt
- flow
- bithound
- appveyor
- fusebox
- editorconfig
- watchman
- aurelia
- rollup
- hack
- apollo
- nodemon
- webhint
- browserlist
- crystal
- snyk
- drone
- cuda
- dotjs
- sequelize
- gatsby
- wakatime
- circleci
- cloudfoundry
- processing
- wepy
- hcl
- san
- wallaby
- stencil
- red
- webassembly
- foxpro
- jupyter
- ballerina
- racket
- bazel
- mint
- velocity
- prisma
- abc
- istanbul
- lisp
- buildkite
- netlify
- svelte
- nest
- percy
- gitpod
- advpl_prw
- advpl_ptm
- advpl_tlpp
- advpl_include
- tilt
- capacitor
- adonis
- forth
- uml
- meson
- buck
- sml
- nrwl
- imba
- drawio
- sas
- slug
+127
View File
@@ -0,0 +1,127 @@
package main
import (
"bytes"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"testing"
)
type nodes []struct {
name string
textContent []byte
dirContent *nodes
}
func (n *nodes) create(t *testing.T, dir string) {
for _, f := range *n {
fn := filepath.Join(dir, f.name)
if f.textContent != nil {
if err := ioutil.WriteFile(fn, f.textContent, 0666); err != nil {
t.Fatal(err)
}
} else if f.dirContent != nil {
if err := os.Mkdir(fn, 0777); err != nil {
t.Log(err)
t.Fail()
continue
}
f.dirContent.create(t, fn)
}
}
}
func TestE2E(t *testing.T) {
goExec, err := exec.LookPath("go")
if err != nil {
t.Fatal(err)
}
dirEnv := filepath.Join("./testdata", "dirEnv")
os.RemoveAll(dirEnv)
// create a temp directory environment
if err := os.Mkdir(dirEnv, 0777); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(dirEnv)
// if you update the fileStruct or create any changes that may break the snapshorts present in ./testdata/logo-ls*.txt
// then you do have to update the snapshorts like: logo-ls -V > ./testdata/logo-ls-V.txt
fileStruct := nodes{
{name: "1test.go", textContent: []byte("package main\nimport \"fmt\"\nfunc main() {\n fmt.Println(\"Hello\")\n}")},
{name: "2test.js", textContent: []byte("consol.log('Hello')")},
{name: "test.routes.tsx", textContent: []byte("consol.log('Hello')")},
{name: "Dockerfile", textContent: []byte("FROM golang:1.15.2-buster AS base")},
{name: "abc.css", textContent: []byte("h1 {\n color : red;\n}")},
{name: "abc.sass", textContent: []byte("h1 {\n color : red;\n}")},
{name: ".abc.txt", textContent: []byte("Hello")},
{name: "3test.py", textContent: []byte("print('Hello')")},
{name: "testDir", dirContent: &nodes{
{name: "abc.txt", textContent: []byte("Hello")},
{name: "1test.go", textContent: []byte("package main\nimport \"fmt\"\nfunc main() {\n fmt.Println(\"Hello\")\n}")},
{name: "2test.js", textContent: []byte("consol.log('Hello')")},
}},
{name: ".privateDir", dirContent: &nodes{
{name: "abc.txt", textContent: []byte("Hello")},
{name: "1test.go", textContent: []byte("package main\nimport \"fmt\"\nfunc main() {\n fmt.Println(\"Hello\")\n}")},
{name: "2test.js", textContent: []byte("consol.log('Hello')")},
}},
{name: "Downloads", dirContent: &nodes{}},
}
fileStruct.create(t, dirEnv)
tt := []struct {
args []string
testFile string
td string
}{
{args: []string{"-1"}, testFile: "logo-ls.snap", td: "Testing normal execution"},
{args: []string{"-1a"}, testFile: "logo-ls-a.snap", td: "Testing -a (all) execution"},
{args: []string{"-1A"}, testFile: "logo-ls-A.snap", td: "Testing -A (almost all) execution"},
{args: []string{"-1i"}, testFile: "logo-ls-i.snap", td: "Testing -i (no icon) execution"},
{args: []string{"-1r"}, testFile: "logo-ls-r.snap", td: "Testing -r (reverse) execution"},
{args: []string{"-1sh"}, testFile: "logo-ls-sh.snap", td: "Testing -sh (human readable size) execution"},
{args: []string{"-1R"}, testFile: "logo-ls-R.snap", td: "Testing -R (recursive) execution"},
{args: []string{"-1Ra"}, testFile: "logo-ls-Ra.snap", td: "Testing -Ra (recursive, all) execution"},
{args: []string{"-1shRa"}, testFile: "logo-ls-shRa.snap", td: "Testing -shRa execution"},
{args: []string{"-V"}, testFile: "logo-ls-V.snap", td: "Testing -V option prints version"},
{args: []string{"-?"}, testFile: "logo-ls--help.snap", td: "Testing -? (help) prints help message"},
}
for _, test := range tt {
t.Run(test.td, func(st *testing.T) {
args := []string{"run", "."}
args = append(args, test.args...)
cmd := exec.Command(goExec, append(args, dirEnv)...)
stdout, err := cmd.StdoutPipe()
defer stdout.Close()
if err != nil {
st.Fatal(err)
}
if err := cmd.Start(); err != nil {
st.Fatal(err)
}
cmdData, err := ioutil.ReadAll(stdout)
if err != nil {
st.Fatal(err)
}
if err := cmd.Wait(); err != nil {
st.Fatal(err)
}
fileData, err := ioutil.ReadFile(filepath.Join("./testdata", test.testFile))
if err != nil {
st.Fatal(err)
}
if bytes.Compare(cmdData, fileData) != 0 {
t.Fatalf("expected output of the command:\n-----------\n%s\n=============\nbut got:\n-----------\n%s", fileData, cmdData)
}
})
}
}
-70
View File
@@ -1,70 +0,0 @@
package main
import (
"path/filepath"
"strings"
"github.com/go-git/go-git/v5"
)
func getRepoStatus(path string) (git.Status, string, error) {
op := git.PlainOpenOptions{DetectDotGit: true}
r, err := git.PlainOpenWithOptions(path, &op)
if err != nil {
return nil, "", err
}
w, err := r.Worktree()
if err != nil {
return nil, "", err
}
ws, err := w.Status()
if err != nil {
return nil, "", err
}
return ws, w.Filesystem.Root(), nil
}
func getFilesGitStatus(p string) map[string]string {
gitRepo, gitRoot, err := getRepoStatus(p)
if err != nil {
return nil
}
pAbs, err := filepath.Abs(p)
if err != nil {
return nil
}
t := make(map[string]string)
for i, v := range gitRepo {
i = gitFilePath(gitRoot+"/"+i, pAbs+"/")
if i == "" {
continue
}
dirs := strings.SplitAfter(i, "/")
d := ""
for j, seg := range dirs {
if j == len(dirs)-1 {
if v.Worktree == '?' {
t[i] = "U"
} else {
t[i] = string(v.Worktree)
}
} else {
d += seg
t[d] = "●"
}
}
}
return t
}
func gitFilePath(gitpath, dirpath string) string {
if strings.HasPrefix(gitpath, dirpath) {
return strings.TrimPrefix(gitpath, dirpath)
}
return ""
}
+9 -2
View File
@@ -3,7 +3,14 @@ module github.com/Yash-Handa/logo-ls
go 1.15
require (
github.com/go-git/go-git/v5 v5.1.0
github.com/Microsoft/go-winio v0.4.16 // indirect
github.com/go-git/go-git/v5 v5.2.0
github.com/imdario/mergo v0.3.11 // indirect
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
github.com/mattn/go-colorable v0.1.7
github.com/pborman/getopt/v2 v2.0.0
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a
github.com/xanzy/ssh-agent v0.3.0 // indirect
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
golang.org/x/net v0.0.0-20201224014010-6772e930b67b // indirect
golang.org/x/sys v0.0.0-20201223074533-0d417f636930 // indirect
)
+44 -6
View File
@@ -1,3 +1,7 @@
github.com/Microsoft/go-winio v0.4.14 h1:+hMXMk01us9KgxGb7ftKQt2Xpf5hH/yky+TDA+qxleU=
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk=
github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs=
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs=
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA=
@@ -18,24 +22,33 @@ github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4=
github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E=
github.com/go-git/go-billy/v5 v5.0.0 h1:7NQHvd9FVid8VL4qVUMm8XifBK+2xCoZ2lSk0agRrHM=
github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
github.com/go-git/go-git-fixtures/v4 v4.0.1 h1:q+IFMfLx200Q3scvt2hN79JsEzy4AmBTp/pqnefH+Bc=
github.com/go-git/go-git-fixtures/v4 v4.0.1/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw=
github.com/go-git/go-git/v5 v5.1.0 h1:HxJn9g/E7eYvKW3Fm7Jt4ee8LXfPOm/H1cdDu8vEssk=
github.com/go-git/go-git/v5 v5.1.0/go.mod h1:ZKfuPUoY1ZqIG4QG9BDBh3G4gLM5zvPuSJAozQrZuyM=
github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12 h1:PbKy9zOy4aAKrJ5pibIRpVO2BXnK1Tlcg+caKI7Ox5M=
github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw=
github.com/go-git/go-git/v5 v5.2.0 h1:YPBLG/3UK1we1ohRkncLjaXWLW+HKp5QNM/jTli2JgI=
github.com/go-git/go-git/v5 v5.2.0/go.mod h1:kh02eMX+wdqqxgNMEyq8YgwlIOsDOa9homkUq1PoTMs=
github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg=
github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA=
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd h1:Coekwdh0v2wtGp9Gmz1Ze3eVRAWJMLokvN3QjdzCHLY=
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck=
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mattn/go-colorable v0.1.7 h1:bQGKb3vps/j0E9GfJQ03JyhRuxsvdAanXlT9BTw3mdw=
github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
@@ -44,32 +57,55 @@ github.com/pborman/getopt/v2 v2.0.0 h1:Tn8XVmhb93Wbc346Tk4P6KutfpMVp+iztUzkZrTSy
github.com/pborman/getopt/v2 v2.0.0/go.mod h1:4NtW75ny4eBw9fO1bhtNdYTlZKYX5/tBLtsOpwKIKd0=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/xanzy/ssh-agent v0.2.1 h1:TCbipTQL2JiiCprBWx9frJ2eJlCYT00NmctrHxVAr70=
github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4=
github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI=
github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0=
golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a h1:vclmkQCjlDX5OydZ9wv8rBCcS0QyQY66Mpf/7BZbInM=
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY=
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0=
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201224014010-6772e930b67b h1:iFwSg7t5GZmB/Q5TjiEAsdoLDrdJRC1RiF2WhuV29Qw=
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So=
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201223074533-0d417f636930 h1:vRgIt+nup/B/BwIS0g2oC0haq0iqbV3ZA+u6+0TlNCo=
golang.org/x/sys v0.0.0-20201223074533-0d417f636930/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@@ -80,3 +116,5 @@ gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRN
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-61
View File
@@ -1,61 +0,0 @@
package main
var Icon_Dir = map[string]*iInfo{
"config": iSet["dir-config"],
".config": iSet["dir-config"],
"configs": iSet["dir-config"],
"configuration": iSet["dir-config"],
"configurations": iSet["dir-config"],
"settings": iSet["dir-config"],
".settings": iSet["dir-config"],
"META-INF": iSet["dir-config"],
"controller": iSet["dir-controller"],
"controllers": iSet["dir-controller"],
"service": iSet["dir-controller"],
"services": iSet["dir-controller"],
"provider": iSet["dir-controller"],
"providers": iSet["dir-controller"],
".git": iSet["dir-git"],
"githooks": iSet["dir-git"],
".githooks": iSet["dir-git"],
"submodules": iSet["dir-git"],
".submodules": iSet["dir-git"],
".github": iSet["dir-github"],
"node_modules": iSet["dir-npm"],
"include": iSet["dir-include"],
"includes": iSet["dir-include"],
"_includes": iSet["dir-include"],
"import": iSet["dir-import"],
"imports": iSet["dir-import"],
"imported": iSet["dir-import"],
"uploads": iSet["dir-upload"],
"upload": iSet["dir-upload"],
"downloads": iSet["dir-download"],
"download": iSet["dir-download"],
"auth": iSet["dir-secure"],
"authentication": iSet["dir-secure"],
"secure": iSet["dir-secure"],
"security": iSet["dir-secure"],
"cert": iSet["dir-secure"],
"certs": iSet["dir-secure"],
"certificate": iSet["dir-secure"],
"certificates": iSet["dir-secure"],
"ssl": iSet["dir-secure"],
"images": iSet["dir-images"],
"image": iSet["dir-images"],
"pics": iSet["dir-images"],
"pic": iSet["dir-images"],
"pictures": iSet["dir-images"],
"picture": iSet["dir-images"],
"img": iSet["dir-images"],
"icons": iSet["dir-images"],
"icon": iSet["dir-images"],
"ico": iSet["dir-images"],
"screenshot": iSet["dir-images"],
"screenshots": iSet["dir-images"],
".env": iSet["dir-environment"],
".environment": iSet["dir-environment"],
"env": iSet["dir-environment"],
"environment": iSet["dir-environment"],
"environments": iSet["dir-environment"],
}
-536
View File
@@ -1,536 +0,0 @@
package main
var Icon_Ext = map[string]*iInfo{
"htm": iSet["html"],
"html": iSet["html"],
"xhtml": iSet["html"],
"html_vm": iSet["html"],
"asp": iSet["html"],
"jade": iSet["pug"],
"pug": iSet["pug"],
"md": iSet["markdown"],
"markdown": iSet["markdown"],
"rst": iSet["markdown"],
"blink": iSet["blink"],
"css": iSet["css"],
"scss": iSet["sass"],
"sass": iSet["sass"],
"less": iSet["less"],
"json": iSet["json"],
"tsbuildinfo": iSet["json"],
"json5": iSet["json"],
"jsonl": iSet["json"],
"ndjson": iSet["json"],
"jinja": iSet["jinja"],
"jinja2": iSet["jinja"],
"j2": iSet["jinja"],
"jinja-html": iSet["jinja"],
"sublime-project": iSet["sublime"],
"sublime-workspace": iSet["sublime"],
"yaml": iSet["yaml"],
"yaml-tmlanguage": iSet["yaml"],
"yml": iSet["yaml"],
"xml": iSet["xml"],
"plist": iSet["xml"],
"xsd": iSet["xml"],
"dtd": iSet["xml"],
"xsl": iSet["xml"],
"xslt": iSet["xml"],
"resx": iSet["xml"],
"iml": iSet["xml"],
"xquery": iSet["xml"],
"tmLanguage": iSet["xml"],
"manifest": iSet["xml"],
"project": iSet["xml"],
"png": iSet["image"],
"jpeg": iSet["image"],
"jpg": iSet["image"],
"gif": iSet["image"],
"ico": iSet["image"],
"tif": iSet["image"],
"tiff": iSet["image"],
"psd": iSet["image"],
"psb": iSet["image"],
"ami": iSet["image"],
"apx": iSet["image"],
"bmp": iSet["image"],
"bpg": iSet["image"],
"brk": iSet["image"],
"cur": iSet["image"],
"dds": iSet["image"],
"dng": iSet["image"],
"exr": iSet["image"],
"fpx": iSet["image"],
"gbr": iSet["image"],
"img": iSet["image"],
"jbig2": iSet["image"],
"jb2": iSet["image"],
"jng": iSet["image"],
"jxr": iSet["image"],
"pbm": iSet["image"],
"pgf": iSet["image"],
"pic": iSet["image"],
"raw": iSet["image"],
"webp": iSet["image"],
"eps": iSet["image"],
"afphoto": iSet["image"],
"ase": iSet["image"],
"aseprite": iSet["image"],
"clip": iSet["image"],
"cpt": iSet["image"],
"heif": iSet["image"],
"heic": iSet["image"],
"kra": iSet["image"],
"mdp": iSet["image"],
"ora": iSet["image"],
"pdn": iSet["image"],
"reb": iSet["image"],
"sai": iSet["image"],
"tga": iSet["image"],
"xcf": iSet["image"],
"js": iSet["javascript"],
"esx": iSet["javascript"],
"mj": iSet["javascript"],
"jsx": iSet["react"],
"tsx": iSet["react_ts"],
"ini": iSet["settings"],
"dlc": iSet["settings"],
"dll": iSet["settings"],
"config": iSet["settings"],
"conf": iSet["settings"],
"properties": iSet["settings"],
"prop": iSet["settings"],
"settings": iSet["settings"],
"option": iSet["settings"],
"props": iSet["settings"],
"toml": iSet["settings"],
"prefs": iSet["settings"],
"dotsettings": iSet["settings"],
"cfg": iSet["settings"],
"ts": iSet["typescript"],
"marko": iSet["markojs"],
"pdf": iSet["pdf"],
"xlsx": iSet["table"],
"xls": iSet["table"],
"csv": iSet["table"],
"tsv": iSet["table"],
"vscodeignore": iSet["vscode"],
"vsixmanifest": iSet["vscode"],
"vsix": iSet["vscode"],
"code-workplace": iSet["vscode"],
"csproj": iSet["visualstudio"],
"ruleset": iSet["visualstudio"],
"sln": iSet["visualstudio"],
"suo": iSet["visualstudio"],
"vb": iSet["visualstudio"],
"vbs": iSet["visualstudio"],
"vcxitems": iSet["visualstudio"],
"vcxproj": iSet["visualstudio"],
"pdb": iSet["database"],
"sql": iSet["mysql"],
"pks": iSet["database"],
"pkb": iSet["database"],
"accdb": iSet["database"],
"mdb": iSet["database"],
"sqlite": iSet["sqlite"],
"sqlite3": iSet["sqlite"],
"pgsql": iSet["postgresql"],
"postgres": iSet["postgresql"],
"psql": iSet["postgresql"],
"cs": iSet["csharp"],
"csx": iSet["csharp"],
"qs": iSet["qsharp"],
"zip": iSet["zip"],
"tar": iSet["zip"],
"gz": iSet["zip"],
"xz": iSet["zip"],
"br": iSet["zip"],
"bzip2": iSet["zip"],
"gzip": iSet["zip"],
"brotli": iSet["zip"],
"7z": iSet["zip"],
"rar": iSet["zip"],
"tgz": iSet["zip"],
"vala": iSet["vala"],
"zig": iSet["zig"],
"exe": iSet["exe"],
"msi": iSet["exe"],
"java": iSet["java"],
"jar": iSet["java"],
"jsp": iSet["java"],
"c": iSet["c"],
"m": iSet["c"],
"i": iSet["c"],
"mi": iSet["c"],
"h": iSet["h"],
"cc": iSet["cpp"],
"cpp": iSet["cpp"],
"cxx": iSet["cpp"],
"c++": iSet["cpp"],
"cp": iSet["cpp"],
"mm": iSet["cpp"],
"mii": iSet["cpp"],
"ii": iSet["cpp"],
"hh": iSet["hpp"],
"hpp": iSet["hpp"],
"hxx": iSet["hpp"],
"h++": iSet["hpp"],
"hp": iSet["hpp"],
"tcc": iSet["hpp"],
"inl": iSet["hpp"],
"go": iSet["go"],
"py": iSet["python"],
"pyc": iSet["python-misc"],
"whl": iSet["python-misc"],
"url": iSet["url"],
"sh": iSet["console"],
"ksh": iSet["console"],
"csh": iSet["console"],
"tcsh": iSet["console"],
"zsh": iSet["console"],
"bash": iSet["console"],
"bat": iSet["console"],
"cmd": iSet["console"],
"awk": iSet["console"],
"fish": iSet["console"],
"ps1": iSet["powershell"],
"psm1": iSet["powershell"],
"psd1": iSet["powershell"],
"ps1xml": iSet["powershell"],
"psc1": iSet["powershell"],
"pssc": iSet["powershell"],
"gradle": iSet["gradle"],
"doc": iSet["word"],
"docx": iSet["word"],
"rtf": iSet["word"],
"cer": iSet["certificate"],
"cert": iSet["certificate"],
"crt": iSet["certificate"],
"pub": iSet["key"],
"key": iSet["key"],
"pem": iSet["key"],
"asc": iSet["key"],
"gpg": iSet["key"],
"woff": iSet["font"],
"woff2": iSet["font"],
"ttf": iSet["font"],
"eot": iSet["font"],
"suit": iSet["font"],
"otf": iSet["font"],
"bmap": iSet["font"],
"fnt": iSet["font"],
"odttf": iSet["font"],
"ttc": iSet["font"],
"font": iSet["font"],
"fonts": iSet["font"],
"sui": iSet["font"],
"ntf": iSet["font"],
"mrf": iSet["font"],
"lib": iSet["lib"],
"bib": iSet["lib"],
"rb": iSet["ruby"],
"erb": iSet["ruby"],
"fs": iSet["fsharp"],
"fsx": iSet["fsharp"],
"fsi": iSet["fsharp"],
"fsproj": iSet["fsharp"],
"swift": iSet["swift"],
"ino": iSet["arduino"],
"dockerignore": iSet["docker"],
"dockerfile": iSet["docker"],
"tex": iSet["tex"],
"sty": iSet["tex"],
"dtx": iSet["tex"],
"ltx": iSet["tex"],
"pptx": iSet["powerpoint"],
"ppt": iSet["powerpoint"],
"pptm": iSet["powerpoint"],
"potx": iSet["powerpoint"],
"potm": iSet["powerpoint"],
"ppsx": iSet["powerpoint"],
"ppsm": iSet["powerpoint"],
"pps": iSet["powerpoint"],
"ppam": iSet["powerpoint"],
"ppa": iSet["powerpoint"],
"webm": iSet["video"],
"mkv": iSet["video"],
"flv": iSet["video"],
"vob": iSet["video"],
"ogv": iSet["video"],
"ogg": iSet["video"],
"gifv": iSet["video"],
"avi": iSet["video"],
"mov": iSet["video"],
"qt": iSet["video"],
"wmv": iSet["video"],
"yuv": iSet["video"],
"rm": iSet["video"],
"rmvb": iSet["video"],
"mp4": iSet["video"],
"m4v": iSet["video"],
"mpg": iSet["video"],
"mp2": iSet["video"],
"mpeg": iSet["video"],
"mpe": iSet["video"],
"mpv": iSet["video"],
"m2v": iSet["video"],
"vdi": iSet["virtual"],
"vbox": iSet["virtual"],
"vbox-prev": iSet["virtual"],
"ics": iSet["email"],
"mp3": iSet["audio"],
"flac": iSet["audio"],
"m4a": iSet["audio"],
"wma": iSet["audio"],
"aiff": iSet["audio"],
"coffee": iSet["coffee"],
"cson": iSet["coffee"],
"iced": iSet["coffee"],
"txt": iSet["document"],
"graphql": iSet["graphql"],
"gql": iSet["graphql"],
"rs": iSet["rust"],
"raml": iSet["raml"],
"xaml": iSet["xaml"],
"hs": iSet["haskell"],
"kt": iSet["kotlin"],
"kts": iSet["kotlin"],
"patch": iSet["git"],
"lua": iSet["lua"],
"clj": iSet["clojure"],
"cljs": iSet["clojure"],
"cljc": iSet["clojure"],
"groovy": iSet["groovy"],
"r": iSet["r"],
"rmd": iSet["r"],
"dart": iSet["dart"],
"as": iSet["actionscript"],
"mxml": iSet["mxml"],
"ahk": iSet["autohotkey"],
"swf": iSet["flash"],
"swc": iSet["swc"],
"cmake": iSet["cmake"],
"asm": iSet["assembly"],
"a51": iSet["assembly"],
"inc": iSet["assembly"],
"nasm": iSet["assembly"],
"s": iSet["assembly"],
"ms": iSet["assembly"],
"agc": iSet["assembly"],
"ags": iSet["assembly"],
"aea": iSet["assembly"],
"argus": iSet["assembly"],
"mitigus": iSet["assembly"],
"binsource": iSet["assembly"],
"vue": iSet["vue"],
"ml": iSet["ocaml"],
"mli": iSet["ocaml"],
"cmx": iSet["ocaml"],
"lock": iSet["lock"],
"hbs": iSet["handlebars"],
"mustache": iSet["handlebars"],
"pm": iSet["perl"],
"raku": iSet["perl"],
"hx": iSet["haxe"],
"pp": iSet["puppet"],
"ex": iSet["elixir"],
"exs": iSet["elixir"],
"eex": iSet["elixir"],
"leex": iSet["elixir"],
"erl": iSet["erlang"],
"twig": iSet["twig"],
"jl": iSet["julia"],
"elm": iSet["elm"],
"pure": iSet["purescript"],
"purs": iSet["purescript"],
"tpl": iSet["smarty"],
"styl": iSet["stylus"],
"merlin": iSet["merlin"],
"v": iSet["verilog"],
"vhd": iSet["verilog"],
"sv": iSet["verilog"],
"svh": iSet["verilog"],
"robot": iSet["robot"],
"sol": iSet["solidity"],
"yang": iSet["yang"],
"mjml": iSet["mjml"],
"tf": iSet["terraform"],
"tfvars": iSet["terraform"],
"tfstate": iSet["terraform"],
"applescript": iSet["applescript"],
"ipa": iSet["applescript"],
"cake": iSet["cake"],
"nim": iSet["nim"],
"nimble": iSet["nim"],
"apib": iSet["apiblueprint"],
"apiblueprint": iSet["apiblueprint"],
"pcss": iSet["postcss"],
"sss": iSet["postcss"],
"todo": iSet["todo"],
"nix": iSet["nix"],
"slim": iSet["slim"],
"http": iSet["http"],
"rest": iSet["http"],
"apk": iSet["android"],
"env": iSet["tune"],
"jenkinsfile": iSet["jenkins"],
"jenkins": iSet["jenkins"],
"log": iSet["log"],
"ejs": iSet["ejs"],
"djt": iSet["django"],
"pot": iSet["i18n"],
"po": iSet["i18n"],
"mo": iSet["i18n"],
"d": iSet["d"],
"mdx": iSet["mdx"],
"gd": iSet["godot"],
"godot": iSet["godot-assets"],
"tres": iSet["godot-assets"],
"tscn": iSet["godot-assets"],
"azcli": iSet["azure"],
"vagrantfile": iSet["vagrant"],
"cshtml": iSet["razor"],
"vbhtml": iSet["razor"],
"ad": iSet["asciidoc"],
"adoc": iSet["asciidoc"],
"asciidoc": iSet["asciidoc"],
"edge": iSet["edge"],
"ss": iSet["scheme"],
"scm": iSet["scheme"],
"stl": iSet["3d"],
"obj": iSet["3d"],
"ac": iSet["3d"],
"blend": iSet["3d"],
"mesh": iSet["3d"],
"mqo": iSet["3d"],
"pmd": iSet["3d"],
"pmx": iSet["3d"],
"skp": iSet["3d"],
"vac": iSet["3d"],
"vdp": iSet["3d"],
"vox": iSet["3d"],
"svg": iSet["svg"],
"vimrc": iSet["vim"],
"gvimrc": iSet["vim"],
"exrc": iSet["vim"],
"moon": iSet["moonscript"],
"iso": iSet["disc"],
"f": iSet["fortran"],
"f77": iSet["fortran"],
"f90": iSet["fortran"],
"f95": iSet["fortran"],
"f03": iSet["fortran"],
"f08": iSet["fortran"],
"tcl": iSet["tcl"],
"liquid": iSet["liquid"],
"p": iSet["prolog"],
"pro": iSet["prolog"],
"coco": iSet["coconut"],
"sketch": iSet["sketch"],
"opam": iSet["opam"],
"dhallb": iSet["dhall"],
"pwn": iSet["pawn"],
"amx": iSet["pawn"],
"dhall": iSet["dhall"],
"pas": iSet["pascal"],
"unity": iSet["shaderlab"],
"nupkg": iSet["nuget"],
"command": iSet["command"],
"dsc": iSet["denizenscript"],
"deb": iSet["debian"],
"rpm": iSet["redhat"],
"snap": iSet["ubuntu"],
"ebuild": iSet["gentoo"],
"pkg": iSet["applescript"],
"openbsd": iSet["freebsd"],
// "ls": iSet["livescript"],
// "re": iSet["reason"],
// "rei": iSet["reason"],
// "cmj": iSet["bucklescript"],
// "nb": iSet["mathematica"],
// "wl": iSet["wolframlanguage"],
// "wls": iSet["wolframlanguage"],
// "njk": iSet["nunjucks"],
// "nunjucks": iSet["nunjucks"],
// "au3": iSet["autoit"],
// "haml": iSet["haml"],
// "feature": iSet["cucumber"],
// "riot": iSet["riot"],
// "tag": iSet["riot"],
// "vfl": iSet["vfl"],
// "kl": iSet["kl"],
// "cfml": iSet["coldfusion"],
// "cfc": iSet["coldfusion"],
// "lucee": iSet["coldfusion"],
// "cfm": iSet["coldfusion"],
// "cabal": iSet["cabal"],
// "rql": iSet["restql"],
// "restql": iSet["restql"],
// "kv": iSet["kivy"],
// "graphcool": iSet["graphcool"],
// "sbt": iSet["sbt"],
// "cr": iSet["crystal"],
// "ecr": iSet["crystal"],
// "cu": iSet["cuda"],
// "cuh": iSet["cuda"],
// "def": iSet["dotjs"],
// "dot": iSet["dotjs"],
// "jst": iSet["dotjs"],
// "pde": iSet["processing"],
// "wpy": iSet["wepy"],
// "hcl": iSet["hcl"],
// "san": iSet["san"],
// "red": iSet["red"],
// "fxp": iSet["foxpro"],
// "prg": iSet["foxpro"],
// "wat": iSet["webassembly"],
// "wasm": iSet["webassembly"],
// "ipynb": iSet["jupyter"],
// "bal": iSet["ballerina"],
// "balx": iSet["ballerina"],
// "rkt": iSet["racket"],
// "bzl": iSet["bazel"],
// "bazel": iSet["bazel"],
// "mint": iSet["mint"],
// "vm": iSet["velocity"],
// "fhtml": iSet["velocity"],
// "vtl": iSet["velocity"],
// "prisma": iSet["prisma"],
// "abc": iSet["abc"],
// "lisp": iSet["lisp"],
// "lsp": iSet["lisp"],
// "cl": iSet["lisp"],
// "fast": iSet["lisp"],
// "svelte": iSet["svelte"],
// "prw": iSet["advpl_prw"],
// "prx": iSet["advpl_prw"],
// "ptm": iSet["advpl_ptm"],
// "tlpp": iSet["advpl_tlpp"],
// "ch": iSet["advpl_include"],
// "4th": iSet["forth"],
// "fth": iSet["forth"],
// "frt": iSet["forth"],
// "iuml": iSet["uml"],
// "pu": iSet["uml"],
// "puml": iSet["uml"],
// "plantuml": iSet["uml"],
// "wsd": iSet["uml"],
// "sml": iSet["sml"],
// "mlton": iSet["sml"],
// "mlb": iSet["sml"],
// "sig": iSet["sml"],
// "fun": iSet["sml"],
// "cm": iSet["sml"],
// "lex": iSet["sml"],
// "use": iSet["sml"],
// "grm": iSet["sml"],
// "imba": iSet["imba"],
// "drawio": iSet["drawio"],
// "dio": iSet["drawio"],
// "sas": iSet["sas"],
// "sas7bdat": iSet["sas"],
// "sashdat": iSet["sas"],
// "astore": iSet["sas"],
// "ast": iSet["sas"],
// "sast": iSet["sas"],
}
-406
View File
@@ -1,406 +0,0 @@
package main
var Icon_FileName = map[string]*iInfo{
".pug-lintrc": iSet["pug"],
".pug-lintrc.js": iSet["pug"],
".pug-lintrc.json": iSet["pug"],
".jscsrc": iSet["json"],
".jshintrc": iSet["json"],
"composer.lock": iSet["json"],
".jsbeautifyrc": iSet["json"],
".esformatter": iSet["json"],
"cdp.pid": iSet["json"],
".mjmlconfig": iSet["json"],
".htaccess": iSet["xml"],
".jshintignore": iSet["settings"],
".buildignore": iSet["settings"],
".mrconfig": iSet["settings"],
".yardopts": iSet["settings"],
"manifest.mf": iSet["settings"],
".clang-format": iSet["settings"],
".clang-tidy": iSet["settings"],
"go.mod": iSet["go-mod"],
"go.sum": iSet["go-mod"],
"requirements.txt": iSet["python-misc"],
"pipfile": iSet["python-misc"],
".python-version": iSet["python-misc"],
"manifest.in": iSet["python-misc"],
"gradle.properties": iSet["gradle"],
"gradlew": iSet["gradle"],
"gradle-wrapper.properties": iSet["gradle"],
"license": iSet["certificate"],
"license.md": iSet["certificate"],
"license.txt": iSet["certificate"],
"licence": iSet["certificate"],
"licence.md": iSet["certificate"],
"licence.txt": iSet["certificate"],
"unlicense": iSet["certificate"],
"unlicense.md": iSet["certificate"],
"unlicense.txt": iSet["certificate"],
".htpasswd": iSet["key"],
"gemfile": iSet["gemfile"],
"dockerfile": iSet["docker"],
"dockerfile.prod": iSet["docker"],
"dockerfile.production": iSet["docker"],
"docker-compose.yml": iSet["docker"],
"docker-compose.yaml": iSet["docker"],
"docker-compose.dev.yml": iSet["docker"],
"docker-compose.local.yml": iSet["docker"],
"docker-compose.ci.yml": iSet["docker"],
"docker-compose.override.yml": iSet["docker"],
"docker-compose.staging.yml": iSet["docker"],
"docker-compose.prod.yml": iSet["docker"],
"docker-compose.production.yml": iSet["docker"],
"docker-compose.test.yml": iSet["docker"],
".mailmap": iSet["email"],
".graphqlconfig": iSet["graphql"],
".gitignore": iSet["git"],
".gitconfig": iSet["git"],
".gitattributes": iSet["git"],
".gitmodules": iSet["git"],
".gitkeep": iSet["git"],
"git-history": iSet["git"],
".luacheckrc": iSet["lua"],
".Rhistory": iSet["r"],
"cmakelists.txt": iSet["cmake"],
"cmakecache.txt": iSet["cmake"],
"vue.config.js": iSet["vue-config"],
"vue.config.ts": iSet["vue-config"],
"nuxt.config.js": iSet["nuxt"],
"nuxt.config.ts": iSet["nuxt"],
"security.md": iSet["lock"],
"security.txt": iSet["lock"],
"security": iSet["lock"],
"vercel.json": iSet["vercel"],
".vercelignore": iSet["vercel"],
"now.json": iSet["vercel"],
".nowignore": iSet["vercel"],
"postcss.config.js": iSet["postcss"],
".postcssrc.js": iSet["postcss"],
".postcssrc": iSet["postcss"],
".postcssrc.json": iSet["postcss"],
".postcssrc.yml": iSet["postcss"],
"CNAME": iSet["http"],
"webpack.js": iSet["webpack"],
"webpack.ts": iSet["webpack"],
"webpack.base.js": iSet["webpack"],
"webpack.base.ts": iSet["webpack"],
"webpack.config.js": iSet["webpack"],
"webpack.config.ts": iSet["webpack"],
"webpack.common.js": iSet["webpack"],
"webpack.common.ts": iSet["webpack"],
"webpack.config.common.js": iSet["webpack"],
"webpack.config.common.ts": iSet["webpack"],
"webpack.config.common.babel.js": iSet["webpack"],
"webpack.config.common.babel.ts": iSet["webpack"],
"webpack.dev.js": iSet["webpack"],
"webpack.dev.ts": iSet["webpack"],
"webpack.development.js": iSet["webpack"],
"webpack.development.ts": iSet["webpack"],
"webpack.config.dev.js": iSet["webpack"],
"webpack.config.dev.ts": iSet["webpack"],
"webpack.config.dev.babel.js": iSet["webpack"],
"webpack.config.dev.babel.ts": iSet["webpack"],
"webpack.prod.js": iSet["webpack"],
"webpack.prod.ts": iSet["webpack"],
"webpack.production.js": iSet["webpack"],
"webpack.production.ts": iSet["webpack"],
"webpack.server.js": iSet["webpack"],
"webpack.server.ts": iSet["webpack"],
"webpack.client.js": iSet["webpack"],
"webpack.client.ts": iSet["webpack"],
"webpack.config.server.js": iSet["webpack"],
"webpack.config.server.ts": iSet["webpack"],
"webpack.config.client.js": iSet["webpack"],
"webpack.config.client.ts": iSet["webpack"],
"webpack.config.production.babel.js": iSet["webpack"],
"webpack.config.production.babel.ts": iSet["webpack"],
"webpack.config.prod.babel.js": iSet["webpack"],
"webpack.config.prod.babel.ts": iSet["webpack"],
"webpack.config.prod.js": iSet["webpack"],
"webpack.config.prod.ts": iSet["webpack"],
"webpack.config.production.js": iSet["webpack"],
"webpack.config.production.ts": iSet["webpack"],
"webpack.config.staging.js": iSet["webpack"],
"webpack.config.staging.ts": iSet["webpack"],
"webpack.config.babel.js": iSet["webpack"],
"webpack.config.babel.ts": iSet["webpack"],
"webpack.config.base.babel.js": iSet["webpack"],
"webpack.config.base.babel.ts": iSet["webpack"],
"webpack.config.base.js": iSet["webpack"],
"webpack.config.base.ts": iSet["webpack"],
"webpack.config.staging.babel.js": iSet["webpack"],
"webpack.config.staging.babel.ts": iSet["webpack"],
"webpack.config.coffee": iSet["webpack"],
"webpack.config.test.js": iSet["webpack"],
"webpack.config.test.ts": iSet["webpack"],
"webpack.config.vendor.js": iSet["webpack"],
"webpack.config.vendor.ts": iSet["webpack"],
"webpack.config.vendor.production.js": iSet["webpack"],
"webpack.config.vendor.production.ts": iSet["webpack"],
"webpack.test.js": iSet["webpack"],
"webpack.test.ts": iSet["webpack"],
"webpack.dist.js": iSet["webpack"],
"webpack.dist.ts": iSet["webpack"],
"webpackfile.js": iSet["webpack"],
"webpackfile.ts": iSet["webpack"],
"ionic.config.json": iSet["ionic"],
".io-config.json": iSet["ionic"],
"gulpfile.js": iSet["gulp"],
"gulpfile.mjs": iSet["gulp"],
"gulpfile.ts": iSet["gulp"],
"gulpfile.babel.js": iSet["gulp"],
"package.json": iSet["nodejs"],
"package-lock.json": iSet["nodejs"],
".nvmrc": iSet["nodejs"],
".esmrc": iSet["nodejs"],
".node-version": iSet["nodejs"],
".npmignore": iSet["npm"],
".npmrc": iSet["npm"],
".yarnrc": iSet["yarn"],
"yarn.lock": iSet["yarn"],
".yarnclean": iSet["yarn"],
".yarn-integrity": iSet["yarn"],
"yarn-error.log": iSet["yarn"],
".yarnrc.yml": iSet["yarn"],
".yarnrc.yaml": iSet["yarn"],
"androidmanifest.xml": iSet["android"],
".env.defaults": iSet["tune"],
".env.example": iSet["tune"],
".env.sample": iSet["tune"],
".env.schema": iSet["tune"],
".env.local": iSet["tune"],
".env.dev": iSet["tune"],
".env.development": iSet["tune"],
".env.qa": iSet["tune"],
".env.prod": iSet["tune"],
".env.production": iSet["tune"],
".env.staging": iSet["tune"],
".env.preview": iSet["tune"],
".env.test": iSet["tune"],
".env.testing": iSet["tune"],
".env.development.local": iSet["tune"],
".env.qa.local": iSet["tune"],
".env.production.local": iSet["tune"],
".env.staging.local": iSet["tune"],
".env.test.local": iSet["tune"],
".babelrc": iSet["babel"],
".babelrc.js": iSet["babel"],
".babelrc.json": iSet["babel"],
"babel.config.json": iSet["babel"],
"babel.config.js": iSet["babel"],
"contributing.md": iSet["contributing"],
"readme.md": iSet["readme"],
"readme.txt": iSet["readme"],
"readme": iSet["readme"],
"changelog": iSet["changelog"],
"changelog.md": iSet["changelog"],
"changelog.txt": iSet["changelog"],
"changes": iSet["changelog"],
"changes.md": iSet["changelog"],
"changes.txt": iSet["changelog"],
"credits": iSet["credits"],
"credits.txt": iSet["credits"],
"credits.md": iSet["credits"],
"authors": iSet["authors"],
"authors.md": iSet["authors"],
"authors.txt": iSet["authors"],
"favicon.ico": iSet["favicon"],
"karma.conf.js": iSet["karma"],
"karma.conf.ts": iSet["karma"],
"karma.conf.coffee": iSet["karma"],
"karma.config.js": iSet["karma"],
"karma.config.ts": iSet["karma"],
"karma-main.js": iSet["karma"],
"karma-main.ts": iSet["karma"],
".travis.yml": iSet["travis"],
".codecov.yml": iSet["codecov"],
"codecov.yml": iSet["codecov"],
"protractor.conf.js": iSet["protractor"],
"protractor.conf.ts": iSet["protractor"],
"protractor.conf.coffee": iSet["protractor"],
"protractor.config.js": iSet["protractor"],
"protractor.config.ts": iSet["protractor"],
"procfile": iSet["heroku"],
"procfile.windows": iSet["heroku"],
".bowerrc": iSet["bower"],
"bower.json": iSet["bower"],
".eslintrc.js": iSet["eslint"],
".eslintrc.cjs": iSet["eslint"],
".eslintrc.yaml": iSet["eslint"],
".eslintrc.yml": iSet["eslint"],
".eslintrc.json": iSet["eslint"],
".eslintrc": iSet["eslint"],
".eslintignore": iSet["eslint"],
".eslintcache": iSet["eslint"],
"code_of_conduct.md": iSet["conduct"],
"code_of_conduct.txt": iSet["conduct"],
"mocha.opts": iSet["mocha"],
".mocharc.yml": iSet["mocha"],
".mocharc.yaml": iSet["mocha"],
".mocharc.js": iSet["mocha"],
".mocharc.json": iSet["mocha"],
".mocharc.jsonc": iSet["mocha"],
"jenkinsfile": iSet["jenkins"],
"firebase.json": iSet["firebase"],
".firebaserc": iSet["firebase"],
"firestore.rules": iSet["firebase"],
"firestore.indexes.json": iSet["firebase"],
".stylelintrc": iSet["stylelint"],
"stylelint.config.js": iSet["stylelint"],
".stylelintrc.json": iSet["stylelint"],
".stylelintrc.yaml": iSet["stylelint"],
".stylelintrc.yml": iSet["stylelint"],
".stylelintrc.js": iSet["stylelint"],
".stylelintignore": iSet["stylelint"],
".codeclimate.yml": iSet["code-climate"],
".prettierrc": iSet["prettier"],
"prettier.config.js": iSet["prettier"],
".prettierrc.js": iSet["prettier"],
".prettierrc.json": iSet["prettier"],
".prettierrc.yaml": iSet["prettier"],
".prettierrc.yml": iSet["prettier"],
".prettierignore": iSet["prettier"],
"gruntfile.js": iSet["grunt"],
"gruntfile.ts": iSet["grunt"],
"gruntfile.coffee": iSet["grunt"],
"gruntfile.babel.js": iSet["grunt"],
"gruntfile.babel.ts": iSet["grunt"],
"gruntfile.babel.coffee": iSet["grunt"],
"jest.config.js": iSet["jest"],
"jest.config.ts": iSet["jest"],
"jest.config.cjs": iSet["jest"],
"jest.config.mjs": iSet["jest"],
"jest.config.json": iSet["jest"],
"jest.e2e.config.js": iSet["jest"],
"jest.e2e.config.ts": iSet["jest"],
"jest.e2e.config.cjs": iSet["jest"],
"jest.e2e.config.mjs": iSet["jest"],
"jest.e2e.config.json": iSet["jest"],
"jest.setup.js": iSet["jest"],
"jest.setup.ts": iSet["jest"],
"jest.json": iSet["jest"],
".jestrc": iSet["jest"],
".jestrc.js": iSet["jest"],
".jestrc.json": iSet["jest"],
"jest.teardown.js": iSet["jest"],
"fastfile": iSet["fastlane"],
"appfile": iSet["fastlane"],
".helmignore": iSet["helm"],
"makefile": iSet["makefile"],
".releaserc": iSet["semantic-release"],
".releaserc.yaml": iSet["semantic-release"],
".releaserc.yml": iSet["semantic-release"],
".releaserc.json": iSet["semantic-release"],
".releaserc.js": iSet["semantic-release"],
"release.config.js": iSet["semantic-release"],
"bitbucket-pipelines.yaml": iSet["bitbucket"],
"bitbucket-pipelines.yml": iSet["bitbucket"],
"azure-pipelines.yml": iSet["azure-pipelines"],
"azure-pipelines.yaml": iSet["azure-pipelines"],
"vagrantfile": iSet["vagrant"],
"tailwind.js": iSet["tailwindcss"],
"tailwind.config.js": iSet["tailwindcss"],
"codeowners": iSet["codeowners"],
".gcloudignore": iSet["gcp"],
".huskyrc": iSet["husky"],
"husky.config.js": iSet["husky"],
".huskyrc.json": iSet["husky"],
".huskyrc.js": iSet["husky"],
".huskyrc.yaml": iSet["husky"],
".huskyrc.yml": iSet["husky"],
".commitlintrc": iSet["commitlint"],
".commitlintrc.js": iSet["commitlint"],
"commitlint.config.js": iSet["commitlint"],
".commitlintrc.json": iSet["commitlint"],
".commitlint.yaml": iSet["commitlint"],
".commitlint.yml": iSet["commitlint"],
"dune": iSet["dune"],
"dune-project": iSet["dune"],
"roadmap.md": iSet["roadmap"],
"roadmap.txt": iSet["roadmap"],
"timeline.md": iSet["roadmap"],
"timeline.txt": iSet["roadmap"],
"milestones.md": iSet["roadmap"],
"milestones.txt": iSet["roadmap"],
"nuget.config": iSet["nuget"],
".nuspec": iSet["nuget"],
"nuget.exe": iSet["nuget"],
"stryker.conf.js": iSet["stryker"],
"stryker.conf.json": iSet["stryker"],
".modernizrrc": iSet["modernizr"],
".modernizrrc.js": iSet["modernizr"],
".modernizrrc.json": iSet["modernizr"],
// ".vfl": iSet["vfl"],
// ".kl": iSet["kl"],
// "project.graphcool": iSet["graphcool"],
// ".flowconfig": iSet["flow"],
// ".bithoundrc": iSet["bithound"],
// ".appveyor.yml": iSet["appveyor"],
// "appveyor.yml": iSet["appveyor"],
// "fuse.js": iSet["fusebox"],
// ".editorconfig": iSet["editorconfig"],
// ".watchmanconfig": iSet["watchman"],
// "aurelia.json": iSet["aurelia"],
// "rollup.config.js": iSet["rollup"],
// "rollup.config.ts": iSet["rollup"],
// "rollup-config.js": iSet["rollup"],
// "rollup-config.ts": iSet["rollup"],
// "rollup.config.common.js": iSet["rollup"],
// "rollup.config.common.ts": iSet["rollup"],
// "rollup.config.base.js": iSet["rollup"],
// "rollup.config.base.ts": iSet["rollup"],
// "rollup.config.prod.js": iSet["rollup"],
// "rollup.config.prod.ts": iSet["rollup"],
// "rollup.config.dev.js": iSet["rollup"],
// "rollup.config.dev.ts": iSet["rollup"],
// "rollup.config.prod.vendor.js": iSet["rollup"],
// "rollup.config.prod.vendor.ts": iSet["rollup"],
// ".hhconfig": iSet["hack"],
// "apollo.config.js": iSet["apollo"],
// "nodemon.json": iSet["nodemon"],
// "nodemon-debug.json": iSet["nodemon"],
// ".hintrc": iSet["webhint"],
// "browserslist": iSet["browserlist"],
// ".browserslistrc": iSet["browserlist"],
// ".snyk": iSet["snyk"],
// ".drone.yml": iSet["drone"],
// ".sequelizerc": iSet["sequelize"],
// "gatsby.config.js": iSet["gatsby"],
// "gatsby-config.js": iSet["gatsby"],
// "gatsby-node.js": iSet["gatsby"],
// "gatsby-browser.js": iSet["gatsby"],
// "gatsby-ssr.js": iSet["gatsby"],
// ".wakatime-project": iSet["wakatime"],
// "circle.yml": iSet["circleci"],
// ".cfignore": iSet["cloudfoundry"],
// "wallaby.js": iSet["wallaby"],
// "wallaby.conf.js": iSet["wallaby"],
// "stencil.config.js": iSet["stencil"],
// "stencil.config.ts": iSet["stencil"],
// ".bazelignore": iSet["bazel"],
// ".bazelrc": iSet["bazel"],
// "prisma.yml": iSet["prisma"],
// ".nycrc": iSet["istanbul"],
// ".nycrc.json": iSet["istanbul"],
// "buildkite.yml": iSet["buildkite"],
// "buildkite.yaml": iSet["buildkite"],
// "netlify.json": iSet["netlify"],
// "netlify.yml": iSet["netlify"],
// "netlify.yaml": iSet["netlify"],
// "netlify.toml": iSet["netlify"],
// "nest-cli.json": iSet["nest"],
// ".nest-cli.json": iSet["nest"],
// "nestconfig.json": iSet["nest"],
// ".nestconfig.json": iSet["nest"],
// ".percy.yml": iSet["percy"],
// ".gitpod.yml": iSet["gitpod"],
// "tiltfile": iSet["tilt"],
// "capacitor.config.json": iSet["capacitor"],
// ".adonisrc.json": iSet["adonis"],
// "ace": iSet["adonis"],
// "meson.build": iSet["meson"],
// ".buckconfig": iSet["buck"],
// "nx.json": iSet["nrwl"],
// ".slugignore": iSet["slug"],
}
-342
View File
@@ -1,342 +0,0 @@
package main
import "fmt"
// iInfo (icon information)
type iInfo struct {
i string
c [3]uint8 // represents the color in rgb (default 0,0,0 is black)
}
func (i *iInfo) getGlyph() string {
return i.i
}
func (i *iInfo) getColor(f uint8) string {
if f == 1 {
return fmt.Sprintf("\033[38;2;%03d;%03d;%03dm", i.c[0], i.c[1], i.c[2])
}
return fmt.Sprintf("\033[38;2;%03d;%03d;%03dm", i.c[0], i.c[1], i.c[2])
}
var iSet = map[string]*iInfo{
"html": {"\uf13b", [3]uint8{228, 79, 57}}, // html
"markdown": {"\uf853", [3]uint8{66, 165, 245}}, // markdown
"css": {"\uf81b", [3]uint8{66, 165, 245}}, // css
"sass": {"\ue603", [3]uint8{237, 80, 122}}, // sass
"less": {"\ue60b", [3]uint8{2, 119, 189}}, // less
"json": {"\ue60b", [3]uint8{251, 193, 60}}, // json
"yaml": {"\ue60b", [3]uint8{244, 68, 62}}, // yaml
"xml": {"\uf72d", [3]uint8{64, 153, 69}}, // xml
"image": {"\uf71e", [3]uint8{48, 166, 154}}, // image
"javascript": {"\ue74e", [3]uint8{255, 202, 61}}, // javascript
"react": {"\ue7ba", [3]uint8{35, 188, 212}}, // react
"react_ts": {"\ue7ba", [3]uint8{36, 142, 211}}, // react_ts
"settings": {"\uf013", [3]uint8{66, 165, 245}}, // settings
"typescript": {"\ue628", [3]uint8{3, 136, 209}}, // typescript
"pdf": {"\uf724", [3]uint8{244, 68, 62}}, // pdf
"table": {"\uf71a", [3]uint8{139, 195, 74}}, // table
"visualstudio": {"\ue70c", [3]uint8{173, 99, 188}}, // visualstudio
"database": {"\ue706", [3]uint8{255, 202, 61}}, // database
"mysql": {"\ue704", [3]uint8{1, 94, 134}}, // mysql
"postgresql": {"\ue76e", [3]uint8{49, 99, 140}}, // postgresql
"sqlite": {"\ue7c4", [3]uint8{1, 57, 84}}, // sqlite
"csharp": {"\uf81a", [3]uint8{2, 119, 189}}, // csharp
"zip": {"\uf410", [3]uint8{175, 180, 43}}, // zip
"exe": {"\uf2d0", [3]uint8{229, 77, 58}}, // exe
"java": {"\uf675", [3]uint8{244, 68, 62}}, // java
"c": {"\ufb70", [3]uint8{2, 119, 189}}, // c
"cpp": {"\ufb71", [3]uint8{2, 119, 189}}, // cpp
"go": {"\ufcd1", [3]uint8{32, 173, 194}}, // go
"go-mod": {"\ufcd1", [3]uint8{237, 80, 122}}, // go-mod
"python": {"\uf81f", [3]uint8{52, 102, 143}}, // python
"python-misc": {"\uf820", [3]uint8{130, 61, 28}}, // python-misc
"url": {"\uf836", [3]uint8{66, 165, 245}}, // url
"console": {"\uf68c", [3]uint8{250, 111, 66}}, // console
"word": {"\uf72b", [3]uint8{1, 87, 155}}, // word
"certificate": {"\uf623", [3]uint8{249, 89, 63}}, // certificate
"key": {"\uf805", [3]uint8{48, 166, 154}}, // key
"font": {"\uf031", [3]uint8{244, 68, 62}}, // font
"lib": {"\uf831", [3]uint8{139, 195, 74}}, // lib
"ruby": {"\ue739", [3]uint8{229, 61, 58}}, // ruby
"gemfile": {"\ue21e", [3]uint8{229, 61, 58}}, // gemfile
"fsharp": {"\ue7a7", [3]uint8{55, 139, 186}}, // fsharp
"swift": {"\ufbe3", [3]uint8{249, 95, 63}}, // swift
"docker": {"\uf308", [3]uint8{1, 135, 201}}, // docker
"powerpoint": {"\uf726", [3]uint8{209, 71, 51}}, // powerpoint
"video": {"\uf72a", [3]uint8{253, 154, 62}}, // video
"virtual": {"\uf822", [3]uint8{3, 155, 229}}, // virtual
"email": {"\uf6ed", [3]uint8{66, 165, 245}}, // email
"audio": {"\ufb75", [3]uint8{239, 83, 80}}, // audio
"coffee": {"\uf675", [3]uint8{66, 165, 245}}, // coffee
"document": {"\uf718", [3]uint8{66, 165, 245}}, // document
"rust": {"\ue7a8", [3]uint8{250, 111, 66}}, // rust
"raml": {"\ue60b", [3]uint8{66, 165, 245}}, // raml
"xaml": {"\ufb72", [3]uint8{66, 165, 245}}, // xaml
"haskell": {"\ue61f", [3]uint8{254, 168, 62}}, // haskell
"git": {"\ue702", [3]uint8{229, 77, 58}}, // git
"lua": {"\ue620", [3]uint8{66, 165, 245}}, // lua
"clojure": {"\ue76a", [3]uint8{100, 221, 23}}, // clojure
"groovy": {"\uf2a6", [3]uint8{41, 198, 218}}, // groovy
"r": {"\ufcd2", [3]uint8{25, 118, 210}}, // r
"dart": {"\ue798", [3]uint8{87, 182, 240}}, // dart
"mxml": {"\uf72d", [3]uint8{254, 168, 62}}, // mxml
"assembly": {"\uf471", [3]uint8{250, 109, 63}}, // assembly
"vue": {"\ufd42", [3]uint8{65, 184, 131}}, // vue
"vue-config": {"\ufd42", [3]uint8{58, 121, 110}}, // vue-config
"lock": {"\uf83d", [3]uint8{255, 213, 79}}, // lock
"handlebars": {"\ue60f", [3]uint8{250, 111, 66}}, // handlebars
"perl": {"\ue769", [3]uint8{149, 117, 205}}, // perl
"elixir": {"\ue62d", [3]uint8{149, 117, 205}}, // elixir
"erlang": {"\ue7b1", [3]uint8{244, 68, 62}}, // erlang
"twig": {"\ue61c", [3]uint8{155, 185, 47}}, // twig
"julia": {"\ue624", [3]uint8{134, 82, 159}}, // julia
"elm": {"\ue62c", [3]uint8{96, 181, 204}}, // elm
"smarty": {"\uf834", [3]uint8{255, 207, 60}}, // smarty
"stylus": {"\ue600", [3]uint8{192, 202, 51}}, // stylus
"verilog": {"\ufb19", [3]uint8{250, 111, 66}}, // verilog
"robot": {"\ufba7", [3]uint8{249, 89, 63}}, // robot
"solidity": {"\ufcb9", [3]uint8{3, 136, 209}}, // solidity
"yang": {"\ufb7e", [3]uint8{66, 165, 245}}, // yang
"vercel": {"\uf47e", [3]uint8{207, 216, 220}}, // vercel
"applescript": {"\uf302", [3]uint8{120, 144, 156}}, // applescript
"cake": {"\uf5ea", [3]uint8{250, 111, 66}}, // cake
"nim": {"\uf6a4", [3]uint8{255, 202, 61}}, // nim
"todo": {"\uf058", [3]uint8{124, 179, 66}}, // todo
"nix": {"\uf313", [3]uint8{80, 117, 193}}, // nix
"http": {"\uf484", [3]uint8{66, 165, 245}}, // http
"webpack": {"\ufc29", [3]uint8{142, 214, 251}}, // webpack
"ionic": {"\ue7a9", [3]uint8{79, 143, 247}}, // ionic
"gulp": {"\ue763", [3]uint8{229, 61, 58}}, // gulp
"nodejs": {"\uf898", [3]uint8{139, 195, 74}}, // nodejs
"npm": {"\ue71e", [3]uint8{203, 56, 55}}, // npm
"yarn": {"\uf61a", [3]uint8{44, 142, 187}}, // yarn
"android": {"\uf531", [3]uint8{139, 195, 74}}, // android
"tune": {"\ufb69", [3]uint8{251, 193, 60}}, // tune
"contributing": {"\uf64d", [3]uint8{255, 202, 61}}, // contributing
"readme": {"\uf7fb", [3]uint8{66, 165, 245}}, // readme
"changelog": {"\ufba6", [3]uint8{139, 195, 74}}, // changelog
"credits": {"\uf75f", [3]uint8{156, 204, 101}}, // credits
"authors": {"\uf0c0", [3]uint8{244, 68, 62}}, // authors
"favicon": {"\ue623", [3]uint8{255, 213, 79}}, // favicon
"karma": {"\ue622", [3]uint8{60, 190, 174}}, // karma
"travis": {"\ue77e", [3]uint8{203, 58, 73}}, // travis
"heroku": {"\ue607", [3]uint8{105, 99, 185}}, // heroku
"gitlab": {"\uf296", [3]uint8{226, 69, 57}}, // gitlab
"bower": {"\ue61a", [3]uint8{239, 88, 60}}, // bower
"conduct": {"\uf64b", [3]uint8{205, 220, 57}}, // conduct
"jenkins": {"\ue767", [3]uint8{240, 214, 183}}, // jenkins
"code-climate": {"\uf7f4", [3]uint8{238, 238, 238}}, // code-climate
"log": {"\uf719", [3]uint8{175, 180, 43}}, // log
"ejs": {"\ue618", [3]uint8{255, 202, 61}}, // ejs
"grunt": {"\ue611", [3]uint8{251, 170, 61}}, // grunt
"django": {"\ue71d", [3]uint8{67, 160, 71}}, // django
"makefile": {"\uf728", [3]uint8{239, 83, 80}}, // makefile
"bitbucket": {"\uf171", [3]uint8{31, 136, 229}}, // bitbucket
"d": {"\ue7af", [3]uint8{244, 68, 62}}, // d
"mdx": {"\uf853", [3]uint8{255, 202, 61}}, // mdx
"azure-pipelines": {"\uf427", [3]uint8{20, 101, 192}}, // azure-pipelines
"azure": {"\ufd03", [3]uint8{31, 136, 229}}, // azure
"razor": {"\uf564", [3]uint8{66, 165, 245}}, // razor
"asciidoc": {"\uf718", [3]uint8{244, 68, 62}}, // asciidoc
"edge": {"\uf564", [3]uint8{239, 111, 60}}, // edge
"scheme": {"\ufb26", [3]uint8{244, 68, 62}}, // scheme
"3d": {"\ue79b", [3]uint8{40, 182, 246}}, // 3d
"svg": {"\ufc1f", [3]uint8{255, 181, 62}}, // svg
"vim": {"\ue62b", [3]uint8{67, 160, 71}}, // vim
"moonscript": {"\uf186", [3]uint8{251, 193, 60}}, // moonscript
"codeowners": {"\uf507", [3]uint8{175, 180, 43}}, // codeowners
"disc": {"\ue271", [3]uint8{176, 190, 197}}, // disc
"fortran": {"F", [3]uint8{250, 111, 66}}, // fortran
"tcl": {"\ufbd1", [3]uint8{239, 83, 80}}, // tcl
"liquid": {"\ue275", [3]uint8{40, 182, 246}}, // liquid
"prolog": {"\ue7a1", [3]uint8{239, 83, 80}}, // prolog
"husky": {"\uf8e8", [3]uint8{229, 229, 229}}, // husky
"coconut": {"\uf5d2", [3]uint8{141, 110, 99}}, // coconut
"sketch": {"\uf6c7", [3]uint8{255, 194, 61}}, // sketch
"pawn": {"\ue261", [3]uint8{239, 111, 60}}, // pawn
"commitlint": {"\ufc16", [3]uint8{43, 150, 137}}, // commitlint
"dhall": {"\uf448", [3]uint8{120, 144, 156}}, // dhall
"dune": {"\uf7f4", [3]uint8{244, 127, 61}}, // dune
"shaderlab": {"\ufbad", [3]uint8{25, 118, 210}}, // shaderlab
"command": {"\ufb32", [3]uint8{175, 188, 194}}, // command
"stryker": {"\uf05b", [3]uint8{239, 83, 80}}, // stryker
"modernizr": {"\ue720", [3]uint8{234, 72, 99}}, // modernizr
"roadmap": {"\ufb6d", [3]uint8{48, 166, 154}}, // roadmap
"debian": {"\uf306", [3]uint8{211, 61, 76}}, // debian
"ubuntu": {"\uf31c", [3]uint8{214, 73, 53}}, // ubuntu
"arch": {"\uf303", [3]uint8{33, 142, 202}}, // arch
"redhat": {"\uf316", [3]uint8{231, 61, 58}}, // redhat
"gentoo": {"\uf30d", [3]uint8{148, 141, 211}}, // gentoo
"linux": {"\ue712", [3]uint8{238, 207, 55}}, // linux
"raspberry-pi": {"\uf315", [3]uint8{208, 60, 76}}, // raspberry-pi
"manjaro": {"\uf312", [3]uint8{73, 185, 90}}, // manjaro
"opensuse": {"\uf314", [3]uint8{111, 180, 36}}, // opensuse
"fedora": {"\uf30a", [3]uint8{52, 103, 172}}, // fedora
"freebsd": {"\uf30c", [3]uint8{175, 44, 42}}, // freebsd
"centOS": {"\uf304", [3]uint8{157, 83, 135}}, // centOS
"alpine": {"\uf300", [3]uint8{14, 87, 123}}, // alpine
"mint": {"\uf30f", [3]uint8{125, 190, 58}}, // mint
"pug": {"\ue60e", [3]uint8{239, 204, 163}}, // pug (Not supported by nerdFont)
"blink": {"\uf72a", [3]uint8{249, 169, 60}}, // blink (The Foundry Nuke) (Not supported by nerdFont)
"postcss": {"\uf81b", [3]uint8{244, 68, 62}}, // postcss (Not supported by nerdFont)
"jinja": {"\ue000", [3]uint8{174, 44, 42}}, // jinja (Not supported by nerdFont)
"sublime": {"\ue7aa", [3]uint8{239, 148, 58}}, // sublime (Not supported by nerdFont)
"markojs": {"\uf13b", [3]uint8{2, 119, 189}}, // markojs (Not supported by nerdFont)
"vscode": {"\ue70c", [3]uint8{33, 150, 243}}, // vscode (Not supported by nerdFont)
"qsharp": {"\uf292", [3]uint8{251, 193, 60}}, // qsharp (Not supported by nerdFont)
"vala": {"\uf7ab", [3]uint8{149, 117, 205}}, // vala (Not supported by nerdFont)
"zig": {"Z", [3]uint8{249, 169, 60}}, // zig (Not supported by nerdFont)
"h": {"h", [3]uint8{2, 119, 189}}, // h (Not supported by nerdFont)
"hpp": {"h", [3]uint8{2, 119, 189}}, // hpp (Not supported by nerdFont)
"powershell": {"\ufcb5", [3]uint8{5, 169, 244}}, // powershell (Not supported by nerdFont)
"gradle": {"\ufcc4", [3]uint8{29, 151, 167}}, // gradle (Not supported by nerdFont)
"arduino": {"\ue255", [3]uint8{35, 151, 156}}, // arduino (Not supported by nerdFont)
"tex": {"\uf783", [3]uint8{66, 165, 245}}, // tex (Not supported by nerdFont)
"graphql": {"\ue284", [3]uint8{237, 80, 122}}, // graphql (Not supported by nerdFont)
"kotlin": {"\ue70e", [3]uint8{139, 195, 74}}, // kotlin (Not supported by nerdFont)
"actionscript": {"\ufb25", [3]uint8{244, 68, 62}}, // actionscript (Not supported by nerdFont)
"autohotkey": {"\uf812", [3]uint8{76, 175, 80}}, // autohotkey (Not supported by nerdFont)
"flash": {"\uf740", [3]uint8{198, 52, 54}}, // flash (Not supported by nerdFont)
"swc": {"\ufbd3", [3]uint8{198, 52, 54}}, // swc (Not supported by nerdFont)
"cmake": {"\uf425", [3]uint8{178, 178, 179}}, // cmake (Not supported by nerdFont)
"nuxt": {"\ue2a6", [3]uint8{65, 184, 131}}, // nuxt (Not supported by nerdFont)
"ocaml": {"\uf1ce", [3]uint8{253, 154, 62}}, // ocaml (Not supported by nerdFont)
"haxe": {"\uf425", [3]uint8{246, 137, 61}}, // haxe (Not supported by nerdFont)
"puppet": {"\uf595", [3]uint8{251, 193, 60}}, // puppet (Not supported by nerdFont)
"purescript": {"\uf670", [3]uint8{66, 165, 245}}, // purescript (Not supported by nerdFont)
"merlin": {"\uf136", [3]uint8{66, 165, 245}}, // merlin (Not supported by nerdFont)
"mjml": {"\ue714", [3]uint8{249, 89, 63}}, // mjml (Not supported by nerdFont)
"terraform": {"\ue20f", [3]uint8{92, 107, 192}}, // terraform (Not supported by nerdFont)
"apiblueprint": {"\uf031", [3]uint8{66, 165, 245}}, // apiblueprint (Not supported by nerdFont)
"slim": {"\uf24e", [3]uint8{245, 129, 61}}, // slim (Not supported by nerdFont)
"babel": {"\uf5a0", [3]uint8{253, 217, 59}}, // babel (Not supported by nerdFont)
"codecov": {"\ue37c", [3]uint8{237, 80, 122}}, // codecov (Not supported by nerdFont)
"protractor": {"\uf288", [3]uint8{229, 61, 58}}, // protractor (Not supported by nerdFont)
"eslint": {"\ufbf6", [3]uint8{121, 134, 203}}, // eslint (Not supported by nerdFont)
"mocha": {"\uf6a9", [3]uint8{161, 136, 127}}, // mocha (Not supported by nerdFont)
"firebase": {"\ue787", [3]uint8{251, 193, 60}}, // firebase (Not supported by nerdFont)
"stylelint": {"\ufb76", [3]uint8{207, 216, 220}}, // stylelint (Not supported by nerdFont)
"prettier": {"\uf8e2", [3]uint8{86, 179, 180}}, // prettier (Not supported by nerdFont)
"jest": {"J", [3]uint8{244, 85, 62}}, // jest (Not supported by nerdFont)
"storybook": {"\ufd2c", [3]uint8{237, 80, 122}}, // storybook (Not supported by nerdFont)
"fastlane": {"\ufbff", [3]uint8{149, 119, 232}}, // fastlane (Not supported by nerdFont)
"helm": {"\ufd31", [3]uint8{32, 173, 194}}, // helm (Not supported by nerdFont)
"i18n": {"\uf7be", [3]uint8{121, 134, 203}}, // i18n (Not supported by nerdFont)
"semantic-release": {"\uf70f", [3]uint8{245, 245, 245}}, // semantic-release (Not supported by nerdFont)
"godot": {"\ufba7", [3]uint8{79, 195, 247}}, // godot (Not supported by nerdFont)
"godot-assets": {"\ufba7", [3]uint8{129, 199, 132}}, // godot-assets (Not supported by nerdFont)
"vagrant": {"\uf27d", [3]uint8{20, 101, 192}}, // vagrant (Not supported by nerdFont)
"tailwindcss": {"\ufc8b", [3]uint8{77, 182, 172}}, // tailwindcss (Not supported by nerdFont)
"gcp": {"\uf662", [3]uint8{70, 136, 250}}, // gcp (Not supported by nerdFont)
"opam": {"\uf1ce", [3]uint8{255, 213, 79}}, // opam (Not supported by nerdFont)
"pascal": {"\uf8da", [3]uint8{3, 136, 209}}, // pascal (Not supported by nerdFont)
"nuget": {"\ue77f", [3]uint8{3, 136, 209}}, // nuget (Not supported by nerdFont)
"denizenscript": {"D", [3]uint8{255, 213, 79}}, // denizenscript (Not supported by nerdFont)
// "riot": {"\u", [3]uint8{255, 255, 255}}, // riot
// "autoit": {"\u", [3]uint8{255, 255, 255}}, // autoit
// "livescript": {"\u", [3]uint8{255, 255, 255}}, // livescript
// "reason": {"\u", [3]uint8{255, 255, 255}}, // reason
// "bucklescript": {"\u", [3]uint8{255, 255, 255}}, // bucklescript
// "mathematica": {"\u", [3]uint8{255, 255, 255}}, // mathematica
// "wolframlanguage": {"\u", [3]uint8{255, 255, 255}}, // wolframlanguage
// "nunjucks": {"\u", [3]uint8{255, 255, 255}}, // nunjucks
// "haml": {"\u", [3]uint8{255, 255, 255}}, // haml
// "cucumber": {"\u", [3]uint8{255, 255, 255}}, // cucumber
// "vfl": {"\u", [3]uint8{255, 255, 255}}, // vfl
// "kl": {"\u", [3]uint8{255, 255, 255}}, // kl
// "coldfusion": {"\u", [3]uint8{255, 255, 255}}, // coldfusion
// "cabal": {"\u", [3]uint8{255, 255, 255}}, // cabal
// "restql": {"\u", [3]uint8{255, 255, 255}}, // restql
// "kivy": {"\u", [3]uint8{255, 255, 255}}, // kivy
// "graphcool": {"\u", [3]uint8{255, 255, 255}}, // graphcool
// "sbt": {"\u", [3]uint8{255, 255, 255}}, // sbt
// "flow": {"\u", [3]uint8{255, 255, 255}}, // flow
// "bithound": {"\u", [3]uint8{255, 255, 255}}, // bithound
// "appveyor": {"\u", [3]uint8{255, 255, 255}}, // appveyor
// "fusebox": {"\u", [3]uint8{255, 255, 255}}, // fusebox
// "editorconfig": {"\u", [3]uint8{255, 255, 255}}, // editorconfig
// "watchman": {"\u", [3]uint8{255, 255, 255}}, // watchman
// "aurelia": {"\u", [3]uint8{255, 255, 255}}, // aurelia
// "rollup": {"\u", [3]uint8{255, 255, 255}}, // rollup
// "hack": {"\u", [3]uint8{255, 255, 255}}, // hack
// "apollo": {"\u", [3]uint8{255, 255, 255}}, // apollo
// "nodemon": {"\u", [3]uint8{255, 255, 255}}, // nodemon
// "webhint": {"\u", [3]uint8{255, 255, 255}}, // webhint
// "browserlist": {"\u", [3]uint8{255, 255, 255}}, // browserlist
// "crystal": {"\u", [3]uint8{255, 255, 255}}, // crystal
// "snyk": {"\u", [3]uint8{255, 255, 255}}, // snyk
// "drone": {"\u", [3]uint8{255, 255, 255}}, // drone
// "cuda": {"\u", [3]uint8{255, 255, 255}}, // cuda
// "dotjs": {"\u", [3]uint8{255, 255, 255}}, // dotjs
// "sequelize": {"\u", [3]uint8{255, 255, 255}}, // sequelize
// "gatsby": {"\u", [3]uint8{255, 255, 255}}, // gatsby
// "wakatime": {"\u", [3]uint8{255, 255, 255}}, // wakatime
// "circleci": {"\u", [3]uint8{255, 255, 255}}, // circleci
// "cloudfoundry": {"\u", [3]uint8{255, 255, 255}}, // cloudfoundry
// "processing": {"\u", [3]uint8{255, 255, 255}}, // processing
// "wepy": {"\u", [3]uint8{255, 255, 255}}, // wepy
// "hcl": {"\u", [3]uint8{255, 255, 255}}, // hcl
// "san": {"\u", [3]uint8{255, 255, 255}}, // san
// "wallaby": {"\u", [3]uint8{255, 255, 255}}, // wallaby
// "stencil": {"\u", [3]uint8{255, 255, 255}}, // stencil
// "red": {"\u", [3]uint8{255, 255, 255}}, // red
// "webassembly": {"\u", [3]uint8{255, 255, 255}}, // webassembly
// "foxpro": {"\u", [3]uint8{255, 255, 255}}, // foxpro
// "jupyter": {"\u", [3]uint8{255, 255, 255}}, // jupyter
// "ballerina": {"\u", [3]uint8{255, 255, 255}}, // ballerina
// "racket": {"\u", [3]uint8{255, 255, 255}}, // racket
// "bazel": {"\u", [3]uint8{255, 255, 255}}, // bazel
// "mint": {"\u", [3]uint8{255, 255, 255}}, // mint
// "velocity": {"\u", [3]uint8{255, 255, 255}}, // velocity
// "prisma": {"\u", [3]uint8{255, 255, 255}}, // prisma
// "abc": {"\u", [3]uint8{255, 255, 255}}, // abc
// "istanbul": {"\u", [3]uint8{255, 255, 255}}, // istanbul
// "lisp": {"\u", [3]uint8{255, 255, 255}}, // lisp
// "buildkite": {"\u", [3]uint8{255, 255, 255}}, // buildkite
// "netlify": {"\u", [3]uint8{255, 255, 255}}, // netlify
// "svelte": {"\u", [3]uint8{255, 255, 255}}, // svelte
// "nest": {"\u", [3]uint8{255, 255, 255}}, // nest
// "percy": {"\u", [3]uint8{255, 255, 255}}, // percy
// "gitpod": {"\u", [3]uint8{255, 255, 255}}, // gitpod
// "advpl_prw": {"\u", [3]uint8{255, 255, 255}}, // advpl_prw
// "advpl_ptm": {"\u", [3]uint8{255, 255, 255}}, // advpl_ptm
// "advpl_tlpp": {"\u", [3]uint8{255, 255, 255}}, // advpl_tlpp
// "advpl_include": {"\u", [3]uint8{255, 255, 255}}, // advpl_include
// "tilt": {"\u", [3]uint8{255, 255, 255}}, // tilt
// "capacitor": {"\u", [3]uint8{255, 255, 255}}, // capacitor
// "adonis": {"\u", [3]uint8{255, 255, 255}}, // adonis
// "forth": {"\u", [3]uint8{255, 255, 255}}, // forth
// "uml": {"\u", [3]uint8{255, 255, 255}}, // uml
// "meson": {"\u", [3]uint8{255, 255, 255}}, // meson
// "buck": {"\u", [3]uint8{255, 255, 255}}, // buck
// "sml": {"\u", [3]uint8{255, 255, 255}}, // sml
// "nrwl": {"\u", [3]uint8{255, 255, 255}}, // nrwl
// "imba": {"\u", [3]uint8{255, 255, 255}}, // imba
// "drawio": {"\u", [3]uint8{255, 255, 255}}, // drawio
// "sas": {"\u", [3]uint8{255, 255, 255}}, // sas
// "slug": {"\u", [3]uint8{255, 255, 255}}, // slug
"dir-config": {"\ue5fc", [3]uint8{32, 173, 194}}, // dir-config
"dir-controller": {"\ue5fc", [3]uint8{255, 194, 61}}, // dir-controller
"dir-git": {"\ue5fb", [3]uint8{250, 111, 66}}, // dir-git
"dir-github": {"\ue5fd", [3]uint8{84, 110, 122}}, // dir-github
"dir-npm": {"\ue5fa", [3]uint8{203, 56, 55}}, // dir-npm
"dir-include": {"\uf756", [3]uint8{3, 155, 229}}, // dir-include
"dir-import": {"\uf756", [3]uint8{175, 180, 43}}, // dir-import
"dir-upload": {"\uf758", [3]uint8{250, 111, 66}}, // dir-upload
"dir-download": {"\uf74c", [3]uint8{76, 175, 80}}, // dir-download
"dir-secure": {"\uf74f", [3]uint8{249, 169, 60}}, // dir-secure
"dir-images": {"\uf74e", [3]uint8{43, 150, 137}}, // dir-images
"dir-environment": {"\uf74e", [3]uint8{102, 187, 106}}, // dir-environment
}
// default icons in case nothing can be found
var iDef = map[string]*iInfo{
"dir": {"\uf74a", [3]uint8{224, 177, 77}},
"diropen": {"\ufc6e", [3]uint8{224, 177, 77}},
"hiddendir": {"\uf755", [3]uint8{224, 177, 77}},
"exe": {"\uf713", [3]uint8{76, 175, 80}},
"file": {"\uf723", [3]uint8{65, 129, 190}},
"hiddenfile": {"\ufb12", [3]uint8{65, 129, 190}},
}
+265
View File
@@ -0,0 +1,265 @@
//This file contains the cli API and configs it
package api
import (
"fmt"
"log"
"os"
"strconv"
"time"
"github.com/Yash-Handa/logo-ls/internal/sysState"
"github.com/pborman/getopt/v2"
"golang.org/x/crypto/ssh/terminal"
)
// flags with corresponding bit values
// frequently used flags should be higher in the list
// help (-?) and version (-V) not included
const (
Flag_l uint = 1 << iota
Flag_a
Flag_alpha // sort in alphabetic order (default)
Flag_i // stop printing of icons
Flag_c // stop printing of colors
Flag_D // stop printing of git status
Flag_A
Flag_h
Flag_R
Flag_r
Flag_S
Flag_t
Flag_X
Flag_s
Flag_v
Flag_U
Flag_1
Flag_d
Flag_o
Flag_g
Flag_G
)
// flagVector has all the options set in it. Each bit represent an option.
var FlagVector uint
// time formate
var timeFormate string
func TimeFormate(t string) {
timeFormate = t
}
func GetTimeFormate() string {
return timeFormate
}
var FileList []string
func Bootstrap() {
getopt.SetParameters("[files ...]")
// content flags
f_a := getopt.BoolLong("all", 'a', "do not ignore entries starting with .")
f_A := getopt.BoolLong("almost-all", 'A', "do not list implied . and ..")
// disable Stuff
f_D := getopt.BoolLong("git-status", 'D', "print git status of files")
f_c := getopt.BoolLong("disable-color", 'c', "don't color icons, filenames and git status (use this to print to a file)")
f_i := getopt.BoolLong("disable-icon", 'i', "don't print icons of the files")
// display flags
f_1 := getopt.Bool('1', "list one file per line.")
f_d := getopt.BoolLong("directory", 'd', "list directories themselves, not their contents")
f_l := getopt.Bool('l', "use a long listing format")
f_o := getopt.Bool('o', "like -l, but do not list group information")
f_g := getopt.Bool('g', "\nlike -l, but do not list owner")
f_G := getopt.BoolLong("no-group", 'G', "in a long listing, don't print group names")
f_h := getopt.BoolLong("human-readable", 'h', "with -l and -s, print sizes like 1K 234M 2G etc.")
f_s := getopt.BoolLong("size", 's', "print the allocated size of each file, in blocks")
// sorting flags
f_S := getopt.Bool('S', "sort by file size, largest first")
f_U := getopt.Bool('U', "do not sort; list entries in directory order")
f_X := getopt.Bool('X', "sort alphabetically by entry extension")
f_v := getopt.Bool('v', "natural sort of (version) numbers within text")
f_t := getopt.Bool('t', "sort by modification time, newest first")
f_r := getopt.BoolLong("reverse", 'r', "reverse order while sorting")
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.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
err := getopt.Getopt(nil)
if err != nil {
// code to handle error
log.Printf("%v\nTry 'logo-ls -?' for more information.", err)
sysState.ExitCode(sysState.Code_Serious)
os.Exit(sysState.GetExitCode())
}
// list of files/ dir
FileList = getopt.Args()
// set one of -A and -a priority -A > -a
switch {
case *f_A:
FlagVector |= Flag_A
case *f_a:
FlagVector |= Flag_a
}
// set one of -S, -U, -X, -v, -t and alpha priority -S > -t > -X > -v > -U > alpha
switch {
case *f_S:
FlagVector |= Flag_S
case *f_t:
FlagVector |= Flag_t
case *f_X:
FlagVector |= Flag_X
case *f_v:
FlagVector |= Flag_v
case *f_U:
FlagVector |= Flag_U
default:
FlagVector |= Flag_alpha
}
// set reverse (-r) flag
if *f_r {
FlagVector |= Flag_r
}
// set recursion (-R) flag
if *f_R {
FlagVector |= Flag_R
}
// set disable-git-status (-D) flag
if *f_D {
FlagVector |= Flag_D
}
// set disable-color (-c) flag
if *f_c {
FlagVector |= Flag_c
}
// set disable-icon (-i) flag
if *f_i {
FlagVector |= Flag_i
}
// set -1 flag
if *f_1 {
FlagVector |= Flag_1
}
// set -d flag
if *f_d {
FlagVector |= Flag_d
}
// set -G flag
if *f_G {
FlagVector |= Flag_G
}
// set time formate
switch *f_T {
case "Stamp":
timeFormate = time.Stamp
case "StampMilli":
timeFormate = time.StampMilli
case "Kitchen":
timeFormate = time.Kitchen
case "ANSIC":
timeFormate = time.ANSIC
case "UnixDate":
timeFormate = time.UnixDate
case "RubyDate":
timeFormate = time.RubyDate
case "RFC1123":
timeFormate = time.RFC1123
case "RFC1123Z":
timeFormate = time.RFC1123Z
case "RFC3339":
timeFormate = time.RFC3339
case "RFC822":
timeFormate = time.RFC822
case "RFC822Z":
timeFormate = time.RFC822Z
case "RFC850":
timeFormate = time.RFC850
default:
timeFormate = time.Stamp
}
// set -h flag
if *f_h {
FlagVector |= Flag_h
}
// set -s flag
if *f_s {
FlagVector |= Flag_s
}
// set one of -o, -g and -l priority -o > -g > -l
switch {
case *f_o:
FlagVector |= Flag_o
case *f_g:
FlagVector |= Flag_g
case *f_l:
FlagVector |= Flag_l
case *f_1:
default:
// screen width for custom tw
w, _, e := terminal.GetSize(int(os.Stdout.Fd()))
if e == nil {
if w == 0 {
// for systems that dont support TIOCGWINSZ.
w, _ = strconv.Atoi(os.Getenv("COLUMNS"))
}
sysState.TerminalWidth(w)
}
}
// 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.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(sysState.GetExitCode())
}
// 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.7")
fmt.Println("\nWritten by Yash Handa")
os.Exit(sysState.GetExitCode())
}
}
+10 -3
View File
@@ -94,6 +94,13 @@ func (w *CTW) Flush(buf *bytes.Buffer) {
totW := widthsSum(iw, pad) //total width of the ls block
if totW > w.termW {
// not even first iteration done print similar to logo-ls -1
if len(widths) == 0 {
widths = make([][4]int, len(iw))
for i := range iw {
widths[i] = iw[i]
}
}
break
} else if totW >= w.termW/2 { // if total width of the ls block is more than half of terminal
// copy iw to widths
@@ -167,11 +174,11 @@ func (w *CTW) printCell(buf *bytes.Buffer, i int, cs [4]int) {
fmt.Fprintf(buf, "%-*s%s", cs[0]-1, w.d[i][0], brailEmpty)
}
if w.showIcon {
fmt.Fprintf(buf, "%s%1s%s%s", w.ic[i], w.d[i][1], white, brailEmpty)
fmt.Fprintf(buf, "%s%1s%s%s", w.ic[i], w.d[i][1], noColor, brailEmpty)
}
fmt.Fprintf(buf, "%s%-*s%s", getGitColor(w.d[i][3]), cs[2], w.d[i][2], white)
fmt.Fprintf(buf, "%s%-*s%s", getGitColor(w.d[i][3]), cs[2], w.d[i][2], noColor)
if cs[3] > 0 {
fmt.Fprintf(buf, "%s%s%1s%s", brailEmpty, getGitColor(w.d[i][3]), w.d[i][3], white)
fmt.Fprintf(buf, "%s%s%1s%s", brailEmpty, getGitColor(w.d[i][3]), w.d[i][3], noColor)
}
}
+2 -2
View File
@@ -64,10 +64,10 @@ func (l *LongCTW) Flush(buf *bytes.Buffer) {
}
if j == l.cols-2 {
fmt.Fprintf(buf, "%s%*s%s", l.ic[i], l.c[j], c, white)
fmt.Fprintf(buf, "%s%*s%s", l.ic[i], l.c[j], c, noColor)
} else if j >= l.cols-1 && (1<<l.cols)&skipCol == 0 {
color := getGitColor(r[l.cols])
fmt.Fprintf(buf, "%s%-*s%s", color, l.c[j], c, white)
fmt.Fprintf(buf, "%s%-*s%s", color, l.c[j], c, noColor)
} else {
fmt.Fprintf(buf, "%-*s", l.c[j], c)
}
+3 -3
View File
@@ -3,7 +3,7 @@ package ctw
import "strings"
var (
white string = "\033[38;2;255;255;255m"
noColor string = "\033[0m"
green string = "\033[38;2;055;183;021m"
brown string = "\033[38;2;192;154;107m"
brailEmpty string = "\u2800"
@@ -11,7 +11,7 @@ var (
func DisplayColor(b bool) {
if b == false {
white = ""
noColor = ""
green = ""
brown = ""
}
@@ -26,7 +26,7 @@ func DisplayBrailEmpty(b bool) {
func getGitColor(gitStatus string) string {
switch strings.Trim(gitStatus, " ") {
case "":
return white
return noColor
case "U":
return green
default:
+62 -55
View File
@@ -1,5 +1,5 @@
// this file contain dir type definition
package main
package dir
import (
"bytes"
@@ -8,14 +8,21 @@ import (
"log"
"os"
"path/filepath"
"runtime"
"sort"
"strings"
"syscall"
"time"
"github.com/Yash-Handa/logo-ls/ctw"
"github.com/Yash-Handa/logo-ls/assets"
"github.com/Yash-Handa/logo-ls/internal/api"
"github.com/Yash-Handa/logo-ls/internal/ctw"
"github.com/Yash-Handa/logo-ls/internal/sysState"
"github.com/mattn/go-colorable"
)
// create the open dir icon
var OpenDirIcon = assets.Icon_Def["diropen"].GetColor(1) + assets.Icon_Def["diropen"].GetGlyph() + "\033[0m" + " "
type file struct {
name, ext, indicator string
modTime time.Time
@@ -40,9 +47,9 @@ type dir struct {
// define methods on *dir type only not on file type
func newDir(d *os.File) (*dir, error) {
func New(d *os.File) (*dir, error) {
// some flag variable combinations
var long, curDir, showHidden bool = flagVector&(flag_l|flag_o|flag_g) > 0, flagVector&(flag_a|flag_d) > 0, flagVector&(flag_a|flag_A) > 0
var long, curDir, showHidden bool = api.FlagVector&(api.Flag_l|api.Flag_o|api.Flag_g) > 0, api.FlagVector&(api.Flag_a|api.Flag_d) > 0, api.FlagVector&(api.Flag_a|api.Flag_A) > 0
t := new(dir)
@@ -56,8 +63,11 @@ func newDir(d *os.File) (*dir, error) {
// getting Git Status of the entire repository
var gitRepoStatus map[string]string // could be nil
if flagVector&flag_D > 0 {
if api.FlagVector&api.Flag_D > 0 {
gitRepoStatus = getFilesGitStatus(d.Name()) // returns map or nil
if len(gitRepoStatus) == 0 {
gitRepoStatus = nil
}
}
if curDir {
@@ -68,21 +78,19 @@ func newDir(d *os.File) (*dir, error) {
t.info.modeBits = uint32(ds.Mode())
t.info.owner, t.info.group = getOwnerGroupInfo(ds)
}
if flagVector&flag_s > 0 {
if s, ok := ds.Sys().(*syscall.Stat_t); ok {
t.info.blocks = s.Blocks
}
if api.FlagVector&api.Flag_s > 0 {
dirBlocks(t.info, ds)
}
if flagVector&flag_i == 0 {
t.info.icon = iDef["diropen"].getGlyph()
if flagVector&flag_c == 0 {
t.info.iconColor = iDef["diropen"].getColor(1)
if api.FlagVector&api.Flag_i == 0 {
t.info.icon = assets.Icon_Def["diropen"].GetGlyph()
if api.FlagVector&api.Flag_c == 0 {
t.info.iconColor = assets.Icon_Def["diropen"].GetColor(1)
}
}
}
// don't fill files info if the -d flag is passed
if flagVector&flag_d > 0 {
if api.FlagVector&api.Flag_d > 0 {
t.files = append(t.files, t.info)
return t, nil
}
@@ -105,15 +113,13 @@ func newDir(d *os.File) (*dir, error) {
f.modeBits = uint32(v.Mode())
f.owner, f.group = getOwnerGroupInfo(v)
}
if flagVector&flag_s > 0 {
if s, ok := v.Sys().(*syscall.Stat_t); ok {
f.blocks = s.Blocks
}
if api.FlagVector&api.Flag_s > 0 {
dirBlocks(f, v)
}
if flagVector&flag_i == 0 {
if api.FlagVector&api.Flag_i == 0 {
f.icon, f.iconColor = getIcon(f.name, f.ext, f.indicator)
if flagVector&flag_c != 0 {
if api.FlagVector&api.Flag_c != 0 {
f.iconColor = ""
}
}
@@ -133,7 +139,7 @@ func newDir(d *os.File) (*dir, error) {
}
// if -a flag is passed then only eval parent dir and append to files
if flagVector&flag_a > 0 {
if api.FlagVector&api.Flag_a > 0 {
t.files = append(t.files, t.info)
p, err := filepath.Abs(d.Name())
if err != nil {
@@ -155,15 +161,13 @@ func newDir(d *os.File) (*dir, error) {
t.parent.modeBits = uint32(pds.Mode())
t.parent.owner, t.parent.group = getOwnerGroupInfo(pds)
}
if flagVector&flag_s > 0 {
if s, ok := pds.Sys().(*syscall.Stat_t); ok {
t.parent.blocks = s.Blocks
}
if api.FlagVector&api.Flag_s > 0 {
dirBlocks(t.parent, pds)
}
if flagVector&flag_i == 0 {
t.parent.icon = iDef["diropen"].getGlyph()
if flagVector&flag_c == 0 {
t.parent.iconColor = iDef["diropen"].getColor(1)
if api.FlagVector&api.Flag_i == 0 {
t.parent.icon = assets.Icon_Def["diropen"].GetGlyph()
if api.FlagVector&api.Flag_c == 0 {
t.parent.iconColor = assets.Icon_Def["diropen"].GetColor(1)
}
}
t.files = append(t.files, t.parent)
@@ -174,8 +178,8 @@ func newDir(d *os.File) (*dir, error) {
return t, err
}
func newDir_ArgFiles(files []os.FileInfo) *dir {
var long bool = flagVector&(flag_l|flag_o|flag_g) > 0
func New_ArgFiles(files []os.FileInfo) *dir {
var long bool = api.FlagVector&(api.Flag_l|api.Flag_o|api.Flag_g) > 0
t := new(dir)
@@ -192,14 +196,12 @@ func newDir_ArgFiles(files []os.FileInfo) *dir {
f.modeBits = uint32(v.Mode())
f.owner, f.group = getOwnerGroupInfo(v)
}
if flagVector&flag_s > 0 {
if s, ok := v.Sys().(*syscall.Stat_t); ok {
f.blocks = s.Blocks
}
if api.FlagVector&api.Flag_s > 0 {
dirBlocks(f, v)
}
if flagVector&flag_i == 0 {
if api.FlagVector&api.Flag_i == 0 {
f.icon, f.iconColor = getIcon(f.name, f.ext, f.indicator)
if flagVector&flag_c != 0 {
if api.FlagVector&api.Flag_c != 0 {
f.iconColor = ""
}
}
@@ -208,43 +210,48 @@ func newDir_ArgFiles(files []os.FileInfo) *dir {
return t
}
func newDirs_Recussion(d *os.File) {
dd, err := newDir(d)
func New_Recussion(d *os.File) {
dd, err := New(d)
d.Close()
if err != nil {
log.Printf("partial access to %q: %v\n", d.Name(), err)
_ = set_osExitCode(code_Minor)
sysState.ExitCode(sysState.Code_Minor)
}
// print the info of the files of the directory
io.Copy(os.Stdout, dd.print())
var out io.Writer = os.Stdout
if runtime.GOOS == "windows" {
out = colorable.NewColorableStdout()
}
io.Copy(out, dd.Print())
if len(dd.dirs) == 0 {
return
}
// at this point dd.print has sorted the children files
// but not using it instead printing children in directory order
temp := make([]string, len(dd.dirs))
sort.Strings(dd.dirs)
for i, v := range dd.dirs {
temp[i] = filepath.Join(d.Name(), v)
}
for _, v := range temp {
fmt.Printf("\n%s:\n", openDir+v)
fmt.Printf("\n%s:\n", OpenDirIcon+v)
f, err := os.Open(v)
if err != nil {
log.Printf("cannot access %q: %v\n", v, err)
f.Close()
_ = set_osExitCode(code_Minor)
sysState.ExitCode(sysState.Code_Minor)
continue
}
newDirs_Recussion(f)
New_Recussion(f)
}
}
func (d *dir) print() *bytes.Buffer {
func (d *dir) Print() *bytes.Buffer {
// take care of printing, extending symbolic links in long forms
//sorting
lessFuncGenerator(d)
if flagVector&flag_U == 0 && flagVector&flag_r > 0 {
if api.FlagVector&api.Flag_U == 0 && api.FlagVector&api.Flag_r > 0 {
sort.Sort(sort.Reverse(d))
} else {
sort.Sort(d)
@@ -252,21 +259,21 @@ func (d *dir) print() *bytes.Buffer {
buf := bytes.NewBuffer([]byte(""))
switch {
case flagVector&(flag_l|flag_o|flag_g) > 0:
case api.FlagVector&(api.Flag_l|api.Flag_o|api.Flag_g) > 0:
w := ctw.NewLong(9)
for _, v := range d.files {
if flagVector&flag_s > 0 {
w.AddRow(getSizeInFormate(v.blocks*512), v.mode, v.owner, v.group, getSizeInFormate(v.size), v.modTime.Format(timeFormate), v.icon, v.name+v.ext+v.indicator, v.gitStatus)
if api.FlagVector&api.Flag_s > 0 {
w.AddRow(getSizeInFormate(v.blocks*512), v.mode, v.owner, v.group, getSizeInFormate(v.size), v.modTime.Format(api.GetTimeFormate()), v.icon, v.name+v.ext+v.indicator, v.gitStatus)
} else {
w.AddRow("", v.mode, v.owner, v.group, getSizeInFormate(v.size), v.modTime.Format(timeFormate), v.icon, v.name+v.ext+v.indicator, v.gitStatus)
w.AddRow("", v.mode, v.owner, v.group, getSizeInFormate(v.size), v.modTime.Format(api.GetTimeFormate()), v.icon, v.name+v.ext+v.indicator, v.gitStatus)
}
w.IconColor(v.iconColor)
}
w.Flush(buf)
case flagVector&flag_1 > 0:
case api.FlagVector&api.Flag_1 > 0:
w := ctw.NewLong(4)
for _, v := range d.files {
if flagVector&flag_s > 0 {
if api.FlagVector&api.Flag_s > 0 {
w.AddRow(getSizeInFormate(v.blocks*512), v.icon, v.name+v.ext+v.indicator, v.gitStatus)
} else {
w.AddRow("", v.icon, v.name+v.ext+v.indicator, v.gitStatus)
@@ -275,9 +282,9 @@ func (d *dir) print() *bytes.Buffer {
}
w.Flush(buf)
default:
w := ctw.New(terminalWidth)
w := ctw.New(sysState.GetTerminalWidth())
for _, v := range d.files {
if flagVector&flag_s > 0 {
if api.FlagVector&api.Flag_s > 0 {
w.AddRow(getSizeInFormate(v.blocks*512), v.icon, v.name+v.ext+v.indicator, v.gitStatus)
} else {
w.AddRow("", v.icon, v.name+v.ext+v.indicator, v.gitStatus)
+63
View File
@@ -0,0 +1,63 @@
// this file contain dir type definition
// +build !windows
package dir
import (
"os"
"os/user"
"strconv"
"syscall"
"github.com/Yash-Handa/logo-ls/internal/api"
)
func dirBlocks(info *file, fi os.FileInfo) {
if s, ok := fi.Sys().(*syscall.Stat_t); ok {
info.blocks = s.Blocks
}
}
func getOwnerGroupInfo(fi os.FileInfo) (o string, g string) {
if stat, ok := fi.Sys().(*syscall.Stat_t); ok {
if api.FlagVector&(api.Flag_l|api.Flag_o) > 0 {
UID := strconv.Itoa(int(stat.Uid))
if n, ok := userMap[UID]; ok {
o = n
} else {
u, err := user.LookupId(UID)
if err != nil {
o = ""
} else {
o = u.Name
userMap[UID] = u.Name
}
}
}
if api.FlagVector&api.Flag_G == 0 && api.FlagVector&(api.Flag_l|api.Flag_g) > 0 {
GID := strconv.Itoa(int(stat.Gid))
if n, ok := grpMap[GID]; ok {
g = n
} else {
grp, err := user.LookupGroupId(GID)
if err != nil {
g = ""
} else {
g = grp.Name
grpMap[GID] = grp.Name
}
}
}
}
return
}
func getFileBlocks(fi os.FileInfo) int64 {
if s, ok := fi.Sys().(*syscall.Stat_t); ok {
return s.Blocks
}
return 0
}
+16
View File
@@ -0,0 +1,16 @@
// this file contain dir type definition
// +build windows
package dir
import (
"os"
)
func dirBlocks(info *file, fi os.FileInfo) {
}
func getOwnerGroupInfo(fi os.FileInfo) (o string, g string) {
return
}
@@ -1,12 +1,12 @@
package main
package dir
import (
"fmt"
"os"
"os/user"
"strconv"
"strings"
"syscall"
"github.com/Yash-Handa/logo-ls/assets"
"github.com/Yash-Handa/logo-ls/internal/api"
)
func mainSort(a, b string) bool {
@@ -26,12 +26,12 @@ func mainSort(a, b string) bool {
// Custom less functions
func lessFuncGenerator(d *dir) {
switch {
case (flagVector & flag_alpha) > 0:
case (api.FlagVector & api.Flag_alpha) > 0:
// sort by alphabetical order of name.ext
d.less = func(i, j int) bool {
return mainSort(d.files[i].name+d.files[i].ext, d.files[j].name+d.files[j].ext)
}
case (flagVector & flag_S) > 0:
case (api.FlagVector & api.Flag_S) > 0:
// sort by file size, largest first
d.less = func(i, j int) bool {
if d.files[i].size > d.files[j].size {
@@ -42,13 +42,13 @@ func lessFuncGenerator(d *dir) {
return false
}
}
case (flagVector & flag_t) > 0:
case (api.FlagVector & api.Flag_t) > 0:
// sort by modification time, newest first
// not sorting by alphabetical order because equality is quite rare
d.less = func(i, j int) bool {
return d.files[i].modTime.After(d.files[j].modTime)
}
case (flagVector & flag_X) > 0:
case (api.FlagVector & api.Flag_X) > 0:
// sort alphabetically by entry extension
d.less = func(i, j int) bool {
if mainSort(d.files[i].ext, d.files[j].ext) {
@@ -59,7 +59,7 @@ func lessFuncGenerator(d *dir) {
return false
}
}
case (flagVector & flag_v) > 0:
case (api.FlagVector & api.Flag_v) > 0:
// natural sort of (version) numbers within text
d.less = func(i, j int) bool {
return d.files[i].name+d.files[i].ext < d.files[j].name+d.files[j].ext
@@ -76,42 +76,6 @@ func lessFuncGenerator(d *dir) {
var grpMap = make(map[string]string)
var userMap = make(map[string]string)
func getOwnerGroupInfo(fi os.FileInfo) (o string, g string) {
if stat, ok := fi.Sys().(*syscall.Stat_t); ok {
if flagVector&(flag_l|flag_o) > 0 {
UID := strconv.Itoa(int(stat.Uid))
if n, ok := userMap[UID]; ok {
o = n
} else {
u, err := user.LookupId(UID)
if err != nil {
o = ""
} else {
o = u.Name
userMap[UID] = u.Name
}
}
}
if flagVector&flag_G == 0 && flagVector&(flag_l|flag_g) > 0 {
GID := strconv.Itoa(int(stat.Gid))
if n, ok := grpMap[GID]; ok {
g = n
} else {
grp, err := user.LookupGroupId(GID)
if err != nil {
g = ""
} else {
g = grp.Name
grpMap[GID] = grp.Name
}
}
}
}
return
}
// get indicator of the file
func getIndicator(modebit os.FileMode) (i string) {
switch {
@@ -130,7 +94,7 @@ func getIndicator(modebit os.FileMode) (i string) {
}
func getSizeInFormate(b int64) string {
if flagVector&flag_h == 0 {
if api.FlagVector&api.Flag_h == 0 {
return fmt.Sprintf("%d", b)
}
@@ -148,40 +112,59 @@ func getSizeInFormate(b int64) string {
}
func getIcon(name, ext, indicator string) (icon, color string) {
var i *iInfo
var i *assets.Icon_Info
var ok bool
switch indicator {
case "/":
// send dir related stuff
i, ok = Icon_Dir[strings.ToLower(name+ext)]
i, ok = assets.Icon_Dir[strings.ToLower(name+ext)]
if ok {
break
}
if len(name) == 0 || '.' == name[0] {
i = iDef["hiddendir"]
i = assets.Icon_Def["hiddendir"]
break
}
i = iDef["dir"]
case "*":
// send executable related stuff
i = iDef["exe"]
i = assets.Icon_Def["dir"]
default:
// send file related stuff
i, ok = Icon_FileName[strings.ToLower(name+ext)]
i, ok = assets.Icon_FileName[strings.ToLower(name+ext)]
if ok {
break
}
i, ok = Icon_Ext[strings.ToLower(strings.TrimPrefix(ext, "."))]
// a special admiration for goLang
if ext == ".go" && strings.HasSuffix(name, "_test") {
i = assets.Icon_Set["go-test"]
break
}
t := strings.Split(name, ".")
if len(t) > 1 && t[0] != "" {
i, ok = assets.Icon_SubExt[strings.ToLower(t[len(t)-1]+ext)]
if ok {
break
}
}
i, ok = assets.Icon_Ext[strings.ToLower(strings.TrimPrefix(ext, "."))]
if ok {
break
}
if len(name) == 0 || '.' == name[0] {
i = iDef["hiddenfile"]
i = assets.Icon_Def["hiddenfile"]
break
}
i = iDef["file"]
i = assets.Icon_Def["file"]
}
return i.getGlyph(), i.getColor(1)
// change icon color if the file is executable
if indicator == "*" {
if i.GetGlyph() == "\uf723" {
i = assets.Icon_Def["exe"]
}
i.MakeExe()
}
return i.GetGlyph(), i.GetColor(1)
}
+120
View File
@@ -0,0 +1,120 @@
package dir
import (
"os/exec"
"path/filepath"
"strings"
"github.com/go-git/go-git/v5"
)
// gitStatus returns the status of modified files in the worktree. It will attempt to execute 'git status'
// and will fall back to git.Worktree.Status() if that fails.
func gitStatus(wt *git.Worktree) (git.Status, error) {
c := exec.Command("git", "status", "--porcelain", "-z")
c.Dir = wt.Filesystem.Root()
output, err := c.Output()
if err != nil {
stat, err := wt.Status()
return stat, err
}
lines := strings.Split(string(output), "\000")
stat := make(map[string]*git.FileStatus, len(lines))
for _, line := range lines {
if len(line) == 0 {
continue
}
// For copy/rename the output looks like
// R destination\000source
// Which means we can split on space and ignore anything with only one result
parts := strings.SplitN(strings.TrimLeft(line, " "), " ", 2)
if len(parts) == 2 {
stat[strings.Trim(parts[1], " ")] = &git.FileStatus{
Worktree: git.StatusCode([]byte(parts[0])[0]),
}
}
}
return stat, err
}
var (
gitRepo git.Status
gitRoot string
gitError error
gitRepoComputedAlready = false
)
func getRepoStatus(path string) (git.Status, string, error) {
if !gitRepoComputedAlready {
gitRepoComputedAlready = true
op := git.PlainOpenOptions{DetectDotGit: true}
r, err := git.PlainOpenWithOptions(path, &op)
if err != nil {
gitError = err
return nil, "", err
}
w, err := r.Worktree()
if err != nil {
gitError = err
return nil, "", err
}
ws, err := gitStatus(w)
if err != nil {
gitError = err
return nil, "", err
}
gitRepo, gitRoot, gitError = ws, w.Filesystem.Root(), nil
}
return gitRepo, gitRoot, gitError
}
// use this function when multiple dirs are given as input, to recalculate the git tree for each
func GitRepoCompute() {
gitRepoComputedAlready = false
}
func getFilesGitStatus(p string) map[string]string {
gitRepo, gitRoot, err := getRepoStatus(p)
if err != nil || len(gitRepo) == 0 {
return nil
}
pAbs, err := filepath.Abs(p)
if err != nil {
return nil
}
t := make(map[string]string)
for i, v := range gitRepo {
i = gitFilePath(gitRoot+"/"+i, pAbs+"/")
if i == "" {
continue
}
dirs := strings.SplitAfter(i, "/")
d := ""
for j, seg := range dirs {
if j == len(dirs)-1 {
if v.Worktree == '?' {
t[i] = "U"
} else {
t[i] = string(v.Worktree)
}
} else {
d += seg
t[d] = "●"
}
}
}
return t
}
func gitFilePath(gitpath, dirpath string) string {
if strings.HasPrefix(gitpath, dirpath) {
return strings.TrimPrefix(gitpath, dirpath)
}
return ""
}
+37
View File
@@ -0,0 +1,37 @@
// This file has sysState data that is set and used by other file
package sysState
// terminal width for formatting [default to 80]
var terminalWidth int = 80
func TerminalWidth(w int) {
terminalWidth = w
}
func GetTerminalWidth() int {
return terminalWidth
}
const (
Code_OK int = iota
Code_Minor
Code_Serious
)
// os exit code (do not update manually)
var osExitCode int = Code_OK
// only use set_osExitCode to update the value of osExitCode
func ExitCode(c int) {
switch {
case c == Code_Serious:
osExitCode = Code_Serious
case c == Code_Minor && osExitCode != Code_Serious:
osExitCode = Code_Minor
}
}
func GetExitCode() int {
return osExitCode
}
BIN
View File
Binary file not shown.
+37 -270
View File
@@ -5,276 +5,33 @@ import (
"io"
"log"
"os"
"runtime"
"sort"
"time"
"github.com/Yash-Handa/logo-ls/ctw"
"github.com/pborman/getopt/v2"
"golang.org/x/crypto/ssh/terminal"
"github.com/Yash-Handa/logo-ls/assets"
"github.com/Yash-Handa/logo-ls/internal/api"
"github.com/Yash-Handa/logo-ls/internal/ctw"
"github.com/Yash-Handa/logo-ls/internal/dir"
"github.com/Yash-Handa/logo-ls/internal/sysState"
"github.com/mattn/go-colorable"
)
// flags with corresponding bit values
// frequently used flags should be higher in the list
// help (-?) and version (-V) not included
const (
flag_l uint = 1 << iota
flag_a
flag_alpha // sort in alphabetic order (default)
flag_i // stop printing of icons
flag_c // stop printing of colors
flag_D // stop printing of git status
flag_A
flag_h
flag_R
flag_r
flag_S
flag_t
flag_X
flag_s
flag_v
flag_U
flag_1
flag_d
flag_o
flag_g
flag_G
)
// flagVector has all the options set in it. Each bit represent an option.
var flagVector uint
// terminal width for formatting
var terminalWidth int
// time formate
var timeFormate string
const (
code_OK int = iota
code_Minor
code_Serious
)
// os exit code (do not update manually)
var osExitCode int = code_OK
// only use set_osExitCode to update the value of osExitCode
func set_osExitCode(c int) int {
switch {
case c == code_Serious:
osExitCode = code_Serious
case c == code_Minor && osExitCode != code_Serious:
osExitCode = code_Minor
}
return osExitCode
}
var openDir = iDef["diropen"].getColor(1) + iDef["diropen"].getGlyph() + "\033[38;2;255;255;255m" + " "
func main() {
// content flags
f_a := getopt.BoolLong("all", 'a', "do not ignore entries starting with .")
f_A := getopt.BoolLong("almost-all", 'A', "do not list implied . and ..")
// load flags into api.FlagVector and other sysState update stuff
api.Bootstrap()
// disable Stuff
f_D := getopt.BoolLong("git-status", 'D', "print git status of files")
f_c := getopt.BoolLong("disable-color", 'c', "don't color icons, filenames and git status (use this to print to a file)")
f_i := getopt.BoolLong("disable-icon", 'i', "don't print icons of the files")
// display flags
f_1 := getopt.Bool('1', "list one file per line.")
f_d := getopt.BoolLong("directory", 'd', "list directories themselves, not their contents")
f_l := getopt.Bool('l', "use a long listing format")
f_o := getopt.Bool('o', "like -l, but do not list group information")
f_g := getopt.Bool('g', "\nlike -l, but do not list owner")
f_G := getopt.BoolLong("no-group", 'G', "in a long listing, don't print group names")
f_h := getopt.BoolLong("human-readable", 'h', "with -l and -s, print sizes like 1K 234M 2G etc.")
f_s := getopt.BoolLong("size", 's', "print the allocated size of each file, in blocks")
// sorting flags
f_S := getopt.Bool('S', "sort by file size, largest first")
f_U := getopt.Bool('U', "do not sort; list entries in directory order")
f_X := getopt.Bool('X', "sort alphabetically by entry extension")
f_v := getopt.Bool('v', "natural sort of (version) numbers within text")
f_t := getopt.Bool('t', "sort by modification time, newest first")
f_r := getopt.BoolLong("reverse", 'r', "reverse order while sorting")
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.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
err := getopt.Getopt(nil)
if err != nil {
// code to handle error
log.Printf("%v\nTry 'logo-ls -?' for more information.", err)
os.Exit(set_osExitCode(code_Serious))
}
// 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.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.3")
fmt.Println("\nWritten by Yash Handa")
os.Exit(osExitCode)
}
// set one of -A and -a priority -A > -a
switch {
case *f_A:
flagVector |= flag_A
case *f_a:
flagVector |= flag_a
}
// set one of -S, -U, -X, -v, -t and alpha priority -S > -t > -X > -v > -U > alpha
switch {
case *f_S:
flagVector |= flag_S
case *f_t:
flagVector |= flag_t
case *f_X:
flagVector |= flag_X
case *f_v:
flagVector |= flag_v
case *f_U:
flagVector |= flag_U
default:
flagVector |= flag_alpha
}
// set reverse (-r) flag
if *f_r {
flagVector |= flag_r
}
// set recursion (-R) flag
if *f_R {
flagVector |= flag_R
}
// set disable-git-status (-D) flag
if *f_D {
flagVector |= flag_D
}
// set disable-color (-c) flag
if *f_c {
flagVector |= flag_c
// config ctw and OpenDirIcon
if api.FlagVector&api.Flag_c > 0 {
ctw.DisplayColor(false)
openDir = iDef["diropen"].getGlyph() + " "
dir.OpenDirIcon = assets.Icon_Def["diropen"].GetGlyph() + " "
}
// set disable-icon (-i) flag
if *f_i {
flagVector |= flag_i
openDir = ""
if api.FlagVector&api.Flag_i > 0 {
dir.OpenDirIcon = ""
ctw.DisplayBrailEmpty(false)
}
// set -1 flag
if *f_1 {
flagVector |= flag_1
}
// set -d flag
if *f_d {
flagVector |= flag_d
}
// set -G flag
if *f_G {
flagVector |= flag_G
}
// set time formate
switch *f_T {
case "Stamp":
timeFormate = time.Stamp
case "StampMilli":
timeFormate = time.StampMilli
case "Kitchen":
timeFormate = time.Kitchen
case "ANSIC":
timeFormate = time.ANSIC
case "UnixDate":
timeFormate = time.UnixDate
case "RubyDate":
timeFormate = time.RubyDate
case "RFC1123":
timeFormate = time.RFC1123
case "RFC1123Z":
timeFormate = time.RFC1123Z
case "RFC3339":
timeFormate = time.RFC3339
case "RFC822":
timeFormate = time.RFC822
case "RFC822Z":
timeFormate = time.RFC822Z
case "RFC850":
timeFormate = time.RFC850
default:
timeFormate = time.Stamp
}
// set -h flag
if *f_h {
flagVector |= flag_h
}
// set -s flag
if *f_s {
flagVector |= flag_s
}
// set one of -o, -g and -l priority -o > -g > -l
switch {
case *f_o:
flagVector |= flag_o
case *f_g:
flagVector |= flag_g
case *f_l:
flagVector |= flag_l
case *f_1:
default:
// screen width for custom tw
var e error = nil
terminalWidth, _, e = terminal.GetSize(int(os.Stdout.Fd()))
if e != nil {
terminalWidth = 80
}
}
// extract files/dir from arguments
dirs := getopt.Args()
dirs := api.FileList
if len(dirs) == 0 {
// use pwd
dirs = append(dirs, ".")
@@ -293,14 +50,14 @@ func main() {
if err != nil {
log.Printf("cannot access %q: %v\n", v, err)
d.Close()
_ = set_osExitCode(code_Serious)
sysState.ExitCode(sysState.Code_Serious)
continue
}
ds, err := d.Stat()
if err != nil {
log.Printf("cannot access %q: %v\n", v, err)
d.Close()
_ = set_osExitCode(code_Serious)
sysState.ExitCode(sysState.Code_Serious)
continue
}
if ds.IsDir() {
@@ -310,48 +67,58 @@ func main() {
}
}
var out io.Writer = os.Stdout
if runtime.GOOS == "windows" {
out = colorable.NewColorableStdout()
}
// process and display all files
if len(args.files) > 0 {
io.Copy(os.Stdout, newDir_ArgFiles(args.files).print())
io.Copy(out, dir.New_ArgFiles(args.files).Print())
if len(args.dirs) > 0 {
fmt.Println()
}
}
// process and display all the dirs in arg
if flagVector&flag_R > 0 {
if api.FlagVector&api.Flag_R > 0 {
// use recursive func
for i, v := range args.dirs {
if i > 0 {
fmt.Println()
}
fmt.Printf("%s:\n", openDir+v.Name())
newDirs_Recussion(v)
fmt.Printf("%s:\n", dir.OpenDirIcon+v.Name())
if api.FlagVector&api.Flag_D > 0 {
dir.GitRepoCompute()
}
dir.New_Recussion(v)
}
} else {
pName := len(dirs) > 1
for i, v := range args.dirs {
if pName {
fmt.Printf("%s:\n", openDir+v.Name())
fmt.Printf("%s:\n", dir.OpenDirIcon+v.Name())
}
d, err := newDir(v)
if api.FlagVector&api.Flag_D > 0 {
dir.GitRepoCompute()
}
d, err := dir.New(v)
v.Close()
if err != nil {
log.Printf("partial access to %q: %v\n", v.Name(), err)
_ = set_osExitCode(code_Serious)
sysState.ExitCode(sysState.Code_Serious)
}
// print the info of the files of the directory
io.Copy(os.Stdout, d.print())
io.Copy(out, d.Print())
if i < len(args.dirs)-1 {
fmt.Println()
}
}
}
os.Exit(osExitCode)
os.Exit(sysState.GetExitCode())
}
func init() {
getopt.SetParameters("[files ...]")
log.SetPrefix("logo-ls: ")
log.SetFlags(0)
}
+50
View File
@@ -0,0 +1,50 @@
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.
-?, --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
don't color icons, filenames and git status (use this to
print to a file)
-d, --directory list directories themselves, not their contents
-D, --git-status print git status of files
-g like -l, but do not list owner
-G, --no-group in a long listing, don't print group names
-h, --human-readable
with -l and -s, print sizes like 1K 234M 2G etc.
-i, --disable-icon
don't print icons of the files
-l use a long listing format
-o like -l, but do not list group information
-R, --recursive list subdirectories recursively
-r, --reverse reverse order while sorting
-S sort by file size, largest first
-s, --size print the allocated size of each file, in blocks
-t sort by modification time, newest first
-T, --time-style=value
time/date format with -l; see time-style below [Stamp]
-U do not sort; list entries in directory order
-v natural sort of (version) numbers within text
-V, --version output version information and exit
-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"
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).
+11
View File
@@ -0,0 +1,11 @@
ﳑ1test.go
2test.js
3test.py
abc.css
abc.sass
.abc.txt
Dockerfile
Downloads/
.privateDir/
נּtest.routes.tsx
testDir/
+17
View File
@@ -0,0 +1,17 @@
ﱮ testdata/dirEnv:
ﳑ1test.go
2test.js
3test.py
abc.css
abc.sass
Dockerfile
Downloads/
נּtest.routes.tsx
testDir/
ﱮ testdata/dirEnv/Downloads:
ﱮ testdata/dirEnv/testDir:
ﳑ1test.go
2test.js
abc.txt
+32
View File
@@ -0,0 +1,32 @@
ﱮ testdata/dirEnv:
ﱮ.
ﱮ..
ﳑ1test.go
2test.js
3test.py
abc.css
abc.sass
.abc.txt
Dockerfile
Downloads/
.privateDir/
נּtest.routes.tsx
testDir/
ﱮ testdata/dirEnv/.privateDir:
ﱮ.
ﱮ..
ﳑ1test.go
2test.js
abc.txt
ﱮ testdata/dirEnv/Downloads:
ﱮ.
ﱮ..
ﱮ testdata/dirEnv/testDir:
ﱮ.
ﱮ..
ﳑ1test.go
2test.js
abc.txt
+7
View File
@@ -0,0 +1,7 @@
logo-ls v1.3.7
Copyright (c) 2020 Yash Handa
License MIT <https://opensource.org/licenses/MIT>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Yash Handa
+13
View File
@@ -0,0 +1,13 @@
ﱮ.
ﱮ..
ﳑ1test.go
2test.js
3test.py
abc.css
abc.sass
.abc.txt
Dockerfile
Downloads/
.privateDir/
נּtest.routes.tsx
testDir/
+9
View File
@@ -0,0 +1,9 @@
1test.go
2test.js
3test.py
abc.css
abc.sass
Dockerfile
Downloads/
test.routes.tsx
testDir/
+9
View File
@@ -0,0 +1,9 @@
testDir/
נּtest.routes.tsx
Downloads/
Dockerfile
abc.sass
abc.css
3test.py
2test.js
ﳑ1test.go
+9
View File
@@ -0,0 +1,9 @@
4.0Kﳑ1test.go
4.0K2test.js
4.0K3test.py
4.0Kabc.css
4.0Kabc.sass
4.0KDockerfile
4.0KDownloads/
4.0Kנּtest.routes.tsx
4.0KtestDir/
+32
View File
@@ -0,0 +1,32 @@
ﱮ testdata/dirEnv:
4.0Kﱮ.
4.0Kﱮ..
4.0Kﳑ1test.go
4.0K2test.js
4.0K3test.py
4.0Kabc.css
4.0Kabc.sass
4.0K.abc.txt
4.0KDockerfile
4.0KDownloads/
4.0K.privateDir/
4.0Kנּtest.routes.tsx
4.0KtestDir/
ﱮ testdata/dirEnv/.privateDir:
4.0Kﱮ.
4.0Kﱮ..
4.0Kﳑ1test.go
4.0K2test.js
4.0Kabc.txt
ﱮ testdata/dirEnv/Downloads:
4.0Kﱮ.
4.0Kﱮ..
ﱮ testdata/dirEnv/testDir:
4.0Kﱮ.
4.0Kﱮ..
4.0Kﳑ1test.go
4.0K2test.js
4.0Kabc.txt
+9
View File
@@ -0,0 +1,9 @@
ﳑ1test.go
2test.js
3test.py
abc.css
abc.sass
Dockerfile
Downloads/
נּtest.routes.tsx
testDir/