Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.15 #20

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ Small, fast and convenient multiplatform CSV parser and builder written for one

# Usage

There is no documentation for the API which consists of just three methods:
Here is what you can do with the library:
```kotlin

// Build CSV object using simple DSL
// (1) Build a CSV file using simple DSL
val csv = buildCsv {
row {
value("Code")
Expand All @@ -30,18 +30,18 @@ val csv = buildCsv {
}
}

// Export CSV object to CSV text
// (2) Export a CSV object to a CSV string
val csvText = csv.toCsvText()

// Parse CSV text to get a CSV object
// (3) Parse a CSV string to get a CSV object
val csv2 = Csv.parseText(csvText)

// Data structure
// There are the data structures supported by the library
val allRows: List<Row> = csv2.rows
val header: HeaderRow = csv2.header
val data: List<DataRow> = csv2.data

// Transform CSV
// (4) Transform CSV data
val codes = data.map { it.value("Code") } // ["DE", "BY"]
val names = data.map { it.value("Name") } // ["Germany", "Belarus"]
```
Expand All @@ -52,7 +52,7 @@ In `gradle/libs.versions.toml`
```toml
[versions]
kotlin = "2.0.21"
csv = "0.14"
csv = "0.15"

[libraries]
csv = { module = "de.halfbit:csv", version.ref = "csv" }
Expand Down Expand Up @@ -83,6 +83,7 @@ kotlin {

# Release Notes

- 0.15 Add macosArm64 target
- 0.14 Add linuxArm64 target, update to Kotlin 2.0.21
- 0.13 Some API changes and DataRow.replaceValue(), see PR #13 for details
- 0.12 Add HeaderRow and DataRow types, enabling easier data transformations
Expand All @@ -99,7 +100,7 @@ kotlin {

# License
```
Copyright 2023-2024 Sergej Shafarenka, www.halfbit.de
Copyright 2023-2025 Sergej Shafarenka, www.halfbit.de

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
7 changes: 5 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

group = "de.halfbit"
version = "0.14"
version = "0.15"

repositories {
mavenCentral()
Expand Down Expand Up @@ -88,7 +88,7 @@ if (canPublishToMaven) {

pom {
name.set(rootProject.name)
description.set("Tiny Kotlin Multiplatform library for building and exporting CSV files")
description.set("Tiny Kotlin Multiplatform library for parsing, building and exporting CSV files")
url.set("https://www.halfbit.de")
licenses {
license {
Expand Down Expand Up @@ -140,6 +140,9 @@ if (canPublishToMaven) {
"compileTestKotlinMacosX64" {
mustRunAfter("signMacosX64Publication")
}
"compileTestKotlinMacosArm64" {
mustRunAfter("signMacosArm64Publication")
}
"compileTestKotlinMingwX64" {
mustRunAfter("signMingwX64Publication")
}
Expand Down
Loading