Skip to content

Commit

Permalink
Update paths
Browse files Browse the repository at this point in the history
  • Loading branch information
nntrn committed Apr 11, 2024
1 parent 283d85d commit c56822a
Show file tree
Hide file tree
Showing 29 changed files with 89 additions and 28 deletions.
3 changes: 3 additions & 0 deletions functions/barcharts.md → _functions/barcharts.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# barcharts

```jq
Expand Down
3 changes: 3 additions & 0 deletions functions/conversion.md → _functions/conversion.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# conversion

Pretty print numbers
Expand Down
3 changes: 3 additions & 0 deletions functions/describe.md → _functions/describe.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# describe

Get object outline
Expand Down
3 changes: 3 additions & 0 deletions functions/flatten.md → _functions/flatten.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# Flatten

## Flat JSON
Expand Down
3 changes: 3 additions & 0 deletions functions/github-api.md → _functions/github-api.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# github api

```jq
Expand Down
5 changes: 5 additions & 0 deletions _functions/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: functions
layout: index
---

3 changes: 3 additions & 0 deletions functions/json2csv.md → _functions/json2csv.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# json2csv

```jq
Expand Down
10 changes: 10 additions & 0 deletions functions/pick.md → _functions/pick.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
---
# pick

[[Source]](https://github.com/jqlang/jq/issues/2578#issuecomment-1532632453)
Expand Down Expand Up @@ -35,3 +37,11 @@ $ jq 'include "recipes"; pick(.properties.dtsRollup.type)' data/api-extractor.sc
}
```

## string pick

```jq
def spick($key):
getpath([($key|split(".")[]|select(length > 0))]);
```


3 changes: 3 additions & 0 deletions functions/read-history.md → _functions/read-history.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# Read history

Compile timestamps in `.bash_history` for all users
Expand Down
3 changes: 3 additions & 0 deletions functions/summary.md → _functions/summary.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# Summary

```jq
Expand Down
3 changes: 3 additions & 0 deletions functions/text.md → _functions/text.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# Text functions

## Recursively split strings w/ new lines
Expand Down
3 changes: 3 additions & 0 deletions functions/unroll.md → _functions/unroll.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# Unroll

```jq
Expand Down
3 changes: 3 additions & 0 deletions articles.md → _general/articles.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# Articles I like

* [You probably don’t need jq](https://ncox.dev/blog/jq-powershell/) - article demonstrating how to manipulate JSON data with PowerShell
3 changes: 3 additions & 0 deletions general/codepoints.md → _general/codepoints.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# Codepoints

Work with explode/implode
Expand Down
3 changes: 3 additions & 0 deletions general/data-cleaning.md → _general/data-cleaning.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# Data cleaning

## Delete keys
Expand Down
3 changes: 3 additions & 0 deletions general/data-transform.md → _general/data-transform.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# Data transformation

## json2ini
Expand Down
3 changes: 3 additions & 0 deletions general/examples.md → _general/examples.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# Examples

## Reduce
Expand Down
7 changes: 7 additions & 0 deletions _general/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: general
nav_order: 2
has_children: true
layout: index
---

3 changes: 3 additions & 0 deletions general/inputs.md → _general/inputs.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# Working with `inputs`

**DATA**: [tmp.tsv](../data/tmp.tsv)
Expand Down
3 changes: 3 additions & 0 deletions general/kv.md → _general/kv.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# kv

```jq
Expand Down
3 changes: 3 additions & 0 deletions general/oneliners.md → _general/oneliners.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# Oneliners

## Recursively convert appropriate data types from string
Expand Down
3 changes: 3 additions & 0 deletions general/reduce.md → _general/reduce.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# Reduce

```jq
Expand Down
3 changes: 3 additions & 0 deletions general/scalars.md → _general/scalars.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# Scalars

Scalars are variables that hold an *individual* value (strings, integers, and booleans). If it's not an object or array — it's most likely a scalar
Expand Down
3 changes: 3 additions & 0 deletions general/streams.md → _general/streams.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# Working with streams

Data used: [nested.json](../data/outer.json)
Expand Down
3 changes: 3 additions & 0 deletions general/wrangle.md → _general/wrangle.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
---

# Wrangle

## Zip Column Headers
Expand Down
1 change: 0 additions & 1 deletion data-transform.md

This file was deleted.

8 changes: 0 additions & 8 deletions functions/index.html

This file was deleted.

8 changes: 0 additions & 8 deletions general/index.html

This file was deleted.

12 changes: 1 addition & 11 deletions index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: default
layout: minimal
title: Home
nav_exclude: true
---
Expand All @@ -23,13 +23,3 @@ jq 'include "recipes"; <funcname>' <jsonfile>
<details><summary>View contents</summary>
<pre>{% include_relative recipes.jq %}</pre>
</details>

---

<ul class="pages">
{% for page in site.pages %}
{%- if page.title -%}
<li class="page"><a href="{{ site.baseurl }}{{ page.url }}">{{ page.title }}</a></li>
{%- endif -%}
{% endfor %}
</ul>

0 comments on commit c56822a

Please sign in to comment.