mirror of
https://github.com/hahwul/WebHackersWeapons.git
synced 2025-03-22 23:06:35 -04:00
Add badge
This commit is contained in:
parent
8693b155c7
commit
b0781b1b3e
BIN
images/apple.png
Normal file
BIN
images/apple.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 886 B |
BIN
images/chrome.png
Normal file
BIN
images/chrome.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
BIN
images/firefox.png
Normal file
BIN
images/firefox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
BIN
images/linux.png
Normal file
BIN
images/linux.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
images/safari.png
Normal file
BIN
images/safari.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
images/windows.png
Normal file
BIN
images/windows.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 998 B |
@ -1,8 +1,26 @@
|
||||
require 'erb'
|
||||
require 'yaml'
|
||||
|
||||
def generate_badge
|
||||
|
||||
def generate_badge array
|
||||
badge = ""
|
||||
array.each { |t|
|
||||
case t
|
||||
when 'linux'
|
||||
badge = badge + ""
|
||||
when 'windows'
|
||||
badge = badge + ""
|
||||
when 'macos'
|
||||
badge = badge + ""
|
||||
when 'firefox'
|
||||
badge = badge + ""
|
||||
when 'safari'
|
||||
badge = badge + ""
|
||||
when 'chrome'
|
||||
badge = badge + ""
|
||||
end
|
||||
}
|
||||
|
||||
return badge
|
||||
end
|
||||
|
||||
template = %q{
|
||||
@ -70,9 +88,9 @@ Dir.entries("./weapons/").each do | name |
|
||||
split_result = data['url'].split "//github.com/"
|
||||
popularity = ""
|
||||
end
|
||||
badge = generate_badge
|
||||
badge = generate_badge(data['platform'])
|
||||
line = "|#{data['types']}|#{name}|#{data['description']}|#{badge}|#{popularity}|"
|
||||
case data['category']
|
||||
case data['category']
|
||||
when 'tool'
|
||||
tools = tools + line + "\n"
|
||||
when 'tool-addon'
|
||||
|
Loading…
x
Reference in New Issue
Block a user