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

Adjust the /q download command to allow downloading QuestPackages and QuestTemplates also from nested folders #2498

Open
4 tasks
Wolf2323 opened this issue Aug 27, 2023 · 0 comments · May be fixed by #2549
Open
4 tasks
Assignees
Labels
Feature Request New feature or request.

Comments

@Wolf2323
Copy link
Member

Wolf2323 commented Aug 27, 2023

Requirements

The strict restriction to only allow downloads from the root folders QuestPackages and QuestTemplates lead to limitations that cause prescribed repository structures, that does not fit all use-cases, especially in Archives used by the Community/multiple Users.

It is required to be able to have a prefix folder, like the user who made it and a folder what project it is, before forcing the structure into the folders QuestPackages and QuestTemplates (dont limit, that this folders could contain a folder with the same name again).
With this change it would also be more usable to provide an setup with e. g. Daily Quests, based on Templates, and Download booth with one command.

TODOs

  • Restructure the https://github.com/BetonQuest/Quest-Tutorials repository
    • Should we now first define the folders(path) and then the QuestPackage and QuestTemplate?
    • Should we delete the legacy default quest?
    • Any other suggestions?

New Command Structure

The Current Structure

/q download <gitHubNamespace> <ref> <type> <sourcePath> [targetPath] [recursive] [overwrite]

Use Cases:

Repository Layout

There are multiple layout choices that can be (independently) choosen:

  1. Whether the quest files are committed "raw" or ordered into QuestPackages (e.g. /path/package.yml vs. /path/QuestPackages/package.yml or /quest/package.yml vs. /QuestPackages/quest/package.yml)
  2. Whether the quest files are sorted into a sub-path (e.g. /path/package.yml vs. package.yml or /path/QuestPackages/quest/package.yml vs. /QuestPackages/quest/package.yml)
  3. Whether the quest files are absolute or relative packages (e.g. /path/quest/package.yml vs. /path/package.yml or /QuestPackages/quest/subquest/package.yml vs. /QuestPackages/subquest/package.yml)

Selected Packages:

  1. Download all packages
  2. Download a subset of packages (e.g. just the quest package even though there's also a tutorial package)
  3. Download a specific file (e.g. /quest/package.yml)

Target Location:

  1. Same path as in repository
  2. Specific path

Possible new structure

The New Structure (v1, does not fulfill the requirements)

/q download <gitHubProject> <gitRef> <sourcePath> [<repoPackage>] [<localPackage>] [<type>] [recursive] [overwrite]
/q download <gitHubProject> <gitRef> <sourcePath> [<repoPackage>] [<localPackage>] [<type>] [recursive] [overwrite]
/q download BetonQuest/Quest-Tutorials main Chapter_1/Structure recursive overwrite

BetonQuest/Quest-Tutorials
- Chapter_1
  - Structure
    - QuestPackages
      - tutorial
        - package.yml
  - Solution
    - QuestPackages
      - tutorial
        - package.yml
- Chapter_2
  - Structure
    - QuestPackages
      - tutorial
        - package.yml
    - QuestTemplats
      - tutorial
        - template.yml
  - Solution
    - QuestPackages
      - tutorial
        - package.yml
        - extra.yml
    - QuestTemplats
      - tutorial
        - template.yml
/q download BetonQuest/Quest-Examples main common_templates . quest3-mynpc QuestTemplates

BetonQuest/Quest-Examples
- common_templates
  - QuestTemplates
    - templates.yml
- example_quest
  - QuestPackages
    - package.yml
  - QuestTemplates
    - quest_template.yml
/q download Example/ServerQuests 1.5.2 raw recursive overwrite

Example/ServerQuests
- quest1
  - package.yml
  - sub1
    - package.yml
- quest2
  - package.yml
  - conversation
    - sebastian.yml
source: 
type: both|package|template|raw.<template|package> (default: both)

/q download <gitHubProject> <gitRef> <sourcePath> [<repoPackage>] [<localPackage>] [<type>] [recursive] [overwrite]
/q download Example/ServerQuests main one pack1 mypack [recursive] [overwrite]

/q download -r -f -- <gitHubProject> <gitRef> -f --template whatever # /-f/QuestPackages/--template/packages.yml
/q download -r -f <gitHubProject> <gitRef> <sourcePath> [<repoPackage>] [<localPackage>]

Example/ServerQuests
- one
  - QuestPackages
    - pack1
      - package.yml
    - pack2
      - package.yml
  - QuestTemplates
    - pack1
      - template.yml
    - pack2
      - template.yml
@seyfahni seyfahni added the Feature Request New feature or request. label Aug 29, 2023
@seyfahni seyfahni self-assigned this Oct 12, 2023
@seyfahni seyfahni linked a pull request Oct 16, 2023 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request.
Projects
Status: On-Hold
Development

Successfully merging a pull request may close this issue.

2 participants