From 34590ceac9259fd4424118894c3d3c7584ebd2fc Mon Sep 17 00:00:00 2001 From: aristote Date: Sat, 26 Jul 2025 23:38:08 +0200 Subject: new publication format --- publications/export.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'publications/export.nix') diff --git a/publications/export.nix b/publications/export.nix index 6a6c42d..3157133 100644 --- a/publications/export.nix +++ b/publications/export.nix @@ -14,7 +14,7 @@ runCommand "publications" {buildInputs = [jq pandoc];} '' echo $id echo "$ref" > "csljson/$id" cat csljson/$id - pandoc --from=csljson --to=biblatex --output "biblatex/$id" <<< "[ $ref ]" - pandoc --from=csljson --to=bibtex --output "bibtex/$id" <<< "[ $ref ]" + pandoc --from=cslyaml --to=biblatex --output "biblatex/$id" <<< "[ $ref ]" + pandoc --from=cslyaml --to=bibtex --output "bibtex/$id" <<< "[ $ref ]" done '' -- cgit v1.2.3 From ad483265ebf2c88b84bf23c66b7a143304c52773 Mon Sep 17 00:00:00 2001 From: aristote Date: Sun, 27 Jul 2025 12:15:34 +0200 Subject: move back to json and rename --- publications/export.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'publications/export.nix') diff --git a/publications/export.nix b/publications/export.nix index 3157133..6a6c42d 100644 --- a/publications/export.nix +++ b/publications/export.nix @@ -14,7 +14,7 @@ runCommand "publications" {buildInputs = [jq pandoc];} '' echo $id echo "$ref" > "csljson/$id" cat csljson/$id - pandoc --from=cslyaml --to=biblatex --output "biblatex/$id" <<< "[ $ref ]" - pandoc --from=cslyaml --to=bibtex --output "bibtex/$id" <<< "[ $ref ]" + pandoc --from=csljson --to=biblatex --output "biblatex/$id" <<< "[ $ref ]" + pandoc --from=csljson --to=bibtex --output "bibtex/$id" <<< "[ $ref ]" done '' -- cgit v1.2.3 From f9d5943d2ba2cf8a756a7b2ed97f4d9327ec4025 Mon Sep 17 00:00:00 2001 From: aristote Date: Sun, 27 Jul 2025 13:29:21 +0200 Subject: publications: fix export --- publications/export.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'publications/export.nix') diff --git a/publications/export.nix b/publications/export.nix index 6a6c42d..93a51f2 100644 --- a/publications/export.nix +++ b/publications/export.nix @@ -1,20 +1,23 @@ { jq, pandoc, - refsJSON ? ./publications.json, + refsJSON, runCommand, }: runCommand "publications" {buildInputs = [jq pandoc];} '' mkdir -p "$out"/{biblatex,bibtex,csljson} cd "$out" - jq --compact-output ".[]" ${refsJSON} | while read ref + for refs in ${refsJSON} do - id=$(echo "$ref" | jq --raw-output '.id') - echo $id - echo "$ref" > "csljson/$id" - cat csljson/$id - pandoc --from=csljson --to=biblatex --output "biblatex/$id" <<< "[ $ref ]" - pandoc --from=csljson --to=bibtex --output "bibtex/$id" <<< "[ $ref ]" + jq --compact-output ".[]" $refs | while read ref + do + id=$(echo "$ref" | jq --raw-output '.id') + echo $id + echo "$ref" > "csljson/$id" + cat csljson/$id + pandoc --from=csljson --to=biblatex --output "biblatex/$id" <<< "[ $ref ]" + pandoc --from=csljson --to=bibtex --output "bibtex/$id" <<< "[ $ref ]" + done done '' -- cgit v1.2.3 From 9749429636e7e5e2515f1c75d228d5321907fba4 Mon Sep 17 00:00:00 2001 From: aristote Date: Sun, 27 Jul 2025 16:06:21 +0200 Subject: publications: files: fix script --- publications/export.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'publications/export.nix') diff --git a/publications/export.nix b/publications/export.nix index 93a51f2..b119054 100644 --- a/publications/export.nix +++ b/publications/export.nix @@ -10,7 +10,7 @@ runCommand "publications" {buildInputs = [jq pandoc];} '' for refs in ${refsJSON} do - jq --compact-output ".[]" $refs | while read ref + jq --compact-output ".[]" $refs | while read -r ref do id=$(echo "$ref" | jq --raw-output '.id') echo $id -- cgit v1.2.3 From ebdf1d48c521ba0925c81453700dcd63a650eeab Mon Sep 17 00:00:00 2001 From: aristote Date: Tue, 29 Jul 2025 09:33:08 +0200 Subject: publications -> research --- publications/export.nix | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 publications/export.nix (limited to 'publications/export.nix') diff --git a/publications/export.nix b/publications/export.nix deleted file mode 100644 index b119054..0000000 --- a/publications/export.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - jq, - pandoc, - refsJSON, - runCommand, -}: -runCommand "publications" {buildInputs = [jq pandoc];} '' - mkdir -p "$out"/{biblatex,bibtex,csljson} - cd "$out" - - for refs in ${refsJSON} - do - jq --compact-output ".[]" $refs | while read -r ref - do - id=$(echo "$ref" | jq --raw-output '.id') - echo $id - echo "$ref" > "csljson/$id" - cat csljson/$id - pandoc --from=csljson --to=biblatex --output "biblatex/$id" <<< "[ $ref ]" - pandoc --from=csljson --to=bibtex --output "bibtex/$id" <<< "[ $ref ]" - done - done -'' -- cgit v1.2.3