Cleanups and reducing duplicates
This commit is contained in:
parent
92dc5a8908
commit
a03c6d2348
2
guix.scm
2
guix.scm
|
@ -80,7 +80,7 @@
|
|||
"GUILE_LOAD_COMPILED_PATH"
|
||||
(compiled-dir out version)
|
||||
(compiled-dir "" version))))
|
||||
,''("generate-east-asian"
|
||||
,''("generate-eastasian"
|
||||
"generate-emoji"
|
||||
"generate-graphemes"))
|
||||
#t))))))))
|
||||
|
|
2
hall.scm
2
hall.scm
|
@ -36,7 +36,7 @@
|
|||
(programs
|
||||
((directory
|
||||
"scripts"
|
||||
((in-file "generate-east-asian")
|
||||
((in-file "generate-eastasian")
|
||||
(in-file "generate-emoji")
|
||||
(in-file "generate-graphemes")))))
|
||||
(documentation
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
(define stdout (current-output-port))
|
||||
|
||||
(define east-asian-url
|
||||
(define url
|
||||
"https://unicode.org/Public/13.0.0/ucd/EastAsianWidth.txt")
|
||||
|
||||
(define-peg-pattern @ea-width-prop all
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
(define eastasian-ht (make-hash-table 6))
|
||||
|
||||
(define (process-east-asian-line line)
|
||||
(define (process-line line)
|
||||
(define (string->property str comment)
|
||||
(if (string-contains comment "COMBINING")
|
||||
'combining
|
||||
|
@ -90,22 +90,15 @@
|
|||
(zip ea-sets ea-symbol-names))
|
||||
|
||||
|
||||
(define line-func
|
||||
(if (= 2 (length (command-line)))
|
||||
(λ ()
|
||||
(file-to-lines (last (command-line)) stdout))
|
||||
(λ ()
|
||||
(wget-to-lines east-asian-url stdout))))
|
||||
|
||||
(define file "uniseg/eastasian.scm")
|
||||
|
||||
(format stdout "Writing to ~a...\n" file)
|
||||
|
||||
(with-output-to-file file
|
||||
(λ ()
|
||||
(format #t ";; Code generated by ~a. DO NOT EDIT\n\n" (first (command-line)))
|
||||
(format #t ";; Code generated by ~a. DO NOT EDIT\n\n" (basename (current-filename)))
|
||||
|
||||
(for-each process-east-asian-line (line-func))
|
||||
(for-each process-line (cmdline-wget-or-file url stdout))
|
||||
|
||||
(pretty-print
|
||||
`(define-module (uniseg eastasian)
|
||||
|
@ -152,4 +145,3 @@
|
|||
(display "Code generation complete.\n" stdout)))
|
||||
|
||||
(format stdout "Written to ~a.\n" file)
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
(define stdout (current-output-port))
|
||||
|
||||
(define emoji-url
|
||||
(define url
|
||||
"https://unicode.org/Public/13.0.0/ucd/emoji/emoji-data.txt")
|
||||
|
||||
(define-peg-pattern @emoji-category all
|
||||
|
@ -49,7 +49,7 @@
|
|||
(define emoji-sets-and-symbols
|
||||
(zip emoji-sets emoji-symbol-names))
|
||||
|
||||
(define (process-emoji-line line)
|
||||
(define (process-line line)
|
||||
(define (string->category str)
|
||||
(match str
|
||||
("Emoji" 'emoji)
|
||||
|
@ -87,22 +87,15 @@
|
|||
(cons-hash-list! emoji-ht category f l)))
|
||||
#:unwind? #t)))))
|
||||
|
||||
(define line-func
|
||||
(if (= 2 (length (command-line)))
|
||||
(λ ()
|
||||
(file-to-lines (last (command-line)) stdout))
|
||||
(λ ()
|
||||
(wget-to-lines emoji-url stdout))))
|
||||
|
||||
(define file "uniseg/emoji.scm")
|
||||
|
||||
(format stdout "Writing to ~a...\n" file)
|
||||
|
||||
(with-output-to-file file
|
||||
(λ ()
|
||||
(format #t ";; Code generated by ~a. DO NOT EDIT\n\n" (first (command-line)))
|
||||
(format #t ";; Code generated by ~a. DO NOT EDIT\n\n" (basename (current-filename)))
|
||||
|
||||
(for-each process-emoji-line (line-func))
|
||||
(for-each process-line (cmdline-wget-or-file url stdout))
|
||||
|
||||
(pretty-print
|
||||
`(define-module (uniseg emoji)
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
(define stdout (current-output-port))
|
||||
|
||||
(define grapheme-url
|
||||
(define url
|
||||
"https://www.unicode.org/Public/15.0.0/ucd/auxiliary/GraphemeBreakProperty.txt")
|
||||
|
||||
(define-peg-pattern @grapheme-category all
|
||||
|
@ -56,7 +56,7 @@
|
|||
(define grapheme-sets-and-symbols
|
||||
(zip grapheme-sets grapheme-symbol-names))
|
||||
|
||||
(define (process-grapheme-line line)
|
||||
(define (process-line line)
|
||||
(define (string->category str)
|
||||
(match str
|
||||
("L" 'hangul-syllable-l)
|
||||
|
@ -101,12 +101,6 @@
|
|||
(cons-hash-list! grapheme-ht category f l)))
|
||||
#:unwind? #t)))))
|
||||
|
||||
(define line-func
|
||||
(if (= 2 (length (command-line)))
|
||||
(λ ()
|
||||
(file-to-lines (last (command-line)) stdout))
|
||||
(λ ()
|
||||
(wget-to-lines grapheme-url stdout))))
|
||||
|
||||
(define file "uniseg/graphemes.scm")
|
||||
|
||||
|
@ -114,9 +108,9 @@
|
|||
|
||||
(with-output-to-file file
|
||||
(λ ()
|
||||
(format #t ";; Code generated by ~a. DO NOT EDIT\n\n" (first (command-line)))
|
||||
(format #t ";; Code generated by ~a. DO NOT EDIT\n\n" (basename (current-filename)))
|
||||
|
||||
(for-each process-grapheme-line (line-func))
|
||||
(for-each process-line (cmdline-wget-or-file url stdout))
|
||||
|
||||
(pretty-print
|
||||
`(define-module (uniseg graphemes)
|
||||
|
|
1220
uniseg/eastasian.scm
1220
uniseg/eastasian.scm
File diff suppressed because it is too large
Load Diff
921
uniseg/emoji.scm
921
uniseg/emoji.scm
|
@ -1,4 +1,4 @@
|
|||
;; Code generated by scripts/generate-emoji. DO NOT EDIT
|
||||
;; Code generated by generate-emoji. DO NOT EDIT
|
||||
|
||||
(define-module
|
||||
(uniseg emoji)
|
||||
|
@ -18,450 +18,7 @@
|
|||
emoji-charsets))
|
||||
(define emoji-ht
|
||||
(alist->hashq-table
|
||||
'((emoji-modifier (127995 127999))
|
||||
(emoji-component
|
||||
(917536 917631)
|
||||
(129456 129459)
|
||||
(127995 127999)
|
||||
(127462 127487)
|
||||
(65039 65039)
|
||||
(8419 8419)
|
||||
(8205 8205)
|
||||
(48 57)
|
||||
(42 42)
|
||||
(35 35))
|
||||
(emoji-modifier-base
|
||||
(129489 129501)
|
||||
(129485 129487)
|
||||
(129467 129467)
|
||||
(129464 129465)
|
||||
(129461 129462)
|
||||
(129399 129399)
|
||||
(129340 129342)
|
||||
(129331 129337)
|
||||
(129329 129330)
|
||||
(129328 129328)
|
||||
(129318 129318)
|
||||
(129311 129311)
|
||||
(129305 129310)
|
||||
(129304 129304)
|
||||
(129295 129295)
|
||||
(129292 129292)
|
||||
(128716 128716)
|
||||
(128704 128704)
|
||||
(128694 128694)
|
||||
(128692 128693)
|
||||
(128675 128675)
|
||||
(128587 128591)
|
||||
(128581 128583)
|
||||
(128405 128406)
|
||||
(128400 128400)
|
||||
(128378 128378)
|
||||
(128372 128373)
|
||||
(128170 128170)
|
||||
(128145 128145)
|
||||
(128143 128143)
|
||||
(128133 128135)
|
||||
(128129 128131)
|
||||
(128124 128124)
|
||||
(128110 128120)
|
||||
(128108 128109)
|
||||
(128102 128107)
|
||||
(128070 128080)
|
||||
(128066 128067)
|
||||
(127947 127948)
|
||||
(127946 127946)
|
||||
(127943 127943)
|
||||
(127938 127940)
|
||||
(127877 127877)
|
||||
(9997 9997)
|
||||
(9994 9996)
|
||||
(9977 9977)
|
||||
(9757 9757))
|
||||
(emoji (129744 129750)
|
||||
(129728 129730)
|
||||
(129712 129718)
|
||||
(129686 129704)
|
||||
(129680 129685)
|
||||
(129667 129670)
|
||||
(129664 129666)
|
||||
(129656 129658)
|
||||
(129652 129652)
|
||||
(129648 129651)
|
||||
(129511 129535)
|
||||
(129488 129510)
|
||||
(129485 129487)
|
||||
(129483 129483)
|
||||
(129475 129482)
|
||||
(129473 129474)
|
||||
(129472 129472)
|
||||
(129466 129471)
|
||||
(129456 129465)
|
||||
(129454 129455)
|
||||
(129451 129453)
|
||||
(129445 129450)
|
||||
(129443 129444)
|
||||
(129432 129442)
|
||||
(129426 129431)
|
||||
(129413 129425)
|
||||
(129408 129412)
|
||||
(129404 129407)
|
||||
(129403 129403)
|
||||
(129402 129402)
|
||||
(129399 129400)
|
||||
(129395 129398)
|
||||
(129394 129394)
|
||||
(129393 129393)
|
||||
(129388 129392)
|
||||
(129375 129387)
|
||||
(129360 129374)
|
||||
(129357 129359)
|
||||
(129356 129356)
|
||||
(129351 129355)
|
||||
(129344 129349)
|
||||
(129343 129343)
|
||||
(129340 129342)
|
||||
(129331 129338)
|
||||
(129329 129330)
|
||||
(129328 129328)
|
||||
(129320 129327)
|
||||
(129312 129319)
|
||||
(129311 129311)
|
||||
(129305 129310)
|
||||
(129296 129304)
|
||||
(129293 129295)
|
||||
(129292 129292)
|
||||
(128992 129003)
|
||||
(128763 128764)
|
||||
(128762 128762)
|
||||
(128761 128761)
|
||||
(128759 128760)
|
||||
(128756 128758)
|
||||
(128755 128755)
|
||||
(128752 128752)
|
||||
(128747 128748)
|
||||
(128745 128745)
|
||||
(128736 128741)
|
||||
(128726 128727)
|
||||
(128725 128725)
|
||||
(128721 128722)
|
||||
(128720 128720)
|
||||
(128717 128719)
|
||||
(128716 128716)
|
||||
(128715 128715)
|
||||
(128705 128709)
|
||||
(128704 128704)
|
||||
(128703 128703)
|
||||
(128697 128702)
|
||||
(128695 128696)
|
||||
(128694 128694)
|
||||
(128691 128693)
|
||||
(128690 128690)
|
||||
(128686 128689)
|
||||
(128679 128685)
|
||||
(128678 128678)
|
||||
(128676 128677)
|
||||
(128675 128675)
|
||||
(128674 128674)
|
||||
(128667 128673)
|
||||
(128665 128666)
|
||||
(128664 128664)
|
||||
(128663 128663)
|
||||
(128662 128662)
|
||||
(128661 128661)
|
||||
(128660 128660)
|
||||
(128657 128659)
|
||||
(128656 128656)
|
||||
(128655 128655)
|
||||
(128654 128654)
|
||||
(128653 128653)
|
||||
(128652 128652)
|
||||
(128650 128651)
|
||||
(128649 128649)
|
||||
(128648 128648)
|
||||
(128647 128647)
|
||||
(128646 128646)
|
||||
(128643 128645)
|
||||
(128641 128642)
|
||||
(128640 128640)
|
||||
(128581 128591)
|
||||
(128577 128580)
|
||||
(128567 128576)
|
||||
(128566 128566)
|
||||
(128565 128565)
|
||||
(128564 128564)
|
||||
(128560 128563)
|
||||
(128558 128559)
|
||||
(128557 128557)
|
||||
(128556 128556)
|
||||
(128552 128555)
|
||||
(128550 128551)
|
||||
(128544 128549)
|
||||
(128543 128543)
|
||||
(128540 128542)
|
||||
(128539 128539)
|
||||
(128538 128538)
|
||||
(128537 128537)
|
||||
(128536 128536)
|
||||
(128535 128535)
|
||||
(128534 128534)
|
||||
(128533 128533)
|
||||
(128530 128532)
|
||||
(128529 128529)
|
||||
(128528 128528)
|
||||
(128527 128527)
|
||||
(128526 128526)
|
||||
(128521 128525)
|
||||
(128519 128520)
|
||||
(128513 128518)
|
||||
(128512 128512)
|
||||
(128507 128511)
|
||||
(128506 128506)
|
||||
(128499 128499)
|
||||
(128495 128495)
|
||||
(128488 128488)
|
||||
(128483 128483)
|
||||
(128481 128481)
|
||||
(128476 128478)
|
||||
(128465 128467)
|
||||
(128450 128452)
|
||||
(128444 128444)
|
||||
(128433 128434)
|
||||
(128424 128424)
|
||||
(128421 128421)
|
||||
(128420 128420)
|
||||
(128405 128406)
|
||||
(128400 128400)
|
||||
(128394 128397)
|
||||
(128391 128391)
|
||||
(128378 128378)
|
||||
(128371 128377)
|
||||
(128367 128368)
|
||||
(128348 128359)
|
||||
(128336 128347)
|
||||
(128331 128334)
|
||||
(128329 128330)
|
||||
(128302 128317)
|
||||
(128300 128301)
|
||||
(128278 128299)
|
||||
(128277 128277)
|
||||
(128266 128276)
|
||||
(128265 128265)
|
||||
(128264 128264)
|
||||
(128260 128263)
|
||||
(128259 128259)
|
||||
(128255 128258)
|
||||
(128253 128253)
|
||||
(128249 128252)
|
||||
(128248 128248)
|
||||
(128246 128247)
|
||||
(128245 128245)
|
||||
(128240 128244)
|
||||
(128239 128239)
|
||||
(128238 128238)
|
||||
(128236 128237)
|
||||
(128184 128235)
|
||||
(128182 128183)
|
||||
(128174 128181)
|
||||
(128173 128173)
|
||||
(128110 128172)
|
||||
(128108 128109)
|
||||
(128102 128107)
|
||||
(128101 128101)
|
||||
(128066 128100)
|
||||
(128065 128065)
|
||||
(128064 128064)
|
||||
(128063 128063)
|
||||
(128043 128062)
|
||||
(128042 128042)
|
||||
(128023 128041)
|
||||
(128022 128022)
|
||||
(128021 128021)
|
||||
(128020 128020)
|
||||
(128019 128019)
|
||||
(128017 128018)
|
||||
(128015 128016)
|
||||
(128012 128014)
|
||||
(128009 128011)
|
||||
(128008 128008)
|
||||
(127992 128007)
|
||||
(127991 127991)
|
||||
(127989 127989)
|
||||
(127988 127988)
|
||||
(127987 127987)
|
||||
(127973 127984)
|
||||
(127972 127972)
|
||||
(127968 127971)
|
||||
(127956 127967)
|
||||
(127951 127955)
|
||||
(127947 127950)
|
||||
(127946 127946)
|
||||
(127945 127945)
|
||||
(127944 127944)
|
||||
(127943 127943)
|
||||
(127942 127942)
|
||||
(127941 127941)
|
||||
(127904 127940)
|
||||
(127902 127903)
|
||||
(127897 127899)
|
||||
(127894 127895)
|
||||
(127872 127891)
|
||||
(127870 127871)
|
||||
(127869 127869)
|
||||
(127868 127868)
|
||||
(127825 127867)
|
||||
(127824 127824)
|
||||
(127820 127823)
|
||||
(127819 127819)
|
||||
(127799 127818)
|
||||
(127798 127798)
|
||||
(127796 127797)
|
||||
(127794 127795)
|
||||
(127792 127793)
|
||||
(127789 127791)
|
||||
(127780 127788)
|
||||
(127777 127777)
|
||||
(127775 127776)
|
||||
(127773 127774)
|
||||
(127772 127772)
|
||||
(127771 127771)
|
||||
(127770 127770)
|
||||
(127769 127769)
|
||||
(127766 127768)
|
||||
(127763 127765)
|
||||
(127762 127762)
|
||||
(127761 127761)
|
||||
(127760 127760)
|
||||
(127759 127759)
|
||||
(127757 127758)
|
||||
(127744 127756)
|
||||
(127568 127569)
|
||||
(127538 127546)
|
||||
(127535 127535)
|
||||
(127514 127514)
|
||||
(127489 127490)
|
||||
(127462 127487)
|
||||
(127377 127386)
|
||||
(127374 127374)
|
||||
(127358 127359)
|
||||
(127344 127345)
|
||||
(127183 127183)
|
||||
(126980 126980)
|
||||
(12953 12953)
|
||||
(12951 12951)
|
||||
(12349 12349)
|
||||
(12336 12336)
|
||||
(11093 11093)
|
||||
(11088 11088)
|
||||
(11035 11036)
|
||||
(11013 11015)
|
||||
(10548 10549)
|
||||
(10175 10175)
|
||||
(10160 10160)
|
||||
(10145 10145)
|
||||
(10133 10135)
|
||||
(10084 10084)
|
||||
(10083 10083)
|
||||
(10071 10071)
|
||||
(10067 10069)
|
||||
(10062 10062)
|
||||
(10060 10060)
|
||||
(10055 10055)
|
||||
(10052 10052)
|
||||
(10035 10036)
|
||||
(10024 10024)
|
||||
(10017 10017)
|
||||
(10013 10013)
|
||||
(10006 10006)
|
||||
(10004 10004)
|
||||
(10002 10002)
|
||||
(9999 9999)
|
||||
(9997 9997)
|
||||
(9992 9996)
|
||||
(9989 9989)
|
||||
(9986 9986)
|
||||
(9981 9981)
|
||||
(9978 9978)
|
||||
(9975 9977)
|
||||
(9973 9973)
|
||||
(9972 9972)
|
||||
(9970 9971)
|
||||
(9968 9969)
|
||||
(9962 9962)
|
||||
(9961 9961)
|
||||
(9940 9940)
|
||||
(9939 9939)
|
||||
(9937 9937)
|
||||
(9935 9935)
|
||||
(9934 9934)
|
||||
(9928 9928)
|
||||
(9924 9925)
|
||||
(9917 9918)
|
||||
(9904 9905)
|
||||
(9898 9899)
|
||||
(9895 9895)
|
||||
(9888 9889)
|
||||
(9883 9884)
|
||||
(9881 9881)
|
||||
(9878 9879)
|
||||
(9877 9877)
|
||||
(9876 9876)
|
||||
(9875 9875)
|
||||
(9874 9874)
|
||||
(9855 9855)
|
||||
(9854 9854)
|
||||
(9851 9851)
|
||||
(9832 9832)
|
||||
(9829 9830)
|
||||
(9827 9827)
|
||||
(9824 9824)
|
||||
(9823 9823)
|
||||
(9800 9811)
|
||||
(9794 9794)
|
||||
(9792 9792)
|
||||
(9786 9786)
|
||||
(9784 9785)
|
||||
(9775 9775)
|
||||
(9774 9774)
|
||||
(9770 9770)
|
||||
(9766 9766)
|
||||
(9762 9763)
|
||||
(9760 9760)
|
||||
(9757 9757)
|
||||
(9752 9752)
|
||||
(9748 9749)
|
||||
(9745 9745)
|
||||
(9742 9742)
|
||||
(9732 9732)
|
||||
(9730 9731)
|
||||
(9728 9729)
|
||||
(9723 9726)
|
||||
(9664 9664)
|
||||
(9654 9654)
|
||||
(9642 9643)
|
||||
(9410 9410)
|
||||
(9208 9210)
|
||||
(9203 9203)
|
||||
(9201 9202)
|
||||
(9200 9200)
|
||||
(9199 9199)
|
||||
(9197 9198)
|
||||
(9193 9196)
|
||||
(9167 9167)
|
||||
(9000 9000)
|
||||
(8986 8987)
|
||||
(8617 8618)
|
||||
(8596 8601)
|
||||
(8505 8505)
|
||||
(8482 8482)
|
||||
(8265 8265)
|
||||
(8252 8252)
|
||||
(174 174)
|
||||
(169 169)
|
||||
(48 57)
|
||||
(42 42)
|
||||
(35 35))
|
||||
(emoji-presentation
|
||||
'((emoji-presentation
|
||||
(129744 129750)
|
||||
(129728 129730)
|
||||
(129712 129718)
|
||||
|
@ -1214,44 +771,472 @@
|
|||
(8265 8265)
|
||||
(8252 8252)
|
||||
(174 174)
|
||||
(169 169)))))
|
||||
(169 169))
|
||||
(emoji-modifier-base
|
||||
(129489 129501)
|
||||
(129485 129487)
|
||||
(129467 129467)
|
||||
(129464 129465)
|
||||
(129461 129462)
|
||||
(129399 129399)
|
||||
(129340 129342)
|
||||
(129331 129337)
|
||||
(129329 129330)
|
||||
(129328 129328)
|
||||
(129318 129318)
|
||||
(129311 129311)
|
||||
(129305 129310)
|
||||
(129304 129304)
|
||||
(129295 129295)
|
||||
(129292 129292)
|
||||
(128716 128716)
|
||||
(128704 128704)
|
||||
(128694 128694)
|
||||
(128692 128693)
|
||||
(128675 128675)
|
||||
(128587 128591)
|
||||
(128581 128583)
|
||||
(128405 128406)
|
||||
(128400 128400)
|
||||
(128378 128378)
|
||||
(128372 128373)
|
||||
(128170 128170)
|
||||
(128145 128145)
|
||||
(128143 128143)
|
||||
(128133 128135)
|
||||
(128129 128131)
|
||||
(128124 128124)
|
||||
(128110 128120)
|
||||
(128108 128109)
|
||||
(128102 128107)
|
||||
(128070 128080)
|
||||
(128066 128067)
|
||||
(127947 127948)
|
||||
(127946 127946)
|
||||
(127943 127943)
|
||||
(127938 127940)
|
||||
(127877 127877)
|
||||
(9997 9997)
|
||||
(9994 9996)
|
||||
(9977 9977)
|
||||
(9757 9757))
|
||||
(emoji-modifier (127995 127999))
|
||||
(emoji (129744 129750)
|
||||
(129728 129730)
|
||||
(129712 129718)
|
||||
(129686 129704)
|
||||
(129680 129685)
|
||||
(129667 129670)
|
||||
(129664 129666)
|
||||
(129656 129658)
|
||||
(129652 129652)
|
||||
(129648 129651)
|
||||
(129511 129535)
|
||||
(129488 129510)
|
||||
(129485 129487)
|
||||
(129483 129483)
|
||||
(129475 129482)
|
||||
(129473 129474)
|
||||
(129472 129472)
|
||||
(129466 129471)
|
||||
(129456 129465)
|
||||
(129454 129455)
|
||||
(129451 129453)
|
||||
(129445 129450)
|
||||
(129443 129444)
|
||||
(129432 129442)
|
||||
(129426 129431)
|
||||
(129413 129425)
|
||||
(129408 129412)
|
||||
(129404 129407)
|
||||
(129403 129403)
|
||||
(129402 129402)
|
||||
(129399 129400)
|
||||
(129395 129398)
|
||||
(129394 129394)
|
||||
(129393 129393)
|
||||
(129388 129392)
|
||||
(129375 129387)
|
||||
(129360 129374)
|
||||
(129357 129359)
|
||||
(129356 129356)
|
||||
(129351 129355)
|
||||
(129344 129349)
|
||||
(129343 129343)
|
||||
(129340 129342)
|
||||
(129331 129338)
|
||||
(129329 129330)
|
||||
(129328 129328)
|
||||
(129320 129327)
|
||||
(129312 129319)
|
||||
(129311 129311)
|
||||
(129305 129310)
|
||||
(129296 129304)
|
||||
(129293 129295)
|
||||
(129292 129292)
|
||||
(128992 129003)
|
||||
(128763 128764)
|
||||
(128762 128762)
|
||||
(128761 128761)
|
||||
(128759 128760)
|
||||
(128756 128758)
|
||||
(128755 128755)
|
||||
(128752 128752)
|
||||
(128747 128748)
|
||||
(128745 128745)
|
||||
(128736 128741)
|
||||
(128726 128727)
|
||||
(128725 128725)
|
||||
(128721 128722)
|
||||
(128720 128720)
|
||||
(128717 128719)
|
||||
(128716 128716)
|
||||
(128715 128715)
|
||||
(128705 128709)
|
||||
(128704 128704)
|
||||
(128703 128703)
|
||||
(128697 128702)
|
||||
(128695 128696)
|
||||
(128694 128694)
|
||||
(128691 128693)
|
||||
(128690 128690)
|
||||
(128686 128689)
|
||||
(128679 128685)
|
||||
(128678 128678)
|
||||
(128676 128677)
|
||||
(128675 128675)
|
||||
(128674 128674)
|
||||
(128667 128673)
|
||||
(128665 128666)
|
||||
(128664 128664)
|
||||
(128663 128663)
|
||||
(128662 128662)
|
||||
(128661 128661)
|
||||
(128660 128660)
|
||||
(128657 128659)
|
||||
(128656 128656)
|
||||
(128655 128655)
|
||||
(128654 128654)
|
||||
(128653 128653)
|
||||
(128652 128652)
|
||||
(128650 128651)
|
||||
(128649 128649)
|
||||
(128648 128648)
|
||||
(128647 128647)
|
||||
(128646 128646)
|
||||
(128643 128645)
|
||||
(128641 128642)
|
||||
(128640 128640)
|
||||
(128581 128591)
|
||||
(128577 128580)
|
||||
(128567 128576)
|
||||
(128566 128566)
|
||||
(128565 128565)
|
||||
(128564 128564)
|
||||
(128560 128563)
|
||||
(128558 128559)
|
||||
(128557 128557)
|
||||
(128556 128556)
|
||||
(128552 128555)
|
||||
(128550 128551)
|
||||
(128544 128549)
|
||||
(128543 128543)
|
||||
(128540 128542)
|
||||
(128539 128539)
|
||||
(128538 128538)
|
||||
(128537 128537)
|
||||
(128536 128536)
|
||||
(128535 128535)
|
||||
(128534 128534)
|
||||
(128533 128533)
|
||||
(128530 128532)
|
||||
(128529 128529)
|
||||
(128528 128528)
|
||||
(128527 128527)
|
||||
(128526 128526)
|
||||
(128521 128525)
|
||||
(128519 128520)
|
||||
(128513 128518)
|
||||
(128512 128512)
|
||||
(128507 128511)
|
||||
(128506 128506)
|
||||
(128499 128499)
|
||||
(128495 128495)
|
||||
(128488 128488)
|
||||
(128483 128483)
|
||||
(128481 128481)
|
||||
(128476 128478)
|
||||
(128465 128467)
|
||||
(128450 128452)
|
||||
(128444 128444)
|
||||
(128433 128434)
|
||||
(128424 128424)
|
||||
(128421 128421)
|
||||
(128420 128420)
|
||||
(128405 128406)
|
||||
(128400 128400)
|
||||
(128394 128397)
|
||||
(128391 128391)
|
||||
(128378 128378)
|
||||
(128371 128377)
|
||||
(128367 128368)
|
||||
(128348 128359)
|
||||
(128336 128347)
|
||||
(128331 128334)
|
||||
(128329 128330)
|
||||
(128302 128317)
|
||||
(128300 128301)
|
||||
(128278 128299)
|
||||
(128277 128277)
|
||||
(128266 128276)
|
||||
(128265 128265)
|
||||
(128264 128264)
|
||||
(128260 128263)
|
||||
(128259 128259)
|
||||
(128255 128258)
|
||||
(128253 128253)
|
||||
(128249 128252)
|
||||
(128248 128248)
|
||||
(128246 128247)
|
||||
(128245 128245)
|
||||
(128240 128244)
|
||||
(128239 128239)
|
||||
(128238 128238)
|
||||
(128236 128237)
|
||||
(128184 128235)
|
||||
(128182 128183)
|
||||
(128174 128181)
|
||||
(128173 128173)
|
||||
(128110 128172)
|
||||
(128108 128109)
|
||||
(128102 128107)
|
||||
(128101 128101)
|
||||
(128066 128100)
|
||||
(128065 128065)
|
||||
(128064 128064)
|
||||
(128063 128063)
|
||||
(128043 128062)
|
||||
(128042 128042)
|
||||
(128023 128041)
|
||||
(128022 128022)
|
||||
(128021 128021)
|
||||
(128020 128020)
|
||||
(128019 128019)
|
||||
(128017 128018)
|
||||
(128015 128016)
|
||||
(128012 128014)
|
||||
(128009 128011)
|
||||
(128008 128008)
|
||||
(127992 128007)
|
||||
(127991 127991)
|
||||
(127989 127989)
|
||||
(127988 127988)
|
||||
(127987 127987)
|
||||
(127973 127984)
|
||||
(127972 127972)
|
||||
(127968 127971)
|
||||
(127956 127967)
|
||||
(127951 127955)
|
||||
(127947 127950)
|
||||
(127946 127946)
|
||||
(127945 127945)
|
||||
(127944 127944)
|
||||
(127943 127943)
|
||||
(127942 127942)
|
||||
(127941 127941)
|
||||
(127904 127940)
|
||||
(127902 127903)
|
||||
(127897 127899)
|
||||
(127894 127895)
|
||||
(127872 127891)
|
||||
(127870 127871)
|
||||
(127869 127869)
|
||||
(127868 127868)
|
||||
(127825 127867)
|
||||
(127824 127824)
|
||||
(127820 127823)
|
||||
(127819 127819)
|
||||
(127799 127818)
|
||||
(127798 127798)
|
||||
(127796 127797)
|
||||
(127794 127795)
|
||||
(127792 127793)
|
||||
(127789 127791)
|
||||
(127780 127788)
|
||||
(127777 127777)
|
||||
(127775 127776)
|
||||
(127773 127774)
|
||||
(127772 127772)
|
||||
(127771 127771)
|
||||
(127770 127770)
|
||||
(127769 127769)
|
||||
(127766 127768)
|
||||
(127763 127765)
|
||||
(127762 127762)
|
||||
(127761 127761)
|
||||
(127760 127760)
|
||||
(127759 127759)
|
||||
(127757 127758)
|
||||
(127744 127756)
|
||||
(127568 127569)
|
||||
(127538 127546)
|
||||
(127535 127535)
|
||||
(127514 127514)
|
||||
(127489 127490)
|
||||
(127462 127487)
|
||||
(127377 127386)
|
||||
(127374 127374)
|
||||
(127358 127359)
|
||||
(127344 127345)
|
||||
(127183 127183)
|
||||
(126980 126980)
|
||||
(12953 12953)
|
||||
(12951 12951)
|
||||
(12349 12349)
|
||||
(12336 12336)
|
||||
(11093 11093)
|
||||
(11088 11088)
|
||||
(11035 11036)
|
||||
(11013 11015)
|
||||
(10548 10549)
|
||||
(10175 10175)
|
||||
(10160 10160)
|
||||
(10145 10145)
|
||||
(10133 10135)
|
||||
(10084 10084)
|
||||
(10083 10083)
|
||||
(10071 10071)
|
||||
(10067 10069)
|
||||
(10062 10062)
|
||||
(10060 10060)
|
||||
(10055 10055)
|
||||
(10052 10052)
|
||||
(10035 10036)
|
||||
(10024 10024)
|
||||
(10017 10017)
|
||||
(10013 10013)
|
||||
(10006 10006)
|
||||
(10004 10004)
|
||||
(10002 10002)
|
||||
(9999 9999)
|
||||
(9997 9997)
|
||||
(9992 9996)
|
||||
(9989 9989)
|
||||
(9986 9986)
|
||||
(9981 9981)
|
||||
(9978 9978)
|
||||
(9975 9977)
|
||||
(9973 9973)
|
||||
(9972 9972)
|
||||
(9970 9971)
|
||||
(9968 9969)
|
||||
(9962 9962)
|
||||
(9961 9961)
|
||||
(9940 9940)
|
||||
(9939 9939)
|
||||
(9937 9937)
|
||||
(9935 9935)
|
||||
(9934 9934)
|
||||
(9928 9928)
|
||||
(9924 9925)
|
||||
(9917 9918)
|
||||
(9904 9905)
|
||||
(9898 9899)
|
||||
(9895 9895)
|
||||
(9888 9889)
|
||||
(9883 9884)
|
||||
(9881 9881)
|
||||
(9878 9879)
|
||||
(9877 9877)
|
||||
(9876 9876)
|
||||
(9875 9875)
|
||||
(9874 9874)
|
||||
(9855 9855)
|
||||
(9854 9854)
|
||||
(9851 9851)
|
||||
(9832 9832)
|
||||
(9829 9830)
|
||||
(9827 9827)
|
||||
(9824 9824)
|
||||
(9823 9823)
|
||||
(9800 9811)
|
||||
(9794 9794)
|
||||
(9792 9792)
|
||||
(9786 9786)
|
||||
(9784 9785)
|
||||
(9775 9775)
|
||||
(9774 9774)
|
||||
(9770 9770)
|
||||
(9766 9766)
|
||||
(9762 9763)
|
||||
(9760 9760)
|
||||
(9757 9757)
|
||||
(9752 9752)
|
||||
(9748 9749)
|
||||
(9745 9745)
|
||||
(9742 9742)
|
||||
(9732 9732)
|
||||
(9730 9731)
|
||||
(9728 9729)
|
||||
(9723 9726)
|
||||
(9664 9664)
|
||||
(9654 9654)
|
||||
(9642 9643)
|
||||
(9410 9410)
|
||||
(9208 9210)
|
||||
(9203 9203)
|
||||
(9201 9202)
|
||||
(9200 9200)
|
||||
(9199 9199)
|
||||
(9197 9198)
|
||||
(9193 9196)
|
||||
(9167 9167)
|
||||
(9000 9000)
|
||||
(8986 8987)
|
||||
(8617 8618)
|
||||
(8596 8601)
|
||||
(8505 8505)
|
||||
(8482 8482)
|
||||
(8265 8265)
|
||||
(8252 8252)
|
||||
(174 174)
|
||||
(169 169)
|
||||
(48 57)
|
||||
(42 42)
|
||||
(35 35))
|
||||
(emoji-component
|
||||
(917536 917631)
|
||||
(129456 129459)
|
||||
(127995 127999)
|
||||
(127462 127487)
|
||||
(65039 65039)
|
||||
(8419 8419)
|
||||
(8205 8205)
|
||||
(48 57)
|
||||
(42 42)
|
||||
(35 35)))))
|
||||
|
||||
(define char-set:emoji (char-set))
|
||||
(define char-set:emoji-presentation (char-set))
|
||||
(define char-set:emoji-modifier (char-set))
|
||||
(define char-set:emoji-modifier-base (char-set))
|
||||
(define char-set:emoji-component (char-set))
|
||||
(define char-set:emoji-extended-pictographic
|
||||
(char-set))
|
||||
(define char-set:emoji-extended-pictographic (char-set))
|
||||
|
||||
(define emoji-charsets
|
||||
(list (list 'emoji char-set:emoji)
|
||||
(list 'emoji-presentation
|
||||
char-set:emoji-presentation)
|
||||
(list 'emoji-presentation char-set:emoji-presentation)
|
||||
(list 'emoji-modifier char-set:emoji-modifier)
|
||||
(list 'emoji-modifier-base
|
||||
char-set:emoji-modifier-base)
|
||||
(list 'emoji-modifier-base char-set:emoji-modifier-base)
|
||||
(list 'emoji-component char-set:emoji-component)
|
||||
(list 'emoji-extended-pictographic
|
||||
char-set:emoji-extended-pictographic)))
|
||||
|
||||
(ranges->charset! emoji-ht 'emoji char-set:emoji)
|
||||
(ranges->charset!
|
||||
emoji-ht
|
||||
'emoji-presentation
|
||||
char-set:emoji-presentation)
|
||||
(ranges->charset!
|
||||
emoji-ht
|
||||
'emoji-modifier
|
||||
char-set:emoji-modifier)
|
||||
(ranges->charset!
|
||||
emoji-ht
|
||||
'emoji-modifier-base
|
||||
char-set:emoji-modifier-base)
|
||||
(ranges->charset!
|
||||
emoji-ht
|
||||
'emoji-component
|
||||
char-set:emoji-component)
|
||||
(ranges->charset! emoji-ht 'emoji-presentation char-set:emoji-presentation)
|
||||
(ranges->charset! emoji-ht 'emoji-modifier char-set:emoji-modifier)
|
||||
(ranges->charset! emoji-ht 'emoji-modifier-base char-set:emoji-modifier-base)
|
||||
(ranges->charset! emoji-ht 'emoji-component char-set:emoji-component)
|
||||
(ranges->charset!
|
||||
emoji-ht
|
||||
'emoji-extended-pictographic
|
||||
|
|
1192
uniseg/graphemes.scm
1192
uniseg/graphemes.scm
File diff suppressed because it is too large
Load Diff
|
@ -20,8 +20,7 @@
|
|||
hex-string->integer
|
||||
format-exception-msg
|
||||
in-surrogate-range
|
||||
wget-to-lines
|
||||
file-to-lines
|
||||
cmdline-wget-or-file
|
||||
ranges->charset!))
|
||||
|
||||
;;
|
||||
|
@ -84,16 +83,22 @@
|
|||
(and (>= num #xd800)
|
||||
(<= num #xdfff)))
|
||||
|
||||
(define* (wget-to-lines url #:optional (port #f))
|
||||
(format port "Downloading from ~a..." url)
|
||||
(define (cmdline-wget-or-file url log-port)
|
||||
(let ((cmdline (command-line)))
|
||||
(if (= 2 (length cmdline))
|
||||
(file-to-lines (last cmdline) log-port)
|
||||
(wget-to-lines url log-port))))
|
||||
|
||||
(define (wget-to-lines url log-port)
|
||||
(format log-port "Downloading from ~a..." url)
|
||||
|
||||
(let* ((response body (http-get (string->uri url)))
|
||||
(lines (string-split body #\newline)))
|
||||
(format port " done.\n")
|
||||
(format log-port " done.\n")
|
||||
lines))
|
||||
|
||||
(define* (file-to-lines path #:optional (port #f))
|
||||
(format port "Loading from local file ~a\n" path)
|
||||
(define (file-to-lines path log-port)
|
||||
(format log-port "Loading from local file ~a\n" path)
|
||||
(string-split
|
||||
(with-input-from-file path
|
||||
(λ () (get-string-all (current-input-port)))) #\newline))
|
||||
|
|
Loading…
Reference in New Issue