{"id":15973733,"url":"https://github.com/c-bata/django-wcwidth-filter","last_synced_at":"2025-07-30T14:06:21.139Z","repository":{"id":76859190,"uuid":"262826250","full_name":"c-bata/django-wcwidth-filter","owner":"c-bata","description":"A collection of Django template filters for multi-width characters.","archived":false,"fork":false,"pushed_at":"2021-07-08T12:56:34.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-10T01:46:16.974Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/c-bata.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-10T16:14:59.000Z","updated_at":"2021-07-08T12:56:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"650ea991-9d10-4fc9-b4bc-736869241b22","html_url":"https://github.com/c-bata/django-wcwidth-filter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-bata%2Fdjango-wcwidth-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-bata%2Fdjango-wcwidth-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-bata%2Fdjango-wcwidth-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-bata%2Fdjango-wcwidth-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c-bata","download_url":"https://codeload.github.com/c-bata/django-wcwidth-filter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208404,"owners_count":20901570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-07T21:06:46.966Z","updated_at":"2025-04-04T16:21:15.965Z","avatar_url":"https://github.com/c-bata.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"=====================\ndjango-wcwidth-filter\n=====================\n\nA collection of Django template filters for multi-width characters.\n\nInstallation\n------------\n\n.. code-block:: console\n\n   $ python3 -m pip install django-wcwidth-filter\n\nUsage\n-----\n\nwcswidth filter\n~~~~~~~~~~~~~~~\n\n.. code-block:: python\n\n   \u003e\u003e\u003e template = Template(\"{% load wcwidth %}{{ x | wcswidth }}\")\n   \u003e\u003e\u003e context = Context({\n   \u003e\u003e\u003e     \"x\": \"Hello\",\n   \u003e\u003e\u003e })\n   \u003e\u003e\u003e template.render(context)\n   5\n   \u003e\u003e\u003e context = Context({\n   \u003e\u003e\u003e     \"x\": \"こんにちは\",\n   \u003e\u003e\u003e })\n   \u003e\u003e\u003e template.render(context)\n   10\n\ntruncate_wcswidth filter\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code-block:: python\n\n   \u003e\u003e\u003e template = Template(\"{% load wcwidth %}{{ x | truncate_wcswidth:4 }}\")\n   \u003e\u003e\u003e context = Context({\n   \u003e\u003e\u003e     \"x\": \"Hello\",\n   \u003e\u003e\u003e })\n   \u003e\u003e\u003e template.render(context)\n   \"Hel…\"\n   \u003e\u003e\u003e template = Template(\"{% load wcwidth %}{{ x | truncate_wcswidth:9 }}\")\n   \u003e\u003e\u003e context = Context({\n   \u003e\u003e\u003e     \"x\": \"こんにちは\",\n   \u003e\u003e\u003e })\n   \u003e\u003e\u003e template.render(context)\n   'こんにち…'\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-bata%2Fdjango-wcwidth-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc-bata%2Fdjango-wcwidth-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-bata%2Fdjango-wcwidth-filter/lists"}