Connect the source
Everything madbot-cli creates starts from a deposit file, in YAML: you describe in it what you want to find in madbot, and madbot-cli puts it there. It holds the objects of the interface:
- the workspace;
- the sources: where the data come from, each declared once under a name of your choice;
- the nodes: the parts of the project, each with its data. madbot links them to their source with datalinks, without copying them.
-
Create the file
depot.yamlin a working folder, with this content:depot.yaml version: 1workspace: madbot CLI workshopsources:zenodo:plugin: zenodoshared_params:url: https://zenodo.org/nodes:- title: Stream water qualitydescription: A year of water quality measurements in a stream, read on Zenodo.The source is called
zenodoin this file; it uses thezenodoplugin on the serverhttps://zenodo.org/, asmadbot-cli plugins zenodoshowed. It has nocredentials_env: without credentials, madbot reads public records. -
Find the dataset on Zenodo, by its DOI. The first time,
--connectcreates the workspace and connects your account to the source; it says what it created, and writes nothing else:Fenêtre de terminal madbot-cli browse depot.yaml zenodo --search "10.5281/zenodo.24343971" --connectcreated workspace 'madbot CLI workshop'connected source zenodo, without credentials: public data onlysource zenodo, search '10.5281/zenodo.24343971' in the whole source: 1 result:madbot introduction workshop – synthetic water quality measurements of a headwater stream, 2025/ 24343971The last column gives the identifier of the record in the source:
24343971. The next commands no longer need--connect. -
Open the record by this identifier, to see its files:
Fenêtre de terminal madbot-cli browse depot.yaml zenodo 24343971source zenodo, 24343971:README.md 24343971/README.mddictionnaire.csv 24343971/dictionnaire.csvmesures.csv 24343971/mesures.csvstations.csv 24343971/stations.csvEach line gives the name of a file, then its external_id, the identifier madbot will know it by. The files of the record have French names.
-
Link three files to the node. Add a
datakey to the node, at the end of the file:depot.yaml version: 1workspace: madbot CLI workshopsources:zenodo:plugin: zenodoshared_params:url: https://zenodo.org/nodes:- title: Stream water qualitydescription: A year of water quality measurements in a stream, read on Zenodo.data:- source: zenodobrowse:path: [24343971]names: [README.md, stations.csv, mesures.csv]The entry says: in the
zenodosource, open the record24343971(path), and take these three files there (names). The fourth one,dictionnaire.csv, is for the optional block.
Optional Three ways to name a data
A data entry names its files in one of these ways:
| Entry | Takes |
|---|---|
external_id: 24343971/README.md |
this file, as browse gives its identifier |
browse with path and names |
the files of a folder, named one by one |
browse with path and match: "*.csv" |
the files of a folder whose name matches a pattern |
The external_id is the form a platform writes most easily, when it knows where it stored its files. Its form depends on the plugin: an absolute path on a file server, <record>/<file> on Zenodo.
Optional What the command does, on the API side
browse --search calls GET /api/connections/{id}/external_data/search?q=…, and opening a folder GET /api/connections/{id}/external_data?parent=…, as the data selection window of the interface does. This needs a connection of your account to the source, in the workspace: --connect creates it (POST /api/connections), without credentials for public data, and the workspace with it if it does not exist (POST /api/workspaces).
Checkpoint
Section titled “Checkpoint”If you are stuck
Section titled “If you are stuck”- “The account is not connected to the source ‘zenodo’ in madbot yet”: add
--connectto thebrowsecommand, once. - “No ‘…’ in the root of the source. It is empty”: a public record is not listed from the root of Zenodo, it opens by its identifier. Check the identifier,
24343971, or find it again with--search. - “No source ‘…’ in depot.yaml”: the name after
depot.yamlis the one of the source in your file (the key undersources), not the name of the plugin. Here,zenodo. - A path written
24343971/README.mdinbrowse: each element of the path is an argument of its own.browse depot.yaml zenodo 24343971opens the record; anexternal_idis only written in the file. - “not valid YAML or JSON”, with a line and a column number: an indentation error. YAML counts spaces.
datalines up withtitle, and each- sourceis indented underdata. Do not use tabs. - “a data entry takes one of these forms … here: source, path, names”:
pathandnamesare written straight under- source, without thebrowse:key that holds them. Addbrowse:and indent them under it. - “rate limited” or a wait: the room saturates the Zenodo search. Wait a minute, or go on to step 3 with the identifier
24343971.

