├── .github ├── FUNDING.yml └── workflows │ ├── buildDev.yml │ └── buildRelease.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── LICENSE.md ├── README.md ├── assets ├── banner.png └── deepsea_wide_v2.png ├── requirements.txt └── src ├── fs.py ├── gh.py ├── settings.json └── start.py /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: teamneptune 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /.github/workflows/buildDev.yml: -------------------------------------------------------------------------------- 1 | name: BuildDev 2 | 3 | on: 4 | push: 5 | branches: 6 | - dev 7 | 8 | defaults: 9 | run: 10 | working-directory: src 11 | 12 | jobs: 13 | build: 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | - uses: actions/checkout@v4 18 | 19 | - id: set-version 20 | run: | 21 | version=$(python -c 'import sys, json; f=open("./settings.json");print(json.loads(f.read())["releaseVersion"])') 22 | echo "version=$version" >> $GITHUB_OUTPUT 23 | 24 | - name: Set up hub 25 | run: | 26 | sudo apt install hub -y 27 | 28 | - name: Set up Python 29 | uses: actions/setup-python@v5 30 | with: 31 | python-version: '3.x' 32 | 33 | - name: Install dependencies 34 | run: | 35 | if [ -f ../requirements.txt ]; then pip3 install -r ../requirements.txt; fi 36 | 37 | - name: Create DeepSea Packages 38 | env: 39 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 40 | run: | 41 | python ./start.py -gt="$GITHUB_TOKEN" 42 | 43 | - name: Create DevRelease 44 | run: | 45 | set -x 46 | assets=() 47 | for asset in ./*.zip; do 48 | assets+=("-a" "$asset") 49 | done 50 | hub release create "${assets[@]}" -d -m "DevRelease v${{ steps.set-version.outputs.version }}" "v${{ steps.set-version.outputs.version }}" 51 | env: 52 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows/buildRelease.yml: -------------------------------------------------------------------------------- 1 | name: BuildRelease 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | defaults: 9 | run: 10 | working-directory: src 11 | 12 | jobs: 13 | build: 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | - uses: actions/checkout@v4 18 | 19 | - id: set-version 20 | run: | 21 | version=$(python -c 'import sys, json; f=open("./settings.json");print(json.loads(f.read())["releaseVersion"])') 22 | echo "version=$version" >> $GITHUB_OUTPUT 23 | 24 | - name: Set up hub 25 | run: | 26 | sudo apt install hub -y 27 | 28 | - name: Set up Python 29 | uses: actions/setup-python@v5 30 | with: 31 | python-version: '3.x' 32 | 33 | - name: Install dependencies 34 | run: | 35 | if [ -f ../requirements.txt ]; then pip3 install -r ../requirements.txt; fi 36 | 37 | - name: Create DeepSea Packages 38 | env: 39 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 40 | run: | 41 | python ./start.py -gt="$GITHUB_TOKEN" 42 | 43 | - name: Create Release 44 | run: | 45 | set -x 46 | assets=() 47 | for asset in ./*.zip; do 48 | assets+=("-a" "$asset") 49 | done 50 | hub release create "${assets[@]}" -d -m "Release v${{ steps.set-version.outputs.version }}" "v${{ steps.set-version.outputs.version }}" 51 | env: 52 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | src/base/* 2 | src/tmp/* 3 | src/sd/* 4 | src/*.zip 5 | 6 | # Byte-compiled / optimized / DLL files 7 | __pycache__/ 8 | *.py[cod] 9 | *$py.class 10 | 11 | # C extensions 12 | *.so 13 | 14 | # Distribution / packaging 15 | .Python 16 | build/ 17 | develop-eggs/ 18 | dist/ 19 | downloads/ 20 | eggs/ 21 | .eggs/ 22 | lib/ 23 | lib64/ 24 | parts/ 25 | sdist/ 26 | var/ 27 | wheels/ 28 | pip-wheel-metadata/ 29 | share/python-wheels/ 30 | *.egg-info/ 31 | .installed.cfg 32 | *.egg 33 | MANIFEST 34 | 35 | # PyInstaller 36 | # Usually these files are written by a python script from a template 37 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 38 | *.manifest 39 | *.spec 40 | 41 | # Installer logs 42 | pip-log.txt 43 | pip-delete-this-directory.txt 44 | 45 | # Unit test / coverage reports 46 | htmlcov/ 47 | .tox/ 48 | .nox/ 49 | .coverage 50 | .coverage.* 51 | .cache 52 | nosetests.xml 53 | coverage.xml 54 | *.cover 55 | *.py,cover 56 | .hypothesis/ 57 | .pytest_cache/ 58 | cover/ 59 | 60 | # Translations 61 | *.mo 62 | *.pot 63 | 64 | # Django stuff: 65 | *.log 66 | local_settings.py 67 | db.sqlite3 68 | db.sqlite3-journal 69 | 70 | # Flask stuff: 71 | instance/ 72 | .webassets-cache 73 | 74 | # Scrapy stuff: 75 | .scrapy 76 | 77 | # Sphinx documentation 78 | docs/_build/ 79 | 80 | # PyBuilder 81 | target/ 82 | 83 | # Jupyter Notebook 84 | .ipynb_checkpoints 85 | 86 | # IPython 87 | profile_default/ 88 | ipython_config.py 89 | 90 | # pyenv 91 | # For a library or package, you might want to ignore these files since the code is 92 | # intended to run in multiple environments; otherwise, check them in: 93 | # .python-version 94 | 95 | # pipenv 96 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 97 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 98 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 99 | # install all needed dependencies. 100 | #Pipfile.lock 101 | 102 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 103 | __pypackages__/ 104 | 105 | # Celery stuff 106 | celerybeat-schedule 107 | celerybeat.pid 108 | 109 | # SageMath parsed files 110 | *.sage.py 111 | 112 | # Environments 113 | .env 114 | .venv 115 | env/ 116 | venv/ 117 | ENV/ 118 | env.bak/ 119 | venv.bak/ 120 | 121 | # Spyder project settings 122 | .spyderproject 123 | .spyproject 124 | 125 | # Rope project settings 126 | .ropeproject 127 | 128 | # mkdocs documentation 129 | /site 130 | 131 | # mypy 132 | .mypy_cache/ 133 | .dmypy.json 134 | dmypy.json 135 | 136 | # Pyre type checker 137 | .pyre/ 138 | 139 | # pytype static type analyzer 140 | .pytype/ 141 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at [Discord](https://discord.gg/VkaRjYN). All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | ## creative commons 2 | 3 | # Attribution-NonCommercial-NoDerivatives 4.0 International 4 | 5 | Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. 6 | 7 | ### Using Creative Commons Public Licenses 8 | 9 | Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. 10 | 11 | * __Considerations for licensors:__ Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. [More considerations for licensors](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors). 12 | 13 | * __Considerations for the public:__ By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. [More considerations for the public](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees). 14 | 15 | ## Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License 16 | 17 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 18 | 19 | ### Section 1 – Definitions. 20 | 21 | a. __Adapted Material__ means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. 22 | 23 | b. __Copyright and Similar Rights__ means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. 24 | 25 | e. __Effective Technological Measures__ means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. 26 | 27 | f. __Exceptions and Limitations__ means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. 28 | 29 | h. __Licensed Material__ means the artistic or literary work, database, or other material to which the Licensor applied this Public License. 30 | 31 | i. __Licensed Rights__ means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. 32 | 33 | h. __Licensor__ means the individual(s) or entity(ies) granting rights under this Public License. 34 | 35 | i. __NonCommercial__ means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange. 36 | 37 | j. __Share__ means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. 38 | 39 | k. __Sui Generis Database Rights__ means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. 40 | 41 | l. __You__ means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. 42 | 43 | ### Section 2 – Scope. 44 | 45 | a. ___License grant.___ 46 | 47 | 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: 48 | 49 | A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and 50 | 51 | B. produce and reproduce, but not Share, Adapted Material for NonCommercial purposes only. 52 | 53 | 2. __Exceptions and Limitations.__ For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 54 | 55 | 3. __Term.__ The term of this Public License is specified in Section 6(a). 56 | 57 | 4. __Media and formats; technical modifications allowed.__ The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. 58 | 59 | 5. __Downstream recipients.__ 60 | 61 | A. __Offer from the Licensor – Licensed Material.__ Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. 62 | 63 | B. __No downstream restrictions.__ You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 64 | 65 | 6. __No endorsement.__ Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). 66 | 67 | b. ___Other rights.___ 68 | 69 | 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 70 | 71 | 2. Patent and trademark rights are not licensed under this Public License. 72 | 73 | 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes. 74 | 75 | ### Section 3 – License Conditions. 76 | 77 | Your exercise of the Licensed Rights is expressly made subject to the following conditions. 78 | 79 | a. ___Attribution.___ 80 | 81 | 1. If You Share the Licensed Material, You must: 82 | 83 | A. retain the following if it is supplied by the Licensor with the Licensed Material: 84 | 85 | i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); 86 | 87 | ii. a copyright notice; 88 | 89 | iii. a notice that refers to this Public License; 90 | 91 | iv. a notice that refers to the disclaimer of warranties; 92 | 93 | v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; 94 | 95 | B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and 96 | 97 | C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 98 | 99 | For the avoidance of doubt, You do not have permission under this Public License to Share Adapted Material. 100 | 101 | 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 102 | 103 | 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. 104 | 105 | ### Section 4 – Sui Generis Database Rights. 106 | 107 | Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: 108 | 109 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only and provided You do not Share Adapted Material; 110 | 111 | b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and 112 | 113 | c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. 114 | 115 | For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. 116 | 117 | ### Section 5 – Disclaimer of Warranties and Limitation of Liability. 118 | 119 | a. __Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.__ 120 | 121 | b. __To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.__ 122 | 123 | c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. 124 | 125 | ### Section 6 – Term and Termination. 126 | 127 | a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. 128 | 129 | b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 130 | 131 | 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 132 | 133 | 2. upon express reinstatement by the Licensor. 134 | 135 | For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. 136 | 137 | c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. 138 | 139 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. 140 | 141 | ### Section 7 – Other Terms and Conditions. 142 | 143 | a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. 144 | 145 | b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. 146 | 147 | ### Section 8 – Interpretation. 148 | 149 | a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. 150 | 151 | b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. 152 | 153 | c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. 154 | 155 | d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. 156 | 157 | > Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at [creativecommons.org/policies](http://creativecommons.org/policies), Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. 158 | > 159 | > Creative Commons may be contacted at creativecommons.org -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 |

3 | The new All-in-One CFW package for the Nintendo Switch.
4 | 5 | Discord 6 | 7 | GitHub All Releases 8 | GitHub Workflow Status 9 |

10 | 11 | --- 12 | 13 | ## Features 14 | 15 | - Background FTP server for filetransfers 16 | - Install NSP & XCI files from Harddrive, WiFi or wired through PC, Smartphone, etc 17 | - Over & Underclocking 18 | - Update OFW & CFW through homebrew 19 | - Find new homebrew through the Appstore 20 | - Savegame management 21 | - Cheating in games (please don't cheat online) 22 | - Emulate Amiibo 23 | - Use all kinds of 3rd party controllers 24 | - Lan play (like Hamachi for your Switch) 25 | - Tesla overlay to control all those features (press L1+DpadDown+RightStick) 26 | 27 | 28 | **Please check out our [wiki](https://github.com/Team-Neptune/DeepSea/wiki) to learn about the best features** 29 | 30 | 31 | ## How to use 32 | Follow this guide to hack your Switch: https://switch.homebrew.guide 33 | 34 | Download the latest release and put it on your SD Card
35 | Send the Hekate payload to your Switch in RCM mode and launch the CFW 36 | 37 | 38 | ## Featuring 39 | 40 | | Software | Advanced Package| Normal Package | Minimal Package | 41 | | -------- | :-------------: | :------------: | :------------: | 42 | | [AIO-switch-updater](https://github.com/HamletDuFromage/aio-switch-updater) | ✅ | ✅ | | 43 | | [Atmosphère](https://github.com/Atmosphere-NX/Atmosphere) | ✅ | ✅ | ✅ | 44 | | [DeepSea Assets](https://github.com/Team-Neptune/DeepSea-Assets) | ✅ | ✅ | ✅ | 45 | | [DeepSea Cleaner](https://github.com/Team-Neptune/DeepSea-Cleaner) | ✅ | ✅ | | 46 | | [DeepSea CPR](https://github.com/Team-Neptune/CommonProblemResolver) | ✅ | ✅ | | 47 | | [DeepSea Toolbox](https://github.com/Team-Neptune/DeepSea-Toolbox) | ✅ | ✅ | | 48 | | [EdiZon-SE](https://github.com/tomvita/EdiZon-SE) | ✅ | ✅ | | 49 | | [EdiZon-Overlay](https://github.com/proferabg/EdiZon-Overlay) | ✅ | ✅ | | 50 | | [Emuiibo](https://github.com/XorTroll/emuiibo) | ✅ | ✅ | | 51 | | [Hekate](https://github.com/CTCaer/hekate) | ✅ | ✅ | ✅ | 52 | | [Homebrew App Store](https://gitlab.com/4TU/hb-appstore) | ✅ | ✅ | ✅ | 53 | | [JKSV](https://github.com/J-D-K/JKSV) | ✅ | ✅ | | 54 | | [ldn_mitm](https://github.com/spacemeowx2/ldn_mitm) | ✅ | | | 55 | | [MissionControl](https://github.com/ndeadly/MissionControl) | ✅ | | | 56 | | [nx-ovlloader](https://github.com/WerWolv/nx-ovlloader) | ✅ | ✅ | | 57 | | [NX-Shell](https://github.com/joel16/NX-Shell) | ✅ | | | 58 | | [ovlSysmodules](https://github.com/WerWolv/ovl-sysmodules) | ✅ | ✅ | | 59 | | [Status Monitor Overlay](https://github.com/masagrator/Status-Monitor-Overlay) | ✅ | | 60 | | [sys-clk](https://github.com/retronx-team/sys-clk) | ✅ | | 61 | | [sys-con](https://github.com/cathery/sys-con) | ✅ | | | 62 | | [sys-ftpd](https://github.com/cathery/sys-ftpd) | ✅ | ✅ | | 63 | | [TegraExplorer](https://github.com/joel16/NX-Shell) | ✅ | | | 64 | | [Tesla-Menu](https://github.com/WerWolv/Tesla-Menu) | ✅ | ✅ | | 65 | | [Goldleaf](https://github.com/XorTroll/Goldleaf) | ✅ | ✅ | | 66 | 67 | 68 | 69 | ## Credits 70 | * Thanks to all the previous members of Team AtlasNX for laying the groundwork for DeepSea. 71 | * And a huge thanks to all the awesome homebrew developers! 72 | -------------------------------------------------------------------------------- /assets/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-Neptune/DeepSea/3bc47331ff91a5014666a6781ab2b4bc35a10478/assets/banner.png -------------------------------------------------------------------------------- /assets/deepsea_wide_v2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-Neptune/DeepSea/3bc47331ff91a5014666a6781ab2b4bc35a10478/assets/deepsea_wide_v2.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | PyGithub -------------------------------------------------------------------------------- /src/fs.py: -------------------------------------------------------------------------------- 1 | import shutil, os, logging, re, zipfile, glob 2 | from pathlib import Path 3 | 4 | class FS(): 5 | def __init__(self): 6 | shutil.rmtree("./base", ignore_errors=True) 7 | shutil.rmtree("./menv", ignore_errors=True) 8 | shutil.rmtree("./sd", ignore_errors=True) 9 | for elements in glob.glob(f"./*.zip"): 10 | os.remove(elements) 11 | 12 | def createSDEnv(self): 13 | shutil.rmtree("./sd", ignore_errors=True) 14 | Path("./sd").mkdir(parents=True, exist_ok=True) 15 | 16 | def createModuleEnv(self, module): 17 | shutil.rmtree("./menv", ignore_errors=True) 18 | Path("./menv").mkdir(parents=True, exist_ok=True) 19 | shutil.copytree(f"./base/{module['repo']}", f"./menv/", dirs_exist_ok=True) 20 | 21 | def finishModule(self): 22 | self.__copyToSD() 23 | shutil.rmtree("./menv", ignore_errors=True) 24 | 25 | def executeStep(self, module, step): 26 | if step["name"] == "extract": 27 | self.__extract(step["arguments"][0]) 28 | 29 | if step["name"] == "create_dir": 30 | self.__createDir(step["arguments"][0]) 31 | 32 | if step["name"] == "create_file": 33 | self.__createFile(step["arguments"][0], step["arguments"][1]) 34 | 35 | if step["name"] == "replace_content": 36 | self.__replaceFileContent(step["arguments"][0], step["arguments"][1], step["arguments"][2]) 37 | 38 | if step["name"] == "delete": 39 | self.__delete(step["arguments"][0]) 40 | 41 | if step["name"] == "copy": 42 | self.__copy(step["arguments"][0], step["arguments"][1]) 43 | 44 | if step["name"] == "move": 45 | self.__copy(step["arguments"][0], step["arguments"][1]) 46 | self.__delete(step["arguments"][0]) 47 | 48 | 49 | 50 | def __extract(self, source): 51 | path = f"./menv/" 52 | for filename in os.listdir(path): 53 | if re.search(source, filename): 54 | assetPath = f"./menv/{filename}" 55 | with zipfile.ZipFile(assetPath, 'r') as zip_ref: 56 | zip_ref.extractall(path) 57 | self.__delete(filename) 58 | 59 | def __delete(self, source): 60 | if not os.path.isdir(f"./menv/{source}"): 61 | if os.path.exists(f"./menv/{source}"): 62 | os.remove(f"./menv/{source}") 63 | else: 64 | shutil.rmtree(f"./menv/{source}", ignore_errors=True) 65 | 66 | def __copy(self, source, dest): 67 | for elements in glob.glob(f"./menv/{source}"): 68 | if not os.path.isdir(elements): 69 | if os.path.exists(elements): 70 | shutil.copy(f"{elements}", f"./menv/{dest}") 71 | break 72 | else: 73 | shutil.copytree(f"{elements}", f"./menv/{dest}", dirs_exist_ok=True) 74 | break 75 | 76 | def __createDir(self, source): 77 | Path(f"./menv/{source}").mkdir(parents=True, exist_ok=True) 78 | 79 | def __createFile(self, source, content): 80 | with open(f"./menv/{source}", "w") as f: 81 | f.write(content) 82 | 83 | def __replaceFileContent(self, source, search, replace): 84 | fin = open(f"./menv/{source}", "rt") 85 | data = fin.read() 86 | data = data.replace(search, replace) 87 | fin.close() 88 | fin = open(f"./menv/{source}", "wt") 89 | fin.write(data) 90 | fin.close() 91 | 92 | def __copyToSD(self): 93 | shutil.copytree("./menv", "./sd/", dirs_exist_ok=True) 94 | 95 | 96 | -------------------------------------------------------------------------------- /src/gh.py: -------------------------------------------------------------------------------- 1 | 2 | import pathlib 3 | from github import Github 4 | import urllib.request 5 | import re 6 | import logging 7 | 8 | class GH(): 9 | def __init__(self, ghToken): 10 | self.token = ghToken 11 | self.github = Github(self.token) 12 | 13 | def downloadReleaseAssets(self, module): 14 | try: 15 | ghRepo = self.github.get_repo(module["repo"]) 16 | except: 17 | logging.exception(f"Unable to get: {module['repo']}") 18 | return 19 | 20 | releases = ghRepo.get_releases() 21 | if releases.totalCount == 0: 22 | logging.warning(f"No available release for: {module['repo']}") 23 | return 24 | ghLatestRelease = releases[0] 25 | 26 | for pattern in module["regex"]: 27 | for asset in ghLatestRelease.get_assets(): 28 | if re.search(pattern, asset.name): 29 | logging.info(f"[{module['repo']}] Downloading: {asset.name}") 30 | fpath = f"./base/{module['repo']}/" 31 | pathlib.Path(fpath).mkdir(parents=True, exist_ok=True) 32 | urllib.request.urlretrieve(asset.browser_download_url, f"{fpath}{asset.name}") 33 | return True -------------------------------------------------------------------------------- /src/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "releaseVersion": "4.13.0", 3 | "packages": [ 4 | { 5 | "name": "minimal", 6 | "active": true, 7 | "modules": [ 8 | "atmosphere", 9 | "hekate", 10 | "deepseaassets", 11 | "hbappstore" 12 | ] 13 | }, 14 | { 15 | "name": "normal", 16 | "active": true, 17 | "modules": [ 18 | "atmosphere", 19 | "hekate", 20 | "deepseaassets", 21 | "hbappstore", 22 | "deepseatoolbox", 23 | "aioupdater", 24 | "edizon", 25 | "edizon-ovl", 26 | "emuiibo", 27 | "jksv", 28 | "goldleaf", 29 | "sysftpd", 30 | "nxovlloader", 31 | "ovlsysmodules", 32 | "teslamenu", 33 | "deepseacpr" 34 | ] 35 | }, 36 | { 37 | "name": "advanced", 38 | "active": true, 39 | "modules": [ 40 | "atmosphere", 41 | "hekate", 42 | "deepseaassets", 43 | "hbappstore", 44 | "deepseatoolbox", 45 | "aioupdater", 46 | "edizon", 47 | "edizon-ovl", 48 | "emuiibo", 49 | "jksv", 50 | "goldleaf", 51 | "sysclk", 52 | "syscon", 53 | "sysftpd", 54 | "nxovlloader", 55 | "ovlsysmodules", 56 | "teslamenu", 57 | "statusmonitoroverlay", 58 | "deepseacpr", 59 | "tegraexplorer", 60 | "nxshell", 61 | "missioncontrol" 62 | ] 63 | } 64 | ], 65 | "moduleList": { 66 | "atmosphere": { 67 | "repo": "Atmosphere-NX/Atmosphere", 68 | "regex": [ 69 | ".*atmosphere.*\\.zip" 70 | ], 71 | "steps": [ 72 | { 73 | "name": "extract", 74 | "arguments": [ 75 | ".*atmosphere.*\\.zip" 76 | ] 77 | }, 78 | { 79 | "name": "delete", 80 | "arguments": [ 81 | "switch/reboot_to_payload.nro" 82 | ] 83 | }, 84 | { 85 | "name": "create_dir", 86 | "arguments": [ 87 | "atmosphere/contents" 88 | ] 89 | }, 90 | { 91 | "name": "copy", 92 | "arguments": [ 93 | "atmosphere/config_templates/system_settings.ini", 94 | "atmosphere/config/system_settings.ini" 95 | ] 96 | }, 97 | { 98 | "name": "replace_content", 99 | "arguments": [ 100 | "atmosphere/config/system_settings.ini", 101 | "; dmnt_cheats_enabled_by_default = u8!0x1", 102 | "dmnt_cheats_enabled_by_default = u8!0x0" 103 | ] 104 | } 105 | ] 106 | }, 107 | "hekate": { 108 | "repo": "CTCaer/hekate", 109 | "regex": [ 110 | ".*hekate.*\\.zip" 111 | ], 112 | "steps": [ 113 | { 114 | "name": "extract", 115 | "arguments": [".*hekate.*\\.zip"] 116 | }, 117 | { 118 | "name": "copy", 119 | "arguments": ["bootloader/hekate_*", "bootloader/update.bin"] 120 | }, 121 | { 122 | "name": "createDir", 123 | "arguments": ["atmosphere"] 124 | }, 125 | { 126 | "name": "copy", 127 | "arguments": ["bootloader/hekate_*", "atmosphere/reboot_payload.bin"] 128 | } 129 | ] 130 | }, 131 | "deepseaassets": { 132 | "repo": "Team-Neptune/DeepSea-Assets", 133 | "regex": [ 134 | ".*DeepSea-Assets.*\\.zip" 135 | ], 136 | "steps": [ 137 | { 138 | "name": "extract", 139 | "arguments": [ 140 | ".*DeepSea-Assets.*\\.zip" 141 | ] 142 | } 143 | ] 144 | }, 145 | "hbappstore": { 146 | "repo": "fortheusers/hb-appstore", 147 | "regex": [".*switch-extracttosd.*\\.zip"], 148 | "steps": [ 149 | { 150 | "name": "extract", 151 | "arguments": [ 152 | ".*switch-extracttosd.*\\.zip" 153 | ] 154 | } 155 | ] 156 | }, 157 | "deepseatoolbox": { 158 | "repo": "Team-Neptune/DeepSea-Toolbox", 159 | "regex": [".*\\.nro"], 160 | "steps": [ 161 | { 162 | "name": "create_dir", 163 | "arguments": ["switch/DeepSea-Toolbox"] 164 | }, 165 | { 166 | "name": "move", 167 | "arguments": ["DeepSeaToolbox.nro", "switch/DeepSea-Toolbox/DeepSeaToolbox.nro"] 168 | } 169 | ] 170 | }, 171 | "deepseacleaner": { 172 | "repo": "Team-Neptune/DeepSea-Cleaner", 173 | "regex": [".*DeepSea-Cleaner.*\\.zip"], 174 | "steps": [ 175 | { 176 | "name": "extract", 177 | "arguments": [".*DeepSea-Cleaner.*\\.zip"] 178 | } 179 | ] 180 | }, 181 | "aioupdater": { 182 | "repo": "HamletDuFromage/aio-switch-updater", 183 | "regex": [".*aio-switch-updater.*\\.zip"], 184 | "steps": [ 185 | { 186 | "name": "extract", 187 | "arguments": [".*aio-switch-updater.*\\.zip"] 188 | } 189 | ] 190 | }, 191 | "edizon": { 192 | "repo": "tomvita/EdiZon-SE", 193 | "regex": [".*EdiZon.*\\.zip"], 194 | "steps": [ 195 | { 196 | "name": "extract", 197 | "arguments": [".*EdiZon.*\\.zip"] 198 | }, 199 | { 200 | "name": "delete", 201 | "arguments": ["switch/breeze"] 202 | } 203 | ] 204 | }, 205 | "edizon-ovl": { 206 | "repo": "proferabg/EdiZon-Overlay", 207 | "regex": [".*EdiZon-Overlay.*\\.zip"], 208 | "steps": [ 209 | { 210 | "name": "extract", 211 | "arguments": [".*EdiZon-Overlay.*\\.zip"] 212 | } 213 | ] 214 | }, 215 | "emuiibo": { 216 | "repo": "XorTroll/emuiibo", 217 | "regex": [".*emuiibo.*\\.zip"], 218 | "steps": [ 219 | { 220 | "name": "extract", 221 | "arguments": [".*emuiibo.*\\.zip"] 222 | }, 223 | { 224 | "name": "delete", 225 | "arguments": ["SdOut/atmosphere/contents/0100000000000352/flags/boot2.flag"] 226 | }, 227 | { 228 | "name": "move", 229 | "arguments": ["SdOut/atmosphere", "atmosphere"] 230 | }, 231 | { 232 | "name": "move", 233 | "arguments": ["SdOut/emuiibo", "emuiibo"] 234 | }, 235 | { 236 | "name": "move", 237 | "arguments": ["SdOut/switch", "switch"] 238 | }, 239 | { 240 | "name": "delete", 241 | "arguments": ["SdOut"] 242 | } 243 | ] 244 | }, 245 | "jksv": { 246 | "repo": "J-D-K/JKSV", 247 | "regex": [".*\\.nro"], 248 | "steps": [ 249 | { 250 | "name": "create_dir", 251 | "arguments": ["switch/jksv"] 252 | }, 253 | { 254 | "name": "move", 255 | "arguments": ["JKSV.nro", "switch/jksv"] 256 | } 257 | ] 258 | }, 259 | "goldleaf": { 260 | "repo": "XorTroll/Goldleaf", 261 | "regex": ["Goldleaf.nro"], 262 | "steps": [ 263 | { 264 | "name": "create_dir", 265 | "arguments": ["switch/Goldleaf"] 266 | }, 267 | { 268 | "name": "move", 269 | "arguments": ["Goldleaf.nro", "switch/Goldleaf/Goldleaf.nro"] 270 | } 271 | ] 272 | }, 273 | "sysclk": { 274 | "repo": "retronx-team/sys-clk", 275 | "regex": [".*sys-clk.*\\.zip"], 276 | "steps": [ 277 | { 278 | "name": "extract", 279 | "arguments": [".*sys-clk.*\\.zip"] 280 | }, 281 | { 282 | "name": "create_dir", 283 | "arguments": ["switch/sys-clk-manager"] 284 | }, 285 | { 286 | "name": "move", 287 | "arguments": ["switch/sys-clk-manager.nro", "switch/sys-clk-manager/sys-clk-manager.nro"] 288 | }, 289 | { 290 | "name": "delete", 291 | "arguments": ["README.md"] 292 | }, 293 | { 294 | "name": "delete", 295 | "arguments": ["atmosphere/contents/00FF0000636C6BFF/flags/boot2.flag"] 296 | }, 297 | { 298 | "name": "create_file", 299 | "arguments": ["atmosphere/contents/00FF0000636C6BFF/toolbox.json", "{\"name\": \"sys-clk\",\"tid\": \"00FF0000636C6BFF\",\"requires_reboot\": true}"] 300 | } 301 | ] 302 | }, 303 | "syscon": { 304 | "repo": "cathery/sys-con", 305 | "regex": [".*sys-con.*\\.zip"], 306 | "steps": [ 307 | { 308 | "name": "extract", 309 | "arguments": [".*sys-con.*\\.zip"] 310 | }, 311 | { 312 | "name": "delete", 313 | "arguments": ["atmosphere/contents/690000000000000D/flags/boot2.flag"] 314 | } 315 | ] 316 | }, 317 | "sysftpd": { 318 | "repo": "cathery/sys-ftpd", 319 | "regex": [".*sys-ftpd.*\\.zip"], 320 | "steps": [ 321 | { 322 | "name": "extract", 323 | "arguments": [".*sys-ftpd.*\\.zip"] 324 | }, 325 | { 326 | "name": "delete", 327 | "arguments": ["atmosphere/contents/420000000000000E/flags/boot2.flag"] 328 | }, 329 | { 330 | "name": "replace_content", 331 | "arguments": [ 332 | "config/sys-ftpd/config.ini", 333 | "user:=", 334 | "user:=deepsea" 335 | ] 336 | }, 337 | { 338 | "name": "replace_content", 339 | "arguments": [ 340 | "config/sys-ftpd/config.ini", 341 | "password:=", 342 | "password:=secretpass" 343 | ] 344 | } 345 | ] 346 | }, 347 | "ldn_mitm": { 348 | "repo": "spacemeowx2/ldn_mitm", 349 | "regex": [".*ldn_mitm.*\\.zip"], 350 | "steps": [ 351 | { 352 | "name": "extract", 353 | "arguments": [".*ldn_mitm.*\\.zip"] 354 | }, 355 | { 356 | "name": "delete", 357 | "arguments": ["atmosphere/contents/4200000000000010/flags/boot2.flag"] 358 | }, 359 | { 360 | "name": "create_file", 361 | "arguments": ["atmosphere/contents/4200000000000010/toolbox.json", "{\"name\": \"ldn_mitm\",\"tid\": \"4200000000000010\",\"requires_reboot\": true}"] 362 | } 363 | ] 364 | }, 365 | "nxovlloader": { 366 | "repo": "WerWolv/nx-ovlloader", 367 | "regex": [".*nx-ovlloader.*\\.zip"], 368 | "steps": [ 369 | { 370 | "name": "extract", 371 | "arguments": [".*nx-ovlloader.*\\.zip"] 372 | } 373 | ] 374 | }, 375 | "ovlsysmodules": { 376 | "repo": "WerWolv/ovl-sysmodules", 377 | "regex": [".*ovlSysmodules.*\\.ovl"], 378 | "steps": [ 379 | { 380 | "name": "create_dir", 381 | "arguments": ["switch/.overlays"] 382 | }, 383 | { 384 | "name": "move", 385 | "arguments": ["ovlSysmodules.ovl", "switch/.overlays/ovlSysmodules.ovl"] 386 | } 387 | ] 388 | }, 389 | "teslamenu": { 390 | "repo": "hax4dazy/Tesla-Menu", 391 | "regex": [".*ovlmenu.*\\.zip"], 392 | "steps": [ 393 | { 394 | "name": "extract", 395 | "arguments": [".*ovlmenu.*\\.zip"] 396 | } 397 | ] 398 | }, 399 | "statusmonitoroverlay": { 400 | "repo": "masagrator/Status-Monitor-Overlay", 401 | "regex": [".*Status-Monitor-Overlay.*\\.zip"], 402 | "steps": [ 403 | { 404 | "name": "extract", 405 | "arguments": [".*Status-Monitor-Overlay.*\\.zip"] 406 | } 407 | ] 408 | }, 409 | "deepseacpr": { 410 | "repo": "Team-Neptune/CommonProblemResolver", 411 | "regex": [".*\\.bin"], 412 | "steps": [ 413 | { 414 | "name": "create_dir", 415 | "arguments": ["bootloader/payloads"] 416 | }, 417 | { 418 | "name": "move", 419 | "arguments": ["CommonProblemResolver.bin", "bootloader/payloads/CommonProblemResolver.bin"] 420 | } 421 | ] 422 | }, 423 | "tegraexplorer": { 424 | "repo": "suchmememanyskill/TegraExplorer", 425 | "regex": [".*\\.bin"], 426 | "steps": [ 427 | { 428 | "name": "create_dir", 429 | "arguments": ["bootloader/payloads"] 430 | }, 431 | { 432 | "name": "move", 433 | "arguments": ["TegraExplorer.bin", "bootloader/payloads/TegraExplorer.bin"] 434 | } 435 | ] 436 | }, 437 | "nxshell": { 438 | "repo": "joel16/NX-Shell", 439 | "regex": [".*NX-Shell.*\\.nro"], 440 | "steps": [ 441 | { 442 | "name": "create_dir", 443 | "arguments": ["switch/NX-Shell"] 444 | }, 445 | { 446 | "name": "move", 447 | "arguments": ["NX-Shell.nro", "switch/NX-Shell/NX-Shell.nro"] 448 | } 449 | ] 450 | }, 451 | "missioncontrol": { 452 | "repo": "ndeadly/MissionControl", 453 | "regex": [".*MissionControl.*\\.zip"], 454 | "steps": [ 455 | { 456 | "name": "extract", 457 | "arguments": [".*MissionControl.*\\.zip"] 458 | }, 459 | { 460 | "name": "delete", 461 | "arguments": ["atmosphere/contents/010000000000bd00/flags/boot2.flag"] 462 | } 463 | ] 464 | } 465 | } 466 | } 467 | -------------------------------------------------------------------------------- /src/start.py: -------------------------------------------------------------------------------- 1 | import logging, json, argparse, shutil 2 | from gh import GH 3 | from fs import FS 4 | logging.basicConfig(format='[%(asctime)s] %(message)s', datefmt='%H:%M:%S') 5 | logging.getLogger().setLevel(logging.INFO) 6 | 7 | if __name__ == '__main__': 8 | 9 | parser = argparse.ArgumentParser(description="Team Neptune's DeepSea build script.") 10 | requiredNamed = parser.add_argument_group('Options required to build a release candidate') 11 | requiredNamed.add_argument('-gt', '--githubToken', help='Github Token', required=True) 12 | args = parser.parse_args() 13 | 14 | sdcard = FS() 15 | github = GH(args.githubToken) 16 | 17 | with open('./settings.json', 'r') as f: 18 | settings = json.load(f) 19 | 20 | neededModules = [] 21 | for package in settings["packages"]: 22 | if package["active"]: 23 | for module in package["modules"]: 24 | if module not in neededModules: 25 | neededModules.append(module) 26 | 27 | 28 | for i in neededModules: 29 | module = settings["moduleList"][i] 30 | github.downloadReleaseAssets(module) 31 | 32 | 33 | for package in settings["packages"]: 34 | if package["active"]: 35 | logging.info(f"[{package['name']}] Creating package") 36 | sdcard.createSDEnv() 37 | 38 | for i in package["modules"]: 39 | module = settings["moduleList"][i] 40 | logging.info(f"[{package['name']}][{module['repo']}] Creating module env") 41 | sdcard.createModuleEnv(module) 42 | for step in module["steps"]: 43 | logging.info(f"[{package['name']}][{module['repo']}] Executing step: {step['name']}") 44 | sdcard.executeStep(module, step) 45 | 46 | logging.info(f"[{package['name']}][{module['repo']}] Moving MENV to SD") 47 | sdcard.finishModule() 48 | 49 | logging.info(f"[{package['name']}] All modules processed.") 50 | logging.info(f"[{package['name']}] Creating ZIP") 51 | shutil.make_archive(f"deepsea-{package['name']}_v{settings['releaseVersion']}", 'zip', "./sd") 52 | 53 | 54 | --------------------------------------------------------------------------------