Skip to content

Commit de1cf81

Browse files
committed
moved static into novelsave package
1 parent 1ab71d2 commit de1cf81

File tree

7 files changed

+8
-12
lines changed

7 files changed

+8
-12
lines changed

MANIFEST.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
include LICENSE
22
include *.ini *.py *.cfg *.txt
33

4-
recursive-include static *.mako *.css *.js
5-
recursive-include novelsave *.mako *.md
4+
recursive-include novelsave *.mako *.md
5+
recursive-include novelsave/static *.mako *.css *.js

novelsave/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = '0.7.4'
1+
__version__ = '0.7.5'
22
__source__ = 'https://github.com/mHaisham/novelsave'

novelsave/settings.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import mimetypes
12
from pathlib import Path
23

34
from appdirs import user_config_dir
@@ -9,7 +10,7 @@
910
# base project directory
1011
BASE_DIR = Path(__file__).resolve().parent.parent
1112

12-
STATIC_DIR = BASE_DIR / 'static'
13+
STATIC_DIR = BASE_DIR / 'novelsave/static'
1314

1415
# operating system specific configuration file
1516
# config directory is used to place logs, config, cache
@@ -29,12 +30,7 @@
2930

3031
# the following map defines how files are stored
3132
# by further subdivision into sub-folders
32-
DIVISION_RULES = {
33-
**{
34-
key: 'assets'
35-
for key in {'.jpeg', '.jpg', '.png', '.webp', '.gif'}
36-
},
37-
}
33+
DIVISION_RULES = {k: v.split('/', maxsplit=1)[0] for k, v in mimetypes.types_map.items()}
3834

3935

4036
def console_formatter(record):
File renamed without changes.
File renamed without changes.

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
setup(
77
install_requires=requirements,
8-
packages=['novelsave', 'static', 'test'],
8+
packages=find_packages(),
99
include_package_data=True,
1010
package_data={
11-
'static': ['*.mako', '*.css', '*.js'],
11+
'novelsave': ['static/*.*'],
1212
},
1313
)

0 commit comments

Comments
 (0)