Korean josa filters for Jinja2-compatible template environments.
Project description
jinja2-josa-filter
Jinja2 호환 템플릿 환경에서 사용할 수 있는 한국어 조사 필터 패키지입니다. tjosa 라이브러리를 바탕으로 만들었습니다.
요구 사항
Python 3.12 이상이 필요합니다.
참고
이 패키지는 Jinja2에 직접 의존하지 않습니다. 일반 Python callable과 필터 매핑을 제공하며, 애플리케이션이나 프레임워크가 제공하는 Jinja2 호환 환경에 등록해서 사용합니다.
등록
이 패키지는 개별 필터 함수와 JINJA_FILTERS 매핑을 내보냅니다. 다음과 같이 런타임에 필터를 등록해 사용할 수 있습니다. 자세한 등록 방법은 사용하고자 하는 프레임워크의 도움말을 참고하세요.
from jinja2_josa_filter import JINJA_FILTERS
app_or_framework_jinja_env.filters.update(JINJA_FILTERS)
개별 필터 함수도 직접 import할 수 있습니다.
from jinja2_josa_filter import eun_neun, e_ga, eul_reul
사용
템플릿에서는 다음처럼 사용할 수 있습니다.
{{ food | 는 }} 맛있다.
>> 사과는 맛있다.
>> 파인애플은 맛있다.
{{ building | 은 }} 크다.
>> 집은 크다.
>> 학교는 크다.
{{ animal | 이 }} 잔다.
>> 고양이가 잔다.
>> 표범이 잔다.
{{ drink | 를 }} 마신다.
>> 물을 마신다.
>> 콜라를 마신다.
{{ tools[0] | 과 }} {{ tools[1] }}
>> 책과 깃펜
>> 컴퓨터와 마우스
말은 {{ horse | 로 }}, 사람은 {{ human | 으로 }}
>> 말은 제주로, 사람은 서울로
{{ friend | 야 }}, 안녕~
>> 철수야, 안녕~
>> 지민아, 안녕~
{{ friend | 이는 }} 내 친구
>> 철수는 내 친구
>> 지민이는 내 친구
필터 종류
은는,은,는이가,가을를,을,를과와,과,와으로,로아야,아,야이,이랑,랑,이며,며,이다,다
라이선스
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jinja2_josa_filter-0.1.0.tar.gz.
File metadata
- Download URL: jinja2_josa_filter-0.1.0.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b5fc44275c6d9002ed8ac4ad91a4bec975fb5fd7c1d8d9dcf9f89df9cf7d4e4
|
|
| MD5 |
05022e1217a6ddd38307a8175deb71ae
|
|
| BLAKE2b-256 |
275ae4072ada8a31fa501291f1e02bfa19dd70f69a20e67282f13bf3119ea1fe
|
Provenance
The following attestation bundles were made for jinja2_josa_filter-0.1.0.tar.gz:
Publisher:
release-pypi.yml on hsl0/jinja2-josa-filter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jinja2_josa_filter-0.1.0.tar.gz -
Subject digest:
8b5fc44275c6d9002ed8ac4ad91a4bec975fb5fd7c1d8d9dcf9f89df9cf7d4e4 - Sigstore transparency entry: 2150728360
- Sigstore integration time:
-
Permalink:
hsl0/jinja2-josa-filter@6258aba4af93eb41e6a445b947ea052183576f35 -
Branch / Tag:
refs/tags/pypi/v0.1.0 - Owner: https://github.com/hsl0
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@6258aba4af93eb41e6a445b947ea052183576f35 -
Trigger Event:
push
-
Statement type:
File details
Details for the file jinja2_josa_filter-0.1.0-py3-none-any.whl.
File metadata
- Download URL: jinja2_josa_filter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cf3da445539762626fa6c753bc9f48e9a8e94ff57760fe912718d0bd25c633d
|
|
| MD5 |
564333664111b09aecf587e06d9423f7
|
|
| BLAKE2b-256 |
2e10638e8ccdbefd065437874351e0d10164174e8addbe2c09ac50f790da9d9e
|
Provenance
The following attestation bundles were made for jinja2_josa_filter-0.1.0-py3-none-any.whl:
Publisher:
release-pypi.yml on hsl0/jinja2-josa-filter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jinja2_josa_filter-0.1.0-py3-none-any.whl -
Subject digest:
6cf3da445539762626fa6c753bc9f48e9a8e94ff57760fe912718d0bd25c633d - Sigstore transparency entry: 2150729084
- Sigstore integration time:
-
Permalink:
hsl0/jinja2-josa-filter@6258aba4af93eb41e6a445b947ea052183576f35 -
Branch / Tag:
refs/tags/pypi/v0.1.0 - Owner: https://github.com/hsl0
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@6258aba4af93eb41e6a445b947ea052183576f35 -
Trigger Event:
push
-
Statement type: