-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Problem
gws docs set-paragraph-style only supports --alignment and --line-spacing, but doesn't expose the Google Docs API's namedStyleType field. This means there's no way to change a paragraph from HEADING_2 to NORMAL_TEXT (or vice versa) via the CLI.
Use case
When using gws docs replace to insert text before a heading, the replacement text inherits the heading style. There's no CLI command to fix the paragraph style back to normal text afterward.
Suggested fix
Add a --style flag to set-paragraph-style that maps to the API's namedStyleType. Accepted values:
NORMAL_TEXTHEADING_1throughHEADING_6TITLESUBTITLE
Example usage:
gws docs set-paragraph-style <doc-id> --from 179 --to 799 --style NORMAL_TEXTRelated
The richformat content format on insert/append also doesn't work as expected for updateParagraphStyle requests - it inserts the JSON as literal text rather than executing it as a batch update. This may be a separate issue, but it means there's currently no workaround via the CLI.