How to bulk edit custom metadata lists

I have some long lists I want to use in custom metadata. It is impracticable to do it one by one.

How can I import/edit them into Scrivener?

Where are they stored? I could use Notepad++ or some other editor (I’ll even hack json to do this!)

The lists are in the project .scrivx, which is XML so it is easy to edit from this form:

    <MetaDataField Type="List" ID="listtest">
        <Title>List Test</Title>
        <ListOptions None="None">
            <Option ID="1">a</Option>
            <Option ID="2">b</Option>
            <Option ID="3">c</Option>
        </ListOptions>
    </MetaDataField>

at your own risk! After taking a backup.

Yes that worked a treat! But WARNING don’t leave your backup of the project .scrivx in the same folder as the one you want to edit… Scrivener notices both and seeks to resolve a perceived conflict, which I have no idea how to manage, having never read about this.

(Or change the extension of your project file to avoid conflict perhaps)

1 Like

Yes, if multiple .scrivx files are found it will attempt to help you reconcile them, as the most common cause of this is a synchronisation tool duplicating files that have been edited in multiple places before being synced.

The safest approach is to just zip the entire .scriv folder for internal edits like this, then if something goes really wrong you can delete the modified project folder and extract the original from the .zip. But if you’re just doing something very self-contained like this, dragging out a copy of the .scrivx to a separate location is fine.

1 Like