storyblok / storyblok-cli

Storyblok CLI
https://www.npmjs.com/package/storyblok
MIT License
32 stars 30 forks source link

[Feature Request] Add the capability of sync a subset of stories filtering by name or slug #51

Open Segmentree opened 1 year ago

Segmentree commented 1 year ago

Description

Sometimes is useful to copy only stories with specific names or slugs. To achieve this, one approach could be to provide a list of names or slugs separate by commas in the command to sync stories:

sync --type stories --source 233308 --target 233311 --names-list name1,name2,name3 sync --type stories --source 233308 --target 233311 --slug-list slug1,slug2,slug3

SebbeJohansson commented 8 months ago

+1 on this. I would love to be able to sync a specific slug/story.

edvinasjurele commented 3 months ago

+1

We have thousands of stories and full sync is not a way to go, we rather have to perform scoped sync or at least by slug list (exact match).

NOTE: starts-with does not cover the need because it could be some folder (f.e. starts-with=blog/) containing a lot of stories in it, although it makes a problem slightly smaller but still does not fully cover the need.

Btw, the filter_query also does not help because it is meant for filtering by story content internals and not the outer metadata.