Utiliser Les Commandes De Graphe Pour Comprendre Les Relations
Une arborescence montre où se trouve un favori ou un dossier. Un graphe montre comment les éléments enregistrés sont liés. Les commandes graph sont utiles pour la recherche concurrentielle, les cartes de connaissances, la planification de lancement et les flux d'agent qui doivent expliquer pourquoi des éléments sont connectés.
bookmarks treegraphInspecter Les Relations Proches
webcull graph around --stack-id 2301 --depth 1 --limit 50 --fields id,parent_id,type,title,url
{
"success": "true",
"command": "graph around",
"stack_id": 2301,
"direction": "both",
"depth": 1,
"nodes": [
{
"id": 2000,
"parent_id": 0,
"type": "folder",
"title": "Marketing",
"url": "",
"depth": 1
},
{
"id": 2301,
"parent_id": 2000,
"type": "folder",
"title": "Competitors",
"url": "",
"depth": 0
},
{
"id": 2302,
"parent_id": 2301,
"type": "bookmark",
"title": "Acme pricing",
"url": "https://acme.example/pricing",
"depth": 1
}
],
"edges": [
{
"from": 2000,
"to": 2301,
"type": "contains",
"source": "hierarchy"
},
{
"from": 2301,
"to": 2302,
"type": "contains",
"source": "hierarchy"
}
],
"returned_nodes": 3,
"returned_edges": 2,
"truncated": false
}
nodesid qui peut être transmis à une autre commande CLI.edgesfrom points to to.typecontains signifie qu'un élément en contient un autre.truncatedDemander Ce Qui Pointe Ici Ou Comment Deux Elements Se Connectent
webcull graph backlinks --stack-id 2302
webcull graph path --from-stack-id 2000 --to-stack-id 2302 --max-depth 4
{
"success": "true",
"command": "graph path",
"from_stack_id": 2000,
"to_stack_id": 2302,
"found": "true",
"max_depth": 4,
"visited_node_count": 3,
"path_stack_ids": [2000, 2301, 2302],
"nodes": [
{
"id": 2000,
"type": "folder",
"title": "Marketing",
"depth": 0
},
{
"id": 2301,
"type": "folder",
"title": "Competitors",
"depth": 1
},
{
"id": 2302,
"type": "bookmark",
"title": "Acme pricing",
"depth": 2
}
],
"edges": [
{
"from": 2000,
"to": 2301,
"type": "contains",
"source": "hierarchy"
},
{
"from": 2301,
"to": 2302,
"type": "contains",
"source": "hierarchy"
}
],
"truncated": false
}
Utilisez backlinks lorsque vous devez savoir ce qui pointe vers un élément. Utilisez path lorsque vous devez expliquer comment deux éléments enregistrés sont connectés.
Vérifier la sortie graph avant de l'utiliser
webcull graph validate --stack-id 2301
webcull graph schema
Utilisez graph schema lorsqu'un script doit comprendre la sortie graph. Utilisez graph validate lorsque vous voulez vérifier si une zone de relations est complète ou limitée par vos options de commande.
Safety
Les commandes graph sont en lecture seule, nécessitent l'accès en lecture aux favoris et n'affichent que les données du compte autorisé. Elles excluent les notes sauf si vous demandez des champs supplémentaires.