emoji

emoji list in a C header
git clone https://noulin.net/git/emoji.git
Log | Files | Refs | README | LICENSE

removeImagesFromUnicodeHtml.c (740B)


      1 #! /usr/bin/env sheepy
      2 /* or direct path to sheepy: #! /usr/local/bin/sheepy */
      3 
      4 /* Libsheepy documentation: http://spartatek.se/libsheepy/ */
      5 #include "libsheepyObject.h"
      6 
      7 int argc; char **argv;
      8 
      9 /* enable/disable logging */
     10 /* #undef pLog */
     11 /* #define pLog(...) */
     12 
     13 int main(int ARGC, char** ARGV) {
     14 
     15   argc = ARGC; argv = ARGV;
     16 
     17   initLibsheepy(ARGV[0]);
     18   setLogMode(LOG_DATE);
     19 
     20   char *html = readFileG(rtChar, "full-emoji-list.html");
     21   var spl = splitG(html, "<img");
     22   free(html);
     23 
     24   forEachCharP(spl, h) {
     25     var img_l = splitG(*h, ">");
     26     free(*h);
     27     setG(img_l, 0, "");
     28     *h = joinG(img_l, ">");
     29   }
     30 
     31   var nobin = joinG(spl,"<img");
     32 
     33   writeFileG(nobin, "full-emoji-list-nobin.html");
     34 }
     35 // vim: set expandtab ts=2 sw=2: