Fixes
This commit is contained in:
parent
c9d369475c
commit
5e1087707c
|
@ -0,0 +1,3 @@
|
||||||
|
twemoji/
|
||||||
|
twemoji-astonishing.css
|
||||||
|
twemoji-astonishing.min.css
|
14
Build.py
14
Build.py
|
@ -1,9 +1,10 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import os
|
import os
|
||||||
import unicodedata
|
import unicodedata
|
||||||
|
from time import ctime
|
||||||
from urllib.request import urlopen
|
from urllib.request import urlopen
|
||||||
|
|
||||||
Name = "twemoji-amazing"
|
Name = "twemoji-astonishing"
|
||||||
EmojiVer = "15.0"
|
EmojiVer = "15.0"
|
||||||
|
|
||||||
# https://stackoverflow.com/a/518232
|
# https://stackoverflow.com/a/518232
|
||||||
|
@ -11,8 +12,6 @@ def StripAccents(s):
|
||||||
return ''.join(c for c in unicodedata.normalize('NFD', s)
|
return ''.join(c for c in unicodedata.normalize('NFD', s)
|
||||||
if unicodedata.category(c) != 'Mn')
|
if unicodedata.category(c) != 'Mn')
|
||||||
|
|
||||||
#https://unpkg.com/emoji.json@13.1.0/emoji.json
|
|
||||||
|
|
||||||
def ReplaceList(Text, Match, Replace):
|
def ReplaceList(Text, Match, Replace):
|
||||||
for m in Match:
|
for m in Match:
|
||||||
Text = Text.replace(m, Replace)
|
Text = Text.replace(m, Replace)
|
||||||
|
@ -58,11 +57,14 @@ def Main():
|
||||||
for Line in Data.splitlines():
|
for Line in Data.splitlines():
|
||||||
if CheckEmojiLine(Line):
|
if CheckEmojiLine(Line):
|
||||||
Emojis += [GetEmojiMeta(Line)]
|
Emojis += [GetEmojiMeta(Line)]
|
||||||
|
EmojiCount = str(len(Emojis))
|
||||||
|
|
||||||
print(f"[I] Writing CSS")
|
print(f"[I] Writing CSS")
|
||||||
CSS = ""
|
CSS = ""
|
||||||
with open("Preamble.css", "r") as f:
|
with open("Preamble.css", "r") as f:
|
||||||
CSS += f.read()
|
CSS += f.read() + "\n"
|
||||||
|
with open("Comment.css", "r") as f:
|
||||||
|
Comment = f.read().replace("{BuildTime}", ctime()).replace("{EmojiCount}", EmojiCount)
|
||||||
for Emoji in Emojis:
|
for Emoji in Emojis:
|
||||||
CSS += f"""\
|
CSS += f"""\
|
||||||
.twa-{Emoji["Name"]}, .twa-{Emoji["Char"]} {{
|
.twa-{Emoji["Name"]}, .twa-{Emoji["Char"]} {{
|
||||||
|
@ -70,9 +72,9 @@ def Main():
|
||||||
}}
|
}}
|
||||||
"""
|
"""
|
||||||
with open(f"{Name}.css", "w") as f:
|
with open(f"{Name}.css", "w") as f:
|
||||||
f.write(CSS)
|
f.write(CSS.replace("/*{CommentBlock}*/", Comment))
|
||||||
with open(f"{Name}.min.css", "w") as f:
|
with open(f"{Name}.min.css", "w") as f:
|
||||||
f.write(MinifyCSS(CSS))
|
f.write(MinifyCSS(CSS).replace("/*{CommentBlock}*/", "\n"+Comment))
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
Main()
|
Main()
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
/*
|
||||||
|
Generated by twemoji-astonishing, available at https://gitlab.com/octtspacc/twemoji-astonishing;
|
||||||
|
Graphics licensed under CC BY 4.0: https://github.com/twitter/twemoji.
|
||||||
|
|
||||||
|
Built on {BuildTime};
|
||||||
|
Generated {EmojiCount} emoji CSS classes.
|
||||||
|
|
||||||
|
Preamble from https://github.com/SebastianAigner/twemoji-amazing,
|
||||||
|
licensed under MIT: https://mit-license.org.
|
||||||
|
*/
|
|
@ -0,0 +1,4 @@
|
||||||
|
/*
|
||||||
|
License: MIT and CC BY 4.0.
|
||||||
|
Details and Sources: https://gitlab.com/octtspacc/twemoji-astonishing.
|
||||||
|
*/
|
12
Preamble.css
12
Preamble.css
|
@ -1,13 +1,5 @@
|
||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
/*
|
/*{CommentBlock}*/
|
||||||
Generated by twemoji-astonishing, available at https://gitlab.com/octtspacc/twemoji-astonishing;
|
|
||||||
Graphics are licensed under CC-BY 4.0: https://github.com/twitter/twemoji.
|
|
||||||
|
|
||||||
Generated a total of {EmojiCount} emoji CSS classes.
|
|
||||||
|
|
||||||
Preamble from https://github.com/SebastianAigner/twemoji-amazing,
|
|
||||||
licensed under MIT: https://mit-license.org.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.twa {
|
.twa {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -64,5 +56,3 @@
|
||||||
vertical-align: -0.5em;
|
vertical-align: -0.5em;
|
||||||
background-size: 5em 5em;
|
background-size: 5em 5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End preamble; begin emoji classes. */
|
|
|
@ -5,4 +5,4 @@ License for our scripts: [MIT](https://mit-license.org).
|
||||||
Uses CSS snippets from [twemoji-amazing](https://github.com/SebastianAigner/twemoji-amazing), licensed under [MIT](https://mit-license.org).
|
Uses CSS snippets from [twemoji-amazing](https://github.com/SebastianAigner/twemoji-amazing), licensed under [MIT](https://mit-license.org).
|
||||||
|
|
||||||
The project exists solely on top of [Twemoji](https://twemoji.twitter.com).
|
The project exists solely on top of [Twemoji](https://twemoji.twitter.com).
|
||||||
The graphics are licensed under [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0). Please adhere to the [Twemoji attribution requirements](https://github.com/twitter/twemoji#attribution-requirements) when using these emojis.
|
The graphics are licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0). Please adhere to the [Twemoji attribution requirements](https://github.com/twitter/twemoji#attribution-requirements) when using these emojis.
|
||||||
|
|
11032
twemoji-amazing.css
11032
twemoji-amazing.css
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue