Help! Need some programming expertise to convert txt to csv
Not sure if this is the right place to post this, so mods feel free to move it if there is a more appropriate home for this thread...
I will start off by saying that I have zero programming know-how. As Neytiri would say, I'm like a baby, making noise, don't know what to do.
Avatar You're Like a Baby - YouTube
Anyway, I have several large text files containing twitter data. Here is a small excerpt of the data to illustrate the format it is in:
Author - defined as everything preceding the first colon on the first line of each record.
Content - defined as everything following the first colon on the first line of each record.
Date - defined as the XX/XX/XXXX content on the second line of each record.
Retweets - defined as the number following date but before the word "retweet" (NB: when 0, this number is absent from the record).
Links - defined as any and all urls appearing in the "Content" field
Link# - the number of urls appearing in the "Content" field
Can it be done? Can anybody help point me in the right direction? Any guidance would be much appreciated! If I can offer anything in exchange for your help, please let me know. Thanks!
edit - Source txt data is encoded in UTF-8, by the way.
It possibly could be done, hell I could probably figure something out to do this if i had the spare time to do it.
I'll try to look into it for you, however I have a lot on the go right now so I may not be able to guarantee you anything.
Have you tried simply opening adding comma separators via script and opening the file in Excel? It might be a lot easier than you think since the format is so consistent.
This can be done in Perl rather quickly and efficiently. Can you post up an example of the result you want? (like actual data so if anyone helps out here, they know it's actually correct). I need to finish up some things for school but I can probably mock up a quick script today or tomorrow if you're interested!
Very cool Keywork! And yes, very interested! Thanks! I've attached an example of the output I'd like using the same data samples as posted above for reference.
MS Access (Microsoft Office Pro) would handle this for ya too.
Keywork, lemme know if you're doing it or not, otherwise I'll throw my hat into the ring and try to work out a little program in my native C++ language
Bleh C++. I'm finishing up an article right now and then i'll spend some time on it! Shouldn't take long! I'll post back here in a few.
|All times are GMT -7. The time now is 02:14 AM.|