mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Tweaked the main dev help page to have actual reflinks
This commit is contained in:
parent
372a682610
commit
5b3d5f5d1c
@ -12,16 +12,16 @@ dupeGuru's codebase has quite a few design flaws. The Model, View and Controller
|
|||||||
different classes, scattered around. If you're aware of that, it might help you to understand what
|
different classes, scattered around. If you're aware of that, it might help you to understand what
|
||||||
the heck is going on.
|
the heck is going on.
|
||||||
|
|
||||||
The central piece of dupeGuru is ``dupeguru.app.DupeGuru`` (in the ``core`` code). It's the only
|
The central piece of dupeGuru is :class:`core.app.DupeGuru`. It's the only
|
||||||
interface to the python's code for the GUI code. A duplicate scan is started with
|
interface to the python's code for the GUI code. A duplicate scan is started with
|
||||||
``start_scanning()``, directories are added through ``add_directory()``, etc..
|
:meth:`core.app.DupeGuru.start_scanning()`, directories are added through
|
||||||
|
:meth:`core.app.DupeGuru.add_directory()`, etc..
|
||||||
|
|
||||||
A lot of functionalities of the App are implemented in the platform-specific subclasses of
|
A lot of functionalities of the App are implemented in the platform-specific subclasses of
|
||||||
``app.DupeGuru``, like ``app_cocoa.DupeGuru``, or the ``base.app.DupeGuru`` class in the PyQt
|
:class:`core.app.DupeGuru`, like ``DupeGuru`` in ``cocoa/inter/app.py``, or the ``DupeGuru`` class
|
||||||
codebase. For example, when performing "Remove Selected From Results",
|
in ``qt/base/app.py``. For example, when performing "Remove Selected From Results",
|
||||||
``app_cocoa.Dupeguru.RemoveSelected()`` on the Obj-C side, and
|
``RemoveSelected()`` on the cocoa side, and ``remove_duplicates()`` on the PyQt side, are
|
||||||
``base.app.DupeGuru.remove_duplicates()`` on the PyQt side, are respectively called to perform the
|
respectively called to perform the thing.
|
||||||
thing. All of this is quite ugly, I know (see the "Refactoring" section below).
|
|
||||||
|
|
||||||
.. _jobs:
|
.. _jobs:
|
||||||
|
|
||||||
@ -29,23 +29,26 @@ Jobs
|
|||||||
----
|
----
|
||||||
|
|
||||||
A lot of operations in dupeGuru take a significant amount of time. This is why there's a generalized
|
A lot of operations in dupeGuru take a significant amount of time. This is why there's a generalized
|
||||||
threaded job mechanism built-in ``app.DupeGuru``. First, ``app.DupeGuru`` has a ``progress`` member
|
threaded job mechanism built-in :class:`~core.app.DupeGuru`. First, :class:`~core.app.DupeGuru` has
|
||||||
which is an instance of ``jobprogress.job.ThreadedJobPerformer``. It lets the GUI code know of the
|
a ``progress`` member which is an instance of
|
||||||
progress of the current threaded job. When ``app.DupeGuru`` needs to start a job, it calls
|
:class:`~hscommon.jobprogress.performer.ThreadedJobPerformer`. It lets the GUI code know of the progress
|
||||||
|
of the current threaded job. When :class:`~core.app.DupeGuru` needs to start a job, it calls
|
||||||
``_start_job()`` and the platform specific subclass deals with the details of starting the job.
|
``_start_job()`` and the platform specific subclass deals with the details of starting the job.
|
||||||
|
|
||||||
Core principles
|
Core principles
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
The core of the duplicate matching takes place (for SE and ME, not PE) in ``dupeguru.engine``.
|
The core of the duplicate matching takes place (for SE and ME, not PE) in :mod:`core.engine`.
|
||||||
There's ``MatchFactory.getmatches()`` which take a list of ``fs.File`` instances and return a list
|
There's :func:`core.engine.getmatches` which take a list of :class:`core.fs.File` instances and
|
||||||
of ``(firstfile, secondfile, match_percentage)`` matches. Then, there's ``get_groups()`` which takes
|
return a list of ``(firstfile, secondfile, match_percentage)`` matches. Then, there's
|
||||||
a list of matches and returns a list of ``Group`` instances (a ``Group`` is basically a list of
|
:func:`core.engine.get_groups` which takes a list of matches and returns a list of
|
||||||
``fs.File`` matching together).
|
:class:`.Group` instances (a :class:`.Group` is basically a list of :class:`.File` matching
|
||||||
|
together).
|
||||||
|
|
||||||
When a scan is over, the final result (the list of groups from ``get_groups()``) is placed into
|
When a scan is over, the final result (the list of groups from :func:`.get_groups`) is placed into
|
||||||
``app.DupeGuru.results``, which is a ``results.Results`` instance. The ``Results`` instance is where
|
:attr:`core.app.DupeGuru.results`, which is a :class:`core.results.Results` instance. The
|
||||||
all the dupe marking, sorting, removing, power marking, etc. takes place.
|
:class:`~.Results` instance is where all the dupe marking, sorting, removing, power marking, etc.
|
||||||
|
takes place.
|
||||||
|
|
||||||
API
|
API
|
||||||
---
|
---
|
||||||
|
Loading…
x
Reference in New Issue
Block a user