ycv 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +4 -0
  3. data/README.md +47 -0
  4. data/lib/ycv/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc8b8fd494999f14f547f1f53b24541bf84f263858230203d2e79919bc8bb743
4
- data.tar.gz: cf3e226d25dae7eefcedcf1386683a79cf1a8cd4d95978c92664e6f3ee96109a
3
+ metadata.gz: 6aeba34f487d0b2fc57a56829e3a42a3ccc7f23cc98073d0786c3c82ef0c831f
4
+ data.tar.gz: 0b129c80309ece8c16239335fc7e2153d7ce38b4371dd26a1b6ba580dc152177
5
5
  SHA512:
6
- metadata.gz: dfbcca5d84d53100138ea8862540ce4a5e344d0f5249864334f391c86895fe5610a0c9c3d154a4eb7cfe1c1c98d30bcbb566d5b334db897bcb43cc06aa440171
7
- data.tar.gz: 8bf7f1533929631e5e7dc12e7872f5a1419e95a8611bae2ea51f7edb18908ac091d0dd53185ed1420f48282f2e2ce3c56a535d88a3dfe36302319ef9e1c87a26
6
+ metadata.gz: fee90e10fbcb528ef47912c68bfb8b2995852b67a0bf47a07f9078bdb2dcf04de3d51b9cb0f2cf55639321ed2edf145dcd07dcd315ad36db0707bf1c15383145
7
+ data.tar.gz: 8a5a816a0c54c4ceb53f22ecb08f9d0fad0f9e70844073c159356b2ff20270ce675efd4971e0cded7eb72372b40b53a3028543887fbd7b3694f58d50278ca739
data/.rubocop.yml CHANGED
@@ -1,5 +1,7 @@
1
1
  AllCops:
2
2
  TargetRubyVersion: 3.0
3
+ DefaultFormatter: simple
4
+ NewCops: disable
3
5
 
4
6
  Style/StringLiterals:
5
7
  Enabled: true
@@ -11,6 +13,8 @@ Style/StringLiteralsInInterpolation:
11
13
 
12
14
  Layout/LineLength:
13
15
  Max: 120
16
+ Exclude:
17
+ - '*.gemspec'
14
18
 
15
19
  Metrics/BlockLength:
16
20
  Max: 50
data/README.md CHANGED
@@ -22,6 +22,7 @@ gem install ycv
22
22
  ```
23
23
 
24
24
  # Usage
25
+
25
26
  ## Command-Line Interface (CLI)
26
27
  The ycv command-line tool is straightforward to use and supports output to both files and standard output (STDOUT), making it versatile for scripting and piping to other commands.
27
28
 
@@ -54,6 +55,52 @@ This feature allows you to easily integrate ycv into your command-line workflows
54
55
  ## As a Ruby Library
55
56
  In addition to the CLI, Ycv can be used as a library within Ruby applications.
56
57
 
58
+ ## Sample Conversion
59
+ This section provides a simple example of converting between CSV and YAML formats using the ycv tool.
60
+
61
+ ### YAML to CSV Conversion
62
+ Given a YAML file sample.yml with the following content:
63
+
64
+ ```yml
65
+ sample_1:
66
+ id: 1
67
+ name: Alice
68
+ age: 30
69
+
70
+ sample_2:
71
+ id: 2
72
+ name: Bob
73
+ age: 25
74
+ ```
75
+ Running `ycv sample.yml sample.csv` will produce a CSV file sample.csv with the following content:
76
+ ```csv
77
+ id,name,age
78
+ 1,Alice,30
79
+ 2,Bob,25
80
+ ```
81
+
82
+
83
+ ### CSV to YAML Conversion
84
+ Conversely, given a CSV file sample.csv with the following content:
85
+ ```csv
86
+ id,name,age
87
+ 1,Alice,30
88
+ 2,Bob,25
89
+ ```
90
+
91
+ Running `ycv sample.csv sample.yml` will produce a YAML file sample.yml with the following content:
92
+ ```yml
93
+ sample_1:
94
+ id: 1
95
+ name: Alice
96
+ age: 30
97
+
98
+ sample_2:
99
+ id: 2
100
+ name: Bob
101
+ age: 25
102
+ ```
103
+ These examples demonstrate the straightforward conversion process between CSV and YAML formats, making it easy to integrate ycv into your data handling workflows.
57
104
 
58
105
  # Contributing
59
106
  Contributions to Ycv are always welcome, whether it's through bug reports, pull requests, or feature requests.
data/lib/ycv/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ycv
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ycv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nozomi-Hijikata