lucas
i ❤ demo -- but cannot edit my profile?
k, so here's my plan:
1. code an
aws s3 php
rest class in php
2. code the back-end using mysql (objections?)
3. code the front-end uses xhtml1 and css2
my scripts will not upload photos. you'll have to use a command-line utility to get them up on s3. you'll upload them in high-res jpg. this will be great, because it'll be easy to create a ruby or python cli script to grab all of the pictures off your camera (assuming they aren't RAW) and PUT them to s3.
then you visit the admin page, and it shows you what you have newly uploaded. you can caption the photos, date them, sort them, et cetera.
either the uploading cli script with create thumbnails and a web-viewable size, or the php script will GET the photo from s3, make multiple sizes, and PUT them all on s3 again.
how does that all sound?
minimalist. i like it.
i don't know anything about the programming stuff though.
do you have to pay for s3?
lucas
i ❤ demo -- but cannot edit my profile?
yeah.
exif data editing page?
http://www.sentex.net/~mwandel/jhead/
jhead is invoked upon edits on a php page?
i was gonna use jhead for my own photo software
DaGr8Gatzby
Drunk by Myself
yea I don't like MySQL
postgresql
or mysql
I'm ok with both
dp
lucas
i ❤ demo -- but cannot edit my profile?
i'm still trying to decide how i want uploads to s3 to work. otherwise, s3 looks like it will be very easy to use.
lucas
i ❤ demo -- but cannot edit my profile?
for now, i'm going to require that the photos are resized on the user's machine and each size uploaded to s3 manually. (this is very quick to do in a batch resize with ImageMagick or Irfanview and s3 tools.)
then the photo management page will find the new files and let you assign properties to them. :D
i have some code for resizing with convert. i could give it to you if you want
lucas
i ❤ demo -- but cannot edit my profile?
it's almost done. the code might be a little dirty, but it's working pretty awesome so far.
asemisldkfj
the law is no protection
screenshots!
asemisldkfj
the law is no protection
just for fun, here's an image upload function that I wrote for my blog software:
http://thehomerow.net/~brain/uploadImage.txt
it takes $filename, $picture_tmp_name, $picture_comment, $post_id, and $size as arguments.
$filename is essentially $_FILES['picture']['name'], or the filename of the uploaded picture.
$picture_tmp_name is $_FILES['picture']['tmp_name'].
$picture_comment is $_POST['comment'], and is set to the filename if it's empty (I think).
$post_id is used to relate the picture of a blog post.
and
$size is the number of pixels you want the largest dimension of the image to be. so if you set it to 1024 and you're resizing a 1600x1200 image, it will resize it to 1024x768.
lucas
i ❤ demo -- but cannot edit my profile?
it sucks that exif_read_data() can only operate on a local file. so i have to read a file from s3, write it somewhere on the disk, and then i can get some exif data for the image.
lucas
i ❤ demo -- but cannot edit my profile?
look at this dumb script..
print meta data retrieved from an image in aws s3
<?php
/*********************************
* GET MYSQL AND AWS CREDENTIALS *
*********************************/
require_once "../../../inc_credentials.php";
/*********************************
* GET GLOBAL VARS AND FUNCTIONS *
*********************************/
require_once "../global.php";
$test_image = "c/000000001.jpg";
$url = "http://$s3_bucket.s3.amazonaws.com/$s3_path/$test_image";
$tmp_file = "/tmp/lucas_photo_shuffle.jpg";
if (!$file_str = file_get_contents($url)) {
die("could not get file from s3.");
};
if (!file_put_contents($tmp_file, $file_str)) {
die("could not put file into $tmp_file.");
};
if (!$exif = exif_read_data($tmp_file, 0, TRUE)) {
die("could not read exif data from image.");
}
if (!unlink($tmp_file)) {
die("could not unlink $tmp_file.");
};
foreach ($exif as $key => $section) {
foreach ($section as $name => $val) {
echo "$key.$name: $val<br />\n";
};
};
?>
lucas
i ❤ demo -- but cannot edit my profile?
i want to print some meta data on the photo's page. i'm storing the data in the mysql table so it doesn't have to be read from s3 on-demand.
i'm planning on storing:
IFD0.Model
EXIF.ExposureTime
EXIF.FNumber
EXIF.ISOSpeedRatings
EXIF.Flash
EXIF.FocalLength
EXIF.DateTimeOriginal
should i grab anything else to show visitors?
here's how it's formatted right now (maybe it should be friendlier):
camera: Canon PowerShot SD750
exposure time: 1/6
f-number: 28/10
iso speed ratings: 400
flash: did not fire
focal length: 5800/1000
original date and time: 2008:05:17 21:53:38
yeah, grab everything
lucas
i ❤ demo -- but cannot edit my profile?
:/
i don't want a huge page of garbage like this, though:
http://www.wingedleopard.net/lucas/photos/?vi … p;showexif
you don't have to show everything, but keep it in the database so you can search with it
lucas
i ❤ demo -- but cannot edit my profile?
so should i give each of those keys its own field in the database table? or be ghetto and dump it all into one field serialized?
no dirty serials
lucas
i ❤ demo -- but cannot edit my profile?
so the table photo_image is gonna have like 200 fields?
can't you have a separate table for exif?
lucas
i ❤ demo -- but cannot edit my profile?
then it's not normal form. (http://en.wikipedia.org/wiki/Database_normalization)
you don't *have* to have a fully normalized model
but if you want that, yeah, 200 fields
lucas
i ❤ demo -- but cannot edit my profile?
this post has been archived.
lucas
i ❤ demo -- but cannot edit my profile?
haha :(
i think i'll stick with seven fields for my own purposes
make it easy to use 200 fields for someone like me though please :)
actually i think i'll just port it to use ruby and local files. when it's reached some stability
lucas
i ❤ demo -- but cannot edit my profile?
you might as well make your own from scratch. the whole point here is php+mysql+s3 from the ground up.
i would like your help with ui design once i get the coding done, though. so maybe you'd find some of that useful.
sure. i'd still use a database though, but probably sqlite
lucas
i ❤ demo -- but cannot edit my profile?
i need a name for my project...
something greek
hyperion
lucas
i ❤ demo -- but cannot edit my profile?
too bad there's not a muse of art
maybe sappho...
sure!
project sappho
lucas
i ❤ demo -- but cannot edit my profile?
or maybe hippocrene
lucas
i ❤ demo -- but cannot edit my profile?
back in development!
i can has squared thumbnails?
http://www.wingedleopard.net/lucas/wlwp/set/3/
lucas
i ❤ demo -- but cannot edit my profile?
asemisldkfj
the law is no protection
looks awesome!
lucas
i ❤ demo -- but cannot edit my profile?
thanks!
lucas
i ❤ demo -- but cannot edit my profile?
asemisldkfj
the law is no protection
in global.php you have mysql user and pass set to user:pass. are these the credentials you have set up on your development box for the mysql server or do you somehow modify those when you're working with the code and they're only user:pass on the svn'ed copy? I had issues with this before.
lucas
i ❤ demo -- but cannot edit my profile?
yeah, you have to setup a mysql server with a user that has full access to a database. then you set those variables accordingly.
looks good.
it needs previous and next buttons
there is a next link
it just don't work
lucas
i ❤ demo -- but cannot edit my profile?
got friendly urls working today. (allowing [a-z0-9_\-].)
gonna wrap the rest of these issues up soon.
lucas
i ❤ demo -- but cannot edit my profile?
lucas
i ❤ demo -- but cannot edit my profile?
down to 7 issues!
lucas
i ❤ demo -- but cannot edit my profile?
down to 5 issues!
lucas
i ❤ demo -- but cannot edit my profile?
three issues left!
here's a current working version:
http://www.wingedleopard.net/lucas/photos/
asemisldkfj
the law is no protection
looks awesome.
lucas
i ❤ demo -- but cannot edit my profile?
this post has been archived.
lucas
i ❤ demo -- but cannot edit my profile?
thanks.
i have an rss feed with thumbnails in it. :)
wow, look at that :D
Étrangère
I am not a robot...
I was looking through the bonsai pics you posted in the other thread, and I'm wondering why when I click "view next in set" it takes me to a black page with "about:blank" in the address bar.
That option must just be temporarily unavailable right now?
lucas
i ❤ demo -- but cannot edit my profile?
this post has been archived.
lucas
i ❤ demo -- but cannot edit my profile?
> a handful of things to do:
>
http://code.google.com/p/sappho/issues/list
thanks for the post, though. :)
lucas
i ❤ demo -- but cannot edit my profile?
mootools is can hassing winnage.
lucas
i ❤ demo -- but cannot edit my profile?
fuck i have to urinate frequently
DaGr8Gatzby
Drunk by Myself
Is this going to be a program feature?
Feature List:
- S3 Backend
- Increases rate of urination (YMMV)
lucas
i ❤ demo -- but cannot edit my profile?
complete with a ymmv mootools slider
lucas
i ❤ demo -- but cannot edit my profile?
all done!
i just need to do some more qa at some point.
:D
lucas
i ❤ demo -- but cannot edit my profile?
i think it's all pretty good now.
lucas
i ❤ demo -- but cannot edit my profile?
i should make a youtube video demonstrating how the back-end works with s3.
asemisldkfj
the law is no protection
do it!
i want to see the integration into wlw/lucas
lucas
i ❤ demo -- but cannot edit my profile?
i have no idea how to do that. :o
lucas
i ❤ demo -- but cannot edit my profile?
i'm declaring it stable!
i also notified the author of the s3 class that i used of my project. :)
lucas
i ❤ demo -- but cannot edit my profile?
lucas
i ❤ demo -- but cannot edit my profile?
i'm having lots of fun with the project!
it's unique, it works well, and the code base is small and manageable.
lucas
i ❤ demo -- but cannot edit my profile?
this post has been archived.
lucas
i ❤ demo -- but cannot edit my profile?
i don't think it's nearly usable enough.
i'm gonna put more work into user interface design this week.
lucas
i ❤ demo -- but cannot edit my profile?
i think i might go ahead and program sappho to use aws's "elastic compute cloud" to resize images:
http://developer.amazonwebservices.com/connec … goryID=175
i'd also code up a simple little script to upload photos.
so all you'd have to do is pull the high-res images from your camera, run the script on the directory containing those images, and you'd be set! :D
lucas
i ❤ demo -- but cannot edit my profile?
where should i put license information (e.g., "all rights reserved")?
example page:
http://www.wingedleopard.net/lucas/photos/image/75/
inside "photo information", on the bottom
Étrangère
I am not a robot...
One of your
photos is trying to undermine the system!
lucas
i ❤ demo -- but cannot edit my profile?
thanks! i renamed all of my photos, and i guess i screwed that one up.
lucas
i ❤ demo -- but cannot edit my profile?
i've marked the project as "stable for production use."
http://code.google.com/p/sappho/
:D
lucas
i ❤ demo -- but cannot edit my profile?
i just announced the software on amazon's s3 forum. i'm terrified of this level of publicity. :o
http://developer.amazonwebservices.com/connec … adID=28661
phi_
... and let the Earth be silent after ye.
Congrats man!
lucas
i ❤ demo -- but cannot edit my profile?
> how do i answer this?
Honestly.
bsdlite
thinks darkness is his ally
> how do i answer this?
start by telling him that sappho doesn't generate thumbnails :)