Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection directory name #111

Merged
merged 16 commits into from
Apr 22, 2020
Merged

Collection directory name #111

merged 16 commits into from
Apr 22, 2020

Conversation

havatv
Copy link
Collaborator

@havatv havatv commented Apr 20, 2020

Use the pathvalidate package to sanitise collection names in order to use them as collection directory names. We want the collection names to be a part of the collection directory names because the user will see these names when looking for collection SVGs in the QGIS GUI.
Since pathvalidate is not a standard package, version 2.2.2 has been included in the ext_libs directory.

Fixes: #110

The collection directory will now be a combination of the sanitised collection name and the sanitised repository name.
Example: Animal silhouettes (Alina's Repository).

An alternative is to use a combination of the santised collection name and a hash.
Example: Animal silhouettes-33b75e8e0ac1ef736eae109d5d5de0697f4b2174.

If this PR is applied, previously installed collections will have their directories renamed, so the user may have to update QGIS projects that use/include resources from these collections.

What has been done to make the transition smoother for the users:

  • When looking up a collection that is already installed, the collection directory is renamed
  • Calling local_collection_path in rebuild_collections (repository_manager.py) - will rename already "installed" collections.

@havatv havatv merged commit 3be3cb2 into master Apr 22, 2020
@havatv havatv deleted the collection_directory_name branch April 22, 2020 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Name of the downloaded resources
1 participant