Welcome Guest.   Make a donation to an author on the site April 24, 2014, 10:05:13 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2014! Download dozens of custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: SOLVED: Unstack Skwire's ClipTrap Output  (Read 3802 times)
nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« on: August 04, 2011, 01:35:58 AM »

I found a way to convert text files into Excel files.

So, now, getting back to Skwire's ClipTrap output....  I've copied many sets of data.  Each copy action, using ClipTrap, sends what's being copied to a temporary long text file.  Between these text file 'sets' is a delimiter -- I chose a series of equal signs.  Below is an example of the output held in ClipTrap after copying three sets of data:

set 1
12345
12345
12345

=====

set 2
12345
12345
12345

=====

set 3
12345
12345
12345

=====


I need a way to 'unstack' this output, placing each set into a separate file.

Ideally the filenames would be the text label at the top of each set.

Any thoughts?

Thanks,
Nicholas
Logged
skwire
Moderator
*****
Posts: 3,911



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #1 on: August 04, 2011, 01:49:12 AM »

You could try saving that output to a file and then use my Chopping List application to split it.  It won't custom name the files like you want but, if you need that, I can write you a custom parser.

Logged

Target
Honorary Member
**
Posts: 1,361



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #2 on: August 04, 2011, 01:54:27 AM »

how is the conversion done? (depending on the answer it may be possible to process directly from the cliptrap file)

do they have to be Excel formatted?  CSV is a plain text alternative that is 'native' to Excel (and pretty much any other spreadsheeting app).

you might also consider processing the cliptrap file directly from Excel using a (VBA) macro

another alternative might be to use something other than cliptrap (I'm thinking of something that sends a copy of the current clipboard to a file)
Logged

"Look wise, say nothing, and grunt. Speech was given to conceal thought" - Sir William Osler
nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« Reply #3 on: August 04, 2011, 01:56:05 AM »

I'll look into Chopping List.  Thank you.

The file names are pretty important.  There will be around 200+ files resulting.  And I plan on doing that over and over many times.

As you have now allowed for custom delimiters in ClipTrap between copy 'sets' (if you remember, I requested that) that may provide some additional possibilities for making the output dividing easier.
Logged
nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« Reply #4 on: August 04, 2011, 01:57:50 AM »

No longer have to worry about any conversion.  Output direct from ClipTrap is fine.

Just have to figure out how to break up and save the ClipTrap output.
Logged
nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« Reply #5 on: August 04, 2011, 02:09:42 AM »

Chopping List is terrific.  Unstacks the ClipTrap output beautifully.

One possible enhancement request perhaps:  If there are blank lines at the beginning and/or end of each created file, delete those blank lines.

Renaming of the files is not so crucial, Skwire.  Never mind about that for now.  The file names created by Chopping List may work fine.

Logged
nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« Reply #6 on: August 04, 2011, 02:11:54 AM »

Question:  Is there some upper limit as to how many lines allowed, in either ClipTrap or Chopping List?

Say, for example, 100,000 lines?

Will things choke.....
Logged
skwire
Moderator
*****
Posts: 3,911



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #7 on: August 04, 2011, 02:27:59 AM »

Will things choke.....

It shouldn't, no.  Let me know if you need that custom parser.  Won't be hard to write.
Logged

nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« Reply #8 on: August 04, 2011, 02:31:09 AM »

Enhancement requests for Chopping List:

-- Remember last used directory for storing created files.
-- Remember last used delimiter.

Logged
skwire
Moderator
*****
Posts: 3,911



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #9 on: August 04, 2011, 02:32:01 AM »

If there are blank lines at the beginning and/or end of each created file, delete those blank lines.

In Chopping List, you could try adding some combo of CR/LF to your specified delimiter so it takes those characters into account when cracking your file.  Something like this might work for you:  =====$n

Look under Help, Contents in Chopping List for more tokens.
Logged

skwire
Moderator
*****
Posts: 3,911



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #10 on: August 04, 2011, 02:50:44 AM »

Enhancement requests for Chopping List:

-- Remember last used directory for storing created files.
-- Remember last used delimiter.

Here you go:

Website | Download
v1.0.2 - 2011-08-04
    + Remember last used directory.  (Thanks, nkormanik)
    + Remember last used delimiter.  (Thanks, nkormanik)
Logged

nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« Reply #11 on: August 04, 2011, 02:52:57 AM »

Amazing...

What a champ.
Logged
skwire
Moderator
*****
Posts: 3,911



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #12 on: August 04, 2011, 02:55:01 AM »

Try cracking your file with: =====$r$n

That should get rid of at least the one blank line at the top.
Logged

nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« Reply #13 on: August 05, 2011, 02:27:59 AM »

This form works:  =====$n

I used another text editing program to strip all blank lines from the file first.

The added features don't seem to be taking:

-- Remember last used directory for storing created files.
-- Remember last used delimiter.
Logged
skwire
Moderator
*****
Posts: 3,911



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #14 on: August 05, 2011, 12:41:19 PM »

The added features don't seem to be taking:

Can you please verify you're running v1.0.2 build 1?  Thanks.
Logged

nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« Reply #15 on: August 05, 2011, 03:16:51 PM »

Downloaded from link above (several times):

About:  Chopping List v1.0.1 build 3

Link above says v1.0.2.....
Logged
tomos
Charter Member
***
Posts: 8,067



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #16 on: August 05, 2011, 05:26:10 PM »

Downloaded from link above (several times):

About:  Chopping List v1.0.1 build 3

Link above says v1.0.2.....

try clearing your cache, or use a different browser maybe?
Logged

Tom
nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« Reply #17 on: August 05, 2011, 05:45:47 PM »

Magic!  Switching browsers for download did the trick.

About:  Chopping List v1.0.2 build 1

Thank you!
Logged
skwire
Moderator
*****
Posts: 3,911



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #18 on: August 05, 2011, 09:19:09 PM »

May I assume it's saving properly now?
Logged

nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« Reply #19 on: August 06, 2011, 12:16:14 AM »

Working like a charm.  Excellent job, Skwire.
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.04s | Server load: 0.02 ]