summaryrefslogtreecommitdiff
path: root/.local/share/Anki2/addons21/anki_reworked/utils/css_files.py
diff options
context:
space:
mode:
authorThanosApollo <[email protected]>2022-09-01 07:41:39 +0300
committerThanosApollo <[email protected]>2022-09-01 07:41:39 +0300
commit0c89df9be987008e55c1b336489c41290653434b (patch)
tree73425d852d363acdd6c9297a97616b23f9311bd4 /.local/share/Anki2/addons21/anki_reworked/utils/css_files.py
parenta6d1ec012952c5e955676af22732cd177d1f3abf (diff)
Remove anki addons
Diffstat (limited to '.local/share/Anki2/addons21/anki_reworked/utils/css_files.py')
-rw-r--r--.local/share/Anki2/addons21/anki_reworked/utils/css_files.py37
1 files changed, 0 insertions, 37 deletions
diff --git a/.local/share/Anki2/addons21/anki_reworked/utils/css_files.py b/.local/share/Anki2/addons21/anki_reworked/utils/css_files.py
deleted file mode 100644
index 0b88564..0000000
--- a/.local/share/Anki2/addons21/anki_reworked/utils/css_files.py
+++ /dev/null
@@ -1,37 +0,0 @@
-import os
-from aqt import mw
-
-mw.addonManager.setWebExports(__name__, r"files/.*\.(css|svg|gif|png)|user_files/.*\.(css|svg|gif|png)")
-addon_package = mw.addonManager.addonFromModule(__name__)
-
-this_script_dir = os.path.join(os.path.dirname(__file__), "..")
-files_dir = os.path.join(this_script_dir, 'files')
-user_files_dir = os.path.join(this_script_dir, 'user_files')
-css_files_dir = {
- 'BottomBar': f"/_addons/{addon_package}/files/BottomBar.css",
- 'CardLayout': f"/_addons/{addon_package}/files/CardLayout.css",
- 'DeckBrowser': f"/_addons/{addon_package}/files/DeckBrowser.css",
- 'Editor': f"/_addons/{addon_package}/files/Editor.css",
- 'global': f"/_addons/{addon_package}/files/global.css",
- 'legacy': f"/_addons/{addon_package}/files/legacy.css",
- 'Overview': f"/_addons/{addon_package}/files/Overview.css",
- 'QAbout': os.path.join(files_dir, 'QAbout.css'),
- 'QAddCards': os.path.join(files_dir, 'QAddCards.css'),
- 'QAddonsDialog': os.path.join(files_dir, 'QAddonsDialog.css'),
- 'QBrowser': os.path.join(files_dir, 'QBrowser.css'),
- 'QFilteredDeckConfigDialog': os.path.join(files_dir, 'QFilteredDeckConfigDialog.css'),
- 'QEditCurrent': os.path.join(files_dir, 'QEditCurrent.css'),
- 'QNewDeckStats': os.path.join(files_dir, 'QNewDeckStats.css'),
- 'QPreferences': os.path.join(files_dir, 'QPreferences.css'),
- 'Reviewer': f"/_addons/{addon_package}/files/Reviewer.css",
- 'ReviewerBottomBar': f"/_addons/{addon_package}/files/ReviewerBottomBar.css",
- 'TopToolbar': f"/_addons/{addon_package}/files/TopToolbar.css",
-}
-# Replace pathing for user customised styled files
-for file in os.listdir(user_files_dir):
- file = file.replace(".css", "")
- if css_files_dir.get(file, "") != "":
- if file.startswith("Q"):
- css_files_dir[file] = os.path.join(user_files_dir, file+'.css')
- else:
- css_files_dir[file] = f"/_addons/{addon_package}/user_files/{file}.css"