We take id Software's classic on the road, literally, to see how it stacks up on the Nintendo Switch.
DOOM. Nintendo Switch. Review.
An in-depth behind-the-scenes look at the game. And bass fishing.
How Ubisoft Bottled Beauty and Batshit Crazy for Far Cry 5
Join us on a chronological journey as we go through some of the highlights from three decades of Creative Assembly, the studio responsible for the brilliant Total War.
Celebrating 30 Years of Creative Assembly
Recently we had the chance to sit down with the head of Microsoft’s indie game service ID@Xbox, Chris Charla, to discuss all things Xbox, indie, and the future of the platform.
Talking Indies and Xbox One X with ID@Xbox Director Chris Charla
Converting .asc to .csv
BillyHardball
Brisbane, Queensland
10283 posts
Hey guys I have to work with massive .asc files (up to ~30 meg) that contain data and I need to convert them to .csv to read them with php scripts. Currently I import the .asc file into Excel, which can take painfully long minutes, and then export to .csv. Is there a faster way? A simple text editing program that can export as .csv would be great...
07:51pm 25/03/10 Permalink
system
Internet
--
07:51pm 25/03/10 Permalink
trog
AGN Admin
Brisbane, Queensland
29969 posts
Read them in with PHP and spit them out as a .CSV.

Or even better, just change your PHP script to read the .ASC file directly; it should be trivial as long as the .ASC file format is relatively structured. Can you paste a line or two of the .ASC?
07:52pm 25/03/10 Permalink
BillyHardball
Brisbane, Queensland
10284 posts
I've done all my script writing based on csv files, but if I can just change a line or two of the php then that sounds like win.

Sample:

ESACC R 735135 735155 22 172.3 487.3 153.9 515.9 0.88 77

SFIX R 735157

MSG 735538 Block 2_Prac Trial 1 Letters D M V D V

MSG 735539 begin sequence 1500

EFIX R 735157 735803 648 156.8 508.3 5218
07:54pm 25/03/10 Permalink
BillyHardball
Brisbane, Queensland
10285 posts
Do I just need to put a space in this php line instead of the comma??

while (($data = fgetcsv($fp, 2000, ',')) !== FALSE)
07:55pm 25/03/10 Permalink
Crizane Tribal
Brisbane, Queensland
2997 posts
Can't you just change the delimiter to a space instead of a comma in your PHP script?
08:31pm 25/03/10 Permalink
BillyHardball
Brisbane, Queensland
10286 posts
Yeh I think so but I'm a php noob and have just been using a template trog made for me...
09:38pm 25/03/10 Permalink
Habib
Brisbane, Queensland
249 posts
Do I just need to put a space in this php line instead of the comma??

while (($data = fgetcsv($fp, 2000, ',')) !== FALSE)


Yep, alternatively:

while (!feof($fp))
{
$line = fgets( $fp );
$row = explode( ' ', $line );
...
}
09:59pm 25/03/10 Permalink
BillyHardball
Brisbane, Queensland
10288 posts
Thanks dude. Until I get some more experience I'll stick with minor changes. There's no one around here that I can ask for PHP help, so I'm only game to try new things when trog's in the next room to supervise...
09:25am 26/03/10 Permalink
Dazhel
Gold Coast, Queensland
1196 posts
I'm only game to try new things when trog's in the next room to supervise...


I doubt any lady friends you invite over would approve of that greatly Billy
10:03am 26/03/10 Permalink
BillyHardball
Brisbane, Queensland
10289 posts
Haha oh dear...
10:06am 26/03/10 Permalink
Dazhel
Gold Coast, Queensland
1197 posts
Heh sorry, no habla el PHP.
I'm a .NET guy so that's about the limit of my contribution to this thread.
10:09am 26/03/10 Permalink
tequila
Brisbane, Queensland
6394 posts
yo imma let you finish, I just wanted to finish that habib had the best idea of the WHOLE THREAD
so i'll expand on it


while (!feof($fp))
{
$line = fgets( $fp );
$row = explode( ' ', $line );
foreach($row as $val) { $line .= str_replace("\t", "", str_replace("\n","",$val)).","; }
print substr($line,0,-1)."\n"; unset($line);

}
10:19am 26/03/10 Permalink
system
Internet
--
10:19am 26/03/10 Permalink
AusGamers Forums
Show: per page
1
This thread is archived and cannot be replied to.