summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-04-25 22:15:30 +0000
committerKarl Berry <karl@freefriends.org>2024-04-25 22:15:30 +0000
commit55c293a267ce95c8f319b59354e86e523245b774 (patch)
treeca4aaac2c5f56b7520382af3790c76f9bfd7827a /Master
parentcf99d1ac0b2c66dc815ddafad26b80515ba802e8 (diff)
json doc
git-svn-id: svn://tug.org/texlive/trunk@71079 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl32
-rw-r--r--Master/tlpkg/doc/json-formats.txt20
2 files changed, 27 insertions, 25 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl
index 4d65fc3839c..43aa76a4dc2 100755
--- a/Master/texmf-dist/scripts/texlive/tlmgr.pl
+++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl
@@ -1713,7 +1713,7 @@ sub action_info {
my @datafields;
my $fmt = "list";
if ($opts{'data'} && $opts{'json'}) {
- tlwarn("Preferring json output over data output!\n");
+ tlwarn("Preferring JSON output over data output!\n");
delete($opts{'data'});
}
if ($opts{'json'}) {
@@ -8626,7 +8626,7 @@ Dump the remote TLPDB.
=item B<--json>
Instead of dumping the actual content, the database is dumped as
-JSON. For the format of JSON output see C<tlpkg/doc/JSON-formats.txt>,
+JSON. For the format of JSON output see C<tlpkg/doc/json-formats.txt>,
format definition C<TLPDB>.
=back
@@ -8850,11 +8850,11 @@ page for new packages: L<https://ctan.org/upload>.
=item B<--json>
-In case C<--json> is specified, the output is a JSON encoded array where
-each array element is the JSON representation of a single C<TLPOBJ> but
-with additional information. For details see
-C<tlpkg/doc/JSON-formats.txt>, format definition: C<TLPOBJINFO>. If both
-C<--json> and C<--data> are given, C<--json> takes precedence.
+If C<--json> is specified, the output is a JSON encoded array where each
+array element is the JSON representation of a single C<TLPOBJ> but with
+additional information. For details see C<tlpkg/doc/json-formats.txt>,
+format definition: C<TLPOBJINFO>. If both C<--json> and C<--data> are
+given, C<--json> takes precedence.
=back
@@ -8989,7 +8989,7 @@ synonym).
Both C<show...> forms take an option C<--json>, which dumps the option
information in JSON format. In this case, both forms dump the same
data. For the format of the JSON output see
-C<tlpkg/doc/JSON-formats.txt>, format definition C<TLOPTION>.
+C<tlpkg/doc/json-formats.txt>, format definition C<TLOPTION>.
In the third form, with I<key>, if I<value> is not given, the setting
for I<key> is displayed. If I<value> is present, I<key> is set to
@@ -9105,7 +9105,7 @@ sizes for that program. The first size shown is the default.
If C<--json> is specified without other options, the paper setup is
dumped in JSON format. For the format of JSON output see
-C<tlpkg/doc/JSON-formats.txt>, format definition C<TLPAPER>.
+C<tlpkg/doc/json-formats.txt>, format definition C<TLPAPER>.
Incidentally, this syntax of having a specific program name before the
C<paper> keyword is unusual. It is inherited from the longstanding
@@ -9443,10 +9443,11 @@ Don't ask questions.
=item B<--json>
-When listing backups, the option C<--json> turn on JSON output.
-The format is an array of JSON objects (C<name>, C<rev>, C<date>).
-For details see C<tlpkg/doc/JSON-formats.txt>, format definition: C<TLBACKUPS>.
-If both C<--json> and C<--data> are given, C<--json> takes precedence.
+When listing backups, the option C<--json> writes JSON output. The
+format is an array of JSON objects (C<name>, C<rev>, C<date>). For
+details see C<tlpkg/doc/json-formats.txt>, format definition:
+C<TLBACKUPS>. If both C<--json> and C<--data> are given, C<--json> takes
+precedence.
=back
@@ -9492,8 +9493,9 @@ C<tables> (unless they also contain the word C<table> on its own).
=item B<--json>
-Output search results as json hash with two keys: B<files> and B<packages>.
-
+Output search results as a JSON hash with two keys: B<files> and
+B<packages>. For the format of the JSON output see
+C<tlpkg/doc/json-formats.txt>, format definition C<TLSEARCH>.
=back
diff --git a/Master/tlpkg/doc/json-formats.txt b/Master/tlpkg/doc/json-formats.txt
index 9db666eabfb..b0bca6a7364 100644
--- a/Master/tlpkg/doc/json-formats.txt
+++ b/Master/tlpkg/doc/json-formats.txt
@@ -4,7 +4,7 @@ $Id$
JSON formats for the various outputs of tlmgr
=============================================
-Fields guaranteed to be present are marked with a *
+Fields guaranteed to be present are marked with a *.
TLPOBJ
------
@@ -40,7 +40,6 @@ exception (docfiles and docfiledata are merged). Details:
- cataloguedata: keys are topics, version, license, ctan, date, related (all strings)
Example: { "topics": "graphic", "version": "1.23" }
-
Note: A minimal TLPOBJ might look like
{
"name": "minimal",
@@ -49,7 +48,6 @@ Note: A minimal TLPOBJ might look like
}
-
TLPOBJINFO
----------
This JSON format is dumped on tlmgr info --data json and is slightly different
@@ -78,8 +76,8 @@ JSON object with the following fields:
TLPDB
-----
This format is used when dumping tlpdb, local or remote
-JSON object with the following fields:
-keys are tags, values are tlpdb in TLPDBSINGLE format
+JSON object with the following fields.
+Keys are tags, values are tlpdb in TLPDBSINGLE format.
Example:
{
"main": {
@@ -92,6 +90,7 @@ Example:
}
}
+
TLBACKUP
--------
This format is used when dumping available backups via the
@@ -115,7 +114,7 @@ Example:
TLPAPER
-------
-array of objects, each one having three keys: program, file, options.
+An array of objects, each one having three keys: program, file, options.
`program' gives the program name, `file' the place where the configuration
has been found, and `options' is an array of strings with the first
one being the currently selected paper.
@@ -132,8 +131,8 @@ Example for one element of the array:
TLOPTION / TLSETTING
--------------------
-each option/setting is an object with the following keys, values
-are all strings(!)
+Each option/setting is an object with the following keys, values
+are all strings(!).
for TLOPTIONS:
name, tlmgrname, description, format, default, value (optional)
for TLSETTING:
@@ -147,7 +146,7 @@ Example TLOPTIONS:
"default" : "1",
"name" : "install_srcfiles"
},
-Example TLSETTING
+Example TLSETTING:
{
"type" : "b",
"description" : "This tree acts as user tree",
@@ -155,4 +154,5 @@ Example TLSETTING
},
-
+TLSEARCH
+--------