Skip to content

Commit

Permalink
Merge branch 'master-old'
Browse files Browse the repository at this point in the history
  • Loading branch information
evandrocoan committed Aug 2, 2024
2 parents bf9ae61 + b7addd4 commit a79b765
Show file tree
Hide file tree
Showing 584 changed files with 138,431 additions and 154 deletions.
141 changes: 1 addition & 140 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,143 +4,4 @@
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# IPython Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# dotenv
.env

# virtualenv
venv/
ENV/

# Spyder project settings
.spyderproject

# Rope project settings
.ropeproject
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.idea/
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml

# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml

# Gradle:
.idea/gradle.xml
.idea/libraries

# Mongo Explorer plugin:
.idea/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Project specific stuff
crowd_anki/thirdparty
crowd_anki/meta.json
crowd_anki/user_files/*
!crowd_anki/user_files/README.md

.vscode
.pylintrc
CrowdAnkiInstalled
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ operate and put them into the `crowd_anki/dist` directory.
pointing to `crowd_anki` directory (**you should not** name the symlink `crowd_anki` though, see
[#62](https://github.com/Stvad/CrowdAnki/issues/62)).

Install the latest version of pipenv: https://stackoverflow.com/questions/73662432/pipenv-no-such-option-requirements-in-latest-version
python3 -m pipenv install --upgrade
edit ./Pipfile to use the same python version as your pipenv is using by removing the python version `[requires] python_version = "3.7"`.
rmdir "D:\User\Documents\Anki2\addons21\CrowdAnkiInstalled" && mklink /J "D:\User\Documents\Anki2\addons21\CrowdAnkiInstalled" "D:\User\Documents\Anki2\addons21\CrowdAnki\crowd_anki"

At this point if you start Anki - it'd be using your development version of CrowdAnki.
If you made some changes to the plugin while Anki is running and want to test them - you need to
restart Anki, as plugins are loaded on Anki startup.
Expand Down
3 changes: 0 additions & 3 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,3 @@ dulwich = "*"
pygtrie = "*"
cached-property = "*"
PyYAML = "*"

[requires]
python_version = "3.7"
2 changes: 1 addition & 1 deletion crowd_anki/anki/hook_vendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def setup_exporter_hook(self):

def setup_snapshot_hooks(self):
snapshot_handler = ArchiverVendor(self.window, self.config).snapshot_on_sync
self.hook_manager.hook('profileLoaded', snapshot_handler)
# self.hook_manager.hook('profileLoaded', snapshot_handler)
self.hook_manager.hook('unloadProfile', snapshot_handler)

def setup_add_config_hook(self):
Expand Down
8 changes: 4 additions & 4 deletions crowd_anki/anki/overrides/change_model_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ def rebuild_template_map(self, key=None, attr=None):
map_widget = QWidget()
map_widget_layout = QGridLayout()
combos = []
targets = [entity['name'] for entity in dst] + [_("Nothing")]
targets = [entity['name'] for entity in dst] + ["Nothing"]
indices = {}
for i, entity in enumerate(src):
map_widget_layout.addWidget(QLabel(_("Change %s to:") % entity['name']), i, 0)
map_widget_layout.addWidget(QLabel("Change %s to:" % entity['name']), i, 0)
combo_box = QComboBox()
combo_box.addItems(targets)
idx = min(i, len(targets) - 1)
Expand Down Expand Up @@ -160,10 +160,10 @@ def accept(self):
field_map = self.get_field_map()
templates_map = self.get_template_map()
if any(True for template in list(templates_map.values()) if template is None) and \
not aqt.utils.askUser(_(
not aqt.utils.askUser(
"Any cards mapped to nothing will be deleted. "
"If a note has no remaining cards, it will be lost. "
"Are you sure you want to continue?")):
"Are you sure you want to continue?"):
return

self.collection.models.change(self.old_model, self.note_id_list, self.targetModel, field_map, templates_map)
Expand Down
Loading

0 comments on commit a79b765

Please # to comment.