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

CLI RemoveTextForHI leaves empty lines #9146

Open
Manujito opened this issue Dec 29, 2024 · 10 comments
Open

CLI RemoveTextForHI leaves empty lines #9146

Manujito opened this issue Dec 29, 2024 · 10 comments

Comments

@Manujito
Copy link

Hi, I'm working on a batch script and run into an error with the RemoveTextForHI command.

When using it from the GUI, everything works correctly, but using it via command line leaves empy lines and dialogue dashes all around.

Examples:

image
image

I'm using the latest version (4.0.10).

Hope it gets fixed, thanks!

@niksedk
Copy link
Member

niksedk commented Dec 29, 2024

@Manujito
Copy link
Author

Hopefully fixed in latest beta: https://github.com/SubtitleEdit/subtitleedit/releases/download/4.0.10/SubtitleEditBeta.zip

Thanks for the quick update. But it's "almost" fixed. Two issues remain:

  1. Now the lines are not automatically renumbered after HI lines are removed...

image

  1. ...and lines with dialogue dashes are still left behind:

image

@niksedk
Copy link
Member

niksedk commented Dec 30, 2024

Could you attach the subtitle file (Github accepts .zip attachments)

@niksedk niksedk reopened this Dec 30, 2024
@Manujito
Copy link
Author

Sure, here it is:

Another Life.S01E01.en.vtt.zip

I tried both converting from .vtt to .srt and .srt to .srt

@niksedk
Copy link
Member

niksedk commented Dec 31, 2024

Hm, I cannot re-create the issue:

image

Any ideas?

@Manujito
Copy link
Author

Manujito commented Dec 31, 2024

That's from the GUI though. My issue only happens when using the CLI command through a .bat script.

I don't know why there's a different behavior, since I assumed the CLI would just use the same code that the GUI uses, but there is.

@GrampaWildWilly
Copy link

This is kind of a shot in the dark. In .bat files, you have to be careful about certain characters. One that comes to mind is %. You need to take evasive maneuvers with these characters. Specifically in the case of %, you have to code %% if you want it to be interpreted as a percent sign & not as the beginning of a parameter being passed around. I think there's other such characters as well. I imagine there's documentation on this at the Microsoft web site . . . if you can manage to concoct the right search to make it give you the relevant help, a not insignificant feat.

Or not. Like I said, I'm guessing.

@niksedk
Copy link
Member

niksedk commented Dec 31, 2024

It should be the same code... I will test from cli.

@niksedk
Copy link
Member

niksedk commented Jan 2, 2025

Sorry, I cannot re-create your issue in latest beta...

@Manujito
Copy link
Author

Manujito commented Jan 2, 2025

I just tried the latest beta. The lines are now numbered correctly, the only issue that remains is the dialogue dashes left behind, which again, it's not an issue when using the GUI.

Example of the issue:
image

I stripped down my script to a couple of lines to be able to just drop it in the beta folder and test it, this is what I'm using:

test.HI.remove.zip

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

3 participants