Commit Graph

21 Commits

Author SHA1 Message Date
Philipp Wolfer
1506462940 Extend asciipunct tests to check for conversion of DOT LEADER 2023-10-02 11:02:49 +02:00
Laurent Monin
2f6479747d Update headers 2022-02-07 09:41:57 +01:00
Laurent Monin
14ce07756e Update Copyright headers, with the help of fix-headers.py script 2021-11-10 21:38:54 +01:00
Philipp Wolfer
d509dd83a0 PICARD-2236: Fullwidth slash is treated as directory separator
A full width slash U+FF0F, e.g. in イニシエノウタ/デボル, in combination with replace non-ascii gets turned into an ASCII slash, leading to a directory being created.
2021-09-26 11:36:57 +02:00
Philipp Wolfer
8ce7fdc850 Removed left-over Python 2 Unicode string modifiers 2021-06-19 14:14:40 +02:00
Undearius
df85263762 PICARD-1800: Simplify Unicode 'Bullet' to ASCII 'Hyphen-minus' 2020-03-29 12:45:15 +02:00
Laurent Monin
6b5e852a60 Run fix-header on *.py 2020-02-24 10:25:09 +01:00
Laurent Monin
3f25bda3c8 Fix a bunch of flake8 warnings, mostly cosmetic changes 2020-02-21 21:43:40 +01:00
Philipp Wolfer
0855862c8c PICARD-321: Support backslash in filenames on non-Windows OS
With this change backslashes can be used in filenames on systems other than Windows. Only if Windows compatibility is activated backslashes will be replaced as before.
2019-12-14 01:03:46 +01:00
Philipp Wolfer
dc0ec84401 isort: Consistently use two blank lines after import 2019-04-04 08:35:23 +02:00
Wieland Hoffmann
e624aa121c Make PicardTestCase the parent class of all tests
This brings the faketagger and, more importantly, settings reset to all of them.
2018-10-23 17:32:50 +02:00
Philipp Wolfer
2fbe8f97a3 PICARD-803: ASCII replacements can cause folder creation 2018-08-27 23:01:57 +02:00
Laurent Monin
5329e3592a Clean up and sort imports using isort
Add a config for isort (https://github.com/timothycrosley/isort)
Run isort -rc . and make import style consistent across files
Add a note about `isort` in CONTRIBUTING.md
2018-08-22 08:51:25 +02:00
Laurent Monin
e2ed569233 Python3 doesn't need to import print_function
This is now a standard feature and no longer needs to be imported from __future__.

https://www.python.org/dev/peps/pep-3105/
2018-02-05 14:43:55 +01:00
Sophist
b94680e09c Rename variables redefining builtins - test_textencoding.py 2017-05-18 11:30:38 +01:00
Sophist
bf4c08e004 Remove unneeded imports in test files 2017-05-17 11:02:24 +01:00
Ville Skyttä
2070d9f008 Python 3.6 invalid escape sequence deprecation fixes
https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
2017-02-28 15:29:23 +02:00
Laurent Monin
a12ee509aa import print_function 2015-08-25 11:16:05 +02:00
Sophist
e406a554bc Address various comments by Philipp Wolfer ...
... based on actual knowledge of how characters are used in practice.

low quotation mark -> normal quotation mark rather than comma
oi should be gha -> gh rather than oi
ideographic punctuation, multiplication / division and middle dot are not punctuation
2014-04-14 11:57:35 +01:00
Sophist
110441f91e Address comments by 96187 ...
... whose local knowledge of how characters are actually used identified
more appropriate characters to map to.

soft hyphen -> nothing (since it is invisible)
multiplication -> x rather than * (visually closer)
remove duplicate oe
2014-04-14 11:57:34 +01:00
Sophist
323d12892c Improve unicode to ascii ...
for punctuation, normalization (merging similar looking characters into
the most common one), accents, and full conversion to ascii.

Functions and tests moved into separate files.

Although more comprehensive, the code should run faster because it
eliminates several loops (inc. a loop with two unicodedata references).

This is intended to form the basis of future PRs to:
a. Clean up (simplify) the file naming code
b. Provide script function(s) for cleaning individual tags / file name
parts
c. Add support for translation / transliteration plugins (which I think
make more sense than being included in Picard itself).
d. Support for converting Tags to ISO-8859-1 rather than ascii (since
that is what is supported by ID3 at least)
e. Possible additional options for allowing / preventing normalization,
possible reorganisation of options to centralise all encoding settings
onto one page rather than metadata, tags and file naming pages at
present (to be discussed).
2014-04-14 11:57:31 +01:00