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

Run script before build #283

Open
daviddavo opened this issue Feb 27, 2023 · 5 comments
Open

Run script before build #283

daviddavo opened this issue Feb 27, 2023 · 5 comments

Comments

@daviddavo
Copy link

I'm forking a package that uses a .txt file.

Currently, I have to run a lua program that generates that file, and then run my build.lua file. Is there any hook I can use to run my txt builder program just before starting to build. I think docinit_hook and checkinit_hook are both too late, because I use docstrip and I need it before compiling the .ins

@josephwright
Copy link
Member

We don't currently have a hook early enough. Could you illustrate the project structure in general terms or with a link?

@daviddavo
Copy link
Author

I'm modifying the lipsum package

https://github.com/PhelypeOleinik/lipsum

As you can see, there are multiple lipsum-*.txt files, which will be converted to lipsum-*.ltd.tex inside \genlipsum (https://github.com/PhelypeOleinik/lipsum/blob/31c3d57d52ee69ab0ff0233f5a6869ca96542c37/lipsum.ins#L52)

My idea is to run a script that generates those lipsum-*.txt files.

@FrankMittelbach
Copy link
Member

FrankMittelbach commented Feb 27, 2023 via email

@daviddavo
Copy link
Author

They are generated randomly, but I guess it's better to distribute the already generated files, and it will be easier to test.

About modifying it, sorry, I wanted to say "forking it", as is I will change the package name (and filenames) and distribute the source code.

@FrankMittelbach
Copy link
Member

all good then :-) ... I didn't look what your project does ... it is just that getting different files with the same name in the TeX world is really bad since you never know what then happens, so when I saw "modifying" it just jumped at me

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

No branches or pull requests

3 participants