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

Update README.md #60

Merged
merged 3 commits into from
Sep 29, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ import SwiftUI
Text(encoding.description).tag(encoding)
}
}

if model.state.exportType == .pdf {

Picker(
"PDF Size",
selection: Binding(
Expand All @@ -64,7 +64,7 @@ import SwiftUI
Text(size.rawValue).tag(size)
}
}

Picker(
"PDF Orientation",
selection: Binding(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ import SwiftUI
}
}
Picker("PDF Orientation", selection: $model.state.orientation) {
ForEach(PdfSize.Orientation.allCases, id: \.self) { orientation in
ForEach(PdfSize.Orientation.allCases, id: \.self) {
orientation in
Text(orientation.rawValue).tag(orientation)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ struct GeneratePreviewView: View {
.aspectRatio(contentMode: .fit)
.frame(width: geometry.size.width, height: geometry.size.height)
}
} else if model.state.pdfDocument != nil, model.state.exportType == .pdf
{
} else if model.state.pdfDocument != nil, model.state.exportType == .pdf {
PdfDocumentView(
document: $model.state.pdfDocument,
size: CGSize(
Expand Down Expand Up @@ -58,8 +57,7 @@ struct GeneratePreviewView: View {
.aspectRatio(contentMode: .fit)
.frame(width: geometry.size.width, height: geometry.size.height)
}
} else if model.state.pdfDocument != nil, model.state.exportType == .pdf
{
} else if model.state.pdfDocument != nil, model.state.exportType == .pdf {
PdfDocumentView(
document: $model.state.pdfDocument,
size: CGSize(
Expand Down
59 changes: 38 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,39 @@ Convert Csv into png image.

<a href="https://apps.apple.com/jp/app/csv-converter-app/id1628273936?mt=12"><img src="https://raw.github.com/fummicc1/csv2img/1.3.2/res/Download_on_the_App_Store_Badge_US-UK_RGB_blk_092917.svg?sanitize=true"></a>

## iOS App
## Demo

### iOS App

### Demo
https://github.com/user-attachments/assets/a9a7847e-7edc-4e28-b918-66de4b992aa3

### MacOS App

<img src="https://github.com/fummicc1/csv2img/assets/44002126/37fdff7c-6947-49a3-9a5d-9b521273c9f0" width=300>








## MacOS App

### Demo


<img src="https://github.com/fummicc1/csv2img/assets/44002126/65a9f3f6-e76f-44f1-b18b-b116f7b310af" width=800>
https://github.com/user-attachments/assets/9b6f5064-ab6e-4897-a0ab-cf5f104e3bbe

# Installation

Add the following to your `Package.swift` file:

```swift
.package(url: "https://github.com/fummicc1/csv2img.git", from: "1.9.0"),
```

# Csv2Img (Library)

Convert Csv into png image.

- [documentation](https://fummicc1.github.io/csv2img/documentation/csv2img/)

## Usage
## Installation of Csv2Img

Add the following to your `Package.swift` file:

```swift
.product(name: "Csv2Img", package: "csv2img"),
```

## Usage of Csv2Img

You cloud convert csv into image / pdf in 3 ways.

Expand Down Expand Up @@ -112,15 +113,23 @@ let data = try await csv.generate(fontSize: 12, exportType: .png)
| 10 | 11 | 12 |
```

#### Output Image
### Output Image

![sample](https://user-images.githubusercontent.com/44002126/186811765-ecc16ca5-9121-47ee-a5a6-a51ac181abd5.png)

# CsvBuilder (Helper Library for Csv2Img)

A helper library to generate `Csv` in Csv2Img library.

## How to use
## Installation of CsvBuilder

Add the following to your `Package.swift` file:

```swift
.product(name: "CsvBuilder", package: "csv2img"),
```

## Usage of CsvBuilder

1. Define custom type that conforms to `CsvComposition`.

Expand Down Expand Up @@ -168,7 +177,15 @@ A command line tool which generates png-image from csv. (Using `Csv2Img` library

- [documentation](https://fummicc1.github.io/Csv2ImgCmd_DocC/documentation/csv2imgcmd/)

## Usage
## Installation of Csv2ImgCmd

Add the following to your `Package.swift` file:

```swift
.product(name: "Csv2ImgCmd", package: "csv2img"),
```

## Usage of Csv2ImgCmd

Coomand line interface using `Csv2Img` library.

Expand Down
3 changes: 2 additions & 1 deletion Tests/Csv2ImgTests/ImageMakerTests.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import XCTest

@testable import Csv2Img

class ImageMakerTests: XCTestCase {
Expand All @@ -20,7 +21,7 @@ class ImageMakerTests: XCTestCase {
Csv.Column.Style(color: Color.blue.cgColor),
Csv.Column.Style(color: Color.blue.cgColor),
Csv.Column.Style(color: Color.blue.cgColor),
Csv.Column.Style(color: Color.blue.cgColor)
Csv.Column.Style(color: Color.blue.cgColor),
]
)
let imageMaker = ImageMaker(maximumRowCount: nil, fontSize: 12)
Expand Down
5 changes: 3 additions & 2 deletions Tests/Csv2ImgTests/PdfMakerTests.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import XCTest
import PDFKit
import XCTest

@testable import Csv2Img

class PdfMakerTests: XCTestCase {
Expand All @@ -19,7 +20,7 @@ class PdfMakerTests: XCTestCase {
Csv.Column.Style(color: Color.blue.cgColor),
Csv.Column.Style(color: Color.blue.cgColor),
Csv.Column.Style(color: Color.blue.cgColor),
Csv.Column.Style(color: Color.blue.cgColor)
Csv.Column.Style(color: Color.blue.cgColor),
]
)
let pdfMaker = PdfMaker(
Expand Down
Loading