Author Topic: SCI Companion V3 - alpha build notes/bugs/feature requests  (Read 158704 times)

0 Members and 1 Guest are viewing this topic.

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #930 on: July 14, 2020, 07:53:04 AM »
I've found it pretty easy and discoverable how to mirror a random LSL2 pic in PE.

Offline Doan Sephim

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #931 on: July 22, 2020, 11:01:12 AM »
Is there a feature in the current companion that will run a spell check on text resources? If not, what do you all think is the best way to do this?
« Last Edit: July 22, 2020, 02:37:57 PM by Doan Sephim »
Artificial Intelligence Competition

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #932 on: July 22, 2020, 11:53:37 AM »
There is not.

The last time something I made (unlike SCI Companion lol) had a spellcheck feature... I think it was an IRC bot? I did it by shelling out to ASpell. That still wouldn't get you any red squiggles though at best I could present it like find or compile results. Another possible way is to have a "dump all text" feature whose output you can feed into your spell checker of choice.

Offline ZvikaZ

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #933 on: July 22, 2020, 12:57:48 PM »
Is there a feature in the current companion that will run a spell check on text files? If not, what do you all think is the best way to do this?
Are you talking about texts or messages?
Because if what you need is spell checking the text resources - I have created a small Python tool that extracts them all to a CSV file.
Then, as Kawa said, you can feed it to whatever other tool (even open it with text editor with spell checker, or some big IDE).

It's https://github.com/ZvikaZ/HebrewAdventure/blob/master/tools/texts_export.py
It operates on the Sierra text resources as exported by SCICompanion.
Note, that currently it's an internal tool, without bells and whistles, and the paths are hard wired inside.

In the future it will be changed of course, but for now, you can just edit the first lines with the paths (and the encoding, if it's relevant for you - if you just use English, it doesn't matter).

If you want, there's also a counterpart https://github.com/ZvikaZ/HebrewAdventure/blob/master/tools/texts_import.py which create Sierra-format text patches from the CSV.

EDIT
====
Note that is part of translation suite. Therefore, the import script creates text resources only if it has at least one translated item. Otherwise, it ignores it.
You can easily change this by removing the check in lines 24-26.
The rest of the script takes the string from the 'translated' column, if there is one, and otherwise, it takes it from the 'original' column.
« Last Edit: July 22, 2020, 01:38:53 PM by ZvikaZ »

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #934 on: July 22, 2020, 04:29:03 PM »
There is, it turns out, a menu item to extract all script strings. That's... 82 lines for The Dating Pool, because most of it is in messages. I wonder if I could extend that to include text and messages...


Edit: that was easier than I expected.
« Last Edit: July 22, 2020, 04:36:37 PM by Kawa »

Offline Collector

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #935 on: July 22, 2020, 04:41:33 PM »
Not that is needed with the current Companion, but Gumby made a tool for this. http://sciwiki.sierrahelp.com//index.php?title=Gumby%27s_SCI_Tools#SCI_Text_Dumper
KQII Remake Pic

Offline Doan Sephim

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #936 on: July 22, 2020, 04:54:00 PM »
Not that is needed with the current Companion, but Gumby made a tool for this. http://sciwiki.sierrahelp.com//index.php?title=Gumby%27s_SCI_Tools#SCI_Text_Dumper
I tried Gumby's program but found it confusing to use...honestly I feel like a caveman troglodyte here sometimes! I also went to ZvikaZ's script and found it equally arcane to use.

I think most people here are experienced in programming (it is the programming community after all!), but I'm still at level 1 when it comes to programming!

Offline ZvikaZ

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #937 on: July 22, 2020, 05:10:21 PM »
Not that is needed with the current Companion, but Gumby made a tool for this. http://sciwiki.sierrahelp.com//index.php?title=Gumby%27s_SCI_Tools#SCI_Text_Dumper
I tried Gumby's program but found it confusing to use...honestly I feel like a caveman troglodyte here sometimes! I also went to ZvikaZ's script and found it equally arcane to use.

I think most people here are experienced in programming (it is the programming community after all!), but I'm still at level 1 when it comes to programming!

Well, I'm aware that my script isn't currently user friendly.
But you just need to change 2 lines, and run it:  (I'm talking about the export script - exports to csv)
line 11, INPUT_FILES = # write here the full path to the directory containing all your text.* files
line 12, OUTPUT_FILE = # write here the full path to the csv file you want to create

That's all, just run it.

If there are any problems, and you want my help, you can report it to me.
But maybe on another thread, as it doesn't really belong to SCI Companion V3 - alpha build notes/bugs/feature requests

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #938 on: July 22, 2020, 05:15:39 PM »
If you want an easy way to get all the text from any game that'll load in SCI Companion, here's an experimental build that changes "Script/Extract all script strings" to "Tools/Extract all text".

Offline ZvikaZ

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #939 on: July 22, 2020, 05:28:00 PM »
If you want an easy way to get all the text from any game that'll load in SCI Companion, here's an experimental build that changes "Script/Extract all script strings" to "Tools/Extract all text".

That's great!
You might consider now adding an import function - after user has edited the text in external tool, it's not fun to manually copy it, it'd be better to press a button, and let it auto-magically imported back to SCICompanion.  (of course, that might need extracting in some specific format, so the user will keep it, in order to facilitate importing)

Just an idea...
You could ignore it. I've already implemented something similar for myself, so I don't need it  ;D

Offline Collector

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #940 on: July 22, 2020, 07:10:00 PM »
How about spell check and translate plugins for Companion?
KQII Remake Pic

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #941 on: July 22, 2020, 07:47:21 PM »
I wonder if I could take the "extract all text" feature and hook it up to Aspell, returning clickable results in the output panel...

Offline Collector

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #942 on: July 22, 2020, 10:26:21 PM »
If you can I could try to do a GUI for it like I did for your SEQ tool.
KQII Remake Pic

Offline Kawa

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #943 on: July 23, 2020, 04:27:57 AM »
I think you might have misunderstood me.

SCI Companion knows where all the text (be it words you looked for or spelling mistakes) come from. That's why you can double click lines in the output panel, right? A plaintext file containing only the raw text does not include anything about where that text came from, and adding that information introduces things that should not be proofed. Also, importing the changes is not as easy as you might think, especially with the way the script strings are found and exported because those are done quite differently from how "find" does it.

So besides the script strings being Weird...

Non-interactive - already hard enough I'd say.
1) Load up a hidden ASpell instance and a pipe.
2) Iterate through all text and message resources.
3) Pass each line to ASpell, read back its judgment.
4) If it's not "*", put a clickable line in the output panel.
5) Let the user click each line and apply each fix as they see fit.

Interactive - would need creation of an all-new dialog box and holy shit this is MFC and oh god oh god
4) If it's not "*", pop up that dialog box, with the original line and ASpell's suggestions in it, let the user judge or edit it, apply the fix.

External - can't be plain .txt but who knows, would require some kind of re-import feature
1) Hope source data is available for the script strings.
2) Iterate through all text and message resources.
3) Write each line to a specially-designed file marked with its source.
4) Let an external tool work with only the "text" fields.
5) Re-import everything, somehow.

...yeah. And then there's things like words it simply doesn't know that need to be added to a personal dictionary, which the non-interactive option can't really do. (It's done by sending a special command line to ASpell.)

Offline gumby

Re: SCI Companion V3 - alpha build notes/bugs/feature requests
« Reply #944 on: July 23, 2020, 07:15:03 PM »
I love this idea.  I had a stand-alone tool that did spelling (and maybe grammar checking?) at one time, but it was clunky - extract the resources, run the tool, re-import the resources.  Having it integrated into Companion would be great.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition


SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.192 seconds with 25 queries.