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

kobopatch.yaml overrides with user-provided strings #18

Open
rightpad opened this issue Dec 4, 2018 · 1 comment
Open

kobopatch.yaml overrides with user-provided strings #18

rightpad opened this issue Dec 4, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@rightpad
Copy link

rightpad commented Dec 4, 2018

Hi there! Thanks for making the kobopatch system, it's very useful. When converting my existing set of enabled patches to the override yaml file, I noticed I'm not able (or I just don't know the correct way) to include customizable user strings for patches that use them, so I can just have one master override file rather than edit the individual patch file to include my strings.

Example kobopatch.yaml with the monospace font patch:

overrides:
  src/librmsdk.so.1.0.0.yaml:
    Default ePub monospace font (Courier):
      - Enabled: yes
      - FindReplaceString: { Find: 'CourierStd.otf', Replace: 'normal/Hack' }
      - FindReplaceString: { Find: 'CourierStd-Bold.otf', Replace: 'bold/Hack' }
      - FindReplaceString: { Find: 'CourierStd-Oblique.otf', Replace: 'italic/Hack' }
      - FindReplaceString: { Find: 'CourierStd-BoldOblique.otf', Replace: 'bolditalic/Hack' }

When running to the tool I get the following error:

kobopatch v0.10.4
https://github.com/geek1011/kobopatch

Loading configuration from kobopatch.yaml
Error: could not load config file: error reading kobopatch.yaml: yaml: unmarshal errors:
  line 42: cannot unmarshal !!seq into bool

If this isn't supported behavior, please consider this a feature request!

@pgaskin
Copy link
Owner

pgaskin commented Dec 13, 2018

This has been discussed quite a bit before (see the kobopatch threads in MobileRead), but most approaches were considered to have more disadvantages than advantages (especially as you can already have more than one patch file per target file, which is a workaround for this).

The syntax you propose seems quite a bit better than the existing suggestions (like placeholders) though, so I may consider implementing it this way.

@pgaskin pgaskin added the enhancement New feature or request label Dec 13, 2018
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

2 participants