On Mon, Jun 16, 2025, 12:31 PM Eric Blake <ebl...@redhat.com> wrote:
> On Fri, Jun 13, 2025 at 04:36:05PM -0400, John Snow wrote: > > Signed-off-by: John Snow <js...@redhat.com> > > --- > > qapi/block-core.json | 186 ++++++++++++++++++++--------------------- > > qapi/block-export.json | 36 ++++---- > > qapi/block.json | 14 ++-- > > qapi/transaction.json | 20 ++--- > > 4 files changed, 128 insertions(+), 128 deletions(-) > > Detecting whether you missed links is harder; but for the links you > include here... > I can share my script in a little bit, though it's very inefficient and at times stupid. It is at best "semi-manual", but perhaps there's worth in improving it so that we can run conversions elsewhere in the docs, or re-run it periodically? 1. I modified qapi-schema to output a list of identifiers to a text file. I exclude anything ending in "List". 2. I manually removed built-in types like str and so on. I could update the above to just do this part automatically ... 3. I ran a python script that loads all of these words and then runs through all of the qapi .json files, replacing each occurrence with `occurrence`. The regex is a little rudimentary ... 4. I use "git add -p" to (quickly) review each change as it goes in. Sometimes I need to make edits to remove the leading @ or remove surrounding quotes. On occasion I need to disambiguate the reference. I may need to reflow the text. 5. I skip committing most things for "stop", "eject", "transaction", etc as they are common words and don't necessarily refer to the QMP command or event enum, etc. If there are mistakes, I'd bet money it's around runstates, eject, stop, or "transaction". It's possible some things are not capitalized "correctly" in the documentation and therefore missed getting hit by the cross-ref beam, too. > Reviewed-by: Eric Blake <ebl...@redhat.com> > Thank you very much! Hopefully you like this change and it makes browsing the block documentation much more pleasant. > -- > Eric Blake, Principal Software Engineer > Red Hat, Inc. > Virtualization: qemu.org | libguestfs.org > >