Comments (5)
hello.
In the current implementation %SG_NEXT-RECORD% is not to be considered a variable, but rather a signpost in the SLA template file that instantly loads the data of the next record when met to be used for the current and subsequent substitutions... and the SLA template file is read by ScribusGenerator as a plain text file, in sequence, since Scribus was not using much of the XML nesting features.
So its effect really boils down to either the moment you include it in your template (in your case I'd recommand to remove all but firt 2 cards content (with variables and all ready), then add a text frame with simple content %SG_NEXT-RECORD% (if it's empty it will be removed by SG), and then add all content of second row. No need to create extra pages if your content is the same: the first page will be duplicated to fit the provided data length.
a more detailed walktrough for %SG_NEXT-RECORD% is available at https://github.com/berteh/ScribusGenerator/wiki/How-to-use-%25SG_NEXT-RECORD%25
any suggestion to improve this feature is welcome, especially along with a PR.
B.
from scribusgenerator.
Thanks for the response. I think what you are saying is what I expected :-/
I have already tried what you suggest (I added a text frame with %SG_NEXT-RECORD%
between the first row and second) but the first card on the second row only seems to have ~50% of the variables correctly updated (the rest are from the previous record).
I have checked the outline view and the text field with %SG_NEXT-RECORD%
appears to be located in the correct place. Looking at other issues and the wiki, is it safer to assume that the XML generated by Scribus is not a direct representation of the outline? Or, is it that Python doesn't load the XML nodes in sequential order?
from scribusgenerator.
-
indeed the XML generated by Scribus is not a direct representation of the outline. things such as parent page, groups, levels, inline images and some more are coded as plain text attributes and not the XML hierarchy. Scribus stores the elements more or less in the order of creation.
-
the scribus generator (currently) loads the XML exactly in sequential (textual) order, not hierarchical (the outline).
If you are comfortable witḣ reading XML code, the easiest way is to open the SLA template with a text editor and move the element containing %SG_NEXT-RECORD% to the location that suits your needs (I'd guess just below all the content of your first row). I isually add meaningful IDs to my object properties, so finding them with a text search goes fast.
from scribusgenerator.
Thanks for the reply (and clarification). I can understand now why this is so annoying to implement!
I am fairly familiar with XML, thought I cannot say I enjoy it much :-p. I will have a play around and see what I come up with,
from scribusgenerator.
good luck !
any improvement to the documentation is welcome directly in the wiki at https://github.com/berteh/ScribusGenerator/wiki/How-to-use-%25SG_NEXT-RECORD%25
or if you have a better idea for the overall workflow don't hesitate to open a new issue on that topic !
from scribusgenerator.
Related Issues (20)
- Fetching an image into an image frame in Scribus and export it as a new layer in the generated the PDF file. HOT 3
- [TYPO] in README.md HOT 1
- add support for inline images - add images dynamicaly into a text frame HOT 4
- Scribus Generator not working HOT 2
- Colorize Image Effect changes the colour in generated document HOT 1
- --single overlapps pages HOT 1
- Help wanted. Add Danish and German æ, ø, å and ä, ö HOT 2
- ModuleNotFoundError: No module named 'Tkinter' HOT 6
- How to set my layout as portrait or landscape dynamically HOT 6
- Cannot specify %VAR_logo% using Scribus1.5.8 HOT 1
- s HOT 1
- Is it possible to print %VAR_COUNT%, also noted the duplication of a last entry in .csv HOT 1
- Variable substitution not working when hyphenation is active on text frame HOT 3
- Last row duplicates to fill the remaining placeholders in the template when using SG_NEXT-RECORD HOT 4
- Allow the CLI to generate PDFs HOT 1
- Color not replaced HOT 7
- warn user for variables in template that do not appear in data columns
- Missing some texts from csv HOT 2
- PDF annotation data only correct on first record on a page HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scribusgenerator.