# Filenaming



## Guppy (Oct 20, 2005)

Have you given any thought to the naming of images?  The old site almost had a good system, though it did seem to arbitrarily ignore the rules.

username - timestamp - userfilename.ext

It really helps with identifying the creator of an image if a file is saved to a harddrive. and timestamp isn't really necessary, if the system checks for duplicate files.

Guppy


----------



## Keto (Oct 20, 2005)

Guppy said:
			
		

> Have you given any thought to the naming of images?  The old site almost had a good system, though it did seem to arbitrarily ignore the rules.
> 
> username - timestamp - userfilename.ext
> 
> ...



Ohhh, it identifies the artists' name when a pic is saved onto someone's harddrive??? I'm up for that! ;P


----------



## SmuttPuppies (Oct 20, 2005)

I'd love that to auto name a file that way. I know I have a ton of art from places like Fchan, that are just strings of numbers, and no way or finding the artists.


----------



## Guppy (Oct 21, 2005)

I'm biased... I save everything into a single directory when possible, then run a script to sort by artist, a consistantly formatted filename helps alot... Yaoi Gallery does a great job.

But indeed when someone decides to upload one of these pics to a fchan, it's nice to be able to tell who the artist was, if it's a style you don't recognise.


----------



## Alkora (Oct 21, 2005)

our system already saves it like that...sort of...it's actually...

timestamp.origionalfilename.filext
I suppose i could throw username in there somewhere...but i never really found it bothersome to not have it in there...

I save all my stuff with the same artist in a folder just for them.


----------



## DarkVixen (Oct 21, 2005)

Jheryn said:
			
		

> our system already saves it like that...sort of...it's actually...
> 
> timestamp.origionalfilename.filext
> I suppose i could throw username in there somewhere...but i never really found it bothersome to not have it in there...
> ...



I don't like the timestamp, it really makes the filename look messy and it's harder to organize when you save them to your desktop. I would MUCH prefer the timestamp being replaced with the username.


----------



## Dragoneer (Oct 21, 2005)

DarkVixen said:
			
		

> Jheryn said:
> 
> 
> 
> ...


I'm all for artistname_originalfilename. I find the number string to be kind of annoying my own pic harvesting. That, and I rename every single file to remove the time stamp as it is. Makes it easier to catalogue.


----------



## Ursus_Amplus (Oct 21, 2005)

Isnt the porting of the old database then going to be a right swine when you have to rename every file?


----------



## Xax (Oct 21, 2005)

not really.

if the image path (inc. filename) is stored in the database you could just do something like

$newtitle = // code to remove spaces & convert to lower case here that I am too lazy to write for pseudocode
$newfilename = $dateposted.'_'.$author.'_'.$newtitle.'.'$ext // where $ext could be gotten from the old filename/path via preg_matching it up (or just grabbing the last 3 characters of the old filename)

and then do whatever needed to be done with the new filename

I like using my meager amount of php brains to impress and astound people.


----------



## Ursus_Amplus (Oct 21, 2005)

... or send them to sleep.


----------



## Xax (Oct 21, 2005)

You wound me.

In my heart.


----------



## Ursus_Amplus (Oct 21, 2005)

Damnit >.< I was aiming for your nuts!


----------



## WHPellic (Oct 22, 2005)

Xax said:
			
		

> You wound me.
> 
> In my heart.



::sings::

Shot through the heart!
And you're to blame!
You give love a bad name!

Er......carry on.


----------



## Guppy (Nov 3, 2005)

yeah, I'm finding the timestamp.filename real painful... when I save a file I have to remove that timestamp and change directories for every file, since submissions aren't ordered by artist, I have to pay attention to what artist I'm currently viewing from my inbox.

with a filename of 'username - filename.ext' I can save them all into one directory and then easily sort by filename and rearrange them... or write a script to sort them.  If a timestamp is absolutelt necessary, put it in the middle.  I assumt it's there for people that use duplicate filenames...

when someone uploads a new submission, you could always check for an existing file and rename the incoming file accordingly like 'username - filename - version.ext'

Just some ideas.  but the timestamp.filename.ext doesn't provide any useful information at all, unless that's how you're sorting files on peoples pages... which is a bad way to do it, use file modification times, or store the time in a database and use the database to sort when retreiving the list of files.


----------



## Dragoneer (Nov 3, 2005)

Guppy said:
			
		

> yeah, I'm finding the timestamp.filename real painful... when I save a file I have to remove that timestamp and change directories for every file, since submissions aren't ordered by artist, I have to pay attention to what artist I'm currently viewing from my inbox.
> 
> with a filename of 'username - filename.ext' I can save them all into one directory and then easily sort by filename and rearrange them... or write a script to sort them.  If a timestamp is absolutelt necessary, put it in the middle.  I assumt it's there for people that use duplicate filenames...
> 
> ...


I think it should be artistname.filename


----------



## Guppy (Nov 4, 2005)

yes please please please... use a character not allowed in the username to separate them  maybe ' - ' spaces and a dash?


----------



## Darnon (Nov 5, 2005)

Spaces are bad on the interweb. And the FA code particularly doesn't like spaces.


----------



## MistressLeathurkatt (Nov 6, 2005)

ArtistName-Filename.ext sounds great to me, makes things much neater and easier to work with than having a random-number-string/timestamp in there.  I hate that too actually...


----------



## Suule (Nov 6, 2005)

I think that using "_" in the filenames should be allowed.


----------



## Guppy (Nov 7, 2005)

Spaces shouldn't a problem, just encode them before spitting out the image url... that's why you're brilliant coders, because you take care of things like that instead of jumping on imageboard tactics of naming everything with a timestamp.ext   you'll figure it out, we have faith in you.


----------

