Link gutenbergsite to autocat3 via git submodule#186
Link gutenbergsite to autocat3 via git submodule#186Thenlie wants to merge 5 commits intogutenbergtools:masterfrom
Conversation
|
I think your dotenv import duplicates what pipenv already does? I don't want to be supporting multiple environment managers, cuz then we'll need to manage the managers |
| </span> | ||
| <img py:if="e.thumb_url" | ||
| class="cover-thumb" src="${e.thumb_url}" alt="" /> | ||
| class="cover-thumb" src="${os.dev_base_path}${e.thumb_url}" alt="" /> |
There was a problem hiding this comment.
If you're writing a script to pull assets into static, why not do the same for the other assets? (note that some of the _includes files come from the dev autocat3 like this:
/usr/bin/wget --quiet -O ${BUILD}/_includes/popular_covers.html "http://[autocat3]:8000/covers/medium/popular/10"
(jekyll script in ebookconverter repo)
There was a problem hiding this comment.
So far, this is more-or-less just linking static assets from gutenbergsite to autocat. Definitely would be interesting to pull other assets in as well. But right now there is no script involved. Everything will work when submodules are fetched.
There was a problem hiding this comment.
technically, it's a base url, not a path. And why only "dev"?
Thanks Eric, didn't realize pipenv also has env variables. I will update to use their system. Agree we should only have one. |
16a2409 to
5598e30
Compare
5598e30 to
86e5d7a
Compare
|
Something like this would really help! When I tried it, I got lost in an unfamiliar git zone; will need more guidance on the git submodule part. For example, if all I want to do is put the gutenbergsite stuff into a CherryPy static directory, (without bonking my autocat3 repo) what are the steps? Do I need to gitignore the static directory in my autocat3 repo? |
Apologies for the delay here. @eshellman You shouldn't need any Here are the complete steps:
Let me know if you have any other questions or if these steps don't work for you. EDIT: I forgot to mention, the submodule points to a specific commit in the gutenberg repo. When devs run |
|
the spare-checkout then omits the autocat 3 files, how do I get both? |
It sounds like you might be running the command from the autocat3 repo instead of within the submodule. You need to be in the gutenberg directory. If you run |
|
in the autocat3 repo or the gitenbergsite repo?
… On Aug 28, 2025, at 4:06 PM, Leithen ***@***.***> wrote:
Thenlie
left a comment
(gutenbergtools/autocat3#186)
<#186 (comment)>
the spare-checkout then omits the autocat 3 files, how do I get both?
It sounds like you might be running the command from the autocat3 repo instead of within the submodule. You need to be in the gutenberg directory. If you run git log you should see the gutenbergsite commits.
—
Reply to this email directly, view it on GitHub <#186 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAHCGMN5HHV6TGLEZRU3II33P4EF3AVCNFSM6AAAAACECAY4OGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTEMZTGY2DINZWGI>.
You are receiving this because you were mentioned.
|
|
In the autocat3 repo. |
|
When I try to switch to this branch with Github Desktop from a branch that has not had submodule set I get: To avoid that I need to run git submodule add before switching to the branch with the submodule. another way to manage this is to add the extra env params so that devs can use submodules or copies of the gutenberg directory so we don't need to alter the prod deployments until we have more experience. |
|
Yes that's correct. And my intent was for this to only impact local builds. Dev and Prod should both still use the current set up. It should already be set up to use ENV params to point to the static directory you want. If someone would prefer to skip the submodule setup, they could just copy the assets to If we want to use something like this in prod, IMO it would make more sense to simply combine the repos. |
@gbnewby requested an example of the submodule approach in #185. This PR is that example.
Overview
I started tracking gutenbergsite within autocat3 via submodule
We can then checkout only the necessary files using
sparse-checkout:This command can be added to a script so it is easier for other devs. It can also be updated as new files are added.
When working on the project, you can simply
git pullthe upstream changes from gutenbergsite.The other changes attempt to dynamically point assets to the submodule directory. This is being done dynamically so it can drop in to the dev and prod environments and still work.