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

Clean out InDesign overrides on character, paragraph, cell, and object styles #1

Open
zwettemaan opened this issue Mar 10, 2019 · 23 comments
Labels
enhancement New feature or request

Comments

@zwettemaan
Copy link
Collaborator

No description provided.

@zwettemaan zwettemaan added the enhancement New feature or request label Mar 10, 2019
@zwettemaan zwettemaan self-assigned this Mar 10, 2019
@flittle8
Copy link
Collaborator

@LauraB7 Would you be able to test this on your end? I don't have InDesign...

@zwettemaan
Copy link
Collaborator Author

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...

@zwettemaan
Copy link
Collaborator Author

Oops. Ignore the previous comment. I confused myself with issue #7.

@zwettemaan
Copy link
Collaborator Author

@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?

@LauraB7
Copy link

LauraB7 commented Apr 11, 2019

Sounds like an A+ idea to me. Can you incorporate turning the PageStaker page numbers into that tool as well?

@zwettemaan
Copy link
Collaborator Author

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:

#14

@zwettemaan
Copy link
Collaborator Author

@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.

@zwettemaan
Copy link
Collaborator Author

zwettemaan commented Apr 20, 2019

@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

@LauraB7
Copy link

LauraB7 commented Apr 23, 2019

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.

@LauraB7
Copy link

LauraB7 commented Apr 29, 2019

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

@zwettemaan
Copy link
Collaborator Author

@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.

@zwettemaan zwettemaan removed their assignment May 15, 2019
@zwettemaan
Copy link
Collaborator Author

This needs to be tested... @LauraB7 can you try this out?

@zwettemaan
Copy link
Collaborator Author

https://github.com/BCLibCoop/nnels-a11y-publishing/tree/master/ReleaseVersions

for the latest version of the DropToScript/DropScripts...

@flittle8
Copy link
Collaborator

@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...

@LauraB7
Copy link

LauraB7 commented May 22, 2019

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.

@flittle8
Copy link
Collaborator

@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.

@flittle8
Copy link
Collaborator

@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.

  • Run StyleCleanup
  • Manually clean up (some of) the styles in InDesign. Delete some, collapse some... This needs human eyeballs. It cannot be done automatically, because no software can automatically decide what is important or not in a badly structured InDesign document.
  • Export to EPUB
  • Run UpdateClass

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."

@zwettemaan
Copy link
Collaborator Author

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...

@zwettemaan
Copy link
Collaborator Author

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.

@LauraB7
Copy link

LauraB7 commented May 22, 2019

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:

  • The collapsing process was easy enough. I was working on files created by a publisher I've never worked with before and so was unfamiliar with their style nomenclature, etc. Nonetheless, it was as straightforward process. 15 paragraph styles, and 7 character styles were created and then mapped to new styles, existing styles, or deleted.
  • Only one style override remained in the resulting EPUB. UpdateClass removed that override.

Things I like:

  • I love that the scripts create a backup automatically.
  • The pop-up menus in DropToScript work nicely. Very intuitive and straightforward.

One final note:

  • In error, I ran the EPUB through Cleaner which did weird things to my EPUB and invalidated the HTML header.

@zwettemaan
Copy link
Collaborator Author

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

https://github.com/BCLibCoop/nnels-a11y-publishing/wiki/How-To-Communicate-About-This-Project-Efficiently

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

No branches or pull requests

3 participants