Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Title is too long, body is too short #180

Open
i1group opened this issue May 11, 2022 · 4 comments
Open

Title is too long, body is too short #180

i1group opened this issue May 11, 2022 · 4 comments

Comments

@i1group
Copy link

i1group commented May 11, 2022

I have an issue with the text generation - it looks not as expected. For example title field should be short (normally 2-5 words) and body should be long (normally >20 words), but often title generated is longer than body:
image

To workaround the issue I've created custom field configuration for title and body:
image

And now it looks like this:
image

  • The body is still very short.
  • The . is added to the end of the title, but I don't need it (it's a punctuation error btw)

So how can I generate short text for titles and long text for bodies? And add/exclude the full stop (.) at the end of the generated text?

@i1group i1group changed the title Title is too long, text is too short Title is too long, body is too short May 11, 2022
@calvinballing
Copy link
Contributor

Using the Regex matching in the custom fields allows for this kind of additional customization

@i1group
Copy link
Author

i1group commented Oct 30, 2023

Sorry, could you provide more details?

I've set minimum number of words for the body (as you can see on the screenshot), but it does not work for the Body field (as you can see on the screenshot).
Also there is no settings for add/exclude full stop at the end of the sentence. Or am I missing something?

@calvinballing
Copy link
Contributor

Instead of using the text type, I think you'll want to change it to the regex match.
For the title I think you'd want something like this:

Screen Shot 2023-10-30 at 10 07 08 AM

For the body, I think you'd want something like this:
Screen Shot 2023-10-30 at 10 12 19 AM

(you can ignore the "Regex Match" field in both cases. I'm working on a successor to this extension, and this is a screenshot from the successor)


Without seeing the underlying html, I'm not sure what you need to put in the match field, but I think the current values you have may not be matching the body field. If this doesn't work, maybe you could post a code snippet showing the element's html.

@i1group
Copy link
Author

i1group commented Oct 30, 2023

I see, this may help. Thanks @calvinballing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants