commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Castro <apudcas...@entwash.org>
Subject Re: JMimeMagic (was [fileUpload] file content-type)
Date Thu, 25 May 2006 08:09:36 GMT
Oh, also note that I have already worked on some changes not currently
in CVS.

One of the additions includes the ability to create what I had dubbed
"detectors", which are basically classes that are registered and used on
content to generate matches in place of a magic file rule.  It is still
defined in the magic.xml though.  For example:

    <match>
        <mimetype></mimetype>
        <extension></extension>
       
    <description>net.sf.jmimemagic.detectors.TextFileDetector</description>
        <test type="detector" offset="0" length="" bitmask=""
    comparator="">net.sf.jmimemagic.detectors.TextFileDetector</test>
    </match>

This accommodates checks that require more complex logic than a
declarative rule in a magic file could provide.  Heck, you could build a
detector that would not only determine that you have a Word document,
but also that it is corrupted or infected with a Macro virus.

In my mind, the framework should be capable of doing more than simply
determine mime types.  It should provide the ability to return much more
information about content and perform much more sophisticated checks. 
Of course there are many things that can be done to cut down on any
unnecessary processing.  You could use file extension hints, etc.

Cheers,
David

David Castro wrote:
> Whelp, it's a good thing I periodically google for my projects to see
> what folks are saying about them.  I noticed that this thread existed
> and unlike the thread implied, I have already responded (with neither a
> return response, nor a bounce that I am aware of) to the person who
> stated he could not contact me (Mark Webb).  You can see the attached
> mbox with my messages.
>
> I'd be interested in all feedback and would certainly be open to
> contributing my code.  As I mentioned in the attached messages, I have
> already considered it before.
>
> And yes, jMimeMagic is less than perfect.  It was born out of my own
> pain and my own needs (as software often is).  I tried to make it
> somewhat usable for other folks though.  There are certainly a thousand
> things that could be done better.  I have many changes that I would like
> to make myself.  It's simply a matter of time and demand.  I do have a
> full-time job unfortunately =P
>
> Tisk tisk tisk...folks are just so eager to criticize.  Certainly not
> every design decision I made was perfect and just as certainly there are
> many more optimizations to be made.  Formats need to change, new magic
> rules to be added, etc. etc.  But c'mon now...play fair, don't just say
> blah blah blah it sucks.
>
> Anyhow, I'd love to participate.  If that means from scratch, so be it. 
> But let's have a discussion about what everyone doesn't like and why,
> what we'd like to see refactored, etc.  As far as I am aware, jMimeMagic
> is the only open source java MIME/content detection library out there. 
> If it makes sense to re-use some of it, then we should.
>
> Oh yeah...heh...nice to meet you all.  I'm David (arimus).  <wave/>  My
> real job is as a Software Architect for a software vendor in Irvine,
> CA.  I moonlight as an open source developer who wishes it could be his
> full-time job ;)
>
> Cheers,
> David
>   
> ------------------------------------------------------------------------
>
> From MAILER-DAEMON Wed May 24 22:00:01 2006
> Date: 24 May 2006 22:00:01 -0700
> From: Mail System Internal Data <MAILER-DAEMON@entwash.org>
> Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA
> X-IMAP: 1148533201 0000000000
> Status: RO
>
> This text is part of the internal format of your mail folder, and is not
> a real message.  It is created automatically by the mail system software.
> If deleted, important folder data will be lost, and it will be re-created
> with the data reset to initial values.
>
> From arimus@entwash.org  Wed Mar 15 22:16:32 2006
> Return-Path: <arimus@entwash.org>
> Received: from mail.sourceforge.net (lists.sourceforge.net [66.35.250.206])
> 	by make.zimage.com (8.11.6/8.11.6) with ESMTP id k2G6GWp15829
> 	for <apudcastro@entwash.org>; Wed, 15 Mar 2006 22:16:32 -0800
> Received: from adsl-gte-la-216-86-214-215.mminternet.com ([216.86.214.215] helo=make.zimage.com)
> 	by mail.sourceforge.net with esmtp (Exim 4.44)
> 	id 1FJlqg-0001jz-6M
> 	for arimus@users.sourceforge.net; Wed, 15 Mar 2006 22:20:38 -0800
> Received: from localhost (arimus@localhost)
> 	by make.zimage.com (8.11.6/8.11.6) with ESMTP id k2G6GUf15824;
> 	Wed, 15 Mar 2006 22:16:30 -0800
> Date: Wed, 15 Mar 2006 22:16:30 -0800 (PST)
> From: David Castro <arimus@entwash.org>
> X-X-Sender: arimus@make.zimage.com
> To: Mark Webb <javaman@users.sourceforge.net>
> cc: arimus@users.sourceforge.net
> Subject: Re: JMimeMagic
> In-Reply-To: <E1FJX98-0000oF-Ft@sc8-sf-web1.sourceforge.net>
> Message-ID: <Pine.LNX.4.44.0603152206290.13482-100000@make.zimage.com>
> MIME-Version: 1.0
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> X-Spam-Score: 1.0 (+)
> X-Spam-Report: Spam Filtering performed by sourceforge.net.
> 	See http://spamassassin.org/tag/ for more details.
> 	Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001
> 	1.0 FORGED_RCVD_HELO       Received: contains a forged HELO
> Status: RO
> X-Status: 
> X-Keywords:                 
>
> On Wed, 15 Mar 2006, Mark Webb wrote:
>
>   
>> Message body follows:
>>
>> Hello - 
>>
>> I was wondering if you are still working with the JMimeMagic
>> library.  I started working on a proposal for a file type
>>     
>
> Oh, and to answer this question...yes, off and on.  I have a number of 
> projects on work on, so jmimemagic hasn't had as much love as it could 
> have recently.
>
>   
>> checker for the jakarta commons project and ran across
>> JMimeMagic.  Please let me know if you are still interested
>>     
>
> Also, jMimeMagic has started to go a bit further than just file type 
> checking.  I'm still hoping to do more in the way of a pluggable 
> architecture for it.
>
>   
>> in working this probject, and if not, would you have a
>> problem with me merging in some of your code to the project
>> I am working on for jakarta commons?
>>     
>
> BTW, do you already have code yourself?  Also Apache wants to see projects 
> with a minimum of 3 active developers before they will allow you to create 
> a project...unless you have contacts with some folks over there =)
>
> I am actively involved in several OSS projects, so we have that 
> requirement covered.
>
>   
>> Thank you.
>>
>> --
>> This message has been sent to you, a registered SourceForge.net user,
>> by another site user, through the SourceForge.net site.  This message
>> has been delivered to your SourceForge.net mail alias.  You may reply
>> to this message using the "Reply" feature of your email client, or
>> using the messaging facility of SourceForge.net at:
>> https://sourceforge.net/sendmessage.php?touser=61402
>>
>>     
>
> From arimus@entwash.org Wed Mar 15 21:45:50 2006 -0800
> Date: Wed, 15 Mar 2006 21:45:49 -0800 (PST)
> From: David Castro <arimus@entwash.org>
> X-X-Sender: arimus@make.zimage.com
> To: Mark Webb <javaman@users.sourceforge.net>
> Subject: Re: JMimeMagic
> In-Reply-To: <E1FJX98-0000oF-Ft@sc8-sf-web1.sourceforge.net>
> Message-ID: <Pine.LNX.4.44.0603152140340.13482-100000@make.zimage.com>
> MIME-Version: 1.0
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> Status: O
> X-Status: 
> X-Keywords:                  
>
>
> Funny.  I have been thinking for quite some time of trying to get it in 
> the sandbox for the commons.  I'd certainly be interested in being a 
> core developer of any commons project that could become home to 
> jmimemagic and offspring.
>
> I know that the Apache folks typically like to see already existing 
> projects with a community around them before being accepted.  Do you 
> already do development for current Apache projects?
>
> Cheers,
>
> David
>
> On Wed, 15 Mar 2006, Mark Webb wrote:
>
>   
>> Message body follows:
>>
>> Hello - 
>>
>> I was wondering if you are still working with the JMimeMagic
>> library.  I started working on a proposal for a file type
>> checker for the jakarta commons project and ran across
>> JMimeMagic.  Please let me know if you are still interested
>> in working this probject, and if not, would you have a
>> problem with me merging in some of your code to the project
>> I am working on for jakarta commons?
>>
>> Thank you.
>>
>> --
>> This message has been sent to you, a registered SourceForge.net user,
>> by another site user, through the SourceForge.net site.  This message
>> has been delivered to your SourceForge.net mail alias.  You may reply
>> to this message using the "Reply" feature of your email client, or
>> using the messaging facility of SourceForge.net at:
>> https://sourceforge.net/sendmessage.php?touser=61402
>>
>>     
>
>
>
>   
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message