mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	@@ -1,6 +1,11 @@
 | 
				
			|||||||
Changelog
 | 
					Changelog
 | 
				
			||||||
#########
 | 
					#########
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* 0.7.0
 | 
				
			||||||
 | 
					  * Fix for `#232`_ wherein Paperless wasn't recognising ``.tif`` files
 | 
				
			||||||
 | 
					    properly.  Thanks to `ayounggun`_ for reporting this one and to
 | 
				
			||||||
 | 
					    `Kusti Skytén`_ for posting the correct solution in the Github issue.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* 0.6.0
 | 
					* 0.6.0
 | 
				
			||||||
  * Abandon the shared-secret trick we were using for the POST API in favour
 | 
					  * Abandon the shared-secret trick we were using for the POST API in favour
 | 
				
			||||||
    of BasicAuth or Django session.
 | 
					    of BasicAuth or Django session.
 | 
				
			||||||
@@ -219,6 +224,8 @@ Changelog
 | 
				
			|||||||
.. _David Martin: https://github.com/ddddavidmartin
 | 
					.. _David Martin: https://github.com/ddddavidmartin
 | 
				
			||||||
.. _Paperless Desktop: https://github.com/thomasbrueggemann/paperless-desktop
 | 
					.. _Paperless Desktop: https://github.com/thomasbrueggemann/paperless-desktop
 | 
				
			||||||
.. _Joshua Gilman: https://github.com/jmgilman
 | 
					.. _Joshua Gilman: https://github.com/jmgilman
 | 
				
			||||||
 | 
					.. _ayounggun: https://github.com/ayounggun
 | 
				
			||||||
 | 
					.. _Kusti Skytén: https://github.com/kskyten
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.. _#20: https://github.com/danielquinn/paperless/issues/20
 | 
					.. _#20: https://github.com/danielquinn/paperless/issues/20
 | 
				
			||||||
.. _#44: https://github.com/danielquinn/paperless/issues/44
 | 
					.. _#44: https://github.com/danielquinn/paperless/issues/44
 | 
				
			||||||
@@ -256,5 +263,6 @@ Changelog
 | 
				
			|||||||
.. _#228: https://github.com/danielquinn/paperless/pull/228
 | 
					.. _#228: https://github.com/danielquinn/paperless/pull/228
 | 
				
			||||||
.. _#229: https://github.com/danielquinn/paperless/pull/229
 | 
					.. _#229: https://github.com/danielquinn/paperless/pull/229
 | 
				
			||||||
.. _#230: https://github.com/danielquinn/paperless/pull/230
 | 
					.. _#230: https://github.com/danielquinn/paperless/pull/230
 | 
				
			||||||
 | 
					.. _#232: https://github.com/danielquinn/paperless/issues/232
 | 
				
			||||||
.. _#236: https://github.com/danielquinn/paperless/issues/236
 | 
					.. _#236: https://github.com/danielquinn/paperless/issues/236
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -316,45 +316,45 @@ class FileInfo(object):
 | 
				
			|||||||
            r"(?P<correspondent>.*) - "
 | 
					            r"(?P<correspondent>.*) - "
 | 
				
			||||||
            r"(?P<title>.*) - "
 | 
					            r"(?P<title>.*) - "
 | 
				
			||||||
            r"(?P<tags>[a-z0-9\-,]*)"
 | 
					            r"(?P<tags>[a-z0-9\-,]*)"
 | 
				
			||||||
            r"\.(?P<extension>pdf|jpe?g|png|gif|tiff)$",
 | 
					            r"\.(?P<extension>pdf|jpe?g|png|gif|tiff?)$",
 | 
				
			||||||
            flags=re.IGNORECASE
 | 
					            flags=re.IGNORECASE
 | 
				
			||||||
        )),
 | 
					        )),
 | 
				
			||||||
        ("created-title-tags", re.compile(
 | 
					        ("created-title-tags", re.compile(
 | 
				
			||||||
            r"^(?P<created>\d\d\d\d\d\d\d\d(\d\d\d\d\d\d)?Z) - "
 | 
					            r"^(?P<created>\d\d\d\d\d\d\d\d(\d\d\d\d\d\d)?Z) - "
 | 
				
			||||||
            r"(?P<title>.*) - "
 | 
					            r"(?P<title>.*) - "
 | 
				
			||||||
            r"(?P<tags>[a-z0-9\-,]*)"
 | 
					            r"(?P<tags>[a-z0-9\-,]*)"
 | 
				
			||||||
            r"\.(?P<extension>pdf|jpe?g|png|gif|tiff)$",
 | 
					            r"\.(?P<extension>pdf|jpe?g|png|gif|tiff?)$",
 | 
				
			||||||
            flags=re.IGNORECASE
 | 
					            flags=re.IGNORECASE
 | 
				
			||||||
        )),
 | 
					        )),
 | 
				
			||||||
        ("created-correspondent-title", re.compile(
 | 
					        ("created-correspondent-title", re.compile(
 | 
				
			||||||
            r"^(?P<created>\d\d\d\d\d\d\d\d(\d\d\d\d\d\d)?Z) - "
 | 
					            r"^(?P<created>\d\d\d\d\d\d\d\d(\d\d\d\d\d\d)?Z) - "
 | 
				
			||||||
            r"(?P<correspondent>.*) - "
 | 
					            r"(?P<correspondent>.*) - "
 | 
				
			||||||
            r"(?P<title>.*)"
 | 
					            r"(?P<title>.*)"
 | 
				
			||||||
            r"\.(?P<extension>pdf|jpe?g|png|gif|tiff)$",
 | 
					            r"\.(?P<extension>pdf|jpe?g|png|gif|tiff?)$",
 | 
				
			||||||
            flags=re.IGNORECASE
 | 
					            flags=re.IGNORECASE
 | 
				
			||||||
        )),
 | 
					        )),
 | 
				
			||||||
        ("created-title", re.compile(
 | 
					        ("created-title", re.compile(
 | 
				
			||||||
            r"^(?P<created>\d\d\d\d\d\d\d\d(\d\d\d\d\d\d)?Z) - "
 | 
					            r"^(?P<created>\d\d\d\d\d\d\d\d(\d\d\d\d\d\d)?Z) - "
 | 
				
			||||||
            r"(?P<title>.*)"
 | 
					            r"(?P<title>.*)"
 | 
				
			||||||
            r"\.(?P<extension>pdf|jpe?g|png|gif|tiff)$",
 | 
					            r"\.(?P<extension>pdf|jpe?g|png|gif|tiff?)$",
 | 
				
			||||||
            flags=re.IGNORECASE
 | 
					            flags=re.IGNORECASE
 | 
				
			||||||
        )),
 | 
					        )),
 | 
				
			||||||
        ("correspondent-title-tags", re.compile(
 | 
					        ("correspondent-title-tags", re.compile(
 | 
				
			||||||
            r"(?P<correspondent>.*) - "
 | 
					            r"(?P<correspondent>.*) - "
 | 
				
			||||||
            r"(?P<title>.*) - "
 | 
					            r"(?P<title>.*) - "
 | 
				
			||||||
            r"(?P<tags>[a-z0-9\-,]*)"
 | 
					            r"(?P<tags>[a-z0-9\-,]*)"
 | 
				
			||||||
            r"\.(?P<extension>pdf|jpe?g|png|gif|tiff)$",
 | 
					            r"\.(?P<extension>pdf|jpe?g|png|gif|tiff?)$",
 | 
				
			||||||
            flags=re.IGNORECASE
 | 
					            flags=re.IGNORECASE
 | 
				
			||||||
        )),
 | 
					        )),
 | 
				
			||||||
        ("correspondent-title", re.compile(
 | 
					        ("correspondent-title", re.compile(
 | 
				
			||||||
            r"(?P<correspondent>.*) - "
 | 
					            r"(?P<correspondent>.*) - "
 | 
				
			||||||
            r"(?P<title>.*)?"
 | 
					            r"(?P<title>.*)?"
 | 
				
			||||||
            r"\.(?P<extension>pdf|jpe?g|png|gif|tiff)$",
 | 
					            r"\.(?P<extension>pdf|jpe?g|png|gif|tiff?)$",
 | 
				
			||||||
            flags=re.IGNORECASE
 | 
					            flags=re.IGNORECASE
 | 
				
			||||||
        )),
 | 
					        )),
 | 
				
			||||||
        ("title", re.compile(
 | 
					        ("title", re.compile(
 | 
				
			||||||
            r"(?P<title>.*)"
 | 
					            r"(?P<title>.*)"
 | 
				
			||||||
            r"\.(?P<extension>pdf|jpe?g|png|gif|tiff)$",
 | 
					            r"\.(?P<extension>pdf|jpe?g|png|gif|tiff?)$",
 | 
				
			||||||
            flags=re.IGNORECASE
 | 
					            flags=re.IGNORECASE
 | 
				
			||||||
        ))
 | 
					        ))
 | 
				
			||||||
    ])
 | 
					    ])
 | 
				
			||||||
@@ -397,6 +397,8 @@ class FileInfo(object):
 | 
				
			|||||||
        r = extension.lower()
 | 
					        r = extension.lower()
 | 
				
			||||||
        if r == "jpeg":
 | 
					        if r == "jpeg":
 | 
				
			||||||
            return "jpg"
 | 
					            return "jpg"
 | 
				
			||||||
 | 
					        if r == "tif":
 | 
				
			||||||
 | 
					            return "tiff"
 | 
				
			||||||
        return r
 | 
					        return r
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @classmethod
 | 
					    @classmethod
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -58,9 +58,9 @@ class TestAttributes(TestCase):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    TAGS = ("tag1", "tag2", "tag3")
 | 
					    TAGS = ("tag1", "tag2", "tag3")
 | 
				
			||||||
    EXTENSIONS = (
 | 
					    EXTENSIONS = (
 | 
				
			||||||
        "pdf", "png", "jpg", "jpeg", "gif",
 | 
					        "pdf", "png", "jpg", "jpeg", "gif", "tiff", "tif",
 | 
				
			||||||
        "PDF", "PNG", "JPG", "JPEG", "GIF",
 | 
					        "PDF", "PNG", "JPG", "JPEG", "GIF", "TIFF", "TIF",
 | 
				
			||||||
        "PdF", "PnG", "JpG", "JPeG", "GiF",
 | 
					        "PdF", "PnG", "JpG", "JPeG", "GiF", "TiFf", "TiF",
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _test_guess_attributes_from_name(self, path, sender, title, tags):
 | 
					    def _test_guess_attributes_from_name(self, path, sender, title, tags):
 | 
				
			||||||
@@ -80,6 +80,8 @@ class TestAttributes(TestCase):
 | 
				
			|||||||
            self.assertEqual(tuple([t.slug for t in file_info.tags]), tags, f)
 | 
					            self.assertEqual(tuple([t.slug for t in file_info.tags]), tags, f)
 | 
				
			||||||
            if extension.lower() == "jpeg":
 | 
					            if extension.lower() == "jpeg":
 | 
				
			||||||
                self.assertEqual(file_info.extension, "jpg", f)
 | 
					                self.assertEqual(file_info.extension, "jpg", f)
 | 
				
			||||||
 | 
					            elif extension.lower() == "tif":
 | 
				
			||||||
 | 
					                self.assertEqual(file_info.extension, "tiff", f)
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                self.assertEqual(file_info.extension, extension.lower(), f)
 | 
					                self.assertEqual(file_info.extension, extension.lower(), f)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user