this repo has no description

feeds/rapidfire.py: count graphemes

+15 -6
+1
Pipfile
··· 12 12 requests = "*" 13 13 gunicorn = "*" 14 14 apsw = "*" 15 + grapheme = "*" 15 16 16 17 [dev-packages] 17 18
+11 -4
Pipfile.lock
··· 1 1 { 2 2 "_meta": { 3 3 "hash": { 4 - "sha256": "cbb8cdcd9715706b3b15f40ed5110cfa258fdc14cfb54160731fa86ffff2cb0d" 4 + "sha256": "9b61d368153d355bc50f12c905ab83194bcebc8912300161da429a30af109880" 5 5 }, 6 6 "pipfile-spec": 6, 7 7 "requires": { ··· 366 366 "index": "pypi", 367 367 "markers": "python_version >= '3.8'", 368 368 "version": "==3.0.2" 369 + }, 370 + "grapheme": { 371 + "hashes": [ 372 + "sha256:44c2b9f21bbe77cfb05835fec230bd435954275267fea1858013b102f8603cca" 373 + ], 374 + "index": "pypi", 375 + "version": "==0.6.0" 369 376 }, 370 377 "gunicorn": { 371 378 "hashes": [ ··· 750 757 }, 751 758 "typing-extensions": { 752 759 "hashes": [ 753 - "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475", 754 - "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb" 760 + "sha256:83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0", 761 + "sha256:c1f94d72897edaf4ce775bb7558d5b79d8126906a14ea5ed1635921406c0387a" 755 762 ], 756 763 "markers": "python_version >= '3.8'", 757 - "version": "==4.10.0" 764 + "version": "==4.11.0" 758 765 }, 759 766 "typing-validation": { 760 767 "hashes": [
+3 -2
feeds/rapidfire.py
··· 2 2 3 3 import apsw 4 4 import apsw.ext 5 + import grapheme 5 6 6 7 from . import BaseFeed 7 8 ··· 37 38 return 38 39 39 40 if all([ 40 - len(record['text']) <= MAX_TEXT_LENGTH, 41 + grapheme.length(record['text']) <= MAX_TEXT_LENGTH, 41 42 record.get('reply') is None, 42 43 record.get('embed') is None, 43 44 record.get('facets') is None ··· 86 87 87 88 def serve_feed_debug(self, limit, offset, langs): 88 89 query = """ 89 - select *, unixepoch('now') as now 90 + select *, unixepoch('now') - create_ts as age_seconds 90 91 from posts 91 92 order by create_ts desc 92 93 limit :limit offset :offset