diff --git a/awk/emoji.awk b/awk/emoji.awk index 2324174..d27f212 100644 --- a/awk/emoji.awk +++ b/awk/emoji.awk @@ -1,831 +1,15 @@ BEGIN { - map[":+1:"] = "๐Ÿ‘" - map[":100:"] = "๐Ÿ’ฏ" - map[":1234:"] = "๐Ÿ”ข" - map[":8ball:"] = "๐ŸŽฑ" - map[":a:"] = "๐Ÿ…ฐ๏ธ" - map[":ab:"] = "๐Ÿ†Ž" - map[":abc:"] = "๐Ÿ”ค" - map[":abcd:"] = "๐Ÿ”ก" - map[":accept:"] = "๐Ÿ‰‘" - map[":aerial_tramway:"] = "๐Ÿšก" - map[":airplane:"] = "โœˆ๏ธ" - map[":alarm_clock:"] = "โฐ" - map[":alien:"] = "๐Ÿ‘ฝ" - map[":ambulance:"] = "๐Ÿš‘" - map[":anchor:"] = "โš“" - map[":angel:"] = "๐Ÿ‘ผ" - map[":anger:"] = "๐Ÿ’ข" - map[":angry:"] = "๐Ÿ˜ " - map[":anguished:"] = "๐Ÿ˜ง" - map[":ant:"] = "๐Ÿœ" - map[":apple:"] = "๐ŸŽ" - map[":aquarius:"] = "โ™’" - map[":aries:"] = "โ™ˆ" - map[":arrow_backward:"] = "โ—€๏ธ" - map[":arrow_double_down:"] = "โฌ" - map[":arrow_double_up:"] = "โซ" - map[":arrow_down:"] = "โฌ‡๏ธ" - map[":arrow_down_small:"] = "๐Ÿ”ฝ" - map[":arrow_forward:"] = "โ–ถ๏ธ" - map[":arrow_heading_down:"] = "โคต๏ธ" - map[":arrow_heading_up:"] = "โคด๏ธ" - map[":arrow_left:"] = "โฌ…๏ธ" - map[":arrow_lower_left:"] = "โ†™๏ธ" - map[":arrow_lower_right:"] = "โ†˜๏ธ" - map[":arrow_right:"] = "โžก๏ธ" - map[":arrow_right_hook:"] = "โ†ช๏ธ" - map[":arrow_up:"] = "โฌ†๏ธ" - map[":arrow_up_down:"] = "โ†•๏ธ" - map[":arrow_up_small:"] = "๐Ÿ”ผ" - map[":arrow_upper_left:"] = "โ†–๏ธ" - map[":arrow_upper_right:"] = "โ†—๏ธ" - map[":arrows_clockwise:"] = "๐Ÿ”ƒ" - map[":arrows_counterclockwise:"] = "๐Ÿ”„" - map[":art:"] = "๐ŸŽจ" - map[":articulated_lorry:"] = "๐Ÿš›" - map[":astonished:"] = "๐Ÿ˜ฒ" - map[":atm:"] = "๐Ÿง" - map[":b:"] = "๐Ÿ…ฑ๏ธ" - map[":baby:"] = "๐Ÿ‘ถ" - map[":baby_bottle:"] = "๐Ÿผ" - map[":baby_chick:"] = "๐Ÿค" - map[":baby_symbol:"] = "๐Ÿšผ" - map[":baggage_claim:"] = "๐Ÿ›„" - map[":balloon:"] = "๐ŸŽˆ" - map[":ballot_box_with_check:"] = "โ˜‘๏ธ" - map[":bamboo:"] = "๐ŸŽ" - map[":banana:"] = "๐ŸŒ" - map[":bangbang:"] = "โ€ผ๏ธ" - map[":bank:"] = "๐Ÿฆ" - map[":bar_chart:"] = "๐Ÿ“Š" - map[":barber:"] = "๐Ÿ’ˆ" - map[":baseball:"] = "โšพ" - map[":basketball:"] = "๐Ÿ€" - map[":bath:"] = "๐Ÿ›€" - map[":bathtub:"] = "๐Ÿ›" - map[":battery:"] = "๐Ÿ”‹" - map[":bear:"] = "๐Ÿป" - map[":beer:"] = "๐Ÿบ" - map[":beers:"] = "๐Ÿป" - map[":beetle:"] = "๐Ÿชฒ" - map[":beginner:"] = "๐Ÿ”ฐ" - map[":bell:"] = "๐Ÿ””" - map[":bento:"] = "๐Ÿฑ" - map[":bicyclist:"] = "๐Ÿšด" - map[":bike:"] = "๐Ÿšฒ" - map[":bikini:"] = "๐Ÿ‘™" - map[":bird:"] = "๐Ÿฆ" - map[":birthday:"] = "๐ŸŽ‚" - map[":black_circle:"] = "โšซ" - map[":black_joker:"] = "๐Ÿƒ" - map[":black_nib:"] = "โœ’๏ธ" - map[":black_square_button:"] = "๐Ÿ”ฒ" - map[":blossom:"] = "๐ŸŒผ" - map[":blowfish:"] = "๐Ÿก" - map[":blue_book:"] = "๐Ÿ“˜" - map[":blue_car:"] = "๐Ÿš™" - map[":blue_heart:"] = "๐Ÿ’™" - map[":blush:"] = "๐Ÿ˜Š" - map[":boar:"] = "๐Ÿ—" - map[":boat:"] = "โ›ต" - map[":bomb:"] = "๐Ÿ’ฃ" - map[":book:"] = "๐Ÿ“–" - map[":bookmark:"] = "๐Ÿ”–" - map[":bookmark_tabs:"] = "๐Ÿ“‘" - map[":books:"] = "๐Ÿ“š" - map[":boom:"] = "๐Ÿ’ฅ" - map[":boot:"] = "๐Ÿ‘ข" - map[":bouquet:"] = "๐Ÿ’" - map[":bow:"] = "๐Ÿ™‡" - map[":bowling:"] = "๐ŸŽณ" - map[":boy:"] = "๐Ÿ‘ฆ" - map[":bread:"] = "๐Ÿž" - map[":bride_with_veil:"] = "๐Ÿ‘ฐโ€โ™€๏ธ" - map[":bridge_at_night:"] = "๐ŸŒ‰" - map[":briefcase:"] = "๐Ÿ’ผ" - map[":broken_heart:"] = "๐Ÿ’”" - map[":bug:"] = "๐Ÿ›" - map[":bulb:"] = "๐Ÿ’ก" - map[":bullettrain_front:"] = "๐Ÿš…" - map[":bullettrain_side:"] = "๐Ÿš„" - map[":bus:"] = "๐ŸšŒ" - map[":busstop:"] = "๐Ÿš" - map[":bust_in_silhouette:"] = "๐Ÿ‘ค" - map[":busts_in_silhouette:"] = "๐Ÿ‘ฅ" - map[":cactus:"] = "๐ŸŒต" - map[":cake:"] = "๐Ÿฐ" - map[":calendar:"] = "๐Ÿ“†" - map[":calling:"] = "๐Ÿ“ฒ" - map[":camel:"] = "๐Ÿซ" - map[":camera:"] = "๐Ÿ“ท" - map[":cancer:"] = "โ™‹" - map[":candy:"] = "๐Ÿฌ" - map[":capital_abcd:"] = "๐Ÿ” " - map[":capricorn:"] = "โ™‘" - map[":car:"] = "๐Ÿš—" - map[":card_index:"] = "๐Ÿ“‡" - map[":carousel_horse:"] = "๐ŸŽ " - map[":cat2:"] = "๐Ÿˆ" - map[":cat:"] = "๐Ÿฑ" - map[":cd:"] = "๐Ÿ’ฟ" - map[":chart:"] = "๐Ÿ’น" - map[":chart_with_downwards_trend:"] = "๐Ÿ“‰" - map[":chart_with_upwards_trend:"] = "๐Ÿ“ˆ" - map[":checkered_flag:"] = "๐Ÿ" - map[":cherries:"] = "๐Ÿ’" - map[":cherry_blossom:"] = "๐ŸŒธ" - map[":chestnut:"] = "๐ŸŒฐ" - map[":chicken:"] = "๐Ÿ”" - map[":children_crossing:"] = "๐Ÿšธ" - map[":chocolate_bar:"] = "๐Ÿซ" - map[":christmas_tree:"] = "๐ŸŽ„" - map[":church:"] = "โ›ช" - map[":cinema:"] = "๐ŸŽฆ" - map[":circus_tent:"] = "๐ŸŽช" - map[":city_sunrise:"] = "๐ŸŒ‡" - map[":city_sunset:"] = "๐ŸŒ†" - map[":cl:"] = "๐Ÿ†‘" - map[":clap:"] = "๐Ÿ‘" - map[":clapper:"] = "๐ŸŽฌ" - map[":clipboard:"] = "๐Ÿ“‹" - map[":clock1030:"] = "๐Ÿ•ฅ" - map[":clock10:"] = "๐Ÿ•™" - map[":clock1130:"] = "๐Ÿ•ฆ" - map[":clock11:"] = "๐Ÿ•š" - map[":clock1230:"] = "๐Ÿ•ง" - map[":clock12:"] = "๐Ÿ•›" - map[":clock130:"] = "๐Ÿ•œ" - map[":clock1:"] = "๐Ÿ•" - map[":clock230:"] = "๐Ÿ•" - map[":clock2:"] = "๐Ÿ•‘" - map[":clock330:"] = "๐Ÿ•ž" - map[":clock3:"] = "๐Ÿ•’" - map[":clock430:"] = "๐Ÿ•Ÿ" - map[":clock4:"] = "๐Ÿ•“" - map[":clock530:"] = "๐Ÿ• " - map[":clock5:"] = "๐Ÿ•”" - map[":clock630:"] = "๐Ÿ•ก" - map[":clock6:"] = "๐Ÿ••" - map[":clock730:"] = "๐Ÿ•ข" - map[":clock7:"] = "๐Ÿ•–" - map[":clock830:"] = "๐Ÿ•ฃ" - map[":clock8:"] = "๐Ÿ•—" - map[":clock930:"] = "๐Ÿ•ค" - map[":clock9:"] = "๐Ÿ•˜" - map[":closed_book:"] = "๐Ÿ“•" - map[":closed_lock_with_key:"] = "๐Ÿ”" - map[":closed_umbrella:"] = "๐ŸŒ‚" - map[":cloud:"] = "โ˜๏ธ" - map[":clubs:"] = "โ™ฃ๏ธ" - map[":cn:"] = "๐Ÿ‡จ๐Ÿ‡ณ" - map[":cocktail:"] = "๐Ÿธ" - map[":coffee:"] = "โ˜•" - map[":cold_sweat:"] = "๐Ÿ˜ฐ" - map[":computer:"] = "๐Ÿ’ป" - map[":confetti_ball:"] = "๐ŸŽŠ" - map[":confounded:"] = "๐Ÿ˜–" - map[":confused:"] = "๐Ÿ˜•" - map[":congratulations:"] = "ใŠ—๏ธ" - map[":construction:"] = "๐Ÿšง" - map[":construction_worker:"] = "๐Ÿ‘ท" - map[":convenience_store:"] = "๐Ÿช" - map[":cookie:"] = "๐Ÿช" - map[":cool:"] = "๐Ÿ†’" - map[":cop:"] = "๐Ÿ‘ฎ" - map[":copyright:"] = "ยฉ๏ธ" - map[":corn:"] = "๐ŸŒฝ" - map[":couple:"] = "๐Ÿ‘ซ" - map[":couple_with_heart:"] = "๐Ÿ’‘" - map[":couplekiss:"] = "๐Ÿ’" - map[":cow2:"] = "๐Ÿ„" - map[":cow:"] = "๐Ÿฎ" - map[":credit_card:"] = "๐Ÿ’ณ" - map[":crocodile:"] = "๐ŸŠ" - map[":crossed_flags:"] = "๐ŸŽŒ" - map[":crown:"] = "๐Ÿ‘‘" - map[":cry:"] = "๐Ÿ˜ข" - map[":crying_cat_face:"] = "๐Ÿ˜ฟ" - map[":crystal_ball:"] = "๐Ÿ”ฎ" - map[":cupid:"] = "๐Ÿ’˜" - map[":curly_loop:"] = "โžฐ" - map[":currency_exchange:"] = "๐Ÿ’ฑ" - map[":curry:"] = "๐Ÿ›" - map[":custard:"] = "๐Ÿฎ" - map[":customs:"] = "๐Ÿ›ƒ" - map[":cyclone:"] = "๐ŸŒ€" - map[":dancer:"] = "๐Ÿ’ƒ" - map[":dancers:"] = "๐Ÿ‘ฏ" - map[":dango:"] = "๐Ÿก" - map[":dart:"] = "๐ŸŽฏ" - map[":dash:"] = "๐Ÿ’จ" - map[":date:"] = "๐Ÿ“…" - map[":de:"] = "๐Ÿ‡ฉ๐Ÿ‡ช" - map[":deciduous_tree:"] = "๐ŸŒณ" - map[":department_store:"] = "๐Ÿฌ" - map[":diamond_shape_with_a_dot_inside:"] = "๐Ÿ’ " - map[":diamonds:"] = "โ™ฆ๏ธ" - map[":disappointed:"] = "๐Ÿ˜ž" - map[":disappointed_relieved:"] = "๐Ÿ˜ฅ" - map[":dizzy:"] = "๐Ÿ’ซ" - map[":dizzy_face:"] = "๐Ÿ˜ต" - map[":do_not_litter:"] = "๐Ÿšฏ" - map[":dog2:"] = "๐Ÿ•" - map[":dog:"] = "๐Ÿถ" - map[":dollar:"] = "๐Ÿ’ต" - map[":dolls:"] = "๐ŸŽŽ" - map[":dolphin:"] = "๐Ÿฌ" - map[":door:"] = "๐Ÿšช" - map[":doughnut:"] = "๐Ÿฉ" - map[":dragon:"] = "๐Ÿ‰" - map[":dragon_face:"] = "๐Ÿฒ" - map[":dress:"] = "๐Ÿ‘—" - map[":dromedary_camel:"] = "๐Ÿช" - map[":droplet:"] = "๐Ÿ’ง" - map[":dvd:"] = "๐Ÿ“€" - map[":ear:"] = "๐Ÿ‘‚" - map[":ear_of_rice:"] = "๐ŸŒพ" - map[":earth_africa:"] = "๐ŸŒ" - map[":earth_americas:"] = "๐ŸŒŽ" - map[":earth_asia:"] = "๐ŸŒ" - map[":egg:"] = "๐Ÿฅš" - map[":eggplant:"] = "๐Ÿ†" - map[":eight:"] = "8๏ธโƒฃ" - map[":eight_pointed_black_star:"] = "โœด๏ธ" - map[":eight_spoked_asterisk:"] = "โœณ๏ธ" - map[":electric_plug:"] = "๐Ÿ”Œ" - map[":elephant:"] = "๐Ÿ˜" - map[":email:"] = "๐Ÿ“ง" - map[":end:"] = "๐Ÿ”š" - map[":envelope:"] = "โœ‰๏ธ" - map[":es:"] = "๐Ÿ‡ช๐Ÿ‡ธ" - map[":euro:"] = "๐Ÿ’ถ" - map[":european_castle:"] = "๐Ÿฐ" - map[":european_post_office:"] = "๐Ÿค" - map[":evergreen_tree:"] = "๐ŸŒฒ" - map[":exclamation:"] = "โ—" - map[":expressionless:"] = "๐Ÿ˜‘" - map[":eyeglasses:"] = "๐Ÿ‘“" - map[":eyes:"] = "๐Ÿ‘€" - map[":factory:"] = "๐Ÿญ" - map[":fallen_leaf:"] = "๐Ÿ‚" - map[":family:"] = "๐Ÿ‘ช" - map[":fast_forward:"] = "โฉ" - map[":fax:"] = "๐Ÿ“ " - map[":fearful:"] = "๐Ÿ˜จ" - map[":feet:"] = "๐Ÿพ" - map[":ferris_wheel:"] = "๐ŸŽก" - map[":file_folder:"] = "๐Ÿ“" - map[":fire:"] = "๐Ÿ”ฅ" - map[":fire_engine:"] = "๐Ÿš’" - map[":fireworks:"] = "๐ŸŽ†" - map[":first_quarter_moon:"] = "๐ŸŒ“" - map[":first_quarter_moon_with_face:"] = "๐ŸŒ›" - map[":fish:"] = "๐ŸŸ" - map[":fish_cake:"] = "๐Ÿฅ" - map[":fishing_pole_and_fish:"] = "๐ŸŽฃ" - map[":fist:"] = "โœŠ" - map[":five:"] = "5๏ธโƒฃ" - map[":flags:"] = "๐ŸŽ" - map[":flashlight:"] = "๐Ÿ”ฆ" - map[":floppy_disk:"] = "๐Ÿ’พ" - map[":flower_playing_cards:"] = "๐ŸŽด" - map[":flushed:"] = "๐Ÿ˜ณ" - map[":foggy:"] = "๐ŸŒ" - map[":football:"] = "๐Ÿˆ" - map[":fork_and_knife:"] = "๐Ÿด" - map[":fountain:"] = "โ›ฒ" - map[":four:"] = "4๏ธโƒฃ" - map[":four_leaf_clover:"] = "๐Ÿ€" - map[":fr:"] = "๐Ÿ‡ซ๐Ÿ‡ท" - map[":free:"] = "๐Ÿ†“" - map[":fried_shrimp:"] = "๐Ÿค" - map[":fries:"] = "๐ŸŸ" - map[":frog:"] = "๐Ÿธ" - map[":frowning:"] = "๐Ÿ˜ฆ" - map[":fuelpump:"] = "โ›ฝ" - map[":full_moon:"] = "๐ŸŒ•" - map[":full_moon_with_face:"] = "๐ŸŒ" - map[":game_die:"] = "๐ŸŽฒ" - map[":gem:"] = "๐Ÿ’Ž" - map[":gemini:"] = "โ™Š" - map[":ghost:"] = "๐Ÿ‘ป" - map[":gift:"] = "๐ŸŽ" - map[":gift_heart:"] = "๐Ÿ’" - map[":girl:"] = "๐Ÿ‘ง" - map[":globe_with_meridians:"] = "๐ŸŒ" - map[":goat:"] = "๐Ÿ" - map[":golf:"] = "โ›ณ" - map[":grapes:"] = "๐Ÿ‡" - map[":green_apple:"] = "๐Ÿ" - map[":green_book:"] = "๐Ÿ“—" - map[":green_heart:"] = "๐Ÿ’š" - map[":grey_exclamation:"] = "โ•" - map[":grey_question:"] = "โ”" - map[":grimacing:"] = "๐Ÿ˜ฌ" - map[":grin:"] = "๐Ÿ˜" - map[":grinning:"] = "๐Ÿ˜€" - map[":guardsman:"] = "๐Ÿ’‚โ€โ™‚๏ธ" - map[":guitar:"] = "๐ŸŽธ" - map[":gun:"] = "๐Ÿ”ซ" - map[":haircut:"] = "๐Ÿ’‡" - map[":hamburger:"] = "๐Ÿ”" - map[":hammer:"] = "๐Ÿ”จ" - map[":hamster:"] = "๐Ÿน" - map[":handbag:"] = "๐Ÿ‘œ" - map[":hankey:"] = "๐Ÿ’ฉ" - map[":hash:"] = "#๏ธโƒฃ" - map[":hatched_chick:"] = "๐Ÿฅ" - map[":hatching_chick:"] = "๐Ÿฃ" - map[":headphones:"] = "๐ŸŽง" - map[":hear_no_evil:"] = "๐Ÿ™‰" - map[":heart:"] = "โค๏ธ" - map[":heart_decoration:"] = "๐Ÿ’Ÿ" - map[":heart_eyes:"] = "๐Ÿ˜" - map[":heart_eyes_cat:"] = "๐Ÿ˜ป" - map[":heartbeat:"] = "๐Ÿ’“" - map[":hearts:"] = "โ™ฅ๏ธ" - map[":heavy_check_mark:"] = "โœ”๏ธ" - map[":heavy_division_sign:"] = "โž—" - map[":heavy_dollar_sign:"] = "๐Ÿ’ฒ" - map[":heavy_minus_sign:"] = "โž–" - map[":heavy_multiplication_x:"] = "โœ–๏ธ" - map[":heavy_plus_sign:"] = "โž•" - map[":helicopter:"] = "๐Ÿš" - map[":herb:"] = "๐ŸŒฟ" - map[":hibiscus:"] = "๐ŸŒบ" - map[":high_brightness:"] = "๐Ÿ”†" - map[":high_heel:"] = "๐Ÿ‘ " - map[":honey_pot:"] = "๐Ÿฏ" - map[":horse:"] = "๐Ÿด" - map[":horse_racing:"] = "๐Ÿ‡" - map[":hospital:"] = "๐Ÿฅ" - map[":hotel:"] = "๐Ÿจ" - map[":hotsprings:"] = "โ™จ๏ธ" - map[":hourglass:"] = "โŒ›" - map[":hourglass_flowing_sand:"] = "โณ" - map[":house:"] = "๐Ÿ " - map[":house_with_garden:"] = "๐Ÿก" - map[":hushed:"] = "๐Ÿ˜ฏ" - map[":ice_cream:"] = "๐Ÿจ" - map[":icecream:"] = "๐Ÿฆ" - map[":id:"] = "๐Ÿ†”" - map[":ideograph_advantage:"] = "๐Ÿ‰" - map[":imp:"] = "๐Ÿ‘ฟ" - map[":inbox_tray:"] = "๐Ÿ“ฅ" - map[":incoming_envelope:"] = "๐Ÿ“จ" - map[":information_desk_person:"] = "๐Ÿ’" - map[":information_source:"] = "โ„น๏ธ" - map[":innocent:"] = "๐Ÿ˜‡" - map[":interrobang:"] = "โ‰๏ธ" - map[":iphone:"] = "๐Ÿ“ฑ" - map[":it:"] = "๐Ÿ‡ฎ๐Ÿ‡น" - map[":izakaya_lantern:"] = "๐Ÿฎ" - map[":jack_o_lantern:"] = "๐ŸŽƒ" - map[":japan:"] = "๐Ÿ—พ" - map[":japanese_castle:"] = "๐Ÿฏ" - map[":japanese_goblin:"] = "๐Ÿ‘บ" - map[":japanese_ogre:"] = "๐Ÿ‘น" - map[":jeans:"] = "๐Ÿ‘–" - map[":joy:"] = "๐Ÿ˜‚" - map[":joy_cat:"] = "๐Ÿ˜น" - map[":jp:"] = "๐Ÿ‡ฏ๐Ÿ‡ต" - map[":key:"] = "๐Ÿ”‘" - map[":keycap_ten:"] = "๐Ÿ”Ÿ" - map[":kimono:"] = "๐Ÿ‘˜" - map[":kiss:"] = "๐Ÿ’‹" - map[":kissing:"] = "๐Ÿ˜—" - map[":kissing_cat:"] = "๐Ÿ˜ฝ" - map[":kissing_closed_eyes:"] = "๐Ÿ˜š" - map[":kissing_heart:"] = "๐Ÿ˜˜" - map[":kissing_smiling_eyes:"] = "๐Ÿ˜™" - map[":koala:"] = "๐Ÿจ" - map[":koko:"] = "๐Ÿˆ" - map[":kr:"] = "๐Ÿ‡ฐ๐Ÿ‡ท" - map[":large_blue_diamond:"] = "๐Ÿ”ท" - map[":large_orange_diamond:"] = "๐Ÿ”ถ" - map[":last_quarter_moon:"] = "๐ŸŒ—" - map[":last_quarter_moon_with_face:"] = "๐ŸŒœ" - map[":laughing:"] = "๐Ÿ˜†" - map[":leaves:"] = "๐Ÿƒ" - map[":ledger:"] = "๐Ÿ“’" - map[":left_luggage:"] = "๐Ÿ›…" - map[":left_right_arrow:"] = "โ†”๏ธ" - map[":leftwards_arrow_with_hook:"] = "โ†ฉ๏ธ" - map[":lemon:"] = "๐Ÿ‹" - map[":leo:"] = "โ™Œ" - map[":leopard:"] = "๐Ÿ†" - map[":libra:"] = "โ™Ž" - map[":light_rail:"] = "๐Ÿšˆ" - map[":link:"] = "๐Ÿ”—" - map[":lips:"] = "๐Ÿ‘„" - map[":lipstick:"] = "๐Ÿ’„" - map[":lock:"] = "๐Ÿ”’" - map[":lock_with_ink_pen:"] = "๐Ÿ”" - map[":lollipop:"] = "๐Ÿญ" - map[":loop:"] = "โžฟ" - map[":loudspeaker:"] = "๐Ÿ“ข" - map[":love_hotel:"] = "๐Ÿฉ" - map[":love_letter:"] = "๐Ÿ’Œ" - map[":low_brightness:"] = "๐Ÿ”…" - map[":m:"] = "โ“‚๏ธ" - map[":mag:"] = "๐Ÿ”" - map[":mag_right:"] = "๐Ÿ”Ž" - map[":mahjong:"] = "๐Ÿ€„" - map[":mailbox:"] = "๐Ÿ“ซ" - map[":mailbox_closed:"] = "๐Ÿ“ช" - map[":mailbox_with_mail:"] = "๐Ÿ“ฌ" - map[":mailbox_with_no_mail:"] = "๐Ÿ“ญ" - map[":man:"] = "๐Ÿ‘จ" - map[":man_with_gua_pi_mao:"] = "๐Ÿ‘ฒ" - map[":man_with_turban:"] = "๐Ÿ‘ณโ€โ™‚๏ธ" - map[":mans_shoe:"] = "๐Ÿ‘ž" - map[":maple_leaf:"] = "๐Ÿ" - map[":mask:"] = "๐Ÿ˜ท" - map[":massage:"] = "๐Ÿ’†" - map[":meat_on_bone:"] = "๐Ÿ–" - map[":mega:"] = "๐Ÿ“ฃ" - map[":melon:"] = "๐Ÿˆ" - map[":memo:"] = "๐Ÿ“" - map[":mens:"] = "๐Ÿšน" - map[":metal:"] = "๐Ÿค˜" - map[":metro:"] = "๐Ÿš‡" - map[":microphone:"] = "๐ŸŽค" - map[":microscope:"] = "๐Ÿ”ฌ" - map[":milky_way:"] = "๐ŸŒŒ" - map[":minibus:"] = "๐Ÿš" - map[":minidisc:"] = "๐Ÿ’ฝ" - map[":mobile_phone_off:"] = "๐Ÿ“ด" - map[":money_with_wings:"] = "๐Ÿ’ธ" - map[":moneybag:"] = "๐Ÿ’ฐ" - map[":monkey:"] = "๐Ÿ’" - map[":monkey_face:"] = "๐Ÿต" - map[":monorail:"] = "๐Ÿš" - map[":mortar_board:"] = "๐ŸŽ“" - map[":mount_fuji:"] = "๐Ÿ—ป" - map[":mountain_bicyclist:"] = "๐Ÿšต" - map[":mountain_cableway:"] = "๐Ÿš " - map[":mountain_railway:"] = "๐Ÿšž" - map[":mouse2:"] = "๐Ÿ" - map[":mouse:"] = "๐Ÿญ" - map[":movie_camera:"] = "๐ŸŽฅ" - map[":moyai:"] = "๐Ÿ—ฟ" - map[":muscle:"] = "๐Ÿ’ช" - map[":mushroom:"] = "๐Ÿ„" - map[":musical_keyboard:"] = "๐ŸŽน" - map[":musical_note:"] = "๐ŸŽต" - map[":musical_score:"] = "๐ŸŽผ" - map[":mute:"] = "๐Ÿ”‡" - map[":nail_care:"] = "๐Ÿ’…" - map[":name_badge:"] = "๐Ÿ“›" - map[":necktie:"] = "๐Ÿ‘”" - map[":negative_squared_cross_mark:"] = "โŽ" - map[":neutral_face:"] = "๐Ÿ˜" - map[":new:"] = "๐Ÿ†•" - map[":new_moon:"] = "๐ŸŒ‘" - map[":new_moon_with_face:"] = "๐ŸŒš" - map[":newspaper:"] = "๐Ÿ“ฐ" - map[":ng:"] = "๐Ÿ†–" - map[":nine:"] = "9๏ธโƒฃ" - map[":no_bell:"] = "๐Ÿ”•" - map[":no_bicycles:"] = "๐Ÿšณ" - map[":no_entry:"] = "โ›”" - map[":no_entry_sign:"] = "๐Ÿšซ" - map[":no_good:"] = "๐Ÿ™…" - map[":no_mobile_phones:"] = "๐Ÿ“ต" - map[":no_mouth:"] = "๐Ÿ˜ถ" - map[":no_pedestrians:"] = "๐Ÿšท" - map[":no_smoking:"] = "๐Ÿšญ" - map[":nose:"] = "๐Ÿ‘ƒ" - map[":notebook:"] = "๐Ÿ““" - map[":notebook_with_decorative_cover:"] = "๐Ÿ“”" - map[":notes:"] = "๐ŸŽถ" - map[":nut_and_bolt:"] = "๐Ÿ”ฉ" - map[":o2:"] = "๐Ÿ…พ๏ธ" - map[":o:"] = "โญ•" - map[":ocean:"] = "๐ŸŒŠ" - map[":octopus:"] = "๐Ÿ™" - map[":oden:"] = "๐Ÿข" - map[":office:"] = "๐Ÿข" - map[":ok:"] = "๐Ÿ†—" - map[":ok_hand:"] = "๐Ÿ‘Œ" - map[":ok_woman:"] = "๐Ÿ™†โ€โ™€๏ธ" - map[":older_man:"] = "๐Ÿ‘ด" - map[":older_woman:"] = "๐Ÿ‘ต" - map[":on:"] = "๐Ÿ”›" - map[":oncoming_automobile:"] = "๐Ÿš˜" - map[":oncoming_bus:"] = "๐Ÿš" - map[":oncoming_police_car:"] = "๐Ÿš”" - map[":oncoming_taxi:"] = "๐Ÿš–" - map[":one:"] = "1๏ธโƒฃ" - map[":open_file_folder:"] = "๐Ÿ“‚" - map[":open_hands:"] = "๐Ÿ‘" - map[":open_mouth:"] = "๐Ÿ˜ฎ" - map[":ophiuchus:"] = "โ›Ž" - map[":orange_book:"] = "๐Ÿ“™" - map[":outbox_tray:"] = "๐Ÿ“ค" - map[":ox:"] = "๐Ÿ‚" - map[":page_facing_up:"] = "๐Ÿ“„" - map[":page_with_curl:"] = "๐Ÿ“ƒ" - map[":pager:"] = "๐Ÿ“Ÿ" - map[":palm_tree:"] = "๐ŸŒด" - map[":panda_face:"] = "๐Ÿผ" - map[":paperclip:"] = "๐Ÿ“Ž" - map[":parking:"] = "๐Ÿ…ฟ๏ธ" - map[":part_alternation_mark:"] = "ใ€ฝ๏ธ" - map[":partly_sunny:"] = "โ›…" - map[":passport_control:"] = "๐Ÿ›‚" - map[":paw_prints:"] = "๐Ÿพ" - map[":peach:"] = "๐Ÿ‘" - map[":pear:"] = "๐Ÿ" - map[":pencil2:"] = "โœ๏ธ" - map[":pencil:"] = "๐Ÿ“" - map[":penguin:"] = "๐Ÿง" - map[":pensive:"] = "๐Ÿ˜”" - map[":performing_arts:"] = "๐ŸŽญ" - map[":persevere:"] = "๐Ÿ˜ฃ" - map[":pig2:"] = "๐Ÿ–" - map[":pig:"] = "๐Ÿท" - map[":pig_nose:"] = "๐Ÿฝ" - map[":pill:"] = "๐Ÿ’Š" - map[":pineapple:"] = "๐Ÿ" - map[":pisces:"] = "โ™“" - map[":pizza:"] = "๐Ÿ•" - map[":point_down:"] = "๐Ÿ‘‡" - map[":point_left:"] = "๐Ÿ‘ˆ" - map[":point_right:"] = "๐Ÿ‘‰" - map[":point_up:"] = "โ˜๏ธ" - map[":point_up_2:"] = "๐Ÿ‘†" - map[":police_car:"] = "๐Ÿš“" - map[":poodle:"] = "๐Ÿฉ" - map[":poop:"] = "๐Ÿ’ฉ" - map[":post_office:"] = "๐Ÿฃ" - map[":postal_horn:"] = "๐Ÿ“ฏ" - map[":postbox:"] = "๐Ÿ“ฎ" - map[":potable_water:"] = "๐Ÿšฐ" - map[":pouch:"] = "๐Ÿ‘" - map[":poultry_leg:"] = "๐Ÿ—" - map[":pound:"] = "๐Ÿ’ท" - map[":pouting_cat:"] = "๐Ÿ˜พ" - map[":pray:"] = "๐Ÿ™" - map[":princess:"] = "๐Ÿ‘ธ" - map[":punch:"] = "๐Ÿ‘Š" - map[":purple_heart:"] = "๐Ÿ’œ" - map[":purse:"] = "๐Ÿ‘›" - map[":pushpin:"] = "๐Ÿ“Œ" - map[":put_litter_in_its_place:"] = "๐Ÿšฎ" - map[":question:"] = "โ“" - map[":rabbit2:"] = "๐Ÿ‡" - map[":rabbit:"] = "๐Ÿฐ" - map[":racehorse:"] = "๐ŸŽ" - map[":radio:"] = "๐Ÿ“ป" - map[":radio_button:"] = "๐Ÿ”˜" - map[":rage:"] = "๐Ÿ˜ก" - map[":railway_car:"] = "๐Ÿšƒ" - map[":rainbow:"] = "๐ŸŒˆ" - map[":raised_hand:"] = "โœ‹" - map[":raised_hands:"] = "๐Ÿ™Œ" - map[":raising_hand:"] = "๐Ÿ™‹" - map[":ram:"] = "๐Ÿ" - map[":ramen:"] = "๐Ÿœ" - map[":rat:"] = "๐Ÿ€" - map[":recycle:"] = "โ™ป๏ธ" - map[":red_car:"] = "๐Ÿš—" - map[":red_circle:"] = "๐Ÿ”ด" - map[":registered:"] = "ยฎ๏ธ" - map[":relaxed:"] = "โ˜บ๏ธ" - map[":relieved:"] = "๐Ÿ˜Œ" - map[":repeat:"] = "๐Ÿ”" - map[":repeat_one:"] = "๐Ÿ”‚" - map[":restroom:"] = "๐Ÿšป" - map[":revolving_hearts:"] = "๐Ÿ’ž" - map[":rewind:"] = "โช" - map[":ribbon:"] = "๐ŸŽ€" - map[":rice:"] = "๐Ÿš" - map[":rice_ball:"] = "๐Ÿ™" - map[":rice_cracker:"] = "๐Ÿ˜" - map[":rice_scene:"] = "๐ŸŽ‘" - map[":ring:"] = "๐Ÿ’" - map[":rocket:"] = "๐Ÿš€" - map[":roller_coaster:"] = "๐ŸŽข" - map[":rooster:"] = "๐Ÿ“" - map[":rose:"] = "๐ŸŒน" - map[":rotating_light:"] = "๐Ÿšจ" - map[":round_pushpin:"] = "๐Ÿ“" - map[":rowboat:"] = "๐Ÿšฃ" - map[":ru:"] = "๐Ÿ‡ท๐Ÿ‡บ" - map[":rugby_football:"] = "๐Ÿ‰" - map[":runner:"] = "๐Ÿƒ" - map[":running_shirt_with_sash:"] = "๐ŸŽฝ" - map[":sa:"] = "๐Ÿˆ‚๏ธ" - map[":sagittarius:"] = "โ™" - map[":sailboat:"] = "โ›ต" - map[":sake:"] = "๐Ÿถ" - map[":sandal:"] = "๐Ÿ‘ก" - map[":santa:"] = "๐ŸŽ…" - map[":satellite:"] = "๐Ÿ“ก" - map[":satisfied:"] = "๐Ÿ˜†" - map[":saxophone:"] = "๐ŸŽท" - map[":school:"] = "๐Ÿซ" - map[":school_satchel:"] = "๐ŸŽ’" - map[":scissors:"] = "โœ‚๏ธ" - map[":scorpius:"] = "โ™" - map[":scream:"] = "๐Ÿ˜ฑ" - map[":scream_cat:"] = "๐Ÿ™€" - map[":scroll:"] = "๐Ÿ“œ" - map[":seat:"] = "๐Ÿ’บ" - map[":secret:"] = "ใŠ™๏ธ" - map[":see_no_evil:"] = "๐Ÿ™ˆ" - map[":seedling:"] = "๐ŸŒฑ" - map[":seven:"] = "7๏ธโƒฃ" - map[":shaved_ice:"] = "๐Ÿง" - map[":sheep:"] = "๐Ÿ‘" - map[":shell:"] = "๐Ÿš" - map[":ship:"] = "๐Ÿšข" - map[":shirt:"] = "๐Ÿ‘•" - map[":shit:"] = "๐Ÿ’ฉ" - map[":shower:"] = "๐Ÿšฟ" - map[":signal_strength:"] = "๐Ÿ“ถ" - map[":six:"] = "6๏ธโƒฃ" - map[":six_pointed_star:"] = "๐Ÿ”ฏ" - map[":ski:"] = "๐ŸŽฟ" - map[":skull:"] = "๐Ÿ’€" - map[":sleeping:"] = "๐Ÿ˜ด" - map[":sleepy:"] = "๐Ÿ˜ช" - map[":slot_machine:"] = "๐ŸŽฐ" - map[":small_blue_diamond:"] = "๐Ÿ”น" - map[":small_orange_diamond:"] = "๐Ÿ”ธ" - map[":small_red_triangle:"] = "๐Ÿ”บ" - map[":small_red_triangle_down:"] = "๐Ÿ”ป" - map[":smile:"] = "๐Ÿ˜„" - map[":smile_cat:"] = "๐Ÿ˜ธ" - map[":smiley:"] = "๐Ÿ˜ƒ" - map[":smiley_cat:"] = "๐Ÿ˜บ" - map[":smiling_imp:"] = "๐Ÿ˜ˆ" - map[":smirk:"] = "๐Ÿ˜" - map[":smirk_cat:"] = "๐Ÿ˜ผ" - map[":smoking:"] = "๐Ÿšฌ" - map[":snail:"] = "๐ŸŒ" - map[":snake:"] = "๐Ÿ" - map[":snowboarder:"] = "๐Ÿ‚" - map[":snowflake:"] = "โ„๏ธ" - map[":snowman:"] = "โ›„" - map[":sob:"] = "๐Ÿ˜ญ" - map[":soccer:"] = "โšฝ" - map[":soon:"] = "๐Ÿ”œ" - map[":sos:"] = "๐Ÿ†˜" - map[":sound:"] = "๐Ÿ”‰" - map[":space_invader:"] = "๐Ÿ‘พ" - map[":spades:"] = "โ™ ๏ธ" - map[":spaghetti:"] = "๐Ÿ" - map[":sparkler:"] = "๐ŸŽ‡" - map[":sparkles:"] = "โœจ" - map[":sparkling_heart:"] = "๐Ÿ’–" - map[":speak_no_evil:"] = "๐Ÿ™Š" - map[":speaker:"] = "๐Ÿ”ˆ" - map[":speech_balloon:"] = "๐Ÿ’ฌ" - map[":speedboat:"] = "๐Ÿšค" - map[":star2:"] = "๐ŸŒŸ" - map[":star:"] = "โญ" - map[":stars:"] = "๐ŸŒ " - map[":station:"] = "๐Ÿš‰" - map[":statue_of_liberty:"] = "๐Ÿ—ฝ" - map[":steam_locomotive:"] = "๐Ÿš‚" - map[":stew:"] = "๐Ÿฒ" - map[":straight_ruler:"] = "๐Ÿ“" - map[":strawberry:"] = "๐Ÿ“" - map[":stuck_out_tongue:"] = "๐Ÿ˜›" - map[":stuck_out_tongue_closed_eyes:"] = "๐Ÿ˜" - map[":stuck_out_tongue_winking_eye:"] = "๐Ÿ˜œ" - map[":sun_with_face:"] = "๐ŸŒž" - map[":sunflower:"] = "๐ŸŒป" - map[":sunglasses:"] = "๐Ÿ˜Ž" - map[":sunny:"] = "โ˜€๏ธ" - map[":sunrise:"] = "๐ŸŒ…" - map[":sunrise_over_mountains:"] = "๐ŸŒ„" - map[":surfer:"] = "๐Ÿ„" - map[":sushi:"] = "๐Ÿฃ" - map[":suspension_railway:"] = "๐ŸšŸ" - map[":sweat:"] = "๐Ÿ˜“" - map[":sweat_drops:"] = "๐Ÿ’ฆ" - map[":sweat_smile:"] = "๐Ÿ˜…" - map[":sweet_potato:"] = "๐Ÿ " - map[":swimmer:"] = "๐ŸŠ" - map[":symbols:"] = "๐Ÿ”ฃ" - map[":syringe:"] = "๐Ÿ’‰" - map[":tada:"] = "๐ŸŽ‰" - map[":tanabata_tree:"] = "๐ŸŽ‹" - map[":tangerine:"] = "๐ŸŠ" - map[":taurus:"] = "โ™‰" - map[":taxi:"] = "๐Ÿš•" - map[":tea:"] = "๐Ÿต" - map[":telephone:"] = "โ˜Ž๏ธ" - map[":telephone_receiver:"] = "๐Ÿ“ž" - map[":telescope:"] = "๐Ÿ”ญ" - map[":tennis:"] = "๐ŸŽพ" - map[":tent:"] = "โ›บ" - map[":thought_balloon:"] = "๐Ÿ’ญ" - map[":three:"] = "3๏ธโƒฃ" - map[":thumbsdown:"] = "๐Ÿ‘Ž" - map[":thumbsup:"] = "๐Ÿ‘" - map[":ticket:"] = "๐ŸŽซ" - map[":tiger2:"] = "๐Ÿ…" - map[":tiger:"] = "๐Ÿฏ" - map[":tired_face:"] = "๐Ÿ˜ซ" - map[":tm:"] = "โ„ข๏ธ" - map[":toilet:"] = "๐Ÿšฝ" - map[":tokyo_tower:"] = "๐Ÿ—ผ" - map[":tomato:"] = "๐Ÿ…" - map[":tongue:"] = "๐Ÿ‘…" - map[":top:"] = "๐Ÿ”" - map[":tophat:"] = "๐ŸŽฉ" - map[":tractor:"] = "๐Ÿšœ" - map[":traffic_light:"] = "๐Ÿšฅ" - map[":train2:"] = "๐Ÿš†" - map[":train:"] = "๐Ÿš‹" - map[":tram:"] = "๐ŸšŠ" - map[":triangular_flag_on_post:"] = "๐Ÿšฉ" - map[":triangular_ruler:"] = "๐Ÿ“" - map[":trident:"] = "๐Ÿ”ฑ" - map[":triumph:"] = "๐Ÿ˜ค" - map[":trolleybus:"] = "๐ŸšŽ" - map[":trophy:"] = "๐Ÿ†" - map[":tropical_drink:"] = "๐Ÿน" - map[":tropical_fish:"] = "๐Ÿ " - map[":truck:"] = "๐Ÿšš" - map[":trumpet:"] = "๐ŸŽบ" - map[":tulip:"] = "๐ŸŒท" - map[":turtle:"] = "๐Ÿข" - map[":tv:"] = "๐Ÿ“บ" - map[":twisted_rightwards_arrows:"] = "๐Ÿ”€" - map[":two:"] = "2๏ธโƒฃ" - map[":two_men_holding_hands:"] = "๐Ÿ‘ฌ" - map[":two_women_holding_hands:"] = "๐Ÿ‘ญ" - map[":u5272:"] = "๐Ÿˆน" - map[":u5408:"] = "๐Ÿˆด" - map[":u55b6:"] = "๐Ÿˆบ" - map[":u6307:"] = "๐Ÿˆฏ" - map[":u6708:"] = "๐Ÿˆท๏ธ" - map[":u6709:"] = "๐Ÿˆถ" - map[":u6e80:"] = "๐Ÿˆต" - map[":u7121:"] = "๐Ÿˆš" - map[":u7533:"] = "๐Ÿˆธ" - map[":u7981:"] = "๐Ÿˆฒ" - map[":u7a7a:"] = "๐Ÿˆณ" - map[":umbrella:"] = "โ˜”" - map[":unamused:"] = "๐Ÿ˜’" - map[":underage:"] = "๐Ÿ”ž" - map[":unlock:"] = "๐Ÿ”“" - map[":up:"] = "๐Ÿ†™" - map[":us:"] = "๐Ÿ‡บ๐Ÿ‡ธ" - map[":v:"] = "โœŒ๏ธ" - map[":vertical_traffic_light:"] = "๐Ÿšฆ" - map[":vhs:"] = "๐Ÿ“ผ" - map[":vibration_mode:"] = "๐Ÿ“ณ" - map[":video_camera:"] = "๐Ÿ“น" - map[":video_game:"] = "๐ŸŽฎ" - map[":violin:"] = "๐ŸŽป" - map[":virgo:"] = "โ™" - map[":volcano:"] = "๐ŸŒ‹" - map[":vs:"] = "๐Ÿ†š" - map[":walking:"] = "๐Ÿšถ" - map[":waning_crescent_moon:"] = "๐ŸŒ˜" - map[":waning_gibbous_moon:"] = "๐ŸŒ–" - map[":warning:"] = "โš ๏ธ" - map[":watch:"] = "โŒš" - map[":water_buffalo:"] = "๐Ÿƒ" - map[":watermelon:"] = "๐Ÿ‰" - map[":wave:"] = "๐Ÿ‘‹" - map[":wavy_dash:"] = "ใ€ฐ๏ธ" - map[":waxing_crescent_moon:"] = "๐ŸŒ’" - map[":waxing_gibbous_moon:"] = "๐ŸŒ”" - map[":wc:"] = "๐Ÿšพ" - map[":weary:"] = "๐Ÿ˜ฉ" - map[":wedding:"] = "๐Ÿ’’" - map[":whale2:"] = "๐Ÿ‹" - map[":whale:"] = "๐Ÿณ" - map[":wheelchair:"] = "โ™ฟ" - map[":white_check_mark:"] = "โœ…" - map[":white_circle:"] = "โšช" - map[":white_flower:"] = "๐Ÿ’ฎ" - map[":white_square_button:"] = "๐Ÿ”ณ" - map[":wind_chime:"] = "๐ŸŽ" - map[":wine_glass:"] = "๐Ÿท" - map[":wink:"] = "๐Ÿ˜‰" - map[":wolf:"] = "๐Ÿบ" - map[":woman:"] = "๐Ÿ‘ฉ" - map[":womans_clothes:"] = "๐Ÿ‘š" - map[":womans_hat:"] = "๐Ÿ‘’" - map[":womens:"] = "๐Ÿšบ" - map[":worried:"] = "๐Ÿ˜Ÿ" - map[":wrench:"] = "๐Ÿ”ง" - map[":x:"] = "โŒ" - map[":yellow_heart:"] = "๐Ÿ’›" - map[":yen:"] = "๐Ÿ’ด" - map[":yum:"] = "๐Ÿ˜‹" - map[":zap:"] = "โšก" - map[":zero:"] = "0๏ธโƒฃ" - map[":zzz:"] = "๐Ÿ’ค" + if (emoji_file == "") { + emoji_file = "emoji.tsv" + } + + while ((getline line < emoji_file) > 0) { + split(line, parts, "\t") + if (length(parts[1]) > 0) { + map[parts[1]] = parts[2] + } + } + close(emoji_file) } { if ($0 ~ /
/) in_pre = 1
@@ -833,6 +17,7 @@ BEGIN {
         code_count = 0
         line = $0
         out = ""
+
         while (match(line, /[^<]*<\/code>/)) {
             code_count++
             code_store[code_count] = substr(line, RSTART, RLENGTH)
@@ -841,14 +26,23 @@ BEGIN {
         }
         out = out line
 
-        for (sc in map) {
-            if (index(out, sc)) {
-                gsub(sc, map[sc], out)
+        line = out
+        out = ""
+        while (match(line, /:[A-Za-z0-9_+\-]+:/)) {
+            token = substr(line, RSTART, RLENGTH)
+            out = out substr(line, 1, RSTART - 1)
+            if (token in map) {
+                out = out map[token]
+            } else {
+                out = out token
             }
+            line = substr(line, RSTART + RLENGTH)
         }
+        out = out line
 
         for (i = 1; i <= code_count; i++) {
             gsub("\034EC" i "\034", code_store[i], out)
+            delete code_store[i]
         }
         $0 = out
     }
diff --git a/awk/emoji.tsv b/awk/emoji.tsv
new file mode 100644
index 0000000..8f7459c
--- /dev/null
+++ b/awk/emoji.tsv
@@ -0,0 +1,827 @@
+:+1:	๐Ÿ‘
+:100:	๐Ÿ’ฏ
+:1234:	๐Ÿ”ข
+:8ball:	๐ŸŽฑ
+:a:	๐Ÿ…ฐ๏ธ
+:ab:	๐Ÿ†Ž
+:abc:	๐Ÿ”ค
+:abcd:	๐Ÿ”ก
+:accept:	๐Ÿ‰‘
+:aerial_tramway:	๐Ÿšก
+:airplane:	โœˆ๏ธ
+:alarm_clock:	โฐ
+:alien:	๐Ÿ‘ฝ
+:ambulance:	๐Ÿš‘
+:anchor:	โš“
+:angel:	๐Ÿ‘ผ
+:anger:	๐Ÿ’ข
+:angry:	๐Ÿ˜ 
+:anguished:	๐Ÿ˜ง
+:ant:	๐Ÿœ
+:apple:	๐ŸŽ
+:aquarius:	โ™’
+:aries:	โ™ˆ
+:arrow_backward:	โ—€๏ธ
+:arrow_double_down:	โฌ
+:arrow_double_up:	โซ
+:arrow_down:	โฌ‡๏ธ
+:arrow_down_small:	๐Ÿ”ฝ
+:arrow_forward:	โ–ถ๏ธ
+:arrow_heading_down:	โคต๏ธ
+:arrow_heading_up:	โคด๏ธ
+:arrow_left:	โฌ…๏ธ
+:arrow_lower_left:	โ†™๏ธ
+:arrow_lower_right:	โ†˜๏ธ
+:arrow_right:	โžก๏ธ
+:arrow_right_hook:	โ†ช๏ธ
+:arrow_up:	โฌ†๏ธ
+:arrow_up_down:	โ†•๏ธ
+:arrow_up_small:	๐Ÿ”ผ
+:arrow_upper_left:	โ†–๏ธ
+:arrow_upper_right:	โ†—๏ธ
+:arrows_clockwise:	๐Ÿ”ƒ
+:arrows_counterclockwise:	๐Ÿ”„
+:art:	๐ŸŽจ
+:articulated_lorry:	๐Ÿš›
+:astonished:	๐Ÿ˜ฒ
+:atm:	๐Ÿง
+:b:	๐Ÿ…ฑ๏ธ
+:baby:	๐Ÿ‘ถ
+:baby_bottle:	๐Ÿผ
+:baby_chick:	๐Ÿค
+:baby_symbol:	๐Ÿšผ
+:baggage_claim:	๐Ÿ›„
+:balloon:	๐ŸŽˆ
+:ballot_box_with_check:	โ˜‘๏ธ
+:bamboo:	๐ŸŽ
+:banana:	๐ŸŒ
+:bangbang:	โ€ผ๏ธ
+:bank:	๐Ÿฆ
+:bar_chart:	๐Ÿ“Š
+:barber:	๐Ÿ’ˆ
+:baseball:	โšพ
+:basketball:	๐Ÿ€
+:bath:	๐Ÿ›€
+:bathtub:	๐Ÿ›
+:battery:	๐Ÿ”‹
+:bear:	๐Ÿป
+:beer:	๐Ÿบ
+:beers:	๐Ÿป
+:beetle:	๐Ÿชฒ
+:beginner:	๐Ÿ”ฐ
+:bell:	๐Ÿ””
+:bento:	๐Ÿฑ
+:bicyclist:	๐Ÿšด
+:bike:	๐Ÿšฒ
+:bikini:	๐Ÿ‘™
+:bird:	๐Ÿฆ
+:birthday:	๐ŸŽ‚
+:black_circle:	โšซ
+:black_joker:	๐Ÿƒ
+:black_nib:	โœ’๏ธ
+:black_square_button:	๐Ÿ”ฒ
+:blossom:	๐ŸŒผ
+:blowfish:	๐Ÿก
+:blue_book:	๐Ÿ“˜
+:blue_car:	๐Ÿš™
+:blue_heart:	๐Ÿ’™
+:blush:	๐Ÿ˜Š
+:boar:	๐Ÿ—
+:boat:	โ›ต
+:bomb:	๐Ÿ’ฃ
+:book:	๐Ÿ“–
+:bookmark:	๐Ÿ”–
+:bookmark_tabs:	๐Ÿ“‘
+:books:	๐Ÿ“š
+:boom:	๐Ÿ’ฅ
+:boot:	๐Ÿ‘ข
+:bouquet:	๐Ÿ’
+:bow:	๐Ÿ™‡
+:bowling:	๐ŸŽณ
+:boy:	๐Ÿ‘ฆ
+:bread:	๐Ÿž
+:bride_with_veil:	๐Ÿ‘ฐโ€โ™€๏ธ
+:bridge_at_night:	๐ŸŒ‰
+:briefcase:	๐Ÿ’ผ
+:broken_heart:	๐Ÿ’”
+:bug:	๐Ÿ›
+:bulb:	๐Ÿ’ก
+:bullettrain_front:	๐Ÿš…
+:bullettrain_side:	๐Ÿš„
+:bus:	๐ŸšŒ
+:busstop:	๐Ÿš
+:bust_in_silhouette:	๐Ÿ‘ค
+:busts_in_silhouette:	๐Ÿ‘ฅ
+:cactus:	๐ŸŒต
+:cake:	๐Ÿฐ
+:calendar:	๐Ÿ“†
+:calling:	๐Ÿ“ฒ
+:camel:	๐Ÿซ
+:camera:	๐Ÿ“ท
+:cancer:	โ™‹
+:candy:	๐Ÿฌ
+:capital_abcd:	๐Ÿ” 
+:capricorn:	โ™‘
+:car:	๐Ÿš—
+:card_index:	๐Ÿ“‡
+:carousel_horse:	๐ŸŽ 
+:cat2:	๐Ÿˆ
+:cat:	๐Ÿฑ
+:cd:	๐Ÿ’ฟ
+:chart:	๐Ÿ’น
+:chart_with_downwards_trend:	๐Ÿ“‰
+:chart_with_upwards_trend:	๐Ÿ“ˆ
+:checkered_flag:	๐Ÿ
+:cherries:	๐Ÿ’
+:cherry_blossom:	๐ŸŒธ
+:chestnut:	๐ŸŒฐ
+:chicken:	๐Ÿ”
+:children_crossing:	๐Ÿšธ
+:chocolate_bar:	๐Ÿซ
+:christmas_tree:	๐ŸŽ„
+:church:	โ›ช
+:cinema:	๐ŸŽฆ
+:circus_tent:	๐ŸŽช
+:city_sunrise:	๐ŸŒ‡
+:city_sunset:	๐ŸŒ†
+:cl:	๐Ÿ†‘
+:clap:	๐Ÿ‘
+:clapper:	๐ŸŽฌ
+:clipboard:	๐Ÿ“‹
+:clock1030:	๐Ÿ•ฅ
+:clock10:	๐Ÿ•™
+:clock1130:	๐Ÿ•ฆ
+:clock11:	๐Ÿ•š
+:clock1230:	๐Ÿ•ง
+:clock12:	๐Ÿ•›
+:clock130:	๐Ÿ•œ
+:clock1:	๐Ÿ•
+:clock230:	๐Ÿ•
+:clock2:	๐Ÿ•‘
+:clock330:	๐Ÿ•ž
+:clock3:	๐Ÿ•’
+:clock430:	๐Ÿ•Ÿ
+:clock4:	๐Ÿ•“
+:clock530:	๐Ÿ• 
+:clock5:	๐Ÿ•”
+:clock630:	๐Ÿ•ก
+:clock6:	๐Ÿ••
+:clock730:	๐Ÿ•ข
+:clock7:	๐Ÿ•–
+:clock830:	๐Ÿ•ฃ
+:clock8:	๐Ÿ•—
+:clock930:	๐Ÿ•ค
+:clock9:	๐Ÿ•˜
+:closed_book:	๐Ÿ“•
+:closed_lock_with_key:	๐Ÿ”
+:closed_umbrella:	๐ŸŒ‚
+:cloud:	โ˜๏ธ
+:clubs:	โ™ฃ๏ธ
+:cn:	๐Ÿ‡จ๐Ÿ‡ณ
+:cocktail:	๐Ÿธ
+:coffee:	โ˜•
+:cold_sweat:	๐Ÿ˜ฐ
+:computer:	๐Ÿ’ป
+:confetti_ball:	๐ŸŽŠ
+:confounded:	๐Ÿ˜–
+:confused:	๐Ÿ˜•
+:congratulations:	ใŠ—๏ธ
+:construction:	๐Ÿšง
+:construction_worker:	๐Ÿ‘ท
+:convenience_store:	๐Ÿช
+:cookie:	๐Ÿช
+:cool:	๐Ÿ†’
+:cop:	๐Ÿ‘ฎ
+:copyright:	ยฉ๏ธ
+:corn:	๐ŸŒฝ
+:couple:	๐Ÿ‘ซ
+:couple_with_heart:	๐Ÿ’‘
+:couplekiss:	๐Ÿ’
+:cow2:	๐Ÿ„
+:cow:	๐Ÿฎ
+:credit_card:	๐Ÿ’ณ
+:crocodile:	๐ŸŠ
+:crossed_flags:	๐ŸŽŒ
+:crown:	๐Ÿ‘‘
+:cry:	๐Ÿ˜ข
+:crying_cat_face:	๐Ÿ˜ฟ
+:crystal_ball:	๐Ÿ”ฎ
+:cupid:	๐Ÿ’˜
+:curly_loop:	โžฐ
+:currency_exchange:	๐Ÿ’ฑ
+:curry:	๐Ÿ›
+:custard:	๐Ÿฎ
+:customs:	๐Ÿ›ƒ
+:cyclone:	๐ŸŒ€
+:dancer:	๐Ÿ’ƒ
+:dancers:	๐Ÿ‘ฏ
+:dango:	๐Ÿก
+:dart:	๐ŸŽฏ
+:dash:	๐Ÿ’จ
+:date:	๐Ÿ“…
+:de:	๐Ÿ‡ฉ๐Ÿ‡ช
+:deciduous_tree:	๐ŸŒณ
+:department_store:	๐Ÿฌ
+:diamond_shape_with_a_dot_inside:	๐Ÿ’ 
+:diamonds:	โ™ฆ๏ธ
+:disappointed:	๐Ÿ˜ž
+:disappointed_relieved:	๐Ÿ˜ฅ
+:dizzy:	๐Ÿ’ซ
+:dizzy_face:	๐Ÿ˜ต
+:do_not_litter:	๐Ÿšฏ
+:dog2:	๐Ÿ•
+:dog:	๐Ÿถ
+:dollar:	๐Ÿ’ต
+:dolls:	๐ŸŽŽ
+:dolphin:	๐Ÿฌ
+:door:	๐Ÿšช
+:doughnut:	๐Ÿฉ
+:dragon:	๐Ÿ‰
+:dragon_face:	๐Ÿฒ
+:dress:	๐Ÿ‘—
+:dromedary_camel:	๐Ÿช
+:droplet:	๐Ÿ’ง
+:dvd:	๐Ÿ“€
+:ear:	๐Ÿ‘‚
+:ear_of_rice:	๐ŸŒพ
+:earth_africa:	๐ŸŒ
+:earth_americas:	๐ŸŒŽ
+:earth_asia:	๐ŸŒ
+:egg:	๐Ÿฅš
+:eggplant:	๐Ÿ†
+:eight:	8๏ธโƒฃ
+:eight_pointed_black_star:	โœด๏ธ
+:eight_spoked_asterisk:	โœณ๏ธ
+:electric_plug:	๐Ÿ”Œ
+:elephant:	๐Ÿ˜
+:email:	๐Ÿ“ง
+:end:	๐Ÿ”š
+:envelope:	โœ‰๏ธ
+:es:	๐Ÿ‡ช๐Ÿ‡ธ
+:euro:	๐Ÿ’ถ
+:european_castle:	๐Ÿฐ
+:european_post_office:	๐Ÿค
+:evergreen_tree:	๐ŸŒฒ
+:exclamation:	โ—
+:expressionless:	๐Ÿ˜‘
+:eyeglasses:	๐Ÿ‘“
+:eyes:	๐Ÿ‘€
+:factory:	๐Ÿญ
+:fallen_leaf:	๐Ÿ‚
+:family:	๐Ÿ‘ช
+:fast_forward:	โฉ
+:fax:	๐Ÿ“ 
+:fearful:	๐Ÿ˜จ
+:feet:	๐Ÿพ
+:ferris_wheel:	๐ŸŽก
+:file_folder:	๐Ÿ“
+:fire:	๐Ÿ”ฅ
+:fire_engine:	๐Ÿš’
+:fireworks:	๐ŸŽ†
+:first_quarter_moon:	๐ŸŒ“
+:first_quarter_moon_with_face:	๐ŸŒ›
+:fish:	๐ŸŸ
+:fish_cake:	๐Ÿฅ
+:fishing_pole_and_fish:	๐ŸŽฃ
+:fist:	โœŠ
+:five:	5๏ธโƒฃ
+:flags:	๐ŸŽ
+:flashlight:	๐Ÿ”ฆ
+:floppy_disk:	๐Ÿ’พ
+:flower_playing_cards:	๐ŸŽด
+:flushed:	๐Ÿ˜ณ
+:foggy:	๐ŸŒ
+:football:	๐Ÿˆ
+:fork_and_knife:	๐Ÿด
+:fountain:	โ›ฒ
+:four:	4๏ธโƒฃ
+:four_leaf_clover:	๐Ÿ€
+:fr:	๐Ÿ‡ซ๐Ÿ‡ท
+:free:	๐Ÿ†“
+:fried_shrimp:	๐Ÿค
+:fries:	๐ŸŸ
+:frog:	๐Ÿธ
+:frowning:	๐Ÿ˜ฆ
+:fuelpump:	โ›ฝ
+:full_moon:	๐ŸŒ•
+:full_moon_with_face:	๐ŸŒ
+:game_die:	๐ŸŽฒ
+:gem:	๐Ÿ’Ž
+:gemini:	โ™Š
+:ghost:	๐Ÿ‘ป
+:gift:	๐ŸŽ
+:gift_heart:	๐Ÿ’
+:girl:	๐Ÿ‘ง
+:globe_with_meridians:	๐ŸŒ
+:goat:	๐Ÿ
+:golf:	โ›ณ
+:grapes:	๐Ÿ‡
+:green_apple:	๐Ÿ
+:green_book:	๐Ÿ“—
+:green_heart:	๐Ÿ’š
+:grey_exclamation:	โ•
+:grey_question:	โ”
+:grimacing:	๐Ÿ˜ฌ
+:grin:	๐Ÿ˜
+:grinning:	๐Ÿ˜€
+:guardsman:	๐Ÿ’‚โ€โ™‚๏ธ
+:guitar:	๐ŸŽธ
+:gun:	๐Ÿ”ซ
+:haircut:	๐Ÿ’‡
+:hamburger:	๐Ÿ”
+:hammer:	๐Ÿ”จ
+:hamster:	๐Ÿน
+:handbag:	๐Ÿ‘œ
+:hankey:	๐Ÿ’ฉ
+:hash:	#๏ธโƒฃ
+:hatched_chick:	๐Ÿฅ
+:hatching_chick:	๐Ÿฃ
+:headphones:	๐ŸŽง
+:hear_no_evil:	๐Ÿ™‰
+:heart:	โค๏ธ
+:heart_decoration:	๐Ÿ’Ÿ
+:heart_eyes:	๐Ÿ˜
+:heart_eyes_cat:	๐Ÿ˜ป
+:heartbeat:	๐Ÿ’“
+:hearts:	โ™ฅ๏ธ
+:heavy_check_mark:	โœ”๏ธ
+:heavy_division_sign:	โž—
+:heavy_dollar_sign:	๐Ÿ’ฒ
+:heavy_minus_sign:	โž–
+:heavy_multiplication_x:	โœ–๏ธ
+:heavy_plus_sign:	โž•
+:helicopter:	๐Ÿš
+:herb:	๐ŸŒฟ
+:hibiscus:	๐ŸŒบ
+:high_brightness:	๐Ÿ”†
+:high_heel:	๐Ÿ‘ 
+:honey_pot:	๐Ÿฏ
+:horse:	๐Ÿด
+:horse_racing:	๐Ÿ‡
+:hospital:	๐Ÿฅ
+:hotel:	๐Ÿจ
+:hotsprings:	โ™จ๏ธ
+:hourglass:	โŒ›
+:hourglass_flowing_sand:	โณ
+:house:	๐Ÿ 
+:house_with_garden:	๐Ÿก
+:hushed:	๐Ÿ˜ฏ
+:ice_cream:	๐Ÿจ
+:icecream:	๐Ÿฆ
+:id:	๐Ÿ†”
+:ideograph_advantage:	๐Ÿ‰
+:imp:	๐Ÿ‘ฟ
+:inbox_tray:	๐Ÿ“ฅ
+:incoming_envelope:	๐Ÿ“จ
+:information_desk_person:	๐Ÿ’
+:information_source:	โ„น๏ธ
+:innocent:	๐Ÿ˜‡
+:interrobang:	โ‰๏ธ
+:iphone:	๐Ÿ“ฑ
+:it:	๐Ÿ‡ฎ๐Ÿ‡น
+:izakaya_lantern:	๐Ÿฎ
+:jack_o_lantern:	๐ŸŽƒ
+:japan:	๐Ÿ—พ
+:japanese_castle:	๐Ÿฏ
+:japanese_goblin:	๐Ÿ‘บ
+:japanese_ogre:	๐Ÿ‘น
+:jeans:	๐Ÿ‘–
+:joy:	๐Ÿ˜‚
+:joy_cat:	๐Ÿ˜น
+:jp:	๐Ÿ‡ฏ๐Ÿ‡ต
+:key:	๐Ÿ”‘
+:keycap_ten:	๐Ÿ”Ÿ
+:kimono:	๐Ÿ‘˜
+:kiss:	๐Ÿ’‹
+:kissing:	๐Ÿ˜—
+:kissing_cat:	๐Ÿ˜ฝ
+:kissing_closed_eyes:	๐Ÿ˜š
+:kissing_heart:	๐Ÿ˜˜
+:kissing_smiling_eyes:	๐Ÿ˜™
+:koala:	๐Ÿจ
+:koko:	๐Ÿˆ
+:kr:	๐Ÿ‡ฐ๐Ÿ‡ท
+:large_blue_diamond:	๐Ÿ”ท
+:large_orange_diamond:	๐Ÿ”ถ
+:last_quarter_moon:	๐ŸŒ—
+:last_quarter_moon_with_face:	๐ŸŒœ
+:laughing:	๐Ÿ˜†
+:leaves:	๐Ÿƒ
+:ledger:	๐Ÿ“’
+:left_luggage:	๐Ÿ›…
+:left_right_arrow:	โ†”๏ธ
+:leftwards_arrow_with_hook:	โ†ฉ๏ธ
+:lemon:	๐Ÿ‹
+:leo:	โ™Œ
+:leopard:	๐Ÿ†
+:libra:	โ™Ž
+:light_rail:	๐Ÿšˆ
+:link:	๐Ÿ”—
+:lips:	๐Ÿ‘„
+:lipstick:	๐Ÿ’„
+:lock:	๐Ÿ”’
+:lock_with_ink_pen:	๐Ÿ”
+:lollipop:	๐Ÿญ
+:loop:	โžฟ
+:loudspeaker:	๐Ÿ“ข
+:love_hotel:	๐Ÿฉ
+:love_letter:	๐Ÿ’Œ
+:low_brightness:	๐Ÿ”…
+:m:	โ“‚๏ธ
+:mag:	๐Ÿ”
+:mag_right:	๐Ÿ”Ž
+:mahjong:	๐Ÿ€„
+:mailbox:	๐Ÿ“ซ
+:mailbox_closed:	๐Ÿ“ช
+:mailbox_with_mail:	๐Ÿ“ฌ
+:mailbox_with_no_mail:	๐Ÿ“ญ
+:man:	๐Ÿ‘จ
+:man_with_gua_pi_mao:	๐Ÿ‘ฒ
+:man_with_turban:	๐Ÿ‘ณโ€โ™‚๏ธ
+:mans_shoe:	๐Ÿ‘ž
+:maple_leaf:	๐Ÿ
+:mask:	๐Ÿ˜ท
+:massage:	๐Ÿ’†
+:meat_on_bone:	๐Ÿ–
+:mega:	๐Ÿ“ฃ
+:melon:	๐Ÿˆ
+:memo:	๐Ÿ“
+:mens:	๐Ÿšน
+:metal:	๐Ÿค˜
+:metro:	๐Ÿš‡
+:microphone:	๐ŸŽค
+:microscope:	๐Ÿ”ฌ
+:milky_way:	๐ŸŒŒ
+:minibus:	๐Ÿš
+:minidisc:	๐Ÿ’ฝ
+:mobile_phone_off:	๐Ÿ“ด
+:money_with_wings:	๐Ÿ’ธ
+:moneybag:	๐Ÿ’ฐ
+:monkey:	๐Ÿ’
+:monkey_face:	๐Ÿต
+:monorail:	๐Ÿš
+:mortar_board:	๐ŸŽ“
+:mount_fuji:	๐Ÿ—ป
+:mountain_bicyclist:	๐Ÿšต
+:mountain_cableway:	๐Ÿš 
+:mountain_railway:	๐Ÿšž
+:mouse2:	๐Ÿ
+:mouse:	๐Ÿญ
+:movie_camera:	๐ŸŽฅ
+:moyai:	๐Ÿ—ฟ
+:muscle:	๐Ÿ’ช
+:mushroom:	๐Ÿ„
+:musical_keyboard:	๐ŸŽน
+:musical_note:	๐ŸŽต
+:musical_score:	๐ŸŽผ
+:mute:	๐Ÿ”‡
+:nail_care:	๐Ÿ’…
+:name_badge:	๐Ÿ“›
+:necktie:	๐Ÿ‘”
+:negative_squared_cross_mark:	โŽ
+:neutral_face:	๐Ÿ˜
+:new:	๐Ÿ†•
+:new_moon:	๐ŸŒ‘
+:new_moon_with_face:	๐ŸŒš
+:newspaper:	๐Ÿ“ฐ
+:ng:	๐Ÿ†–
+:nine:	9๏ธโƒฃ
+:no_bell:	๐Ÿ”•
+:no_bicycles:	๐Ÿšณ
+:no_entry:	โ›”
+:no_entry_sign:	๐Ÿšซ
+:no_good:	๐Ÿ™…
+:no_mobile_phones:	๐Ÿ“ต
+:no_mouth:	๐Ÿ˜ถ
+:no_pedestrians:	๐Ÿšท
+:no_smoking:	๐Ÿšญ
+:nose:	๐Ÿ‘ƒ
+:notebook:	๐Ÿ““
+:notebook_with_decorative_cover:	๐Ÿ“”
+:notes:	๐ŸŽถ
+:nut_and_bolt:	๐Ÿ”ฉ
+:o2:	๐Ÿ…พ๏ธ
+:o:	โญ•
+:ocean:	๐ŸŒŠ
+:octopus:	๐Ÿ™
+:oden:	๐Ÿข
+:office:	๐Ÿข
+:ok:	๐Ÿ†—
+:ok_hand:	๐Ÿ‘Œ
+:ok_woman:	๐Ÿ™†โ€โ™€๏ธ
+:older_man:	๐Ÿ‘ด
+:older_woman:	๐Ÿ‘ต
+:on:	๐Ÿ”›
+:oncoming_automobile:	๐Ÿš˜
+:oncoming_bus:	๐Ÿš
+:oncoming_police_car:	๐Ÿš”
+:oncoming_taxi:	๐Ÿš–
+:one:	1๏ธโƒฃ
+:open_file_folder:	๐Ÿ“‚
+:open_hands:	๐Ÿ‘
+:open_mouth:	๐Ÿ˜ฎ
+:ophiuchus:	โ›Ž
+:orange_book:	๐Ÿ“™
+:outbox_tray:	๐Ÿ“ค
+:ox:	๐Ÿ‚
+:page_facing_up:	๐Ÿ“„
+:page_with_curl:	๐Ÿ“ƒ
+:pager:	๐Ÿ“Ÿ
+:palm_tree:	๐ŸŒด
+:panda_face:	๐Ÿผ
+:paperclip:	๐Ÿ“Ž
+:parking:	๐Ÿ…ฟ๏ธ
+:part_alternation_mark:	ใ€ฝ๏ธ
+:partly_sunny:	โ›…
+:passport_control:	๐Ÿ›‚
+:paw_prints:	๐Ÿพ
+:peach:	๐Ÿ‘
+:pear:	๐Ÿ
+:pencil2:	โœ๏ธ
+:pencil:	๐Ÿ“
+:penguin:	๐Ÿง
+:pensive:	๐Ÿ˜”
+:performing_arts:	๐ŸŽญ
+:persevere:	๐Ÿ˜ฃ
+:pig2:	๐Ÿ–
+:pig:	๐Ÿท
+:pig_nose:	๐Ÿฝ
+:pill:	๐Ÿ’Š
+:pineapple:	๐Ÿ
+:pisces:	โ™“
+:pizza:	๐Ÿ•
+:point_down:	๐Ÿ‘‡
+:point_left:	๐Ÿ‘ˆ
+:point_right:	๐Ÿ‘‰
+:point_up:	โ˜๏ธ
+:point_up_2:	๐Ÿ‘†
+:police_car:	๐Ÿš“
+:poodle:	๐Ÿฉ
+:poop:	๐Ÿ’ฉ
+:post_office:	๐Ÿฃ
+:postal_horn:	๐Ÿ“ฏ
+:postbox:	๐Ÿ“ฎ
+:potable_water:	๐Ÿšฐ
+:pouch:	๐Ÿ‘
+:poultry_leg:	๐Ÿ—
+:pound:	๐Ÿ’ท
+:pouting_cat:	๐Ÿ˜พ
+:pray:	๐Ÿ™
+:princess:	๐Ÿ‘ธ
+:punch:	๐Ÿ‘Š
+:purple_heart:	๐Ÿ’œ
+:purse:	๐Ÿ‘›
+:pushpin:	๐Ÿ“Œ
+:put_litter_in_its_place:	๐Ÿšฎ
+:question:	โ“
+:rabbit2:	๐Ÿ‡
+:rabbit:	๐Ÿฐ
+:racehorse:	๐ŸŽ
+:radio:	๐Ÿ“ป
+:radio_button:	๐Ÿ”˜
+:rage:	๐Ÿ˜ก
+:railway_car:	๐Ÿšƒ
+:rainbow:	๐ŸŒˆ
+:raised_hand:	โœ‹
+:raised_hands:	๐Ÿ™Œ
+:raising_hand:	๐Ÿ™‹
+:ram:	๐Ÿ
+:ramen:	๐Ÿœ
+:rat:	๐Ÿ€
+:recycle:	โ™ป๏ธ
+:red_car:	๐Ÿš—
+:red_circle:	๐Ÿ”ด
+:registered:	ยฎ๏ธ
+:relaxed:	โ˜บ๏ธ
+:relieved:	๐Ÿ˜Œ
+:repeat:	๐Ÿ”
+:repeat_one:	๐Ÿ”‚
+:restroom:	๐Ÿšป
+:revolving_hearts:	๐Ÿ’ž
+:rewind:	โช
+:ribbon:	๐ŸŽ€
+:rice:	๐Ÿš
+:rice_ball:	๐Ÿ™
+:rice_cracker:	๐Ÿ˜
+:rice_scene:	๐ŸŽ‘
+:ring:	๐Ÿ’
+:rocket:	๐Ÿš€
+:roller_coaster:	๐ŸŽข
+:rooster:	๐Ÿ“
+:rose:	๐ŸŒน
+:rotating_light:	๐Ÿšจ
+:round_pushpin:	๐Ÿ“
+:rowboat:	๐Ÿšฃ
+:ru:	๐Ÿ‡ท๐Ÿ‡บ
+:rugby_football:	๐Ÿ‰
+:runner:	๐Ÿƒ
+:running_shirt_with_sash:	๐ŸŽฝ
+:sa:	๐Ÿˆ‚๏ธ
+:sagittarius:	โ™
+:sailboat:	โ›ต
+:sake:	๐Ÿถ
+:sandal:	๐Ÿ‘ก
+:santa:	๐ŸŽ…
+:satellite:	๐Ÿ“ก
+:satisfied:	๐Ÿ˜†
+:saxophone:	๐ŸŽท
+:school:	๐Ÿซ
+:school_satchel:	๐ŸŽ’
+:scissors:	โœ‚๏ธ
+:scorpius:	โ™
+:scream:	๐Ÿ˜ฑ
+:scream_cat:	๐Ÿ™€
+:scroll:	๐Ÿ“œ
+:seat:	๐Ÿ’บ
+:secret:	ใŠ™๏ธ
+:see_no_evil:	๐Ÿ™ˆ
+:seedling:	๐ŸŒฑ
+:seven:	7๏ธโƒฃ
+:shaved_ice:	๐Ÿง
+:sheep:	๐Ÿ‘
+:shell:	๐Ÿš
+:ship:	๐Ÿšข
+:shirt:	๐Ÿ‘•
+:shit:	๐Ÿ’ฉ
+:shower:	๐Ÿšฟ
+:signal_strength:	๐Ÿ“ถ
+:six:	6๏ธโƒฃ
+:six_pointed_star:	๐Ÿ”ฏ
+:ski:	๐ŸŽฟ
+:skull:	๐Ÿ’€
+:sleeping:	๐Ÿ˜ด
+:sleepy:	๐Ÿ˜ช
+:slot_machine:	๐ŸŽฐ
+:small_blue_diamond:	๐Ÿ”น
+:small_orange_diamond:	๐Ÿ”ธ
+:small_red_triangle:	๐Ÿ”บ
+:small_red_triangle_down:	๐Ÿ”ป
+:smile:	๐Ÿ˜„
+:smile_cat:	๐Ÿ˜ธ
+:smiley:	๐Ÿ˜ƒ
+:smiley_cat:	๐Ÿ˜บ
+:smiling_imp:	๐Ÿ˜ˆ
+:smirk:	๐Ÿ˜
+:smirk_cat:	๐Ÿ˜ผ
+:smoking:	๐Ÿšฌ
+:snail:	๐ŸŒ
+:snake:	๐Ÿ
+:snowboarder:	๐Ÿ‚
+:snowflake:	โ„๏ธ
+:snowman:	โ›„
+:sob:	๐Ÿ˜ญ
+:soccer:	โšฝ
+:soon:	๐Ÿ”œ
+:sos:	๐Ÿ†˜
+:sound:	๐Ÿ”‰
+:space_invader:	๐Ÿ‘พ
+:spades:	โ™ ๏ธ
+:spaghetti:	๐Ÿ
+:sparkler:	๐ŸŽ‡
+:sparkles:	โœจ
+:sparkling_heart:	๐Ÿ’–
+:speak_no_evil:	๐Ÿ™Š
+:speaker:	๐Ÿ”ˆ
+:speech_balloon:	๐Ÿ’ฌ
+:speedboat:	๐Ÿšค
+:star2:	๐ŸŒŸ
+:star:	โญ
+:stars:	๐ŸŒ 
+:station:	๐Ÿš‰
+:statue_of_liberty:	๐Ÿ—ฝ
+:steam_locomotive:	๐Ÿš‚
+:stew:	๐Ÿฒ
+:straight_ruler:	๐Ÿ“
+:strawberry:	๐Ÿ“
+:stuck_out_tongue:	๐Ÿ˜›
+:stuck_out_tongue_closed_eyes:	๐Ÿ˜
+:stuck_out_tongue_winking_eye:	๐Ÿ˜œ
+:sun_with_face:	๐ŸŒž
+:sunflower:	๐ŸŒป
+:sunglasses:	๐Ÿ˜Ž
+:sunny:	โ˜€๏ธ
+:sunrise:	๐ŸŒ…
+:sunrise_over_mountains:	๐ŸŒ„
+:surfer:	๐Ÿ„
+:sushi:	๐Ÿฃ
+:suspension_railway:	๐ŸšŸ
+:sweat:	๐Ÿ˜“
+:sweat_drops:	๐Ÿ’ฆ
+:sweat_smile:	๐Ÿ˜…
+:sweet_potato:	๐Ÿ 
+:swimmer:	๐ŸŠ
+:symbols:	๐Ÿ”ฃ
+:syringe:	๐Ÿ’‰
+:tada:	๐ŸŽ‰
+:tanabata_tree:	๐ŸŽ‹
+:tangerine:	๐ŸŠ
+:taurus:	โ™‰
+:taxi:	๐Ÿš•
+:tea:	๐Ÿต
+:telephone:	โ˜Ž๏ธ
+:telephone_receiver:	๐Ÿ“ž
+:telescope:	๐Ÿ”ญ
+:tennis:	๐ŸŽพ
+:tent:	โ›บ
+:thought_balloon:	๐Ÿ’ญ
+:three:	3๏ธโƒฃ
+:thumbsdown:	๐Ÿ‘Ž
+:thumbsup:	๐Ÿ‘
+:ticket:	๐ŸŽซ
+:tiger2:	๐Ÿ…
+:tiger:	๐Ÿฏ
+:tired_face:	๐Ÿ˜ซ
+:tm:	โ„ข๏ธ
+:toilet:	๐Ÿšฝ
+:tokyo_tower:	๐Ÿ—ผ
+:tomato:	๐Ÿ…
+:tongue:	๐Ÿ‘…
+:top:	๐Ÿ”
+:tophat:	๐ŸŽฉ
+:tractor:	๐Ÿšœ
+:traffic_light:	๐Ÿšฅ
+:train2:	๐Ÿš†
+:train:	๐Ÿš‹
+:tram:	๐ŸšŠ
+:triangular_flag_on_post:	๐Ÿšฉ
+:triangular_ruler:	๐Ÿ“
+:trident:	๐Ÿ”ฑ
+:triumph:	๐Ÿ˜ค
+:trolleybus:	๐ŸšŽ
+:trophy:	๐Ÿ†
+:tropical_drink:	๐Ÿน
+:tropical_fish:	๐Ÿ 
+:truck:	๐Ÿšš
+:trumpet:	๐ŸŽบ
+:tulip:	๐ŸŒท
+:turtle:	๐Ÿข
+:tv:	๐Ÿ“บ
+:twisted_rightwards_arrows:	๐Ÿ”€
+:two:	2๏ธโƒฃ
+:two_men_holding_hands:	๐Ÿ‘ฌ
+:two_women_holding_hands:	๐Ÿ‘ญ
+:u5272:	๐Ÿˆน
+:u5408:	๐Ÿˆด
+:u55b6:	๐Ÿˆบ
+:u6307:	๐Ÿˆฏ
+:u6708:	๐Ÿˆท๏ธ
+:u6709:	๐Ÿˆถ
+:u6e80:	๐Ÿˆต
+:u7121:	๐Ÿˆš
+:u7533:	๐Ÿˆธ
+:u7981:	๐Ÿˆฒ
+:u7a7a:	๐Ÿˆณ
+:umbrella:	โ˜”
+:unamused:	๐Ÿ˜’
+:underage:	๐Ÿ”ž
+:unlock:	๐Ÿ”“
+:up:	๐Ÿ†™
+:us:	๐Ÿ‡บ๐Ÿ‡ธ
+:v:	โœŒ๏ธ
+:vertical_traffic_light:	๐Ÿšฆ
+:vhs:	๐Ÿ“ผ
+:vibration_mode:	๐Ÿ“ณ
+:video_camera:	๐Ÿ“น
+:video_game:	๐ŸŽฎ
+:violin:	๐ŸŽป
+:virgo:	โ™
+:volcano:	๐ŸŒ‹
+:vs:	๐Ÿ†š
+:walking:	๐Ÿšถ
+:waning_crescent_moon:	๐ŸŒ˜
+:waning_gibbous_moon:	๐ŸŒ–
+:warning:	โš ๏ธ
+:watch:	โŒš
+:water_buffalo:	๐Ÿƒ
+:watermelon:	๐Ÿ‰
+:wave:	๐Ÿ‘‹
+:wavy_dash:	ใ€ฐ๏ธ
+:waxing_crescent_moon:	๐ŸŒ’
+:waxing_gibbous_moon:	๐ŸŒ”
+:wc:	๐Ÿšพ
+:weary:	๐Ÿ˜ฉ
+:wedding:	๐Ÿ’’
+:whale2:	๐Ÿ‹
+:whale:	๐Ÿณ
+:wheelchair:	โ™ฟ
+:white_check_mark:	โœ…
+:white_circle:	โšช
+:white_flower:	๐Ÿ’ฎ
+:white_square_button:	๐Ÿ”ณ
+:wind_chime:	๐ŸŽ
+:wine_glass:	๐Ÿท
+:wink:	๐Ÿ˜‰
+:wolf:	๐Ÿบ
+:woman:	๐Ÿ‘ฉ
+:womans_clothes:	๐Ÿ‘š
+:womans_hat:	๐Ÿ‘’
+:womens:	๐Ÿšบ
+:worried:	๐Ÿ˜Ÿ
+:wrench:	๐Ÿ”ง
+:x:	โŒ
+:yellow_heart:	๐Ÿ’›
+:yen:	๐Ÿ’ด
+:yum:	๐Ÿ˜‹
+:zap:	โšก
+:zero:	0๏ธโƒฃ
+:zzz:	๐Ÿ’ค
diff --git a/awk/generate_sidebar.awk b/awk/generate_sidebar.awk
index 8088264..bac0a3a 100644
--- a/awk/generate_sidebar.awk
+++ b/awk/generate_sidebar.awk
@@ -3,6 +3,15 @@ function title_from_name(name) {
     gsub(/-/, " ", name)
     return name
 }
+function url_encode_path(path) {
+    gsub(/%/, "%25", path)
+    gsub(/ /, "%20", path)
+    gsub(/#/, "%23", path)
+    gsub(/\?/, "%3F", path)
+    gsub(/"/, "%22", path)
+    gsub(/'/, "%27", path)
+    return path
+}
 
 function get_title(path, default_title,   full_path, line, title, in_fm) {
     full_path = src "/" path
@@ -172,7 +181,7 @@ END {
                 continue
             }
 
-            printf "
  • %s
      \n", dir_path, get_title(this_d, title_from_name(parts[i])) + printf "
    • %s
        \n", url_encode_path(dir_path), get_title(this_d, title_from_name(parts[i])) opened_levels[++depth] = i } @@ -183,7 +192,7 @@ END { is_single = (single_file_index == "true" && md_count[curr_dir] == 1 && !has_index[curr_dir]) if (parts[n] != "index.md" && !is_single) { - path = "/" rel + path = url_encode_path("/" rel) gsub(/\.md$/, ".html", path) printf "
      • %s
      • \n", path, get_title(rel, title_from_name(parts[n])) } diff --git a/awk/headers.awk b/awk/headers.awk index 748e91a..fb9392d 100644 --- a/awk/headers.awk +++ b/awk/headers.awk @@ -13,6 +13,24 @@ function strip_markdown(s) { gsub(/-+$/, "", s) return s } +function unique_id(raw_id, candidate) { + candidate = raw_id + if (candidate == "") candidate = "section" + if (!(candidate in seen_ids)) { + seen_ids[candidate] = 1 + return candidate + } + seen_ids[candidate]++ + return candidate "-" seen_ids[candidate] +} +function print_heading(tag, line, id) { + id = unique_id(strip_markdown(line)) + if (enable_header_links == "true") { + print "<" tag " id=\"" id "\">" line " #" + } else { + print "<" tag " id=\"" id "\">" line "" + } +} function print_header(line) { tag = "" if (line ~ /^# /) { tag = "h1"; sub(/^# /, "", line) } @@ -23,12 +41,7 @@ function print_header(line) { else if (line ~ /^###### /) { tag = "h6"; sub(/^###### /, "", line) } if (tag != "") { - id = strip_markdown(line) - if (enable_header_links == "true") { - print "<" tag " id=\"" id "\">" line "" - } else { - print "<" tag " id=\"" id "\">" line "" - } + print_heading(tag, line) } else { print line } @@ -52,7 +65,7 @@ BEGIN { if ($0 ~ /^=+$/) { if (has_prev && prev != "" && prev !~ /^<[a-z]/) { - print "

        " prev "

        " + print_heading("h1", prev) has_prev = 0 } else { if (has_prev) print_header(prev) @@ -61,7 +74,7 @@ BEGIN { } } else if ($0 ~ /^-+$/) { if (has_prev && prev != "" && prev !~ /^<[a-z]/) { - print "

        " prev "

        " + print_heading("h2", prev) has_prev = 0 } else { if (has_prev) print_header(prev) diff --git a/awk/render_template.awk b/awk/render_template.awk index 1b23451..7e72fcd 100644 --- a/awk/render_template.awk +++ b/awk/render_template.awk @@ -16,6 +16,7 @@ BEGIN { style_path = ENVIRON["AWK_STYLE_PATH"] head_extra = ENVIRON["AWK_HEAD_EXTRA"] header_brand = ENVIRON["AWK_HEADER_BRAND"] + header_search = ENVIRON["AWK_HEADER_SEARCH"] lang = ENVIRON["AWK_LANG"] version = ENVIRON["AWK_VERSION"] content_warning = ENVIRON["AWK_CONTENT_WARNING"] @@ -33,6 +34,7 @@ BEGIN { line = replace_all(line, "{{CSS}}", style_path) line = replace_all(line, "{{HEAD_EXTRA}}", head_extra) line = replace_all(line, "{{HEADER_BRAND}}", header_brand) + line = replace_all(line, "{{HEADER_SEARCH}}", header_search) line = replace_all(line, "{{VERSION}}", version) pos = index(line, "{{CONTENT}}") diff --git a/lib/builder.sh b/lib/builder.sh index d98f2b3..755c568 100644 --- a/lib/builder.sh +++ b/lib/builder.sh @@ -68,14 +68,16 @@ eval "find \"$src\" \( $IGNORE_ARGS \) -prune -o -type d -print" | sort | while if [ "$md_count" -eq 1 ]; then md_file=$(find "$dir" ! -name "$(basename "$dir")" -prune -name "*.md") is_home="false"; [ "$dir" = "$src" ] && is_home="true" - target_url="/$rel_dir/index.html" - [ "$rel_dir" = "." ] && target_url="/index.html" + target_url=$(directory_index_url "$rel_dir") if needs_rebuild "$md_file" "$out_dir/index.html"; then parse_frontmatter "$md_file" if [ -n "$fm_content_warning" ]; then content_out_file="$out_dir/content.html" - content_rel_url="/$rel_dir/content.html" - [ "$rel_dir" = "." ] && content_rel_url="/content.html" + if [ "$rel_dir" = "." ]; then + content_rel_url="/content.html" + else + content_rel_url="/$(encode_url_path "$rel_dir")/content.html" + fi write_content_warning_outputs "$md_file" "$content_out_file" "$content_rel_url" "$target_url" "$out_dir/index.html" "$is_home" else render_markdown "$md_file" "$is_home" "$target_url" > "$out_dir/index.html" @@ -112,7 +114,8 @@ eval "find \"$src\" \( $IGNORE_ARGS \) -prune -o -type d -print" | sort | while template.html|site.conf|style.css|styles.root.css|index.md) continue ;; esac if [ -d "$entry" ]; then - echo "${name}|- [${name}/](${name}/index.html)" >> "$temp_entries" + dir_url="$(encode_url_path "$name")/index.html" + echo "${name}|- [${name}/](${dir_url})" >> "$temp_entries" elif [ "${entry%.md}" != "$entry" ]; then label="${name%.md}" set_post_metadata "$entry" "" @@ -147,9 +150,11 @@ eval "find \"$src\" \( $IGNORE_ARGS \) -prune -o -type d -print" | sort | while else sort_key="$name" fi - echo "${sort_key}|- [$label](${name%.md}.html)|$name|${name%.md}.html" >> "$temp_entries" + entry_url=$(encode_url_path "${name%.md}.html") + echo "${sort_key}|- [$label](${entry_url})|$name|${entry_url}" >> "$temp_entries" else - echo "${name}|- [$name]($name)|$name|$name" >> "$temp_entries" + asset_url=$(encode_url_path "$name") + echo "${name}|- [$name]($asset_url)|$name|$asset_url" >> "$temp_entries" fi done @@ -186,8 +191,7 @@ eval "find \"$src\" \( $IGNORE_ARGS \) -prune -o -type d -print" | sort | while rm -f "$temp_entries" is_home="false"; [ "$dir" = "$src" ] && is_home="true" - target_url="/$rel_dir/index.html" - [ "$rel_dir" = "." ] && target_url="/index.html" + target_url=$(directory_index_url "$rel_dir") num_items=$(wc -l < "$temp_list") if [ "$is_posts_dir" = "true" ] && [ -n "$posts_per_page" ] && [ "$posts_per_page" -gt 0 ] && [ "$num_items" -gt "$posts_per_page" ]; then @@ -289,8 +293,11 @@ eval "find \"$src\" \( $IGNORE_ARGS \) -prune -o -type d -print" | sort | while if [ -n "$fm_content_warning" ]; then content_out_file="$out_dir/content.html" - content_rel_url="/$rel_dir/content.html" - [ "$rel_dir" = "." ] && content_rel_url="/content.html" + if [ "$rel_dir" = "." ]; then + content_rel_url="/content.html" + else + content_rel_url="/$(encode_url_path "$rel_dir")/content.html" + fi write_content_warning_outputs "$temp_index" "$content_out_file" "$content_rel_url" "$target_url" "$out_dir/index.html" "$is_home" else render_markdown "$temp_index" "$is_home" "$target_url" > "$out_dir/index.html" @@ -360,8 +367,8 @@ eval "find \"$src\" \( $IGNORE_ARGS \) -prune -o -type f -print" | sort | while if needs_rebuild "$file" "$out_file"; then if [ -n "$fm_content_warning" ]; then content_out_file="$out/${rel_path%.md}-content.html" - content_rel_url="/${rel_path%.md}-content.html" - orig_rel_url="/${rel_path%.md}.html" + content_rel_url="/$(encode_url_path "${rel_path%.md}")-content.html" + orig_rel_url=$(markdown_file_url "$rel_path") write_content_warning_outputs "$file" "$content_out_file" "$content_rel_url" "$orig_rel_url" "$out_file" "$is_home" else render_markdown "$file" "$is_home" > "$out_file" @@ -446,7 +453,7 @@ if [ "$generate_feed" = "true" ] && [ -n "$base_url" ]; then rel_path="${post_file#"$src"}" rel_path="${rel_path#/}" - post_url="$base_url_feed/${rel_path%.md}.html" + post_url="$base_url_feed$(markdown_file_url "$rel_path")" if date -u -d "$post_date $post_time" '+%a, %d %b %Y %H:%M:%S +0000' >/dev/null 2>&1; then pub_date=$(date -u -d "$post_date $post_time" '+%a, %d %b %Y %H:%M:%S +0000') @@ -497,10 +504,10 @@ if [ "$generate_search" = "true" ] || [ "$generate_tags" = "true" ]; then if [ "$rel_path" = "index.md" ]; then md_url="/index.html" else - md_url="/${rel_path%/index.md}/index.html" + md_url=$(directory_index_url "${rel_path%/index.md}") fi else - md_url="/${rel_path%.md}.html" + md_url=$(markdown_file_url "$rel_path") if [ "$single_file_index" = "true" ]; then dir_of_file="$(dirname "$md_file")" rel_dir_of_file="${dir_of_file#"$src"}" @@ -518,7 +525,7 @@ if [ "$generate_search" = "true" ] || [ "$generate_tags" = "true" ]; then if [ "$rel_dir_of_file" = "." ]; then md_url="/index.html" else - md_url="/$rel_dir_of_file/index.html" + md_url=$(directory_index_url "$rel_dir_of_file") fi fi fi @@ -528,7 +535,7 @@ if [ "$generate_search" = "true" ] || [ "$generate_tags" = "true" ]; then parse_frontmatter "$md_file" [ "$fm_draft" = "true" ] && continue - markdown_title_from_file "$md_file" "$title - Page" + markdown_title_from_loaded_file "$md_file" "$title - Page" md_heading="$markdown_title" if [ "$generate_search" = "true" ]; then diff --git a/lib/config.sh b/lib/config.sh index d6ce81a..d96b322 100644 --- a/lib/config.sh +++ b/lib/config.sh @@ -49,6 +49,7 @@ DEFAULT_TMPL='

        {{HEADER_BRAND}}

        + {{HEADER_SEARCH}}
        diff --git a/lib/generator.sh b/lib/generator.sh index 4492657..2e83c38 100644 --- a/lib/generator.sh +++ b/lib/generator.sh @@ -117,7 +117,7 @@ render_markdown() { else rel_path="${file#"$src"}" rel_path="${rel_path#/}" - current_url="/${rel_path%.md}.html" + current_url=$(markdown_file_url "$rel_path") fi content_file="$file" @@ -158,7 +158,7 @@ render_markdown() { "$src/styles.css") style_rel_to_src="styles.css" ;; "$src/style.css") style_rel_to_src="style.css" ;; esac - style_path="/${style_rel_to_src%styles.css}" + style_path="/$(encode_url_path "${style_rel_to_src%styles.css}")" style_path="${style_path%style.css}styles.css" else style_path="/styles.css" @@ -252,13 +252,14 @@ render_markdown() { final_nav="$nav" final_header_brand="$header_brand" + final_header_search="" if [ "$search_in_header" = "true" ]; then - final_header_brand="$header_brand $SEARCH_FORM_HEADER" + final_header_search="$SEARCH_FORM_HEADER" final_nav="$SEARCH_FORM_NAV $nav" fi - ENABLE_HEADER_LINKS="$enable_header_links" CUSTOM_ADMONITIONS="$custom_admonitions" MARKDOWN_SITE_ROOT="$src" MARKDOWN_FALLBACK_FILE="$script_dir/styles/$style.css" sh "$script_dir/markdown.sh" "$content_file" | AWK_LANG="$lang" AWK_CURRENT_URL="$current_url" AWK_TITLE="$page_title" AWK_NAV="$final_nav" AWK_FOOTER="$final_footer" AWK_STYLE_PATH="${style_path}" AWK_HEADER_BRAND="$final_header_brand" AWK_HEAD_EXTRA="$head_extra" AWK_VERSION="$asset_version" AWK_CONTENT_WARNING="$fm_content_warning" awk -f "$awk_dir/render_template.awk" "$local_template" + ENABLE_HEADER_LINKS="$enable_header_links" CUSTOM_ADMONITIONS="$custom_admonitions" MARKDOWN_SITE_ROOT="$src" MARKDOWN_FALLBACK_FILE="$script_dir/styles/$style.css" sh "$script_dir/markdown.sh" "$content_file" | AWK_LANG="$lang" AWK_CURRENT_URL="$current_url" AWK_TITLE="$page_title" AWK_NAV="$final_nav" AWK_FOOTER="$final_footer" AWK_STYLE_PATH="${style_path}" AWK_HEADER_BRAND="$final_header_brand" AWK_HEADER_SEARCH="$final_header_search" AWK_HEAD_EXTRA="$head_extra" AWK_VERSION="$asset_version" AWK_CONTENT_WARNING="$fm_content_warning" awk -f "$awk_dir/render_template.awk" "$local_template" } generate_content_warning_page() { _fm_title="$1" diff --git a/lib/metadata.sh b/lib/metadata.sh index 35b2825..d83c94c 100644 --- a/lib/metadata.sh +++ b/lib/metadata.sh @@ -38,11 +38,9 @@ first_heading_from_markdown() { grep -m 1 '^# ' "$1" | sed 's/^# *//; s/ *$//' } -markdown_title_from_file() { +markdown_title_from_loaded_file() { _title_file="$1" _title_default="$2" - - parse_frontmatter "$_title_file" markdown_title="$fm_title" if [ -z "$markdown_title" ]; then @@ -62,6 +60,13 @@ markdown_title_from_file() { fi } +markdown_title_from_file() { + _title_file="$1" + _title_default="$2" + parse_frontmatter "$_title_file" + markdown_title_from_loaded_file "$_title_file" "$_title_default" +} + set_post_datetime() { _raw_date="$1" _fallback_name="$2" diff --git a/lib/runtime.sh b/lib/runtime.sh index ddbf252..0f7c43d 100644 --- a/lib/runtime.sh +++ b/lib/runtime.sh @@ -2,6 +2,30 @@ trim_whitespace() { printf '%s' "$1" | sed 's/^[[:space:]]*//; s/[[:space:]]*$//' } +encode_url_path() { + printf '%s' "$1" | sed \ + -e 's/%/%25/g' \ + -e 's/ /%20/g' \ + -e 's/#/%23/g' \ + -e 's/?/%3F/g' \ + -e 's/"/%22/g' \ + -e "s/'/%27/g" +} + +markdown_file_url() { + _rel_path="$1" + printf '/%s.html\n' "$(encode_url_path "${_rel_path%.md}")" +} + +directory_index_url() { + _rel_dir="$1" + if [ -z "$_rel_dir" ] || [ "$_rel_dir" = "." ]; then + printf '/index.html\n' + else + printf '/%s/index.html\n' "$(encode_url_path "$_rel_dir")" + fi +} + append_find_rule() { _expr="$1" _rule="$2" diff --git a/markdown.sh b/markdown.sh index 1303db2..425ecfd 100755 --- a/markdown.sh +++ b/markdown.sh @@ -15,7 +15,7 @@ sed_inplace() { fi } -temp_file="${KEWT_TMPDIR:-/tmp}/markdown.$$.md" +temp_file=$(mktemp "${KEWT_TMPDIR:-/tmp}/markdown.XXXXXX") cat "$@" > "$temp_file" trap 'rm -f "$temp_file" "$temp_file.tmp" "$temp_file.fm"' EXIT INT TERM @@ -30,7 +30,7 @@ awk -f "$awk_dir/mask_inline_code.awk" "$temp_file" > "$temp_file.tmp" && mv "$t awk -f "$awk_dir/mask_plain.awk" "$temp_file" > "$temp_file.tmp" && mv "$temp_file.tmp" "$temp_file" # Reference links -refs=$(cat "$@" | awk '/^\[[^\]]+\]: */') +refs=$(awk '/^\[[^\]]+\]: */' "$temp_file") IFS=' ' for ref in $refs; do @@ -75,7 +75,7 @@ awk -f "$awk_dir/breaks.awk" "$temp_file" > "$temp_file.tmp" && mv "$temp_file.t awk -f "$awk_dir/paragraphs.awk" "$temp_file" > "$temp_file.tmp" && mv "$temp_file.tmp" "$temp_file" # Inline styles -awk -f "$awk_dir/emoji.awk" "$temp_file" > "$temp_file.tmp" && mv "$temp_file.tmp" "$temp_file" +awk -v emoji_file="$awk_dir/emoji.tsv" -f "$awk_dir/emoji.awk" "$temp_file" > "$temp_file.tmp" && mv "$temp_file.tmp" "$temp_file" awk -f "$awk_dir/markdown_inline.awk" "$temp_file" > "$temp_file.tmp" && mv "$temp_file.tmp" "$temp_file" awk -v input_file="$1" -v site_root="$MARKDOWN_SITE_ROOT" -v fallback_file="$MARKDOWN_FALLBACK_FILE" -v script_dir="$script_dir" -f "$awk_dir/markdown_embed.awk" "$temp_file" rm "$temp_file"