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

some empty variables not removed #56

Closed
berteh opened this issue Aug 31, 2016 · 7 comments
Closed

some empty variables not removed #56

berteh opened this issue Aug 31, 2016 · 7 comments
Assignees
Labels
Milestone

Comments

@berteh
Copy link
Owner

berteh commented Aug 31, 2016

reported by @garydale:
Some empty fields are removed from the generated document and some aren't. I'm getting lots of empty lines in my .sla output file.

@berteh
Copy link
Owner Author

berteh commented Aug 31, 2016

sorry to read that @garydale.

Is it that an empty variables is not removed (i.e.you still see the %VAR_name% in the generated document)? if then are you sure the value is indeed empty in the csv or is it a space character " " or something else?

Or is the problem more like the variable is removed (you don't see the %VAR_name%) but the surrounding box is not, or the surrounding spaces, or linefeeds, or tabulations are not removed whereas you think they should?

if you can attach an excerpt of your data and your sla tempate it may help.

@berteh berteh added this to the 2.4 milestone Aug 31, 2016
@garydale
Copy link

garydale commented Sep 1, 2016

Looking at it in detail, I think blank lines are always showing up. What
fooled me is that some elements don't take up a lot of space.

The %VAR variables are being removed. I think if they aren't, it's
because the CVS column doesn't exist.

The xml-to-cvs converter I'm using is at
http://www.convertcsv.com/xml-to-csv.htm. It has a bug that it will
number columns if it detects multiple instances of an element but not if
there is only one. Therefore I have 3 variables, %VAR_den%, %VAR_den/0%
and %VAR_den/1% that always show up. They are on separate lines in my
template. Generally the first one contains data and the next two are blank.

The den elements always show up, as do multiple instances of location &
mailing.

I also have 4 additional text boxes that may contain club officer
information. There are 3 address lines that always seem to show up.

On 31/08/16 07:44 PM, Berteh wrote:

sorry to read that @garydale https://github.com/garydale.

Is it that an empty variables is not removed (i.e.you still see the
%VAR_name% in the generated document? if then are you sure the value
is indeed empty in the csv or is it a space character " " or something
else?

Or is the problem more like the variable is removed (you don't see the
%VAR_name%) but the surrounding box is not, or the surrounding spaces,
or linefeeds, or tabulations are not removed whereas you think they
should?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#56 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANO5W_h2AEQq6_MBhFBNyc5bqHcOhOZoks5qlhHGgaJpZM4JyLLj.

@berteh berteh closed this as completed in aad8664 Sep 2, 2016
@berteh
Copy link
Owner Author

berteh commented Sep 2, 2016

Hi @garydale
the recent code change is now removing one empty lines that precedes an unused or unknown variable, as well as a list-like character... so you can generate mostly clean lists using the following text frame content in scribus:

%VAR_n1%
%VAR_n2%
%VAR_n3%
%VAR_n4%

or in an enumerated text: %VAR_n1%, %VAR_n2%, %VAR_n3%, %VAR_n4%.

more explanations and settings: https://github.com/berteh/ScribusGenerator#clean-output

@berteh
Copy link
Owner Author

berteh commented Sep 2, 2016

kindly download, test, and let me know if that works for you... and %VARS.." with no corresponding column in csv should definitely be removed as well... so let me know if any is still showing in the resulting document, as it'd be a bug.

thanks.

@garydale
Copy link

garydale commented Sep 2, 2016

The new version worked. It omitted the blank fields properly.

I didn't test it with a wrongly-named variable but I suggest that not
removing it should be considered a feature, not a bug. It would
highlight the fact that the template contains an error.

On 02/09/16 06:12 AM, Berteh wrote:

kindly download, test, and let me know if that works for you... and
%VARS.." with no corresponding column in csv should definitely be
removed as well... so let me know if any is still showing in the
resulting document, as it'd be a bug.

thanks.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#56 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANO5W0HdQD-5EgbCQRu4L7ZtJreffG6Pks5ql_apgaJpZM4JyLLj.

@garydale
Copy link

garydale commented Sep 2, 2016

One problem: The first text element on each page (clubname) always
exists but the second (website) doesn't. If the second element is blank,
the first element picks up the paragraph style for the second.

In this case the first element is in a separate text frame from the
subsequent elements. The subsequent elements flow into a second frame
with different margins. I don't know if that is relevant or not.

On 02/09/16 06:12 AM, Berteh wrote:

kindly download, test, and let me know if that works for you... and
%VARS.." with no corresponding column in csv should definitely be
removed as well... so let me know if any is still showing in the
resulting document, as it'd be a bug.

thanks.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#56 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANO5W0HdQD-5EgbCQRu4L7ZtJreffG6Pks5ql_apgaJpZM4JyLLj.

@berteh
Copy link
Owner Author

berteh commented Sep 3, 2016

moved your style problem to #59 to keep good track of solved/ongoing issues. kindly answer there.
B.

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

No branches or pull requests

2 participants