From 6a6c2c23afdff0d95a9302d1a65e6b4c9f19aba1 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Mon, 27 Oct 2025 11:27:42 +0100 Subject: WIP docs --- doc/dev/diff.rst | 5 ++++ doc/dev/index.rst | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++ doc/dev/processor.rst | 11 ++++++++ 3 files changed, 88 insertions(+) create mode 100644 doc/dev/diff.rst create mode 100644 doc/dev/index.rst create mode 100644 doc/dev/processor.rst (limited to 'doc/dev') diff --git a/doc/dev/diff.rst b/doc/dev/diff.rst new file mode 100644 index 0000000..6875ed6 --- /dev/null +++ b/doc/dev/diff.rst @@ -0,0 +1,5 @@ +Default +******* + +Include +******* diff --git a/doc/dev/index.rst b/doc/dev/index.rst new file mode 100644 index 0000000..6932fa9 --- /dev/null +++ b/doc/dev/index.rst @@ -0,0 +1,72 @@ +Developer docs +============== + +Installation +************ + +.. note:: + + Patchtree is developed and tested on \*NIX-like operating systems. + Windows compatibility is not tested or guaranteed. + The output .patch files can of course be used anywhere where ``git apply`` works. + +Make sure you have the following dependencies installed: + +* Python 3 and pip +* Coccinelle (optional) + +Installation can be done by cloning this repository and running + +.. code:: + + $ pip install . + +This will install any missing Python dependencies automatically as well. + +Generating clean patches +************************ + +In order to generate a clean .patch file, patchtree needs + +* the original source tree (either as a folder or .zip file) +* a list of patch files placed in the same structure as the original source tree + +Writing patch sources +********************* + + + +.. _config: + +Configuration +************* + +.. currentmodule:: patchtree.config + +The configuration file is a Python file sourced from ``ptconfig.py`` relative to the current working directory when executing the ``patchtree`` command. +This file can contain arbitrary Python code. +Certain global variables influence the behavior of patchtree when defined. +These variables are the member variables of the :class:`Config` class. + +Processors +********** + +.. currentmodule:: patchtree.process + +The processors included with patchtree are listed below. +Custom processors can be created by inheriting from the base :py:class:`Process` class and registering through the `configuration file `_. + +.. toctree:: + :maxdepth: 1 + + processor.rst + +Diff engines +************ + +The diff engines included with patchtree are listed below. + +.. toctree:: + :maxdepth: 1 + + diff.rst diff --git a/doc/dev/processor.rst b/doc/dev/processor.rst new file mode 100644 index 0000000..f577220 --- /dev/null +++ b/doc/dev/processor.rst @@ -0,0 +1,11 @@ +Touch +***** + +Coccinelle +********** + +Jinja template +************** + +Executable +********** -- cgit v1.2.3