Commits

Frederic De Groef committed 8d699b0

added typography symbols, removed math and arrows, moved combos to their own tab

  • Participants
  • Parent commits 9ee10b6

Comments (0)

Files changed (2)

File scripts/make_popup_html.py

+# -*- coding: utf-8 -*-
 import os.path
 import unicodedata
 from jinja2 import Template, Environment, FileSystemLoader
 
+#[unicodedata.name(char) for char in u'(╯‵Д′)╯彡┻━┻']
+
 
 MOST_USED_NAMES = ['WHITE STAR', 'BLACK STAR',
                    'HEAVY CHECK MARK', 'HEAVY BALLOT X',
 
                    'KATAKANA LETTER TU', 'KATAKANA LETTER SI', 'KATAKANA LETTER SMALL TU',
 
-                   'LOWER SEVEN EIGHTHS BLOCK']
+                   'LOWER SEVEN EIGHTHS BLOCK', 'JAPANESE INDUSTRIAL STANDARD SYMBOL']
+
+
+
+TYPOGRAPHY_SYMBOLS = [
+    'DAGGER', 'DOUBLE DAGGER', 'DITTO MARK', 'INVERTED EXCLAMATION MARK', 'INVERTED QUESTION MARK',
+    'COMMERCIAL MINUS SIGN', 'PER MILLE SIGN', 'PER TEN THOUSAND SIGN', 'PILCROW SIGN',
+    'ASTERISM', 'DOWN TACK', 'UP TACK', 'THEREFORE', 'BECAUSE', 'INTERROBANG', 'REVERSED QUESTION MARK',
+    'LOZENGE', 'REFERENCE MARK',
+
+]
+
+
 
 DINGBATS_RANGE = (0x2701, 0x27FF)
 MISC_SYMBOLS_RANGE = (0x2600, 0x26FF)
             ('LOOK OF DISAPPROVAL', ('KANNADA LETTER TTHA', 'LOW LINE', 'KANNADA LETTER TTHA')),
             ('A WHALE THING', ('HIRAGANA LETTER DU', 'CIRCLED DOT OPERATOR', 'WAVY LOW LINE',
                                 'CIRCLED DOT OPERATOR', 'RIGHT PARENTHESIS', 'HIRAGANA LETTER DU')),
-            ('TABLE THROWING', ('LEFT PARENTHESIS',
+            ('JAPANESE TABLE THROWING', ('LEFT PARENTHESIS',
                                  'BOX DRAWINGS LIGHT ARC UP AND LEFT',
                                  'REVERSED PRIME',
                                  'CYRILLIC CAPITAL LETTER DE',
                                  'BOX DRAWINGS HEAVY UP AND HORIZONTAL',
                                  'BOX DRAWINGS HEAVY HORIZONTAL',
                                  'BOX DRAWINGS HEAVY UP AND HORIZONTAL')),
+    
+           ('TABLE THROWING', ('LEFT PARENTHESIS',
+                                  'BOX DRAWINGS LIGHT ARC UP AND LEFT',
+                                  'DEGREE SIGN',
+                                  'WHITE SQUARE',
+                                  'DEGREE SIGN',
+                                  'RIGHT PARENTHESIS',
+                                  'SPACE',
+                                  'BOX DRAWINGS LIGHT ARC UP AND LEFT',
+                                  'PRESENTATION FORM FOR VERTICAL LEFT PARENTHESIS',
+                                  'SPACE',
+                                  'BOX DRAWINGS HEAVY UP AND HORIZONTAL',
+                                  'BOX DRAWINGS HEAVY HORIZONTAL',
+                                  'BOX DRAWINGS HEAVY UP AND HORIZONTAL')),
+
 
             ('REDACTED', ['LOWER SEVEN EIGHTHS BLOCK']*7)
 ]
     dingbats_symbols = make_symbols_from_range(DINGBATS_RANGE)
     misc_symbols = make_symbols_from_range(MISC_SYMBOLS_RANGE)
     arrow_symbols = make_symbols_from_range(ARROWS_RANGE)
-    math_symbols = make_symbols_from_range(MATH_OPERATORS_RANGE)
+    #math_symbols = make_symbols_from_range(MATH_OPERATORS_RANGE)
+    typography_symbols = make_symbols_from_names(TYPOGRAPHY_SYMBOLS)
     
 
     all_symbols = [
-            ('dingbats', dingbats_symbols),
-            ('misc-symbols', misc_symbols),
-            ('arrows', arrow_symbols),
-            ('math-operators', math_symbols),
+        ('most-used', most_used_symbols),
+        ('typography', typography_symbols),
+        ('dingbats', dingbats_symbols),
+        ('misc-symbols', misc_symbols),
+        #('arrows', arrow_symbols),
+        #('math-operators', math_symbols),
     ]
 
 
 
     print('Generating chrome extension')
     chrome_popup_html = template.render(all_symbols=all_symbols,
-                                        most_used=most_used_symbols,
+                                        #most_used=most_used_symbols,
                                         combos=make_html_entity_strings_from_combos(COMBOS))
 
     with open(outfile, 'w') as f:

File scripts/templates/chrome_popup_template.html

     
         <div id="tabs" class="span-16">
             <ul>
-                <li><a href="#tabs-most-used">Most used </a></li>
-
                 {% for name, symbols in all_symbols %}
                     <li><a href="#tabs-{{ name }}"> {{ name|replace("-", " ")|capitalize }} </a></li>
                 {% endfor %}
+                <li><a href="#tabs-combos">Combos</a></li>
             </ul>
 
-            <div id="tabs-most-used" style="height: 350px; overflow-y: auto;">
-                <ul class="icons ui-widget ui-helper-clearfix">
-                    {% for title, decimal_value in most_used %}
-                    <li class="ui-state-default ui-corner-all" title="{{ title  }}">
-                        <span class="unicode-symbol">&#{{decimal_value}};</span>
-                    </li>
-                    {% endfor %}
-                </ul>
-                <br/>
-                <br/>
-
-                <h3>Combos:</h3>
-                <ul class="icons ui-widget ui-helper-clearfix">
-                    {% for title, html_string in combos %}
-                        <li class="ui-state-default ui-corner-all" title="{{ title  }}">
-                            <span class="unicode-symbol-combo">{{ html_string }}</span>
-                        </li>
-
-                    {% endfor %}
-                </ul>
-
-            </div>
-
 
             {% for name, symbols in all_symbols %}
                 <div id="tabs-{{ name }}" style="height: 350px; overflow-y: auto;">
                     </ul>
                 </div>
             {% endfor %}
-            
+
+
+            <div id="tabs-combos" style="height: 350px; overflow-y: auto;">
+
+                <ul class="icons ui-widget ui-helper-clearfix">
+                    {% for title, html_string in combos %}
+                        <li class="ui-state-default ui-corner-all" title="{{ title  }}">
+                            <span class="unicode-symbol-combo">{{ html_string }}</span>
+                        </li>
+
+                    {% endfor %}
+                </ul>
+            </div>
 
         </div>