From 83b6894c00bb1d43c7ec2ecb52de9923317dc2f8 Mon Sep 17 00:00:00 2001 From: yoshioka Date: Wed, 5 Jul 2023 16:31:59 +0900 Subject: [PATCH 1/2] Add list-nompedia command --- bin/list-nompedia | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 bin/list-nompedia diff --git a/bin/list-nompedia b/bin/list-nompedia new file mode 100755 index 0000000..4ae5618 --- /dev/null +++ b/bin/list-nompedia @@ -0,0 +1,23 @@ +#!/bin/bash + +NOMPEDIA_URL="https://scrapbox.io/nompedia/" + +function usage() { +cat << EOS +list-nompedia + +Description: + Display titles and URL of all nompedia pages +Usage: + list-nompedia [json_file] +Help: + [json_file] can be downloaded from Scrapbox settings page +EOS +} + +if [ "$1" = "" ]; then + usage + exit 1 +fi + +cat $1 | jq -r '.pages[].title' | sed 's/ /_/g' | awk -v url="$NOMPEDIA_URL" '{print NR, $0, url$0}' \ No newline at end of file From 7c25215290a77a692663bdbad35b35ffa45de4c3 Mon Sep 17 00:00:00 2001 From: yoshioka Date: Wed, 5 Jul 2023 16:44:32 +0900 Subject: [PATCH 2/2] Add README.org --- README.org | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.org b/README.org index cdc9559..fa5ae56 100644 --- a/README.org +++ b/README.org @@ -48,6 +48,8 @@ + [[#treetable][treetable]] :: Convert markdown or org-mode style section tree into table. It is supposed to be used for conversion of issue list into table. + + + [[#list-nomladia][list-nompedia]] :: List titles and URLs of all nompedia pages * Descriptions ** ame @@ -137,3 +139,7 @@ : Usage: treetable sample-todo-list.{md|org} > sample-todo-list.tex For details about input-file format, check [[file:examples/treetable/todo-list.org][examples/treetable/todo-list.org]] or [[file:examples/treetable/todo-list.md][examples/treetable/todo-list.md]]. See also about output example [[file:examples/treetable/todo-list.pdf][examples/treetable/todo-list.pdf]] + +** list-nompedia + : Usage: list-nompedia nompedia.json + nompedia.json can be downloaded from [[https://scrapbox.io/projects/nompedia/settings/page-data][nompedia settings page]]