Open zwettemaan opened 5 years ago
Note: I have not added any functionality with regards to cell styles or object styles - will implement that after we've looked at the current version...
Oops. Ignore the previous comment. I confused myself with issue #7.
@LauraB7 I suspect this is a process you'd perform with an HTML file which is part of an exploded EPUB, correct? Would this be a blanket 'remove overrides'?
Like for #2, I'd make this a drag/drop tool.
I am wondering: maybe I should make a single drag/drop tool which shows an option screen where you can select what function it should perform, rather than a whole host of little tools? More like the swiss army knife?
Sounds like an A+ idea to me. Can you incorporate turning the PageStaker page numbers into that tool as well?
Yes, the wrapper tool would allow any other php scripts to be converted to drag-and-drop. The main difference is that the wrapper tool I am developing will work on Mac and Windows, whereas PageStaker is Mac only.
More info on my thinking here:
@LauraB7 Could you provide me with a sample EPUB which has these artefacts?
At present, I am thinking of a script that finds specific class names and removes them - e.g.
<span class="com-rorohiko-pagestaker-style _idGenCharOverride-1">iii</span>
would become
<span class="com-rorohiko-pagestaker-style">iii</span>
The script would look for classnames that match a GREP expression - e.g.
stripClass=/_idGenCharOverride.*/
would match any class name like _idGenCharOverride-whatchamacallit
.
@LauraB7 @flittle8 I've set up a sample drag/drop script which rids a bunch of HTML files from classes like '_idGenCharOverride...'.
The config I've added is just a sample - I've only targeted a specific InDesign bit of crud. The config file will probably need a bit more meat on its bones to be useful.
Download from here:
https://github.com/BCLibCoop/nnels-a11y-publishing/tree/master/ReleaseVersions
Some docs here:
https://github.com/BCLibCoop/nnels-a11y-publishing/wiki/DropToScript-Documentation
I've written up a bunch of docs and made some videos. Please have a look at:
https://github.com/BCLibCoop/nnels-a11y-publishing/wiki/UpdateClass-Documentation https://github.com/BCLibCoop/nnels-a11y-publishing/wiki/DropToScript-Documentation https://github.com/BCLibCoop/nnels-a11y-publishing/wiki/DropScript-Template-Documentation
So of course I can't find an EPUB with overrides on the page stake span, @zwettemaan. I will keep looking but now that I need one, they are all hiding from me.
Hi Kris. I am attaching here some raw EPUBs generated from InDesign. Something1 is a straight export, Something2 is exported after PageStaker was run. You can see all the overrides in the screenshots in packaged in the zip folder. I also pointed to the title issue, suggesting the top-level <H1>
text could be duplicated up there. Also, I'm not sure we talked about this, but the language tag needs to be moved form the <body>
tag up to the root HTML element.
The main thing about all the overrides you see in these files is that the text is 100% cleanly styled. I don't know why ID flags them as overrides.
I am happy to send the packaged InDesign files if you want. Archive.zip
@LauraB7 I've moved the language tag request to a separate issue, #17 - it's a separate request so it's important to give it its own issue record.
This needs to be tested... @LauraB7 can you try this out?
https://github.com/BCLibCoop/nnels-a11y-publishing/tree/master/ReleaseVersions
for the latest version of the DropToScript/DropScripts...
@LauraB7 Hey Laura, if you're still around would you be able to pass me a couple INDD files to test out this script with? If not, no worries, I'll just assume it's all good...
Hello @flittle8 and @zwettemaan. I am around today and can devote a big chunk of time to this project. (I am so sorry to have been so absent and hard to pin down.) But I have kind of lost the thread on what to test out in this issue. I have downloaded DropToScript two comments up and am ready to go, if you have the patience to guide me a wee bit.
@LauraB7 Hi Laura! If you're able to test out the "UpdateClass" script and the "StyleCleanup.jsx" that would be great. These 2 scripts are InDesign-specific.
@LauraB7 Here's some more info from Kris about them in case this is useful:
"StyleCleanup is a totally separate script. It is not incorporated. The method to clean up the document is interactive:
Essentially, StyleCleanup and UpdateClass are two tools in a manual workflow - they are not complete solutions, as there is a need for human oversight and intelligence to decide what to remove and what to keep.
It's an either/or/both setup: on some docs, you can omit StyleCleanup, and directly run UpdateClass, and the result might be usable. On some docs, you would run StyleCleanup and fully clean the document, after which UpdateClass should be a do-nothing. On some docs, you would run StyleCleanup, do some deleting and collapsing, and finally delete any styles you don't want, then run UpdateClass to get rid of the unwanted remaining manual overrides."
Please start with the Wiki. The link can be found near the top of the Github windows, right-ish of the menu bar
https://github.com/BCLibCoop/nnels-a11y-publishing/wiki
Then click 'Technical Documentation'
Then click 'StyleCleanup Script Documentation'
Please download and watch the videos provided...
Hi Laura, it looks like you tried to install the HTML of the wrapper page that contains the script. Make sure to download the actual script, not the web page containing the script.
Please visit
https://github.com/BCLibCoop/nnels-a11y-publishing/wiki/StyleCleanup-Script-Documentation
and follow the download instructions.
Then make sure that the file StyleCleanup.jsx is a script (and not an HTML page) by opening it in a text editor.
I have tested both the StyleCleanup.jsx script, done the collapsing work needed, exported to EPUB and run that file through DropToScript for UpdateClass. It worked exactly as expected.
Some notes:
Things I like:
One final note:
In error, I ran the EPUB through Cleaner which did weird things to my EPUB and invalidated the HTML header.
Hi @LauraB7
I created a Github issue entry for this. Each time you find a problem, please try to create a separate new issue for it.
If you add your findings in the comments of an existing, unrelated issue, what you are reporting will get drowned out and there is a good chance I will never see it, hence never fix it.
Please check issue #19 and attach the EPUB (undamaged) so I can try it out for myself.
It is very important to split each separate 'point of action' for me into a separate issue, instead of lumping it all into one long comment thread for an unrelated issue.
Not splitting it up makes it very hard to follow up on anything.
Make sure to read
@LauraB7 Would you be able to test this on your end? I don't have InDesign...