1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 06:37:17 +00:00

Update site to include help

- Add sphinx documentation generated from build to help
- Add link to help (in english) in header
- Add link to github in header
This commit is contained in:
2018-04-08 11:25:34 -05:00
parent 10f06999ed
commit bacba3f0a5
431 changed files with 117335 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
core.app
========
.. automodule:: core.app
:members:

View File

@@ -0,0 +1,5 @@
core.directories
================
.. automodule:: core.directories
:members:

View File

@@ -0,0 +1,36 @@
core.engine
===========
.. automodule:: core.engine
.. autoclass:: Match
.. autoclass:: Group
:members:
.. autofunction:: build_word_dict
.. autofunction:: compare
.. autofunction:: compare_fields
.. autofunction:: getmatches
.. autofunction:: getmatches_by_contents
.. autofunction:: get_groups
.. autofunction:: merge_similar_words
.. autofunction:: reduce_common_words
.. _fields:
Fields
------
Fields are groups of words which each represent a significant part of the whole name. This concept
is sifnificant in music file names, where we often have names like "My Artist - a very long title
with many many words".
This title has 10 words. If you run as scan with a bit of tolerance, let's say 90%, you'll be able
to find a dupe that has only one "many" in the song title. However, you would also get false
duplicates from a title like "My Giraffe - a very long title with many many words", which is of
course a very different song and it doesn't make sense to match them.
When matching by fields, each field (separated by "-") is considered as a separate string to match
independently. After all fields are matched, the lowest result is kept. In the "Giraffe" example we
gave, the result would be 50% instead of 90% in normal mode.

View File

@@ -0,0 +1,5 @@
core.fs
=======
.. automodule:: core.fs
:members:

View File

@@ -0,0 +1,5 @@
core.gui.deletion_options
=========================
.. automodule:: core.gui.deletion_options
:members:

View File

@@ -0,0 +1,10 @@
core.gui
========
.. automodule:: core.gui
:members:
.. toctree::
:maxdepth: 2
deletion_options

View File

@@ -0,0 +1,12 @@
core
====
.. toctree::
:maxdepth: 2
app
fs
engine
directories
results
gui/index

View File

@@ -0,0 +1,5 @@
core.results
============
.. automodule:: core.results
:members:

View File

@@ -0,0 +1,5 @@
hscommon.build
==============
.. automodule:: hscommon.build
:members:

View File

@@ -0,0 +1,5 @@
hscommon.conflict
=================
.. automodule:: hscommon.conflict
:members:

View File

@@ -0,0 +1,5 @@
hscommon.desktop
================
.. automodule:: hscommon.desktop
:members:

View File

@@ -0,0 +1,12 @@
hscommon.gui.base
=================
.. automodule:: hscommon.gui.base
.. autosummary::
GUIObject
.. autoclass:: GUIObject
:members:
:private-members:

View File

@@ -0,0 +1,25 @@
hscommon.gui.column
============================
.. automodule:: hscommon.gui.column
.. autosummary::
Columns
Column
ColumnsView
PrefAccessInterface
.. autoclass:: Columns
:members:
:private-members:
.. autoclass:: Column
:members:
:private-members:
.. autoclass:: ColumnsView
:members:
.. autoclass:: PrefAccessInterface
:members:

View File

@@ -0,0 +1,18 @@
hscommon.gui.progress_window
============================
.. automodule:: hscommon.gui.progress_window
.. autosummary::
ProgressWindow
ProgressWindowView
.. autoclass:: ProgressWindow
:members:
:private-members:
.. autoclass:: ProgressWindowView
:members:
:private-members:

View File

@@ -0,0 +1,26 @@
hscommon.gui.selectable_list
============================
.. automodule:: hscommon.gui.selectable_list
.. autosummary::
Selectable
SelectableList
GUISelectableList
GUISelectableListView
.. autoclass:: Selectable
:members:
:private-members:
.. autoclass:: SelectableList
:members:
:private-members:
.. autoclass:: GUISelectableList
:members:
:private-members:
.. autoclass:: GUISelectableListView
:members:

View File

@@ -0,0 +1,26 @@
hscommon.gui.table
==================
.. automodule:: hscommon.gui.table
.. autosummary::
Table
Row
GUITable
GUITableView
.. autoclass:: Table
:members:
:private-members:
.. autoclass:: Row
:members:
:private-members:
.. autoclass:: GUITable
:members:
:private-members:
.. autoclass:: GUITableView
:members:

View File

@@ -0,0 +1,16 @@
hscommon.gui.text_field
=======================
.. automodule:: hscommon.gui.text_field
.. autosummary::
TextField
TextFieldView
.. autoclass:: TextField
:members:
:private-members:
.. autoclass:: TextFieldView
:members:

View File

@@ -0,0 +1,18 @@
hscommon.gui.tree
=================
.. automodule:: hscommon.gui.tree
.. autosummary::
Tree
Node
.. autoclass:: Tree
:members:
:private-members:
.. autoclass:: Node
:members:
:private-members:

View File

@@ -0,0 +1,16 @@
hscommon
========
.. toctree::
:maxdepth: 2
:glob:
build
conflict
desktop
notify
path
util
jobprogress/*
gui/*

View File

@@ -0,0 +1,17 @@
hscommon.jobprogress.job
========================
.. automodule:: hscommon.jobprogress.job
.. autosummary::
Job
NullJob
.. autoclass:: Job
:members:
:private-members:
.. autoclass:: NullJob
:members:

View File

@@ -0,0 +1,12 @@
hscommon.jobprogress.performer
==============================
.. automodule:: hscommon.jobprogress.performer
.. autosummary::
ThreadedJobPerformer
.. autoclass:: ThreadedJobPerformer
:members:

View File

@@ -0,0 +1,12 @@
hscommon.jobprogress.qt
=======================
.. automodule:: hscommon.jobprogress.qt
.. autosummary::
Progress
.. autoclass:: Progress
:members:

View File

@@ -0,0 +1,5 @@
hscommon.notify
===============
.. automodule:: hscommon.notify
:members:

View File

@@ -0,0 +1,5 @@
hscommon.path
=============
.. automodule:: hscommon.path
:members:

View File

@@ -0,0 +1,5 @@
hscommon.util
=============
.. automodule:: hscommon.util
:members:

View File

@@ -0,0 +1,74 @@
Developer Guide
===============
When looking at a non-trivial codebase for the first time, it's very difficult to understand
anything of it until you get the "Big Picture". This page is meant to, hopefully, make you get
dupeGuru's big picture.
Branches and tags
-----------------
The git repo has one main branch, ``master``. It represents the latest "stable development commit",
that is, the latest commit that doesn't include in-progress features. This branch should always
be buildable, ``tox`` should always run without errors on it.
When a feature/bugfix has an atomicity of a single commit, it's alright to commit right into
``master``. However, if a feature/bugfix needs more than a commit, it should live in a separate
topic branch until it's ready.
Every release is tagged with the version number. For example, there's a ``2.8.2`` tag for the
v2.8.2 release.
Model/View/Controller... nope!
------------------------------
dupeGuru's codebase has quite a few design flaws. The Model, View and Controller roles are filled by
different classes, scattered around. If you're aware of that, it might help you to understand what
the heck is going on.
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
: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
:class:`core.app.DupeGuru`, like ``DupeGuru`` in ``cocoa/inter/app.py``, or the ``DupeGuru`` class
in ``qt/base/app.py``. For example, when performing "Remove Selected From Results",
``RemoveSelected()`` on the cocoa side, and ``remove_duplicates()`` on the PyQt side, are
respectively called to perform the thing.
.. _jobs:
Jobs
----
A lot of operations in dupeGuru take a significant amount of time. This is why there's a generalized
threaded job mechanism built-in :class:`~core.app.DupeGuru`. First, :class:`~core.app.DupeGuru` has
a ``progress`` member which is an instance of
: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.
Core principles
---------------
The core of the duplicate matching takes place (for SE and ME, not PE) in :mod:`core.engine`.
There's :func:`core.engine.getmatches` which take a list of :class:`core.fs.File` instances and
return a list of ``(firstfile, secondfile, match_percentage)`` matches. Then, there's
:func:`core.engine.get_groups` which takes a list of matches and returns a list of
: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 :func:`.get_groups`) is placed into
:attr:`core.app.DupeGuru.results`, which is a :class:`core.results.Results` instance. The
:class:`~.Results` instance is where all the dupe marking, sorting, removing, power marking, etc.
takes place.
API
---
.. toctree::
:maxdepth: 2
core/index
hscommon/index