So I think it’s useful to use a database to store alle the information
and run the statistic-queries.
Yes, I see your application better now.
My knowledge about databases is very poor.
Any other suggestions?
Yes, I surely hope that you get some other opinions than mine!
I was not sure how to handle this with ruby/ror because I’am (I was!!!)
a php man and it’s the first project I want to do with ruby.
These are my first lines od ruby code - and I want to make it good.
So, seeing you’re a php coder, and not used to ruby, I will try again.
You first have to chose between 2 options, do you want a real framwework
like Ruby on Rails, Nitro, IOWA or something similar, or stay with the
approach from php (erb/eruby/erubis).
My approach would best work within a framework (Og is in fact part of
I researched a bit and coded a little. As it’s just scrap code and
it’s a bit longish, I put it into a paste service. Feel free to copy
small parts here if something is unclear.
get data from pure-uploadscript
When called like
UploadedFile.parse_pure_uploadscript it returns a
UploadedFile instance with your data.
setting up the database
This configures Og and creates a table to save your data. It can be
extended by adding more
propery :symbol, Type entries.
setting up the clamav ‘parser’
I extended the original a bit, allowing for a local clamavscan.
Putting the parts together
This, when run, expects the filename as the first argument, uses
the uploaded_file ‘parser’ to get all the data from the environment,
feeds that to the clamav scanner and saves the result by using Og.
Must be a bit confusing for a newcomer, it’s not all ‘newbie’ code,
but I hope that helps you a little to see how this could be done.
Anyway, maybe somebody else can jump in and propose another solution.
(What I didn’t get into here, is on how to present the data. Sorry.
Tell me which road you want to go (framework or plain erb/eruby),
and I’ll try to write something up for that.)
I apologize to everyone who sees this message in the future when the
pastie links are all dead… just send me an email and I’ll try to
dig it up again.