Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Use flaks instance folder
Browse files Browse the repository at this point in the history
  • Loading branch information
EpocDotFr authored Oct 27, 2022
1 parent fd25356 commit 655e29e
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
config.py
storage/logs/*.log
storage/logs/*.log.*
storage/cache
storage/webassets-cache/*
!storage/webassets-cache/.gitkeep
instance/logs/*.log
instance/logs/*.log.*
instance/cache
instance/webassets-cache/*
!instance/webassets-cache/.gitkeep
maintenance
static/js/*.min.js
static/css/*.min.css
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ we directly use JSON as the data storage format.

#### The Escapists 1

- `storage/data/1/items.json` is built by the `flask te1-extract-items-data` command by parsing the game's files (the `Data/items_*.dat` ones). It contains all items information.
- `storage/data/1/recipes.json` contains all crafting recipes of the items contained in the file above. A recipes editor (only available locally at `http://localhost:8080/recipes-editor`) is used to convert The Escapists 1 crafting recipes format (simple, unformatted, non-machine friendly text) to the Craft N' Escape one (relation to items IDs).
- `data/1/items.json` is built by the `flask te1-extract-items-data` command by parsing the game's files (the `Data/items_*.dat` ones). It contains all items information.
- `data/1/recipes.json` contains all crafting recipes of the items contained in the file above. A recipes editor (only available locally at `http://localhost:8080/recipes-editor`) is used to convert The Escapists 1 crafting recipes format (simple, unformatted, non-machine friendly text) to the Craft N' Escape one (relation to items IDs).

Items images are extracted using, huh, a brutal solution. Basically, the `flask te1-extract-items-image` command edit the game's
process memory for each existing items by assigning them in your weapon slot. A screenshot of the current weapon is then
Expand Down
10 changes: 5 additions & 5 deletions cne.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
app.config.update(
SECRET_KEY=env.str('SECRET_KEY'),
CACHE_TYPE='filesystem',
CACHE_DIR='storage/cache',
CACHE_DIR='instance/cache',
CACHE_THRESHOLD=env.int('CACHE_THRESHOLD', default=800),
ITEMS_IMAGES_DIR='static/images/items/{game_version}',
ITEMS_FILE='storage/data/{game_version}/items.json',
RECIPES_FILE='storage/data/{game_version}/recipes.json',
ITEMS_FILE='instance/data/{game_version}/items.json',
RECIPES_FILE='instance/data/{game_version}/recipes.json',
ESCAPISTS_WIKI_DOMAIN='theescapists.gamepedia.com',
COMPRESS_MIN_SIZE=1024,
)
Expand All @@ -46,13 +46,13 @@
if has_debug_toolbar_ext:
toolbar = DebugToolbarExtension(app)

assets.cache = 'storage/webassets-cache/'
assets.cache = 'instance/webassets-cache/'

assets.register('js_home', Bundle('js/common.js', 'js/home.js', filters='jsmin', output='js/home.min.js'))
assets.register('js_recipes_editor', Bundle('js/common.js', 'js/recipes_editor.js', filters='jsmin', output='js/recipes_editor.min.js'))
assets.register('css_app', Bundle('css/app.css', filters='cssutils', output='css/app.min.css'))

handler = RotatingFileHandler('storage/logs/errors.log', maxBytes=10000000, backupCount=2)
handler = RotatingFileHandler('instance/logs/errors.log', maxBytes=10000000, backupCount=2)
handler.setLevel(logging.WARNING)
formatter = logging.Formatter(fmt='%(asctime)s - %(levelname)s - %(message)s', datefmt='%d/%m/%Y %H:%M:%S')
handler.setFormatter(formatter)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 655e29e

Please sign in to comment.