Skip to content

Commit

Permalink
code: Remove unnecessary files
Browse files Browse the repository at this point in the history
  • Loading branch information
matiusz committed Feb 1, 2024
1 parent c3d8588 commit 1c83c5d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 216 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/render.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
service-id: ${{ secrets.HK_RENDER_SERVICE }}
render-token: ${{ secrets.RENDER_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
retries: 6
retries: 10
wait: 20000
- name: spiewnik111adh
uses: bounceapp/[email protected]
with:
service-id: ${{ secrets.ADH_RENDER_SERVICE }}
render-token: ${{ secrets.RENDER_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
retries: 6
retries: 10
wait: 20000
3 changes: 3 additions & 0 deletions requirements_deploy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Flask
Frozen-Flask
unidecode
22 changes: 11 additions & 11 deletions requirements.txt → requirements_full.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
aiofiles>=0.7.0
pynput>=1.7.6
PySide6>=6.2.0
Flask>=2.0.2
WTForms>=3.0.0
Frozen-Flask
Flask-WTF>=1.0.0
requests>=2.27.1
pre-commit
markdown2
rapidfuzz
aiofiles>=0.7.0
pynput>=1.7.6
PySide6>=6.2.0
Flask>=2.0.2
WTForms>=3.0.0
Frozen-Flask
Flask-WTF>=1.0.0
requests>=2.27.1
pre-commit
markdown2
rapidfuzz
unidecode
20 changes: 0 additions & 20 deletions src/obj/Songbook.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
from .Song import Song
from src.tools.loggerSetup import logging
from collections import defaultdict
from unidecode import unidecode
from src.tools import fuzz
from string import punctuation
from src.tools.dirTools import getCategoriesFromDirs, getSongFilenamesFromCatDir

logger = logging.getLogger(__name__)
Expand All @@ -16,19 +12,3 @@ def __init__(self):
for song in self.sb[cat]:
if song.category != cat:
logger.warning(f"Category mismatch for song {song.title} - category: {song.category}, folder: {cat}")

def filteredSongs(self, filter):
filtered = defaultdict(list)
for cat, songs in self.sb.items():
for song in songs:
if not filter or \
prepareSearchString(filter) in prepareSearchString(song.title) or \
fuzz.partial_ratio(prepareSearchString(filter), prepareSearchString(song.filterString)) > 95:
filtered[cat].append(song)
return filtered

def prepareSearchString(string):
string = string.lower()
string = unidecode(string)
string = string.translate(str.maketrans('', '', punctuation))
return string
162 changes: 0 additions & 162 deletions src/tools/fuzz.py

This file was deleted.

21 changes: 0 additions & 21 deletions src/tools/fuzzUtils.py

This file was deleted.

0 comments on commit 1c83c5d

Please sign in to comment.