Running DROID through Python

58 views
Skip to first unread message

luvn...@gmail.com

unread,
Apr 4, 2022, 6:03:07 PM4/4/22
to droid-list
I was wondering if anyone has used Python to run DROID?

I have a Python script that runs several steps in our process and I was wondering if it might be possible to add DROID to it. I always use the GUI. I add a folder with files and subfolders, run DROID and then export to a CSV file. If I'm able to automate it more, I can have Python search the output for TRUE in the mismatch field and flag it.

Jenn Morris
MIT LIbraries

Radek Hubner

unread,
Apr 5, 2022, 7:18:41 AM4/5/22
to droid...@googlegroups.com
Hello Jenn,

Thank you for asking this. We have a command line version of DROID. You can run it as a subprocess from python. Probably you will need to split this into two steps. First run DROID as you do in GUI for file format identification. And then a second run for export to CSV which you can then process with standart python tools.

Unfortunately we don't have a direct API for Python, Droid is fully written in Java.

Radek

--
You received this message because you are subscribed to the Google Groups "droid-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to droid-list+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/droid-list/b7f6c8f0-71ab-4374-a700-f0880a9650bbn%40googlegroups.com.

Marcelo Garcia

unread,
Apr 21, 2022, 7:14:51 AM4/21/22
to droid-list
Hi 

I'm using `droid` inside a Python script as Radek suggested. If you need help, let me know.

Regards

m.

luvn...@gmail.com

unread,
Sep 9, 2024, 5:35:07 PM9/9/24
to droid-list
I realize it's been a couple years but Marcelo I would be interested to see how you're running it in Python. Would you be willing to share your code and process?

Jenn Morris
MIT LIbraries

Sobhan Jahangir

unread,
Sep 16, 2024, 3:37:03 AM9/16/24
to droid-list
Hey! 

I am not sure how Marcelo does it, but you have to run it with command lines through Python. 

Check out this link:

windows - How to execute a command prompt command from python - Stack Overflow

Also if you need help with which command line to run, you can open Droid and then click on help. There it will show you the different function the program has through command lines. 

I run the same thing through C# if you want to look at my code, I can send it to you, but it is not the same as Python. 

Hope this helps!

Adam Farquhar

unread,
Sep 24, 2024, 7:10:00 AM9/24/24
to droid-list
Jenn - I am just doing a rev of fido, which is a python format identification tool that uses the pronom signatures. It might be interesting to see what your use case is and understand what sort of integration would support it. Of course, using Droid as a sub-process is also a good option.
Cheers,
Adam.

Reply all
Reply to author
Forward
0 new messages