CLI para conversão e sanitização de arquivos de tabelas de dados.
Project description
csv-converter-skart
Ferramenta de linha de comando para converter e sanitizar arquivos de planilha, com foco em dados inconsistentes e geração de arquivos CSV com suporte a pandas.
Visão geral
O projeto converte arquivos .xlsx, .xls e .csv para CSV, aplicando etapas de normalização úteis para cenários em que a origem contém problemas de estrutura, conteúdo ou codificação.
Principais recursos:
- Conversão de planilhas para CSV.
- Normalização de arquivos CSV com saída em UTF-8.
- Sanitização de XML interno de arquivos XLSX.
- Detecção de codificação para arquivos CSV.
- Interface de linha de comando e uso programático via módulo Python.
Requisitos
- Python
>= 3.10
Instalação
pip install csv-converter-skart
Uso
Linha de comando
Se apenas o arquivo de entrada for informado, o diretório File{NomeDoArquivo}Normalized será criado no diretório atual. O CSV gerado manterá o nome base do arquivo original.
csv-converter ./meus_arquivos/arquivo.xlsx
Para definir explicitamente o arquivo de saída, use -o ou --output.
csv-converter ./meus_arquivos/arquivo.xlsx --output ./csv/arquivo_normalizado.csv
Para exibir a ajuda da CLI:
csv-converter --help
Uso como módulo
O pacote também expõe a função csv_converter, que pode ser importada diretamente.
import pandas as pd
from pathlib import Path
from csv_converter import csv_converter
input_file = Path("./meu_arquivo.xlsx")
output_file = Path("./destino.csv")
generated_file = csv_converter(input_file, output_file)
dataframe = pd.read_csv(generated_file)
print(dataframe.info())
Comportamento de saída
- Entradas
.xlsxe.xlssão processadas e exportadas para CSV. - Entradas
.csvsão lidas com detecção de codificação e regravadas em UTF-8. - Quando o caminho de saída não é informado, ele é criado automaticamente.
Licença
MIT License - Copyright (c) 2026 Artur dos Santos Shon
Project details
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 csv_converter_skart-0.2.1.tar.gz.
File metadata
- Download URL: csv_converter_skart-0.2.1.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fed24ef9badfca2e717dc89b40bd8fdeaf79df9fc55e8076913c250527b9de37
|
|
| MD5 |
aa05fc28b742d2874360d65b8915f194
|
|
| BLAKE2b-256 |
d4c32c1a907f9d7bc6141e9155b43f52d0c1acab1db979ab23b3e9de3ae574ae
|
Provenance
The following attestation bundles were made for csv_converter_skart-0.2.1.tar.gz:
Publisher:
cd.yml on SkyArtur/csv-converter-skart
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
csv_converter_skart-0.2.1.tar.gz -
Subject digest:
fed24ef9badfca2e717dc89b40bd8fdeaf79df9fc55e8076913c250527b9de37 - Sigstore transparency entry: 1187546388
- Sigstore integration time:
-
Permalink:
SkyArtur/csv-converter-skart@44fe7ea9f16153ca238a4984419cd6284479391e -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/SkyArtur
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@44fe7ea9f16153ca238a4984419cd6284479391e -
Trigger Event:
push
-
Statement type:
File details
Details for the file csv_converter_skart-0.2.1-py3-none-any.whl.
File metadata
- Download URL: csv_converter_skart-0.2.1-py3-none-any.whl
- Upload date:
- Size: 21.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18b87b6a633d4ca8466fe79587210f41721036cd157f7ed90e093835f38e1f60
|
|
| MD5 |
71155f76f929c93a3685d21039ed9432
|
|
| BLAKE2b-256 |
7b5681039ce95692457d1e0e3ef34014593dc5c91af8e638d5bad58cfca337d7
|
Provenance
The following attestation bundles were made for csv_converter_skart-0.2.1-py3-none-any.whl:
Publisher:
cd.yml on SkyArtur/csv-converter-skart
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
csv_converter_skart-0.2.1-py3-none-any.whl -
Subject digest:
18b87b6a633d4ca8466fe79587210f41721036cd157f7ed90e093835f38e1f60 - Sigstore transparency entry: 1187546602
- Sigstore integration time:
-
Permalink:
SkyArtur/csv-converter-skart@44fe7ea9f16153ca238a4984419cd6284479391e -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/SkyArtur
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@44fe7ea9f16153ca238a4984419cd6284479391e -
Trigger Event:
push
-
Statement type: