Skip to content

Commit

Permalink
Releasing v1.3.4, with some normalization expansions
Browse files Browse the repository at this point in the history
  • Loading branch information
apocalyptech committed Mar 25, 2021
1 parent 7226a8e commit fade045
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
1.3.4 (UNRELEASED)
1.3.4 (2021-03-25)
------------------

**Bugfixes/Tweaks**

- Nothing Yet
- Expanded the internal "normalization" character set to handle a bunch
more Greek characters specifically, and probably a few others as well.
This is used for normalizing filenames in zip downloads, and normalizing
search strings.

1.3.3 (2020-05-28)
------------------
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ under the MIT license (see LICENSE-jQuery.txt)
Exordium License:
-------------------------------------------------------------------------------

Copyright (c) 2016-2018, Christopher J. Kucera
Copyright (c) 2016-2021, Christopher J. Kucera
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

# General information about the project.
project = 'Exordium'
copyright = '2016-2020, CJ Kucera'
copyright = '2016-2021, CJ Kucera'
author = 'CJ Kucera'

# The version info for the project you're documenting, acts as replacement for
Expand Down
16 changes: 10 additions & 6 deletions exordium/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1270,11 +1270,12 @@ class App(object):
prefixre = re.compile('^((the)\s+)?(.+)$', re.IGNORECASE)
livere = re.compile('^....[-\._]..[-\._].. - live', re.IGNORECASE)

norm_translation = str.maketrans('äáàâãåëéèêẽïíìîĩöóòôõøüúùûũůÿýỳŷỹðçřğş“”‘’', 'aaaaaaeeeeeiiiiioooooouuuuuuyyyyydcrgs""\'\'')
norm_translation = str.maketrans(
'äáàâãåάαëéèêẽηήεέïíìîĩiίιöóòôõøοόώωüúùûũůύÿýỳŷỹβçðδğφğγřκλμνπřρşσς$τξχυζ“”‘’',
'aaaaaaaaeeeeeeeeeiiiiiiiioooooooooouuuuuuuyyyyybcddgfggrklmnprrsssstxxyz""\'\'')
norm_translation_filename = str.maketrans(
'äÄáÁàÀâÂãÃåÅëËéÉèÈêÊẽẼïÏíÍìÌîÎĩĨİöÖóÓòÒôÔõÕøØüÜúÚùÙûÛũŨůŮÿŸýÝỳỲŷŶỹỸðÐçÇřŘğĞşŞ',
'aAaAaAaAaAaAeEeEeEeEeEiIiIiIiIiIIoOoOoOoOoOoOuuuUuUuUuUuUyYyYyYyYyYdDcCrRgGsS'
)
'äÄáÁàÀâÂãÃåÅάΆαΑëËéÉèÈêÊẽẼηΗήΉεΕέΈïÏíÍìÌîÎĩĨiİίΊιΙöÖóÓòÒôÔõÕøØοΟόΌώΏωΩüÜúÚùÙûÛũŨůŮύΎÿŸýÝỳỲŷŶỹỸβΒçÇðÐδΔğφΦğĞγΓřκΚλΛμΜνΝπΠřŘρΡşŞσΣς$τΤξΞχΧυΥζΖ',
'aAaAaAaAaAaAaAaAeEeEeEeEeEeEeEeEeEiIiIiIiIiIiIiIiIoOoOoOoOoOoOoOoOoOoOuuuUuUuUuUuUuUyYyYyYyYyYbBcCdDdDgfFgGgGrkKlLmMnNpPrRrRsSsSsstTxXxXyYzZ')

cover_extensions = ['.png', '.jpg', '.gif']
image_format_to_mime = {
Expand Down Expand Up @@ -1356,7 +1357,8 @@ def norm_name(name):

return name.replace('İ', 'I').lower().translate(App.norm_translation).replace(
'æ', 'ae').replace('ß', 'ss').replace('þ', 'th').replace(
'œ', 'oe').replace('&', 'and')
'œ', 'oe').replace('&', 'and').replace('θ', 'th').replace(
'ψ', 'ps')

#lower = name.lower()
#lower = lower.translate(App.norm_translation).replace(
Expand All @@ -1378,7 +1380,9 @@ def norm_filename(name):
'æ', 'ae').replace('Æ', 'Ae').replace(
'þ', 'th').replace('Þ', 'Th').replace(
'œ', 'oe').replace('Œ', 'Oe').replace(
'&', 'and').replace('ß', 'ss')
'&', 'and').replace('ß', 'ss').replace(
'Θ', 'Th').replace('θ', 'th').replace(
'Ψ', 'Ps').replace('ψ', 'ps')
name = re.sub('[ \\\/=<>]', '_', name)
name = re.sub('[\'"\[\]\(\)\?\%\$\!\.\+,:;#]', '', name)
return re.sub('[^a-zA-Z0-9_-]', '', name)
Expand Down
1 change: 1 addition & 0 deletions release.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Things to check before releasing:
apocalyptech.com docs)
* Also update the end copyright year in docs/conf.py, if that's
changed!
* Also in LICENSE.txt
* Finalized Changelog entries (update the release date!)

To build:
Expand Down

0 comments on commit fade045

Please sign in to comment.