Skip to content

Commit f9fc86d

Browse files
author
R. S. Doiel
committed
prep for v1.3.4, Added json2jsonl. It will render a JSON array document as JSON lines. A '-as-dataset' option is included. If an top level attribute name is provided and matches the object it will render the result as a dataset load componatible object. Of the top level attribute name is not found then that object is skipped with a message written to standard error.
1 parent 4312aaa commit f9fc86d

File tree

107 files changed

+514
-216
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+514
-216
lines changed

CITATION.cff

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,21 @@
1-
21
cff-version: 1.2.0
32
message: "If you use this software, please cite it as below."
43
type: software
5-
title: datatools
6-
abstract: "A set of command line tools for working with CSV, Excel Workbooks, JSON and structured text documents."
4+
title: "datatools"
5+
abstract: "A set of command line tools for working with CSV, Excel
6+
Workbooks, JSON and structured text documents."
77
authors:
88
- family-names: Doiel
99
given-names: R. S.
10-
orcid: https://orcid.org/0000-0003-0900-6903
11-
10+
orcid: ""
1211

13-
contacts:
12+
maintainers:
1413
- family-names: Doiel
1514
given-names: R. S.
16-
orcid: https://orcid.org/0000-0003-0900-6903
17-
15+
orcid: ""
1816

1917
repository-code: "https://github.com/caltechlibrary/datatools"
20-
version: 1.3.3
21-
date-released: 2025-05-14
22-
18+
version: 1.3.4
2319
license-url: "https://data.caltech.edu/license"
24-
keywords:
25-
- csv
26-
- excel
27-
- sql
28-
- json
29-
- yaml
30-
- xlsx
31-
- golang
32-
- bash
33-
20+
keywords: [ "csv", "excel", "sql", "json", "yaml", "xlsx", "golang", "bash" ]
21+
date-released: 2025-05-15

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ RELEASE_DATE=$(shell date +'%Y-%m-%d')
99

1010
RELEASE_HASH=$(shell git log --pretty=format:'%h' -n 1)
1111

12-
PROGRAMS = codemeta2cff csv2json csv2jsonl csv2mdtable csv2tab csv2xlsx csvcleaner csvcols csvfind csvjoin csvrows finddir findfile json2toml json2yaml jsoncols jsonjoin jsonmunge jsonrange jsonobjects2csv mergepath range reldate reltime sql2csv string tab2csv timefmt toml2json urlparse xlsx2csv xlsx2json yaml2json
12+
PROGRAMS = codemeta2cff csv2json csv2jsonl csv2mdtable csv2tab csv2xlsx csvcleaner csvcols csvfind csvjoin csvrows finddir findfile json2toml json2yaml jsoncols jsonjoin jsonmunge jsonrange jsonobjects2csv json2jsonl mergepath range reldate reltime sql2csv string tab2csv timefmt toml2json urlparse xlsx2csv xlsx2json yaml2json
1313

14-
MAN_PAGES = codemeta2cff.1 csv2json.1 csv2jsonl.1 csv2mdtable.1 csv2tab.1 csv2xlsx.1 csvcleaner.1 csvcols.1 csvfind.1 csvjoin.1 csvrows.1 finddir.1 findfile.1 json2toml.1 json2yaml.1 jsoncols.1 jsonjoin.1 jsonmunge.1 jsonrange.1 jsonobjects2csv.1 mergepath.1 range.1 reldate.1 reltime.1 sql2csv.1 string.1 tab2csv.1 timefmt.1 toml2json.1 urlparse.1 xlsx2csv.1 xlsx2json.1 yaml2json.1
14+
MAN_PAGES = codemeta2cff.1 csv2json.1 csv2jsonl.1 csv2mdtable.1 csv2tab.1 csv2xlsx.1 csvcleaner.1 csvcols.1 csvfind.1 csvjoin.1 csvrows.1 finddir.1 findfile.1 json2toml.1 json2yaml.1 jsoncols.1 jsonjoin.1 jsonmunge.1 jsonrange.1 jsonobjects2csv.1 json2jsonl.1 mergepath.1 range.1 reldate.1 reltime.1 sql2csv.1 string.1 tab2csv.1 timefmt.1 toml2json.1 urlparse.1 xlsx2csv.1 xlsx2json.1 yaml2json.1
1515

1616
PACKAGE = $(shell ls -1 *.go)
1717

about.html

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,14 @@
2525

