A sample Python project
Project description
singular_wrap_text
singular_wrap_text é um simples quebrador de texto para qualquer ocasião escrito em Python. Insere quebras de linha.
Funções
-
WrapText- construtor que recebe o texto a ser quebrado. Pode receber 2 (dois) valores: length_wrap quantidade de caracteres a contar para inserir a quebra de linha (trecho). Por padrão quebra o texto a cada 50 caracteres. break_type indica o tipo de quebra a ser inserida. Por padrão insere '\n'. Para html, recomendo setar este argumento com '<br>'. -
get()- Retorna o texto contendo as quebras de linha.
Exemplos:
from singular_wrap_text.wraptext import WrapText
meu_texto = "Escrevendo um código numa única linha para testá-lo com a função WrapText."
# Exemplo 1
wt = WrapText(meu_texto, length_wrap=38)
print(wt.get())
>>Escrevendo um código numa única linha
para testá-lo com a função WrapText.
# Exemplo 2
wt = WrapText(meu_texto, length_wrap=38, break_type="<br>")
print(wt.get())
>>Escrevendo um código numa única linha<br>para testá-lo com a função WrapText.
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 singular_wrap_text-1.0.1.tar.gz.
File metadata
- Download URL: singular_wrap_text-1.0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4303dc9933b7a8928980a11007bac9a22fa0bfb920567049de6f3bc82959a28
|
|
| MD5 |
6f04e8d88f1b2dd6811956a548a94bb9
|
|
| BLAKE2b-256 |
ddbbdfeb5c4e23f3ffa9d4f8a2302abe72973e6646b3fafc89293890c59a8f13
|
File details
Details for the file singular_wrap_text-1.0.1-py3-none-any.whl.
File metadata
- Download URL: singular_wrap_text-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
034f806e691ea07eb056d3224d1bd5a94a34df04e7d6bf7bdd4f95e01f70ae77
|
|
| MD5 |
8f5268a6d7652a5137f3135902013057
|
|
| BLAKE2b-256 |
0441d4ee55be2e8ff99939e546d63aac6fcb52e8232f551be9a9ec246ff58ff4
|