Pulling my hair out....
Ok, I have an issue that I "think" could be filesystem related, trouble is I'm not using php for all parts, am using some php, some python and glueing them together with a bash script !
What I am trying to do it create a system that deals with information from the "World of Warcraft Armory"..
The first php file is run as a script, and exports the characters returned to a text file.
First the PHP, that works fine and does excatly what I want it to do...
Now for a touch of BASH and python, this part reads the roster list (created from the above php code) then drags a line out at a time and throws another query at the Warcraft Armoury to get ALL the Achievements for each character listed in the roster file (one name per line). The output from the python script is redirected to a text file, one per character listing all achievements completed or not..
Ok, now this is where I have the problem...
The roster list displays the character names correctly with their funky characters.
The problem lays with the file names created by the BASH script, so that I think is filesystem based...
What i would like to do now, is to process the files and create pretty web pages with the data form each file, not a difficult task in any way, apart from the filenames...
Any ideas ? or should I go back to the drawing board and see if I can write something in PHP that will do the job of the python script (The python script is not my work)
I guess am just looking for pointers really...
The files are stored http://maeltar.homelinux.net/sandbox/wow-scripts/cache/
Have a look and see what I mean about the names...
I have a sneaky feeling am going to have to write someting in PHP to do it...
Oh, and before anyone says it, yes I know the thing is a mess (the server), is just a junk server I use for basic development and testing..
If I am reading this correctly, couldn't you just use a regex to remove any non alphanumeric characters?
No, thats the problem I need the nonalphanumeric characters as they are the player names..
Maybe I would be better off by creating flat file db with 2 columns...
"player name" | "numeric index"
Then I could use that to grab the correct name when i want to display the actual name of the player, that would get around the issue of the filesystem not able to handle the odd charcters..
In fact am thinking about using mysql to store the data in anyway, so just might plan in that function...
Couldn't you use the regex to remove/convert the special characters from the file name, and keep the contents of the file the same? Or is that also not what you're looking for?
Also, you could just use sqlite if it's a small project, and it would also increase portability.
Never used sqlite, so may use that, would be nice to learn something else while hacking away at this...
Can't really change the file names like that, as each files contains the achievement (completed/uncompleted) information for that player..
|All times are GMT. The time now is 11:16 AM.|
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0