2626
<section>
2727
<h1 id="about-this-software">About this software</h1>
28-
<h2 id="datatools-1.3.3">datatools 1.3.3</h2>
29-
<p>Added option, `-for-dataset` to csv2jsonl. This renders JSON lines
30-
output suitable for loading into a dataset collectiojn.</p>
28+
<h2 id="datatools-1.3.4">datatools 1.3.4</h2>
3129
<h3 id="authors">Authors</h3>
3230
<ul>
33-
<li>R. S. Doiel, <a href="https://orcid.org/0000-0003-0900-6903"
34-
class="uri">https://orcid.org/0000-0003-0900-6903</a></li>
31+
<li>R. S. Doiel</li>
3532
</ul>
3633
<h3 id="maintainers">Maintainers</h3>
3734
<ul>
38-
<li>R. S. Doiel, <a href="https://orcid.org/0000-0003-0900-6903"
39-
class="uri">https://orcid.org/0000-0003-0900-6903</a></li>
35+
<li>R. S. Doiel</li>
4036
</ul>
4137
<p>A set of command line tools for working with CSV, Excel Workbooks,
4238
JSON and structured text documents.</p>
@@ -58,7 +54,7 @@ <h3 id="operating-systems">Operating Systems</h3>
5854
<li>Windows</li>
5955
<li>macOS</li>
6056
</ul>
61-
<h3 id="software-requirements">Software Requirements</h3>
57+
<h3 id="software-requiremets">Software Requiremets</h3>
6258
<ul>
6359
<li>Golang &gt;= 1.23.5</li>
6460
<li>Pandoc &gt;= 3.1</li>

about.md

Lines changed: 25 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,55 @@
11
---
2-
title: datatools
3-
abstract: "A set of command line tools for working with CSV, Excel Workbooks, JSON and structured text documents."
2+
cff-version: 1.2.0
3+
message: "If you use this software, please cite it as below."
4+
type: software
5+
title: "datatools"
6+
abstract: "A set of command line tools for working with CSV, Excel
7+
Workbooks, JSON and structured text documents."
48
authors:
5-
- family_name: Doiel
6-
given_name: R. S.
7-
id: https://orcid.org/0000-0003-0900-6903
8-
9-
10-
maintainer:
11-
- family_name: Doiel
12-
given_name: R. S.
13-
id: https://orcid.org/0000-0003-0900-6903
14-
15-
repository_code: https://github.com/caltechlibrary/datatools
16-
version: 1.3.3
17-
license_url: https://data.caltech.edu/license
18-
operating_system:
19-
- Linux
20-
- Windows
21-
- macOS
22-
23-
programming_language:
24-
- Go &gt;&#x3D; 1.23.5
25-
26-
keywords:
27-
- csv
28-
- excel
29-
- sql
30-
- json
31-
- yaml
32-
- xlsx
33-
- golang
34-
- bash
35-
36-
date_released: 2025-05-14
9+
- family-names: Doiel
10+
given-names: R. S.
11+
orcid: ""
12+
13+
repository-code: "https://github.com/caltechlibrary/datatools"
14+
version: 1.3.4
15+
license-url: "https://data.caltech.edu/license"
16+
keywords: [ "csv", "excel", "sql", "json", "yaml", "xlsx", "golang", "bash" ]
17+
date-released: 2025-05-15
3718
---
3819

3920
About this software
4021
===================
4122

42-
## datatools 1.3.3
43-
44-
Added option, &#x60;-for-dataset&#x60; to csv2jsonl. This renders JSON lines output suitable for loading into a dataset collectiojn.
23+
## datatools 1.3.4
4524

4625
### Authors
4726

48-
- R. S. Doiel, <https://orcid.org/0000-0003-0900-6903>
49-
50-
27+
- R. S. Doiel
5128

5229

5330
### Maintainers
5431

55-
- R. S. Doiel, <https://orcid.org/0000-0003-0900-6903>
56-
32+
- R. S. Doiel
5733

58-
A set of command line tools for working with CSV, Excel Workbooks, JSON and structured text documents.
34+
A set of command line tools for working with CSV, Excel Workbooks, JSON
35+
and structured text documents.
5936

6037
- License: <https://data.caltech.edu/license>
6138
- GitHub: <https://github.com/caltechlibrary/datatools>
6239
- Issues: <https://github.com/caltechlibrary/datatools/issues>
6340

64-
### Programming languages
6541

66-
- Go &gt;&#x3D; 1.23.5
42+
### Programming languages
6743

44+
- Go &gt;= 1.23.5
6845

6946
### Operating Systems
7047

7148
- Linux
7249
- Windows
7350
- macOS
7451

52+
### Software Requiremets
7553

76-
### Software Requirements
77-
78-
- Golang &gt;&#x3D; 1.23.5
79-
- Pandoc &gt;&#x3D; 3.1
80-
54+
- Golang &gt;= 1.23.5
55+
- Pandoc &gt;= 3.1

cmd/csv2jsonl/csv2jsonl.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
// csv2json - is a command line that takes CSV input from stdin and
2-
// writes out JSON-L expression. It includes support for using the first
3-
// row as field names or default fieldnames (e.g. col0, col1, col2).
4-
// Additionally it can output the resulting JSON data structures as a
5-
// JSON array or individual JSON blobs (one line per blob).
6-
//
1+
// csv2jsonl - is a command line that takes CSV input from stdin and
2+
// writes out JSON lines expression.
3+
//
74
// @author R. S. Doiel, <[email protected]>
85
//
9-
// Copyright (c) 2021, Caltech
6+
// Copyright (c) 2025, Caltech
107
// All rights not granted herein are expressly reserved by Caltech.
118
//
129
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

0 commit comments

Comments
 (0)