Page 1 of 1

Dynamically adding text side by side...

Posted: Fri Jul 17, 2009 7:33 am
by alnico
Can I add text side by side...where the 'text to add' window would accept variable, ie. @texttoadd?

I was reading your updates page and I don't understand what is written there...if this indeed would do what I need it to do:
Can you please clarify?

What's New in TextPipe v8.3 - February 24, 2009
===============================================
* Filenames specified in TextPipe can now make use of embedded environment variables using e.g. %PROGRAMFILES%, %TEMP% syntax.
- Search/replace list filter
- Log filename
- Execute filter input/output filename and command to run
- Sound to play on completion, and default editor
- Add Left/Right Margin, Header/Footer, Add Text Side by Side
- Output filter new extension, new output folder and single output filename
- Merge and Link filters.
===============================================

What I am trying to accomplish is merging a table that spans two pages. These two pages spans exist as two separate html tables.
I simply need to dynamically add every other page side by side to the preceding one.

Variables, variables if we could only use variables everywhere ;-)

Thanks,
Brent

Re: Dynamically adding text side by side...

Posted: Fri Jul 17, 2009 11:27 am
by DataMystic Support
Filenames in general are specified at the start of a filter job and do not change (can't cache a file that changes all the time)!

But you can work around this using a scripting filter and the FileSystem object to grab a file and insert it.

Re: Dynamically adding text side by side...

Posted: Tue Jul 21, 2009 10:16 am
by alnico
Ok...more specifically: I am using TP ver 8.2 and I cannot test new features that have been added since...because TP says that my trial period is up when installing a new version.

Specifically interested in adding text side by side...as noted in my 1st post.

I just figured out how to easily rotate/pivot a table IF the filter "Add text side by side" accepts variables (@var).
So does it? If not, can it?

Thanks,
Brent

Re: Dynamically adding text side by side...

Posted: Tue Jul 21, 2009 11:10 am
by DataMystic Support
Yes - your trial period would be up by now!

It doesn't currently support @vars - but I think it could. I'll check this for the next release.

Re: Dynamically adding text side by side...

Posted: Wed Jul 22, 2009 7:40 am
by alnico
Adding @vars would be great!

also,

Attached is a small simple filter demoing what I am trying to accomplish...pivot/transpose tables.
The 'Add text side by side' filter would need @vars capability and also another issue has arisen...
The content when inserted by 'Add text side by side' filter, is cut off as described in the help (when text B is shorter than text A), (I think this is because I am transforming a single line into a triple line...and I cannot figure out how to add rows and yet not break the side by side insertion).

If this did not chop off the text and was allowed raw (even though no columns would be uneven)...then I think this setup would work.

Thanks,
Brent

Re: Dynamically adding text side by side...

Posted: Wed Jul 22, 2009 9:41 am
by DataMystic Support
You need to pad File A with extra lines to ensure File B is not truncated. Try Filters\Add\File Footer.

As for your filter, I have no concept of how you think this will work!

You're taking each line at a time, changing tabs to cr/lfs, then capturing this to a global.

so

Code: Select all

1	2	3 
becomes

Code: Select all

1
2
3
capturing to a global.

Then you're trying to append this same global to the already captured text (assuming that @column worked with this filter), which should probably result in

Code: Select all

11
22
33
Then onto line two...

You have to use a script here to capture the data into a global array, and then transpose the array.

Re: Dynamically adding text side by side...

Posted: Wed Dec 08, 2010 3:02 am
by dfhtextpipe
The Unix paste command can be used to add text from two files side by side.

See http://en.wikipedia.org/wiki/Paste_%28Unix%29

For Windows users, this command is included in http://en.wikipedia.org/wiki/Cygwin.

It's very useful.

David

Re: Dynamically adding text side by side...

Posted: Wed Dec 08, 2010 5:11 am
by dfhtextpipe
Another method is to download the Native Win32 ports of some GNU utilities from
http://unxutils.sourceforge.net/

These are some ports of common GNU utilities to native Win32. In this context, native means the executables do only depend on the Microsoft C-runtime (msvcrt.dll) and not an emulation layer like that provided by Cygwin tools.

The downloaded ZIP file includes paste.exe that does the same thing.

Very useful.

Re: Dynamically adding text side by side...

Posted: Wed Jan 12, 2011 4:15 am
by dfhtextpipe
Pleased to be of service.