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

Allow importing as Compendium(s) / Use compendium links when exporting to one #143

Open
DaGwann opened this issue Oct 9, 2024 · 1 comment

Comments

@DaGwann
Copy link

DaGwann commented Oct 9, 2024

I've been looking to turn my folders of imported Kanka entries into compendia, in order to ease load times. The tools offered by Foundry work good overall (creating a module, exporting the journal folders to the compendia of said module, etc.).

The big problem comes with linked entities in the newly created compendium entries. The links inside a compendium journal entry are still connected to the original journal entry. Therefore, when that journal entry is deleted, the link is lost. The goal of this whole process is to delete all journal entries in the end, and in doing so, all the internal Foundry links are lost in the compendium entries, leaving only the direct links to Kanka's website.

It would be a great improvement to keep those connections in the compendium. I don't know enough about the internal structure to suggest how, but I have to guess it's related to the new IDs each journal entry gets once it's exported into a compendium.

For reference, the first image shows how a character journal entry looks when it has been exported to a compendium, and the original journal entries it links to still exist outside the compendium. The second image shows what happens when those original files are deleted, despite them being available in the compendium.

Original still in Journals folder
image

Original deleted, compendium remaining (hyperlinks for removed journal entries, Foundry links for remaining originals)
image

Thank you for such a great module!

@eXaminator
Copy link
Owner

I just looked into this and I fear it's not something I can easily change.

Right now the entries (with these links) are generated dynamically, which means that I only save the data structure (more or less) from Kanka locally and everytime you open up the sheet this data is renedered into what you see. This has the main advantage that I can easily update styles, templates and general functionality without users having to update all their imported entries every time. This is also what allows me to create the "local" link to the other entries on the fly or - if none was found - just show the Kanka link that was provided by Kanka itself.

This means all I have in the data is the Kanka-Link, which I try to resolve to a local journal entry every time you open up that sheet.

The problem here is, that I don't really have access to the compendium packs themselves. I can see them and there is some data (like the name) that is indexed, thus accessible. But the whole idea of them (and what improves the performance) is, that they don't load all the information automatically, including the information I would need to find the right compendium entry to link to.

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

2 participants