droid icon indicating copy to clipboard operation
droid copied to clipboard

DROID CLI can't identify file format by extension in no-profile-mode

Open toKrause opened this issue 7 years ago • 7 comments

The current signature file (DROID_SignatureFile_V94.xml) contains some file format definitions that contain only an <Extension> and no <InternalSignatureID>-reference to a byte signature. One such example is the file format definition for "Java language source code file" (x-fmt/422):

<FileFormat ID="809" Name="Java language source code file" PUID="x-fmt/422">
   <Extension>java</Extension>
</FileFormat>

DROID UI identifies a file with the .java-extension correctly as x-fmt/422 but DROID CLI returns Unknown.


Input:

touch Test.java
./droid.sh -Nr Test.java -Ns DROID_SignatureFile_V94.xml -Nc container-signature-20180920.xml

Output:

DROID 6.4 No Profile mode: Runtime Information
Selected folder or file: Test.java
Binary signature file: DROID_SignatureFile_V94.xml
Container signature file: container-signature-20180920.xml
Open archives: False
Open web archives: False
/home/xxx/DROID-6.4/Test.java,Unknown

toKrause avatar Nov 07 '18 15:11 toKrause

Hello Torsten,

Thank you for raising this - it's really useful to know. We'll investigate this functionality for potential inclusion in a future version of DROID.

Alex

alexgreenDP avatar Nov 14 '18 16:11 alexgreenDP

We'll investigate this functionality for potential inclusion in a future version of DROID.

Well, I haven't really suggested a new feature to be added.

toKrause avatar Nov 27 '18 17:11 toKrause

Hi,

Will this be fixed anytime soon? It's a little annoying that DROID CLI can't even identify a plain text file like foo.txt (result Unknown) when DROID GUI returns a correct PUID (result x-fmt/111).

Thanks, Martin

marhop avatar Oct 29 '19 12:10 marhop

Has this been fixed by any chance? Using droid6.4 and still getting some "unknown" responses.

kalmicka avatar Dec 04 '19 13:12 kalmicka

a bit late to come to the party but going to look at this, see if it can be included in the upcoming release.

jcharlet avatar Feb 04 '20 18:02 jcharlet

ok we analyzed it with @sparkhi , the file extension identification is implemented in the GUI, but missing in the CLI, which explains the inconsistency of the results between gui and cli.

we could either reimplement the extension identification in the CLI, or refactor the whole identification mechanism as @nishihatapalmer is already looking at. Either way, there is no quick win, it's a significant feature so we won't provide this for 6.5 release.

jcharlet avatar Feb 11 '20 16:02 jcharlet

to be fixed with https://github.com/digital-preservation/droid/issues/470

jcharlet avatar Jun 10 '20 10:06 jcharlet

Fixed in 6.6.0

sparkhi avatar Mar 02 '23 17:03 sparkhi