From 44cd38f8fbcf5e661f0b7446ebe256c1d7f7f194 Mon Sep 17 00:00:00 2001 From: Peter Eke Date: Wed, 17 Jul 2024 14:03:12 +0200 Subject: [PATCH 1/3] Detect PDF files that start with CRLF --- puremagic/magic_data.json | 1 + 1 file changed, 1 insertion(+) diff --git a/puremagic/magic_data.json b/puremagic/magic_data.json index 081a7eb..a70b984 100644 --- a/puremagic/magic_data.json +++ b/puremagic/magic_data.json @@ -745,6 +745,7 @@ ["000100004d534953414d204461746162617365", 0, ".mny", "application/x-msmoney", "Microsoft Money file"], ["000100005374616e64617264204a6574204442", 0, ".mdb", "application/x-msaccess", "Microsoft Access file"], ["25504446", 0, ".pdf", "application/pdf", "Adobe Portable Document Format file"], + ["0d0a25504446", 0, ".pdf", "application/pdf", "Adobe Portable Document Format file"], ["a0461df0", 512, ".ppt", "application/vnd.ms-powerpoint", "Microsoft Office PowerPoint Presentation file"], ["cf11e0a1b11ae100", 0, ".doc", "application/msword", "Perfect Office Document file"], ["d0cf11e0a1b11ae1", 0, ".doc", "application/msword", "Microsoft Office Document file"], From f672dc15beedf4f7326485567cab178ac4d73877 Mon Sep 17 00:00:00 2001 From: Peter Eke Date: Wed, 17 Jul 2024 14:36:19 +0200 Subject: [PATCH 2/3] Add pdf to detect by extension --- puremagic/magic_data.json | 1 + 1 file changed, 1 insertion(+) diff --git a/puremagic/magic_data.json b/puremagic/magic_data.json index a70b984..b582419 100644 --- a/puremagic/magic_data.json +++ b/puremagic/magic_data.json @@ -28,6 +28,7 @@ ["", 0, ".c", "text/x-csrc", "C Code File"], ["", 0, ".cc", "text/x-csrc", "C Code File"], ["", 0, ".h", "text/x-csrc", "C Header File"], + ["", 0, ".pdf", "application/pdf", "Adobe Portable Document Format file"], ["", 0, ".stl", "model/stl", "stereolithography CAD software"], ["", 0, ".srt", "application/x-subrip", "SubRip subtitles"], ["", 0, ".obj", "", "Relocatable object code"], From 5b3b408f8cf663872396019eb0a6612d71f69e91 Mon Sep 17 00:00:00 2001 From: Peter Eke Date: Wed, 17 Jul 2024 14:36:42 +0200 Subject: [PATCH 3/3] Fix description for JSON files --- puremagic/magic_data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/puremagic/magic_data.json b/puremagic/magic_data.json index b582419..cef2ce5 100644 --- a/puremagic/magic_data.json +++ b/puremagic/magic_data.json @@ -20,7 +20,7 @@ ["", 0, ".crt", "text/plain", "X.509 Certificate"], ["", 0, ".reg", "", "Windows Registry File"], ["", 0, ".md", "text/plain", "Markdown File"], - ["", 0, ".json", "application/json", "Markdown File"], + ["", 0, ".json", "application/json", "JSON File"], ["", 0, ".rst", "text/plain", "Restructured Text File"], ["", 0, ".cfg", "text/plain", "Configuration File"], ["", 0, ".flake8", "text/plain", "Flake 8 Configuration File"],