forked from larrychristensen/orcpub
-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
#610 extend feature boxes for icewind/mythos CS #610
Open
Jessomadic
wants to merge
5
commits into
Orcpub:develop
Choose a base branch
from
Jessomadic:#608-extend-feature-boxes-for-icewindmythos-csoptional-variant
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
83418ff
Merge pull request #6 from Orcpub/develop
Jessomadic 2254c4b
Merge branch 'Orcpub:develop' into #608-extend-feature-boxes-for-icew…
Jessomadic 6ccde20
Extending Features Sheets
Jessomadic ff35a94
Char limit increase
Jessomadic 2c2e9db
Reverted Changes
Jessomadic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't rename :features-and-traits-2 to :features-and-traits-3.
It is the form field name in the PDF that needs to match.
Testing the other PDF's they come across blank.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. I found a fallback that I can make whats called a "PDF Portfolio" that will allow multiple of the same form field name while not linking them so I can set Char limits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is strange that they are coming across blank though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jessomadic
This work flow takes the form data from the "download-form" in the browser and loops through all the elements in it.
If you look in the data, there is no :features-and-traits-3. But there is :features-and-traits-2.
It's looping through all the fields being passed down from the as built character.
Ideally, we need a chunk of code that looks at the size of what features-and-traits are going to be and adds another page if needed.
Example, where 900 is the character length that looks good in the PDF Text field. something like:
do while ( features-and-traits >=900 )
add page
take first 900 characters from features-and-traits and insert it into the page.
remove the first 900 characters from features-and-traits and set features-and-traits to the new value.
)
The routes is responsible for filling the PDF text fields, and it is called here.
orcpub/src/clj/orcpub/routes.clj
Line 478 in 6b709e7
Implementation of it lives here:
orcpub/src/clj/orcpub/pdf.clj
Lines 31 to 55 in 6b709e7
Which is just looping through all the fields/elements that are in the edn.
The
(doseq [[k v] fields]
is basically the do while above for all the fields/elements being passed in, eg :religion :dex-save :hp-current etc.https://clojuredocs.org/clojure.core/doseq
I don't know. It's a toss up to break up that function or just live with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets just live with it. I'll make a workaround. It was more if it was an easy 10 min change it would be nice to have but I can get it all done in Adobe. Thanks for breaking it down though that explains alot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look into the logic zotz pointed out once I get a free weekend again.