[diffoscope] 04/05: Add human-readable yet machine-parsable descriptions to comparators where appropriate.
Chris Lamb
chris at chris-lamb.co.uk
Sun Mar 18 22:00:11 CET 2018
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository diffoscope.
commit 0ca1403f268af3040f42d96bf552656b2b072837
Author: Chris Lamb <lamby at debian.org>
Date: Sun Mar 18 14:41:09 2018 -0400
Add human-readable yet machine-parsable descriptions to comparators where appropriate.
---
diffoscope/comparators/android.py | 1 +
diffoscope/comparators/apk.py | 1 +
diffoscope/comparators/ar.py | 1 +
diffoscope/comparators/berkeley_db.py | 1 +
diffoscope/comparators/bzip2.py | 1 +
diffoscope/comparators/cbfs.py | 1 +
diffoscope/comparators/cpio.py | 1 +
diffoscope/comparators/debian.py | 3 +++
diffoscope/comparators/device.py | 2 ++
diffoscope/comparators/dex.py | 1 +
diffoscope/comparators/directory.py | 2 ++
diffoscope/comparators/docx.py | 1 +
diffoscope/comparators/dtb.py | 1 +
diffoscope/comparators/elf.py | 2 ++
diffoscope/comparators/fontconfig.py | 1 +
diffoscope/comparators/fonts.py | 1 +
diffoscope/comparators/fsimage.py | 1 +
diffoscope/comparators/gettext.py | 1 +
diffoscope/comparators/gif.py | 1 +
diffoscope/comparators/git.py | 1 +
diffoscope/comparators/gnumeric.py | 1 +
diffoscope/comparators/gzip.py | 1 +
diffoscope/comparators/haskell.py | 1 +
diffoscope/comparators/icc.py | 1 +
diffoscope/comparators/image.py | 2 ++
diffoscope/comparators/ipk.py | 1 +
diffoscope/comparators/iso9660.py | 1 +
diffoscope/comparators/java.py | 1 +
diffoscope/comparators/javascript.py | 1 +
diffoscope/comparators/json.py | 2 ++
diffoscope/comparators/llvm.py | 1 +
diffoscope/comparators/macho.py | 1 +
diffoscope/comparators/mono.py | 1 +
diffoscope/comparators/odt.py | 1 +
diffoscope/comparators/ogg.py | 1 +
diffoscope/comparators/openssh.py | 1 +
diffoscope/comparators/pcap.py | 1 +
diffoscope/comparators/pdf.py | 1 +
diffoscope/comparators/pgp.py | 1 +
diffoscope/comparators/png.py | 1 +
diffoscope/comparators/ppu.py | 1 +
diffoscope/comparators/ps.py | 1 +
diffoscope/comparators/rdata.py | 3 +++
diffoscope/comparators/rpm.py | 1 +
diffoscope/comparators/rust.py | 1 +
diffoscope/comparators/sqlite.py | 1 +
diffoscope/comparators/squashfs.py | 1 +
diffoscope/comparators/symlink.py | 2 ++
diffoscope/comparators/tar.py | 1 +
diffoscope/comparators/text.py | 1 +
diffoscope/comparators/xml.py | 2 ++
diffoscope/comparators/xsb.py | 1 +
diffoscope/comparators/xz.py | 1 +
53 files changed, 64 insertions(+)
diff --git a/diffoscope/comparators/android.py b/diffoscope/comparators/android.py
index a54d6aa..85ce479 100644
--- a/diffoscope/comparators/android.py
+++ b/diffoscope/comparators/android.py
@@ -80,6 +80,7 @@ class AndroidBootImgContainer(Archive):
class AndroidBootImgFile(File):
+ DESCRIPTION = "Android boot images"
FILE_TYPE_RE = re.compile(r'^Android bootimg\b')
CONTAINER_CLASS = AndroidBootImgContainer
diff --git a/diffoscope/comparators/apk.py b/diffoscope/comparators/apk.py
index 464ccfa..d194449 100644
--- a/diffoscope/comparators/apk.py
+++ b/diffoscope/comparators/apk.py
@@ -152,6 +152,7 @@ class ApkContainer(Archive):
class ApkFile(File):
+ DESCRIPTION = "Android APK files"
FILE_TYPE_HEADER_PREFIX = b"PK\x03\x04"
FILE_TYPE_RE = re.compile(r'^(Java|Zip) archive data.*\b')
FILE_EXTENSION_SUFFIX = '.apk'
diff --git a/diffoscope/comparators/ar.py b/diffoscope/comparators/ar.py
index a769f28..7ff5a5e 100644
--- a/diffoscope/comparators/ar.py
+++ b/diffoscope/comparators/ar.py
@@ -57,6 +57,7 @@ class ArSymbolTableDumper(Command):
class ArFile(File):
+ DESCRIPTION = "ar(1) archives"
CONTAINER_CLASS = ArContainer
FILE_TYPE_RE = re.compile(r'\bar archive\b')
diff --git a/diffoscope/comparators/berkeley_db.py b/diffoscope/comparators/berkeley_db.py
index 7a54392..4e42fc4 100644
--- a/diffoscope/comparators/berkeley_db.py
+++ b/diffoscope/comparators/berkeley_db.py
@@ -42,6 +42,7 @@ class DbDump(Command):
class BerkeleyDBFile(File):
+ DESCRIPTION = "Berkeley DB database files"
FILE_TYPE_RE = re.compile(r'^Berkeley DB ')
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/bzip2.py b/diffoscope/comparators/bzip2.py
index 8641e8b..af80e4a 100644
--- a/diffoscope/comparators/bzip2.py
+++ b/diffoscope/comparators/bzip2.py
@@ -51,5 +51,6 @@ class Bzip2Container(Archive):
class Bzip2File(File):
+ DESCRIPTION = "bzip2 archives"
CONTAINER_CLASS = Bzip2Container
FILE_TYPE_RE = re.compile(r'^bzip2 compressed data\b')
diff --git a/diffoscope/comparators/cbfs.py b/diffoscope/comparators/cbfs.py
index 3aa40b6..390a087 100644
--- a/diffoscope/comparators/cbfs.py
+++ b/diffoscope/comparators/cbfs.py
@@ -99,6 +99,7 @@ def is_header_valid(buf, size, offset=0):
class CbfsFile(File):
+ DESCRIPTION = "Coreboot CBFS filesystem images"
CONTAINER_CLASS = CbfsContainer
@classmethod
diff --git a/diffoscope/comparators/cpio.py b/diffoscope/comparators/cpio.py
index 2e9f7dc..30e9cb8 100644
--- a/diffoscope/comparators/cpio.py
+++ b/diffoscope/comparators/cpio.py
@@ -27,6 +27,7 @@ from .utils.libarchive import LibarchiveContainer, list_libarchive
class CpioFile(File):
+ DESCRIPTION = "cpio archives"
CONTAINER_CLASS = LibarchiveContainer
FILE_TYPE_RE = re.compile(r'\bcpio archive\b')
diff --git a/diffoscope/comparators/debian.py b/diffoscope/comparators/debian.py
index d9903c2..4bd7030 100644
--- a/diffoscope/comparators/debian.py
+++ b/diffoscope/comparators/debian.py
@@ -161,6 +161,7 @@ class DebControlFile(File):
class DotChangesFile(DebControlFile):
+ DESCRIPTION = "Debian .changes files"
FILE_EXTENSION_SUFFIX = '.changes'
@classmethod
@@ -202,6 +203,7 @@ class DotChangesFile(DebControlFile):
class DotDscFile(DebControlFile):
+ DESCRIPTION = "Debian source packages (.dsc)"
FILE_EXTENSION_SUFFIX = '.dsc'
@classmethod
@@ -254,6 +256,7 @@ class DotBuildinfoContainer(DebControlContainer):
class DotBuildinfoFile(DebControlFile):
+ DESCRIPTION = "Debian .buildinfo files"
CONTAINER_CLASS = DotBuildinfoContainer
FILE_EXTENSION_SUFFIX = '.buildinfo'
diff --git a/diffoscope/comparators/device.py b/diffoscope/comparators/device.py
index f1a05e6..a2a3de1 100644
--- a/diffoscope/comparators/device.py
+++ b/diffoscope/comparators/device.py
@@ -31,6 +31,8 @@ logger = logging.getLogger(__name__)
class Device(File):
+ DESCRIPTION = "character/block devices"
+
@classmethod
def recognizes(cls, file):
return file.is_device()
diff --git a/diffoscope/comparators/dex.py b/diffoscope/comparators/dex.py
index 77065eb..0643dec 100644
--- a/diffoscope/comparators/dex.py
+++ b/diffoscope/comparators/dex.py
@@ -54,5 +54,6 @@ class DexContainer(Archive):
class DexFile(File):
+ DESCRIPTION = "Dalvik .dex files"
FILE_TYPE_RE = re.compile(r'^Dalvik dex file .*\b')
CONTAINER_CLASS = DexContainer
diff --git a/diffoscope/comparators/directory.py b/diffoscope/comparators/directory.py
index ae2a1f7..2e1dce5 100644
--- a/diffoscope/comparators/directory.py
+++ b/diffoscope/comparators/directory.py
@@ -175,6 +175,8 @@ def compare_directories(path1, path2, source=None):
class Directory(object):
+ DESCRIPTION = "directories"
+
@classmethod
def recognizes(cls, file):
return file.is_directory()
diff --git a/diffoscope/comparators/docx.py b/diffoscope/comparators/docx.py
index 7574210..a46b1ea 100644
--- a/diffoscope/comparators/docx.py
+++ b/diffoscope/comparators/docx.py
@@ -37,6 +37,7 @@ class Docx2txt(Command):
class DocxFile(File):
+ DESCRIPTION = "Microsoft Word .docx files"
FILE_TYPE_RE = re.compile(r'^Microsoft Word 2007+\b')
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/dtb.py b/diffoscope/comparators/dtb.py
index 9517295..257358b 100644
--- a/diffoscope/comparators/dtb.py
+++ b/diffoscope/comparators/dtb.py
@@ -34,6 +34,7 @@ class DeviceTreeContents(Command):
class DeviceTreeFile(File):
+ DESCRIPTION = "Device Tree Compiler blob files"
FILE_TYPE_RE = re.compile(r'^Device Tree Blob')
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/elf.py b/diffoscope/comparators/elf.py
index 181ea6e..5fb3377 100644
--- a/diffoscope/comparators/elf.py
+++ b/diffoscope/comparators/elf.py
@@ -558,6 +558,7 @@ class ElfContainer(Container):
class ElfFile(File):
+ DESCRIPTION = "ELF binaries"
CONTAINER_CLASS = ElfContainer
FILE_TYPE_RE = re.compile(r'^ELF ')
@@ -566,6 +567,7 @@ class ElfFile(File):
class StaticLibFile(File):
+ DESCRIPTION = "statically-linked binaries"
CONTAINER_CLASS = ElfContainer
FILE_TYPE_RE = re.compile(r'\bar archive\b')
FILE_EXTENSION_SUFFIX = '.a'
diff --git a/diffoscope/comparators/fontconfig.py b/diffoscope/comparators/fontconfig.py
index 475c6ca..d24b551 100644
--- a/diffoscope/comparators/fontconfig.py
+++ b/diffoscope/comparators/fontconfig.py
@@ -25,6 +25,7 @@ from .utils.file import File
class FontconfigCacheFile(File):
+ DESCRIPTION = "FreeDesktop Fontconfig cache files"
FILE_TYPE_HEADER_PREFIX = struct.pack('<H', 0xFC04)
FILE_EXTENSION_SUFFIX = '-le64.cache-4'
diff --git a/diffoscope/comparators/fonts.py b/diffoscope/comparators/fonts.py
index c6bec9f..3caefad 100644
--- a/diffoscope/comparators/fonts.py
+++ b/diffoscope/comparators/fonts.py
@@ -36,6 +36,7 @@ class Showttf(Command):
class TtfFile(File):
+ DESCRIPTION = "TrueType font files"
FILE_TYPE_RE = re.compile(r'^(TrueType|OpenType) font data', re.IGNORECASE)
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/fsimage.py b/diffoscope/comparators/fsimage.py
index bf106db..565fbf9 100644
--- a/diffoscope/comparators/fsimage.py
+++ b/diffoscope/comparators/fsimage.py
@@ -77,6 +77,7 @@ class FsImageContainer(Archive):
class FsImageFile(File):
+ DESCRIPTION = "ext2/ext3/ext4/btrfs filesystems"
CONTAINER_CLASS = FsImageContainer
FILE_TYPE_RE = re.compile(r'^(Linux.*filesystem data|BTRFS Filesystem).*')
diff --git a/diffoscope/comparators/gettext.py b/diffoscope/comparators/gettext.py
index feab414..a68840d 100644
--- a/diffoscope/comparators/gettext.py
+++ b/diffoscope/comparators/gettext.py
@@ -61,6 +61,7 @@ class Msgunfmt(Command):
class MoFile(File):
+ DESCRIPTION = "Gettext message catalogues"
FILE_TYPE_RE = re.compile(r'^GNU message catalog\b')
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/gif.py b/diffoscope/comparators/gif.py
index c0e7c43..1b88dfe 100644
--- a/diffoscope/comparators/gif.py
+++ b/diffoscope/comparators/gif.py
@@ -67,6 +67,7 @@ def can_compose_gif_images(image1, image2):
class GifFile(File):
+ DESCRIPTION = "GIF image files"
FILE_TYPE_RE = re.compile(r'^GIF image data\b')
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/git.py b/diffoscope/comparators/git.py
index 1410d2b..88ce395 100644
--- a/diffoscope/comparators/git.py
+++ b/diffoscope/comparators/git.py
@@ -28,6 +28,7 @@ from .utils.file import File
class GitIndexFile(File):
+ DESCRIPTION = "Git repositories"
FILE_TYPE_RE = re.compile(r'^Git index')
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/gnumeric.py b/diffoscope/comparators/gnumeric.py
index 32d66da..0db59f9 100644
--- a/diffoscope/comparators/gnumeric.py
+++ b/diffoscope/comparators/gnumeric.py
@@ -29,6 +29,7 @@ from .missing_file import MissingFile
class GnumericFile(File):
+ DESCRIPTION = "Gnumeric spreadsheets"
FILE_EXTENSION_SUFFIX = '.gnumeric'
@tool_required('ssconvert')
diff --git a/diffoscope/comparators/gzip.py b/diffoscope/comparators/gzip.py
index 39598f4..8ed629e 100644
--- a/diffoscope/comparators/gzip.py
+++ b/diffoscope/comparators/gzip.py
@@ -52,6 +52,7 @@ class GzipContainer(Archive):
class GzipFile(File):
+ DESCRIPTION = "Gzipped files"
CONTAINER_CLASS = GzipContainer
FILE_TYPE_RE = re.compile(r'^gzip compressed data\b')
diff --git a/diffoscope/comparators/haskell.py b/diffoscope/comparators/haskell.py
index 22e074b..87392cd 100644
--- a/diffoscope/comparators/haskell.py
+++ b/diffoscope/comparators/haskell.py
@@ -69,6 +69,7 @@ class HiFile(File):
So the version of this file has 4 characters, and it's 7103. Note how all
this information is stored as big endian.
"""
+ DESCRIPTION = "GHC Haskell .hi files"
RE_FILE_EXTENSION = re.compile(r'\.(p_|dyn_)?hi$')
@classmethod
diff --git a/diffoscope/comparators/icc.py b/diffoscope/comparators/icc.py
index a1785a9..5de1db8 100644
--- a/diffoscope/comparators/icc.py
+++ b/diffoscope/comparators/icc.py
@@ -33,6 +33,7 @@ class Iccdump(Command):
class IccFile(File):
+ DESCRIPTION = "ColorSync colour profiles (.icc)"
FILE_TYPE_RE = re.compile(r'\bColorSync (ICC|color) [Pp]rofile')
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/image.py b/diffoscope/comparators/image.py
index a6170b6..7ef1db5 100644
--- a/diffoscope/comparators/image.py
+++ b/diffoscope/comparators/image.py
@@ -144,6 +144,7 @@ def same_size(image1, image2):
class JPEGImageFile(File):
+ DESCRIPTION = "JPEG images"
FILE_TYPE_RE = re.compile(r'\bJPEG image data\b')
def compare_details(self, other, source=None):
@@ -179,6 +180,7 @@ class JPEGImageFile(File):
class ICOImageFile(File):
+ DESCRIPTION = "Microsoft Windows icon files"
FILE_TYPE_RE = re.compile(r'\bMS Windows icon resource\b')
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/ipk.py b/diffoscope/comparators/ipk.py
index 7ba2359..7dc9907 100644
--- a/diffoscope/comparators/ipk.py
+++ b/diffoscope/comparators/ipk.py
@@ -22,4 +22,5 @@ from .gzip import GzipFile
class IpkFile(GzipFile):
+ DESCRIPTION = "OpenWRT package archives (.ipk)"
FILE_EXTENSION_SUFFIX = '.ipk'
diff --git a/diffoscope/comparators/iso9660.py b/diffoscope/comparators/iso9660.py
index 2cefaee..17b8548 100644
--- a/diffoscope/comparators/iso9660.py
+++ b/diffoscope/comparators/iso9660.py
@@ -68,6 +68,7 @@ class ISO9660Listing(Command):
class Iso9660File(File):
+ DESCRIPTION = "ISO 9660 CD images"
CONTAINER_CLASS = LibarchiveContainer
FILE_TYPE_RE = re.compile(r'\bISO 9660\b')
diff --git a/diffoscope/comparators/java.py b/diffoscope/comparators/java.py
index f44d740..c6f06f3 100644
--- a/diffoscope/comparators/java.py
+++ b/diffoscope/comparators/java.py
@@ -74,6 +74,7 @@ class Javap(Command):
class ClassFile(File):
+ DESCRIPTION = "Java .class files"
FILE_TYPE_RE = re.compile(r'^compiled Java class data\b')
decompilers = [ProcyonDecompiler, Javap]
diff --git a/diffoscope/comparators/javascript.py b/diffoscope/comparators/javascript.py
index a4a628b..0861f4a 100644
--- a/diffoscope/comparators/javascript.py
+++ b/diffoscope/comparators/javascript.py
@@ -31,6 +31,7 @@ class JavaScriptBeautify(Command):
class JavaScriptFile(File):
+ DESCRIPTION = "JavaScript files"
FILE_EXTENSION_SUFFIX = '.js'
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/json.py b/diffoscope/comparators/json.py
index 1066af9..41c5ec7 100644
--- a/diffoscope/comparators/json.py
+++ b/diffoscope/comparators/json.py
@@ -31,6 +31,8 @@ except ImportError: # noqa
class JSONFile(File):
+ DESCRIPTION = "JSON files"
+
@classmethod
def recognizes(cls, file):
with open(file.path, 'rb') as f:
diff --git a/diffoscope/comparators/llvm.py b/diffoscope/comparators/llvm.py
index 1dc3ac2..dded5ac 100644
--- a/diffoscope/comparators/llvm.py
+++ b/diffoscope/comparators/llvm.py
@@ -43,6 +43,7 @@ class LlvmBcDisassembler(Command):
class LlvmBitCodeFile(File):
+ DESCRIPTION = "LLVM IR bitcode files"
FILE_TYPE_RE = re.compile(r'^LLVM IR bitcode')
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/macho.py b/diffoscope/comparators/macho.py
index 0ac0c76..2d590a5 100644
--- a/diffoscope/comparators/macho.py
+++ b/diffoscope/comparators/macho.py
@@ -70,6 +70,7 @@ class OtoolDisassembleInternal(Otool):
class MachoFile(File):
+ DESCRIPTION = "MacOS binaries"
FILE_TYPE_RE = re.compile(r'^Mach-O ')
RE_EXTRACT_ARCHS = re.compile(r'^(?:Architectures in the fat file: .* are|Non-fat file: .* is architecture): (.*)$')
diff --git a/diffoscope/comparators/mono.py b/diffoscope/comparators/mono.py
index 4d62541..c811a1f 100644
--- a/diffoscope/comparators/mono.py
+++ b/diffoscope/comparators/mono.py
@@ -34,6 +34,7 @@ class Pedump(Command):
class MonoExeFile(File):
+ DESCRIPTION = "Mono 'Portable Executable' files"
FILE_TYPE_RE = re.compile(r'\bPE[0-9]+\b.*\bMono\b')
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/odt.py b/diffoscope/comparators/odt.py
index 26d36c4..eda021d 100644
--- a/diffoscope/comparators/odt.py
+++ b/diffoscope/comparators/odt.py
@@ -37,6 +37,7 @@ class Odt2txt(Command):
class OdtFile(File):
+ DESCRIPTION = "OpenOffice .odt files"
FILE_TYPE_RE = re.compile(r'^OpenDocument Text\b')
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/ogg.py b/diffoscope/comparators/ogg.py
index 4f04baf..4cf7282 100644
--- a/diffoscope/comparators/ogg.py
+++ b/diffoscope/comparators/ogg.py
@@ -33,6 +33,7 @@ class OggDump(Command):
class OggFile(File):
+ DESCRIPTION = "Ogg Vorbis audio files"
FILE_TYPE_RE = re.compile(r'^Ogg data')
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/openssh.py b/diffoscope/comparators/openssh.py
index ea8f254..f1fc23e 100644
--- a/diffoscope/comparators/openssh.py
+++ b/diffoscope/comparators/openssh.py
@@ -33,6 +33,7 @@ class SSHKeyList(Command):
class PublicKeyFile(File):
+ DESCRIPTION = "OpenSSH public keys"
FILE_TYPE_RE = re.compile(r'^OpenSSH \S+ public key')
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/pcap.py b/diffoscope/comparators/pcap.py
index c01d7c4..3d86136 100644
--- a/diffoscope/comparators/pcap.py
+++ b/diffoscope/comparators/pcap.py
@@ -39,6 +39,7 @@ class Tcpdump(Command):
class PcapFile(File):
+ DESCRIPTION = "tcpdump capture files (.pcap)"
FILE_TYPE_RE = re.compile(r'^tcpdump capture file\b')
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/pdf.py b/diffoscope/comparators/pdf.py
index 243e2ea..51760e6 100644
--- a/diffoscope/comparators/pdf.py
+++ b/diffoscope/comparators/pdf.py
@@ -42,6 +42,7 @@ class Pdftk(Command):
class PdfFile(File):
+ DESCRIPTION = "PDF documents"
FILE_TYPE_RE = re.compile(r'^PDF document\b')
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/pgp.py b/diffoscope/comparators/pgp.py
index 3ff6be8..40e75d1 100644
--- a/diffoscope/comparators/pgp.py
+++ b/diffoscope/comparators/pgp.py
@@ -41,6 +41,7 @@ class Pgpdump(Command):
class PgpFile(File):
+ DESCRIPTION = "PGP signed/encrypted messages"
FILE_TYPE_RE = re.compile(r'^PGP message\b')
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/png.py b/diffoscope/comparators/png.py
index 18c6319..6052d85 100644
--- a/diffoscope/comparators/png.py
+++ b/diffoscope/comparators/png.py
@@ -42,6 +42,7 @@ class Sng(Command):
class PngFile(File):
+ DESCRIPTION = "PNG images"
FILE_TYPE_RE = re.compile(r'^PNG image data\b')
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/ppu.py b/diffoscope/comparators/ppu.py
index f8460e9..58d5223 100644
--- a/diffoscope/comparators/ppu.py
+++ b/diffoscope/comparators/ppu.py
@@ -58,6 +58,7 @@ class Ppudump(Command):
class PpuFile(File):
+ DESCRIPTION = "FreePascal files (.ppu)"
FILE_EXTENSION_SUFFIX = '.ppu'
@classmethod
diff --git a/diffoscope/comparators/ps.py b/diffoscope/comparators/ps.py
index f6117e6..44865c3 100644
--- a/diffoscope/comparators/ps.py
+++ b/diffoscope/comparators/ps.py
@@ -37,6 +37,7 @@ class Pstotext(Command):
class PsFile(TextFile):
+ DESCRIPTION = "PostScript documents"
FILE_TYPE_RE = re.compile(r'^PostScript document\b')
def compare(self, other, *args, **kwargs):
diff --git a/diffoscope/comparators/rdata.py b/diffoscope/comparators/rdata.py
index 833c335..d0d6cbc 100644
--- a/diffoscope/comparators/rdata.py
+++ b/diffoscope/comparators/rdata.py
@@ -68,6 +68,8 @@ class RdsReader(Command):
class RdsFile(File):
+ DESCRIPTION = "GNU R Rscript files (.rds)"
+
@classmethod
def recognizes(cls, file):
if check_rds_extension(file) or \
@@ -87,6 +89,7 @@ class RdbReader(Command):
class RdbFile(File):
+ DESCRIPTION = "GNU R database files (.rdb)"
FILE_EXTENSION_SUFFIX = '.rdb'
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/rpm.py b/diffoscope/comparators/rpm.py
index 901578c..d8a2387 100644
--- a/diffoscope/comparators/rpm.py
+++ b/diffoscope/comparators/rpm.py
@@ -104,6 +104,7 @@ class RpmContainer(Archive):
class RpmFile(AbstractRpmFile):
+ DESCRIPTION = "RPM archives"
CONTAINER_CLASS = RpmContainer
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/rust.py b/diffoscope/comparators/rust.py
index a053340..756e5e0 100644
--- a/diffoscope/comparators/rust.py
+++ b/diffoscope/comparators/rust.py
@@ -57,6 +57,7 @@ class RustObjectContainer(Archive):
class RustObjectFile(File):
+ DESCRIPTION = "Rust object files (.deflate)"
CONTAINER_CLASS = RustObjectContainer
FILE_TYPE_HEADER_PREFIX = b'RUST_OBJECT\x01\x00\x00\x00'
FILE_EXTENSION_SUFFIX = '.deflate'
diff --git a/diffoscope/comparators/sqlite.py b/diffoscope/comparators/sqlite.py
index e58d60a..631de7e 100644
--- a/diffoscope/comparators/sqlite.py
+++ b/diffoscope/comparators/sqlite.py
@@ -33,6 +33,7 @@ class Sqlite3Dump(Command):
class Sqlite3Database(File):
+ DESCRIPTION = "SQLite databases"
FILE_TYPE_RE = re.compile(r'^SQLite 3.x database')
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/squashfs.py b/diffoscope/comparators/squashfs.py
index c7cf20d..ca2efe2 100644
--- a/diffoscope/comparators/squashfs.py
+++ b/diffoscope/comparators/squashfs.py
@@ -299,6 +299,7 @@ class SquashfsContainer(Archive):
class SquashfsFile(File):
+ DESCRIPTION = "SquashFS filesystems"
CONTAINER_CLASS = SquashfsContainer
FILE_TYPE_RE = re.compile(r'^Squashfs filesystem\b')
diff --git a/diffoscope/comparators/symlink.py b/diffoscope/comparators/symlink.py
index 99b557a..b3b50e5 100644
--- a/diffoscope/comparators/symlink.py
+++ b/diffoscope/comparators/symlink.py
@@ -29,6 +29,8 @@ logger = logging.getLogger(__name__)
class Symlink(File):
+ DESCRIPTION = "symlinks"
+
@classmethod
def recognizes(cls, file):
return file.is_symlink()
diff --git a/diffoscope/comparators/tar.py b/diffoscope/comparators/tar.py
index 9771c2b..8a5f5b4 100644
--- a/diffoscope/comparators/tar.py
+++ b/diffoscope/comparators/tar.py
@@ -30,6 +30,7 @@ class TarContainer(LibarchiveContainer):
class TarFile(File):
+ DESCRIPTION = "tape archives (.tar)"
CONTAINER_CLASS = TarContainer
FILE_TYPE_RE = re.compile(r'\btar archive\b')
diff --git a/diffoscope/comparators/text.py b/diffoscope/comparators/text.py
index 0c56f26..d9ea5a1 100644
--- a/diffoscope/comparators/text.py
+++ b/diffoscope/comparators/text.py
@@ -36,6 +36,7 @@ def order_only_difference(unified_diff):
class TextFile(File):
+ DESCRIPTION = "text files"
FILE_TYPE_RE = re.compile(r'\btext\b')
@property
diff --git a/diffoscope/comparators/xml.py b/diffoscope/comparators/xml.py
index 79d3ad1..6b11c55 100644
--- a/diffoscope/comparators/xml.py
+++ b/diffoscope/comparators/xml.py
@@ -71,6 +71,8 @@ class XMLFile(File):
Attributes:
FILE_EXTENSION_SUFFIX (str): xml file extension suffix
"""
+
+ DESCRIPTION = "XML files"
FILE_EXTENSION_SUFFIX = '.xml'
@classmethod
diff --git a/diffoscope/comparators/xsb.py b/diffoscope/comparators/xsb.py
index 713ad45..fa0dd05 100644
--- a/diffoscope/comparators/xsb.py
+++ b/diffoscope/comparators/xsb.py
@@ -36,6 +36,7 @@ class Dumpxsb(Command):
class XsbFile(File):
+ DESCRIPTION = "XML binary schemas (.xsb)"
FILE_EXTENSION_SUFFIX = '.xsb'
def compare_details(self, other, source=None):
diff --git a/diffoscope/comparators/xz.py b/diffoscope/comparators/xz.py
index a76408c..2685ff6 100644
--- a/diffoscope/comparators/xz.py
+++ b/diffoscope/comparators/xz.py
@@ -52,6 +52,7 @@ class XzContainer(Archive):
class XzFile(File):
+ DESCRIPTION = "XZ compressed files"
CONTAINER_CLASS = XzContainer
FILE_TYPE_RE = re.compile(r'^XZ compressed data$')
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list