Last active
January 21, 2021 14:56
-
-
Save rowaasr13/d272904099edd9346a1d8f76b8a77631 to your computer and use it in GitHub Desktop.
text_extensions.pl - Generates list of patterns for highly compressible files.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generates list of patterns for highly compressible files. | |
# Most of them are text and formatted text - hence name. | |
# But some are other uncompressed formats - bitmaps, targa, uncompressed sounds, textures, etc. | |
use strict; | |
use warnings; | |
my @ext; | |
my %known; | |
foreach(split /[\r\n]/, ' | |
*.txt | |
*.log | |
*.ini | |
*.inf | |
*.conf | |
*.csv | |
*.tsv | |
*.md | |
*.rtf | |
*.xml | |
*.srt | |
*.ass | |
*.ssa | |
*.etl | |
*.mum | |
*.manifest | |
*.htm | |
*.html | |
*.css | |
*.js | |
*.js.map | |
*.cjs | |
*.mjs | |
*.json | |
*.sjson | |
*.json.bin | |
*.ts | |
*.ts.map | |
*.tsbuildinfo | |
*.yml | |
*.tbl | |
*.ser | |
*.pl | |
*.pm | |
*.t | |
*.php | |
*.py | |
*.lua | |
*.c | |
*.cpp | |
*.h | |
*.hpp | |
*.po | |
*.lng | |
*.dic | |
*.lang | |
*.qm | |
*.ini | |
*.cmd | |
*.bat | |
*.ps1 | |
*.crt | |
COPYING | |
LICENSE | |
Makefile | |
.gitignore | |
.npmignore | |
.editorconfig | |
.eslintrc | |
.DS_Store | |
*.termcap | |
*.terminfo | |
*.res | |
*.ico | |
*.bsp | |
*.nav | |
*.vtf | |
*.vdf | |
*.mdl | |
*.vvd | |
*.vtx | |
*.chroma | |
*.d3d | |
*.tga | |
*.bmp | |
*.blp | |
*.pcx | |
') { | |
s/^\s+//; | |
s/\s+$//; | |
if ($_ eq '') { next } | |
if ($known{$_}) { next } else { $known{$_}++ } | |
print "$_\n"; | |
push(@ext, $_); | |
} | |
print("\n", join(", ", @ext), "\n"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment