From pablojr at gmail.com Tue Feb 1 18:52:01 2011 From: pablojr at gmail.com (Pablo Rogina) Date: Tue, 1 Feb 2011 14:52:01 -0300 Subject: [dff-devel] Could it be possible to post defects, tasks, issues in English please? Message-ID: Sorry for bothering with this silly request, and I understand that the majority of the developers are native French but unfortunately I think English is the only common language we have to understand each other. Don't push me to start posting bugs or tasks in Spanish! :-) Thanks, Pablo From solal.jacob at ArxSys.fr Tue Feb 1 21:11:42 2011 From: solal.jacob at ArxSys.fr (Solal Jacob) Date: Tue, 01 Feb 2011 20:11:42 +0000 Subject: [dff-devel] Could it be possible to post defects, tasks, issues in English please? In-Reply-To: References: Message-ID: <4D4868FE.1090300@ArxSys.fr> Hello Pablo, Just have a new student that is testing DFF and report bug in the tracker, he doesn't speak english much so he post it in French, we will translate them so everyone could understand. Thanks. Solal On 02/01/11 17:52, Pablo Rogina wrote: > Sorry for bothering with this silly request, and I understand that the > majority of the developers are native French but unfortunately I think > English is the only common language we have to understand each other. > > Don't push me to start posting bugs or tasks in Spanish! :-) > > Thanks, > > Pablo > _______________________________________________ > dff-devel mailing list > dff-devel at digital-forensic.org > http://lists.digital-forensic.org/listinfo/dff-devel > From rbe at arxsys.fr Wed Feb 2 12:46:33 2011 From: rbe at arxsys.fr (romain) Date: Wed, 02 Feb 2011 12:46:33 +0100 Subject: [dff-devel] Could it be possible to post defects, tasks, issues in English please? In-Reply-To: References: Message-ID: <4D494419.1040709@arxsys.fr> Pablo Rogina wrote: > Sorry for bothering with this silly request, and I understand that the > majority of the developers are native French but unfortunately I think > English is the only common language we have to understand each other. > > Don't push me to start posting bugs or tasks in Spanish! :-) > > Thanks, > > Pablo Hi, I translated them. I hope I did not forget any. Sorry for the inconvenience. Thanks, Romain From pablojr at gmail.com Thu Feb 10 18:56:17 2011 From: pablojr at gmail.com (Pablo Rogina) Date: Thu, 10 Feb 2011 14:56:17 -0300 Subject: [dff-devel] New module for PDF viewer, some questions Message-ID: Hi, I created ticket #100 for a new feature: a PDF viewer. The idea is to provide a way to view a PDF file along all its metadata (author, dates, thumbnail, etc. etc.) using poppler library under Python. I already read the wiki page about creating a new module in Python and I already created a new folder pdf under modules/viewer. I have a PdfViewer class which is a QWidget with a pane to show the PDF contents and some tabs to show the different categories for the metadata (I'm using the viewerimage module as an example). I know that I should have a class derived from Module (i.e. PdfModule) along with the class for the UI (i.e. PdfViewer). I have a __init__.py file along with all the other .py files plus the CMakeLists.txt file. The problem so far is that I cannot make the PDF viewer option appear under the "Open With >" submenu. I tried modifying modules/gui/widget/nodebrowser.py file as well. I guess the wiki page is missing some more information in the way of some kind of recipe in order to create and apply a new module. Could it be possible that somebody with experience about this topic tell me briefly what steps to follow or what I may be doing wrong? I don't want to seem a lazy developer not willing to read documentation or to go trial and error but if some tips could save me some time, I would appreciate that. Thank you, Pablo From rbe at arxsys.fr Thu Feb 10 19:13:30 2011 From: rbe at arxsys.fr (romain) Date: Thu, 10 Feb 2011 19:13:30 +0100 Subject: [dff-devel] New module for PDF viewer, some questions In-Reply-To: References: Message-ID: <4D542ACA.7050403@arxsys.fr> Pablo Rogina wrote: > Hi, I created ticket #100 for a new feature: a PDF viewer. The idea is > to provide a way to view a PDF file along all its metadata (author, > dates, thumbnail, etc. etc.) using poppler library under Python. > > I already read the wiki page about creating a new module in Python and > I already created a new folder pdf under modules/viewer. I have a > PdfViewer class which is a QWidget with a pane to show the PDF > contents and some tabs to show the different categories for the > metadata (I'm using the viewerimage module as an example). I know that > I should have a class derived from Module (i.e. PdfModule) along with > the class for the UI (i.e. PdfViewer). I have a __init__.py file along > with all the other .py files plus the CMakeLists.txt file. The problem > so far is that I cannot make the PDF viewer option appear under the > "Open With >" submenu. I tried modifying > modules/gui/widget/nodebrowser.py file as well. > > I guess the wiki page is missing some more information in the way of > some kind of recipe in order to create and apply a new module. > Could it be possible that somebody with experience about this topic > tell me briefly what steps to follow or what I may be doing wrong? > I don't want to seem a lazy developer not willing to read > documentation or to go trial and error but if some tips could save me > some time, I would appreciate that. > > Thank you, > > Pablo Hi Pablo, First, you should not have to modify the /gui/widget/nodebrowser.py file. The documentation on the wiki is indeed not up to date. When you launch dff in console mode, do you have a message error concerning your module, indicating that it did not load ? In your .py did you add a tag (self.tags = "your tag") ? Your module should appear in open with -> your tag -> module name. If you did not specify the tag, it should appear in open with -> other. Thanks, -- Romain BERTHOLON From pablojr at gmail.com Fri Feb 11 11:57:32 2011 From: pablojr at gmail.com (Pablo Rogina) Date: Fri, 11 Feb 2011 07:57:32 -0300 Subject: [dff-devel] Use of Qt Designer and .ui files for GUI Message-ID: > I want to have your advice concerning one thing. When i read QMainWindow > documentation, i saw that it's mandatory to use a centralWidget. Do you > think that we can integrate a system composed by only dockwidgets ? This > kind of system will be less restrictive and will enable some interesting > functionnalities. You cannot get rid of a centralWidget in the QMainWindow (from Qt docs: "You must have a central widget even if it is just a placeholder.") but I don't see any problem integrating QDockWidgets as well. Please take a look at the Qt4 demo provided by Poppler (library for PDF support) where they are using this concept: the pdf contents are shown in a QScrollArea set as the central widget and they display the pdf metadata as a series of dock widget to the left of the main window. http://poppler.freedesktop.org/ > Another question, you suggest in the tracker to use a TabWidget in order > to display module's arguments and parameters, i tried this but as I said > in the Issue, when a module (like ExtFS) has too many arguments, the > system is not very clear because names of arguments are not very > readable. I decided to use a liswidget combinated to QStackedWidget, > what do you think about that ? I guess I didn't explain my idea very well. When I suggested QTabWidget I thought of using the tabs as categories and the placing several arguments on each tab. You'll probably find categories from all the arguments in the ExtFS module to group them. But I think the QStackedWidget is also a good approach. Either way, the purpose is to get arguments group logically to make the UI not so cluttered. Thanks, Pablo From pablojr at gmail.com Fri Feb 11 17:48:19 2011 From: pablojr at gmail.com (Pablo Rogina) Date: Fri, 11 Feb 2011 13:48:19 -0300 Subject: [dff-devel] New module for PDF viewer, some questions Message-ID: >When you launch dff in console mode, do you have a message error >concerning your module, indicating that it did not load ? Romain, I'm indeed getting the following error: [ERROR] loading pdfviewer from /home/pablo/projects/dff/build/modules/viewer/pdf/pdfviewer.py Traceback (most recent call last): File "/home/pablo/projects/dff/build/api/loader/loader.py", line 212, in ModuleImport cl = getattr(module, modname) AttributeError: 'module' object has no attribute 'pdfviewer' I double checked comparing with modules/viewer/viewerimage.py about the class derived from Module but I cannot see any apparent difference so I'm stuck with this. Any hints? Just in case I copied the source code for the module so far (it's pretty basic, I just want the module to load and be enable from the menus and just open a widget. Once that's working I'll fill all the details for displaying PDF files...) Thank you. Pablo ======================================================================== modules/viewer/pdf/pdfviewer.py ======================================================================== from PyQt4 import QtCore, QtGui from PyQt4.QtGui import * from PyQt4.QtCore import * from api.vfs import * from api.module.module import * from api.module.script import * #from ui_pdfviewer import Ui_PdfBrowser class PdfViewer(QWidget, Script): def __init__(self): Script.__init__(self, "viewerpdf") self.vfs = vfs.vfs() self.env = env.env() self.type = "pdf" self.icon = None def g_display(self): QWidget.__init__(self, None) # Set up the user interface from Qt Designer # self.setupUi(self) def start(self, args): self.args = args self.node = args.get_node("file") class viewerpdf(Module): def __init__(self): Module.__init__(self, "pdf", PdfViewer) self.conf.add("file", "node", False, "File to display contents and metadata") self.conf.add_const("mime-type", "PDF") self.tags = "Viewers" self.tags = ["gui"] From solal.jacob at ArxSys.fr Fri Feb 11 19:52:06 2011 From: solal.jacob at ArxSys.fr (Solal Jacob) Date: Fri, 11 Feb 2011 18:52:06 +0000 Subject: [dff-devel] New module for PDF viewer, some questions In-Reply-To: References: Message-ID: <4D558556.3070200@ArxSys.fr> Hi Pablo, In fact you must name your class that inherit from modules with the same name as your .py files, that how the loader search for this class and create the instance (this not very smart and we certainly need to find a better way), I assume this is certainly not tell in the wiki and we must modify it to add that. So you can rename your .py file : viewerpdf.py or rename the class that inherit modules pdfviewer at your choice. Also you must remove the line : self.tags = ["gui"] at the end of your code. You can specifiy that's a gui module providing it in "self.flags" but however this is autodetected so you don't need to add it manually. In the last version of DFF I also add a new features that permit to create dynamic attributes that are added to node attributes, this will be certainly a good features to add in your modules, so people can access the pdf attributes directly by the proprety table ( in the gui ) or once we have done the filtering and searching interfaces they could use those attributes as filters. For now you could add it in the graphical widget as it's done in the viewerimage modules or look at the metaexif modules in the last master branches if you want some ideas of how to add it to node attributes. Thanks, Solal. On 02/11/11 16:48, Pablo Rogina wrote: >> When you launch dff in console mode, do you have a message error >> concerning your module, indicating that it did not load ? >> > Romain, > > I'm indeed getting the following error: > > [ERROR] loading pdfviewer from > /home/pablo/projects/dff/build/modules/viewer/pdf/pdfviewer.py > Traceback (most recent call last): > File "/home/pablo/projects/dff/build/api/loader/loader.py", line > 212, in ModuleImport > cl = getattr(module, modname) > AttributeError: 'module' object has no attribute 'pdfviewer' > > I double checked comparing with modules/viewer/viewerimage.py about > the class derived from Module but I cannot see any apparent difference > so I'm stuck with this. > > Any hints? > > Just in case I copied the source code for the module so far (it's > pretty basic, I just want the module to load and be enable from the > menus and just open a widget. Once that's working I'll fill all the > details for displaying PDF files...) > > Thank you. Pablo > > ======================================================================== > modules/viewer/pdf/pdfviewer.py > ======================================================================== > > from PyQt4 import QtCore, QtGui > from PyQt4.QtGui import * > from PyQt4.QtCore import * > > from api.vfs import * > from api.module.module import * > from api.module.script import * > > #from ui_pdfviewer import Ui_PdfBrowser > > class PdfViewer(QWidget, Script): > def __init__(self): > Script.__init__(self, "viewerpdf") > self.vfs = vfs.vfs() > self.env = env.env() > self.type = "pdf" > self.icon = None > > def g_display(self): > QWidget.__init__(self, None) > # Set up the user interface from Qt Designer > # self.setupUi(self) > > def start(self, args): > self.args = args > self.node = args.get_node("file") > > class viewerpdf(Module): > def __init__(self): > Module.__init__(self, "pdf", PdfViewer) > self.conf.add("file", "node", False, "File to display contents > and metadata") > self.conf.add_const("mime-type", "PDF") > self.tags = "Viewers" > self.tags = ["gui"] > _______________________________________________ > dff-devel mailing list > dff-devel at digital-forensic.org > http://lists.digital-forensic.org/listinfo/dff-devel > -- Solal Jacob solal.jacob at arxsys.fr ArxSys, Riposte Num?rique 14-16, Rue du Soleillet 75020 Paris T?l: +33 1 46 36 25 22 www.arxsys.fr www.digital-forensic.org