Dynamically adding text side by side...

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
alnico
Posts: 74
Joined: Fri Oct 12, 2007 11:57 pm

Dynamically adding text side by side...

Post 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
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Dynamically adding text side by side...

Post 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.
alnico
Posts: 74
Joined: Fri Oct 12, 2007 11:57 pm

Re: Dynamically adding text side by side...

Post 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
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Dynamically adding text side by side...

Post 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.
alnico
Posts: 74
Joined: Fri Oct 12, 2007 11:57 pm

Re: Dynamically adding text side by side...

Post 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
Attachments
Pivot table.zip
(581 Bytes) Downloaded 723 times
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Dynamically adding text side by side...

Post 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.
dfhtextpipe
Posts: 987
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Dynamically adding text side by side...

Post 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
David
dfhtextpipe
Posts: 987
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Dynamically adding text side by side...

Post 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.
David
dfhtextpipe
Posts: 987
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Dynamically adding text side by side...

Post by dfhtextpipe »

Pleased to be of service.
David
Post Reply