Created
November 8, 2012 21:17
-
-
Save danieljs96/4041672 to your computer and use it in GitHub Desktop.
Generates an XML file for emoticons in KDE and XMPP applications
This file contains hidden or 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
#!/usr/bin/env ruby | |
emoteFile = File.open('emoticons.xml', 'w') | |
emoteFile.puts( | |
"<?xml version='1.0'?>", | |
"<messaging-emoticon-map>" | |
) | |
File.readlines('theme').map do |line| | |
emoteFile.puts(" <emoticon file=\"#{line.split[0]}\">") | |
line.split[1..-1].map do |expression| | |
emoteFile.puts(" <string>#{expression}</string>") | |
end | |
emoteFile.puts(" </emoticon>") | |
end | |
emoteFile.puts("</messaging-emoticon-map>") |
This file contains hidden or 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
#!/usr/bin/env ruby | |
emoteFile = File.open('icondef.xml', 'w') | |
emoteFile.puts( | |
"<?xml version='1.0'?>", | |
"<icondef>", | |
" <meta>", | |
" <name>Reddit Ponies</name>", | |
" <version>1.0</version>", | |
" <description>Reddit ponies for XMPP</description>", | |
" <creation>#{Time.now.strftime("%Y-%m-%d")}</creation>", | |
" <author email=\"monostel@gmail.com\" jid=\"monostel@ubuntu-jabber.net\">Joshua Stone (icondef.xml)</author>", | |
" </meta>" | |
) | |
File.readlines('theme').map do |line| | |
emoteFile.puts(" <icon>") | |
line.split[1..-1].map do |expression| | |
emoteFile.puts(" <text>#{expression}</text>") | |
end | |
emoteFile.puts( | |
" <object mime=\"image/png\">#{line.split[0]}</object>", | |
" </icon>" | |
) | |
end | |
emoteFile.puts("</icondef>") |
This file contains hidden or 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
b00.png [](/b00) [](/flutterfear) [](/rflutterfear) | |
b01.png [](/b01) [](/ajcower) [](/rajcower) | |
b02.png [](/b02) [](/fluttersrs) [](/rfluttersrs) | |
b03.png [](/b03) [](/ppshrug) [](/rppshrug) | |
b04.png [](/b04) [](/fluttershh) [](/rfluttershh) | |
b05.png [](/b05) [](/ajugh) [](/rajugh) | |
b06.png [](/b06) [](/trixiesmug) [](/rtrixiesmug) | |
b07.png [](/b07) [](/ajwut) [](/rajwut) | |
b08.png [](/b08) [](/abwut) [](/rabwut) | |
b09.png [](/b09) [](/rarityjudge) [](/rrarityjudge) | |
b10.png [](/b10) [](/ppboring) [](/rppboring) | |
b11.png [](/b11) [](/ajsly) [](/rajsly) | |
b12.png [](/b12) [](/raritydress) [](/rraritydress) | |
b13.png [](/b13) [](/spikenervous) [](/rspikenervous) [](/newrainbowdash) [](/rnewrainbowdash) | |
b14.png [](/b14) [](/flutteryay) [](/rflutteryay) | |
b15.png [](/b15) [](/raritywut) [](/rraritywut) | |
b16.png [](/b16) [](/flutterwink) [](/rflutterwink) | |
b17.png [](/b17) [](/twisquint) [](/rtwisquint) | |
b18.png [](/b18) [](/manspike) [](/rmanspike) | |
b19.png [](/b19) [](/rarityprimp) [](/rrarityprimp) | |
b20.png [](/b20) [](/rarityyell) [](/rrarityyell) | |
b21.png [](/b21) [](/eeyup) [](/reeyup) | |
b22.png [](/b22) [](/takealetter) [](/rtakealetter) | |
b23.png [](/b23) [](/noooo) [](/rnoooo) | |
b24.png [](/b24) [](/squintyjack) [](/rsquintyjack) | |
b25.png [](/b25) [](/dumbfabric) [](/rdumbfabric) | |
b26.png [](/b26) [](/rarityannoyed) [](/rrarityannoyed) | |
b27.png [](/b27) [](/raritywhine) [](/rraritywhine) | |
b28.png [](/b28) [](/cockatrice) [](/rcockatrice) | |
b29.png [](/b29) [](/twirage) [](/rtwirage) | |
b30.png [](/b30) [](/fluttershy) [](/rfluttershy) | |
b31.png [](/b31) [](/rdsmile) [](/rrdsmile) | |
b32.png [](/b32) [](/rdwut) [](/rrdwut) | |
b33.png [](/b33) [](/dj) [](/rdj) [](/threedog) [](/rthreedog) | |
b34.png [](/b34) [](/spikepushy) [](/rspikepushy) | |
b35.png [](/b35) [](/raritywhy) [](/rraritywhy) | |
b36.png [](/b36) [](/soawesome) [](/rsoawesome) | |
b37.png [](/b37) [](/rdcool) [](/rrdcool) | |
b38.png [](/b38) [](/facehoof) [](/rfacehoof) | |
b39.png [](/b39) [](/ppseesyou) [](/rppseesyou) | |
c00.png [](/c00) [](/rdsitting) [](/rrdsitting) | |
c01.png [](/c01) [](/twismug) [](/rtwismug) | |
c02.png [](/c02) [](/ohhi) [](/rohhi) | |
c03.png [](/c03) [](/flutterblush) [](/rflutterblush) | |
c04.png [](/c04) [](/ajfrown) [](/rajfrown) | |
c05.png [](/c05) [](/raritysad) [](/rraritysad) | |
c06.png [](/c06) [](/louder) [](/rlouder) | |
c07.png [](/c07) [](/pinkamina) [](/rpinkamina) | |
c08.png [](/c08) [](/scootaloo) [](/rscootaloo) | |
c09.png [](/c09) [](/allmybits) [](/rallmybits) | |
c10.png [](/c10) [](/rdhappy) [](/rrdhappy) | |
c11.png [](/c11) [](/twismile) [](/rtwismile) | |
c12.png [](/c12) [](/party) [](/rparty) | |
c13.png [](/c13) [](/gross) [](/rgross) | |
c14.png [](/c14) [](/hmmm) [](/rhmmm) | |
c15.png [](/c15) [](/fabulous) [](/rfabulous) | |
c16.png [](/c16) [](/lunasad) [](/rlunasad) | |
c17.png [](/c17) [](/loveme) [](/rloveme) | |
c18.png [](/c18) [](/celestia) [](/rcelestia) | |
c19.png [](/c19) [](/zecora) [](/rzecora) | |
c20.png [](/c20) [](/rdannoyed) [](/rrdannoyed) | |
c21.png [](/c21) [](/twistare) [](/rtwistare) | |
c22.png [](/c22) [](/hahaha) [](/rhahaha) | |
c23.png [](/c23) [](/derpyhappy) [](/rderpyhappy) | |
c24.png [](/c24) [](/joy) [](/rjoy) | |
c25.png [](/c25) [](/derp) [](/rderp) | |
c26.png [](/c26) [](/derpyshock) [](/rderpyshock) | |
c27.png [](/c27) [](/lunagasp) [](/rlunagasp) | |
c28.png [](/c28) [](/angel) [](/rangel) | |
c29.png [](/c29) [](/photofinish) [](/rphotofinish) | |
a00.png [](/a00) [](/ajlie) [](/rajlie) | |
a10.png [](/a10) [](/priceless) [](/rpriceless) | |
a20.png [](/a20) [](/flutterjerk) [](/rflutterjerk) | |
a01.png [](/a01) [](/twipride) [](/rtwipride) | |
a11.png [](/a11) [](/celestiamad) [](/rcelestiamad) | |
a21.png [](/a21) [](/twicrazy) [](/rtwicrazy) | |
a02.png [](/a02) [](/lunateehee) [](/rlunateehee) | |
a12.png [](/a12) [](/lunawait) [](/rlunawait) | |
a22.png [](/a22) [](/paperbagderpy) [](/paperbagwizard) [](/derpwizard) [](/rpaperbagderpy) [](/rpaperbagwizard) [](/rderpwizard) | |
a03.png [](/a03) [](/ajhappy) [](/happlejack) | |
a13.png [](/a13) [](/ppfear) [](/pinkiefear) | |
a23.png [](/a23) [](/twibeam) | |
lyra.png [](/l00) [](/rl00) [](/lyra) | |
fillytgap.png [](/t00) [](/rt00) [](/fillytgap) [](/rfillytgap) | |
bonbon.png [](/bonbon) [](/rbonbon) | |
snails.png [](/snails) [](/rsnails) | |
rdhuh.png [](/rdhuh) [](/rrdhuh) | |
spitfire.png [](/spitfire) [](/rspitfire) | |
cutealoo.png [](/cutealoo) [](/rcutealoo) | |
happyluna.png [](/happyluna) [](/rhappyluna) [](/lunahappy) [](/rlunahappy) | |
sotrue.png [](/sotrue) [](/rsotrue) | |
wahaha.png [](/wahaha) [](/rwahaha) | |
sbstare.png [](/sbstare) [](/rsbstare) | |
berry.png [](/berry) [](/rberry) [](/punchdrunk) [](/rpunchdrunk) | |
absmile.png [](/absmile) [](/rabsmile) | |
huhhuh.png [](/huhhuh) [](/rhuhhuh) | |
dealwithit.png [](/dealwithit) [](/rdealwithit) | |
nmm.png [](/nmm) [](/blacksnooty) [](/rnmm) [](/rblacksnooty) [](/queenmeanie) [](/rqueenmeanie) [](/hokeysmokes) [](/rhokeysmokes) | |
whooves.png [](/whooves) [](/rwhooves) | |
rdsalute.png [](/rdsalute) [](/rrdsalute) | |
sbf.png [](/sbf) | |
crossfire.png [](/crossfire) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment