-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Decompile to multiple files? #3
Comments
I came looking for this exact functionality. +1 |
How about per tag? In fact it would be cool if tweego could have an option to add passage tags based on original filenames so they could be decompiled in a similar reverse fashion. The reason I ask is because grouping TwineScript passages into groups makes sense (but how would tweego know which were in what group without tagging or some other grouping?). Also since tweego can directly compile CSS and JS files, it would be cool if it could reverse this by decompiling back into such files instead of dropping it into passages in a twee file. Of course the question becomes one of what filenames to use when decompiling. Currently there is the Also having more switches to help when HTML source that was not compiled by tweego would be good too. It should at least be possible to have some heuristic to split CSS and JS into individual files. I am not sure how grouping Twine script passages would work. Methinks human intervention would be needed (decompiling does have limitations). |
@Uzume , my fork can do that to some extent and provides the following options:
Can add grouping by tag but how reliable that can be? Which tag to select if a passage is marked with several of them? Otherwise |
@ezsh That is interesting and I am glad to know others are thinking of such things. Methinks I would have chosen Rust if I wanted to migrate to a new language. Perhaps I should port it and make a Of course if one is interested in going so far, Twine compatibility becomes a questionable default feature. I never understood the need to keep the story format wiki markup directly in the HTML when it can never be rendered "as is" anyway (and is always dynamically pulled out and expanded before stuffing it in the main "passages" stage). I am also not a fan of all the special names (e.g. passage special names). It seems to me all the configuration details could be centrally located and controlled easily enough. |
Why do you want to port it to Web when the sole purpose of the Tweego project was a local command-line compiler that can be used to assemble large projects on desktops? |
I do not want to port it to the web as per se. I am more interested in a unified code base that powers both a command line and a GUI visualization. Twine 2 is close if it would just incorporate/combine command line functionality into it. There are a few older and mostly unmaintained forks/applications of Twine 2 for such purposes but as long as they are separate code bases and one is developed without the other they will diverge and one will eventually become unmaintained. Some examples include: It also becomes problematic to make large changes like drastically changing the base Twine format, etc. without having a unified join command-line and GUI set of tools in one development repository. |
This feature is needed yup! |
I think I'd like faithful bidirectional translation: if you tweego multiple files, it should create a Twine .html file with tags or other metadata that will let tweego deconstruct it back to the original files. And this should let someone edit the story in Twine, and then easily propagate the changes back to the twee files, which makes several types of collaborative workflow easier. I think a sensible implementation would be to add a tag like "tweefile:filename.tw" to each passage.
(If this seems sensible, I can try to implement it) |
Okay bidirectional using tweego is straightforward. I should just need to
add .twee to each generated file.
It will then allow you to compile a .html file again as expected.
Can additional tagging be a separate feature. The ability to compile and
decompile back and forth can be completed and tested this weekend.
…On Fri, Aug 12, 2022, 4:33 PM felix ***@***.***> wrote:
I think I'd like faithful bidirectional translation: if you tweego
multiple files, it should create a Twine .html file with tags or other
metadata that will let tweego deconstruct it back to the original files.
And this should let someone edit the story in Twine, and then easily
propagate the changes back to the twee files, which makes several types of
collaborative workflow easier.
I think a sensible implementation would be to add a tag like "tweefile:
filename.tw" to each passage.
- This won't work for special passages like StoryData, or
script/stylesheet passages, so those will need special handling, perhaps
send them to default filenames, with command-line options to override.
- If multiple passages go to the same file, try to preserve the order
that's in the original file. I think most of the time, it should be good
enough to just use the order of the passages in the .html file. But perhaps
there are cases where it should try to be smart about minimizing diffs when
updating a twee file.
(If this seems sensible, I can try to implement it)
—
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVCQEWHK35JVQQPSLP2VBWLVY3NK7ANCNFSM4J62OUIA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Allow decompiling input sources to multiple files.
Possible options:
Questions:
.js
/.css
files?The text was updated successfully, but these errors were encountered: