Skip to content

Commit

Permalink
Merge pull request #182 from aopell/develop
Browse files Browse the repository at this point in the history
Version 6.2
  • Loading branch information
aopell authored May 24, 2020
2 parents 2f523b7 + cd5b88c commit 4120564
Show file tree
Hide file tree
Showing 52 changed files with 88,520 additions and 88,005 deletions.
97 changes: 97 additions & 0 deletions .build/build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import argparse
import json
import os
import shutil
import copy
import errno

class BuildRules:
def __init__(self, config):
self.excluded_files = config["excluded_files"] or []

EXCLUDED_FILES = [".build", ".git", ".github", ".vscode", "SchoologyPlus.zip", "webstore-description.txt"]

chrome_rules = BuildRules({
"excluded_files": []
})

firefox_rules = BuildRules({
"excluded_files": [
"lib/js/analytics.js"
]
})

targets = {
"chrome": chrome_rules,
"firefox": firefox_rules,
"edge": chrome_rules
}

parser = argparse.ArgumentParser(description="Schoology Plus build script")
parser.add_argument("target", choices=list(targets.keys()) + ["all"], help="Which target to build")
args = parser.parse_args()

os.chdir(os.path.dirname(__file__) + "/..")

with open("manifest.json", "r") as manifestFile:
global manifest
manifest = json.loads(manifestFile.read())
manifestFile.close()

print("+ Starting Schoology Plus build script")
print(f"Building version {manifest['version']}")

def removePathFromManifest(man, path, traversal=""):
if type(man) == list:
try:
man.remove(path)
print(f"Removed {path} from manifest: {traversal}")
except ValueError:
i = 0
for item in man:
removePathFromManifest(item, path, f"{traversal}[{i}]")
i += 1
elif type(man) == dict:
for key in man.keys():
removePathFromManifest(man[key], path, f"{traversal}.{key}")

def copyFileOrDirectory(src, dst):
try:
shutil.copytree(src, dst)
except OSError as exc:
if exc.errno == errno.ENOTDIR:
shutil.copy(src, dst)
else: raise

for target in targets:
if args.target != "all" and args.target != target:
continue

print(f'+ Building target "{target}"')
rules = targets[target]

try:
os.makedirs(f".build/{target}")
except FileExistsError:
pass

for path in os.listdir():
if path not in EXCLUDED_FILES and path not in rules.excluded_files:
copyFileOrDirectory(path, f".build/{target}/{path}")

targetManifest = copy.deepcopy(manifest)

for path in rules.excluded_files:
removePathFromManifest(targetManifest, path)

with open(f".build/{target}/manifest.json", "w") as manifestFile:
manifestFile.write(json.dumps(targetManifest, indent=4))
manifestFile.close()

print(f"Wrote modified .build/{target}/manifest.json")

shutil.make_archive(f".build/SchoologyPlus-v{manifest['version']}-{target}", "zip", f".build/{target}")
print(f"Successfully created SchoologyPlus-v{manifest['version']}-{target}.zip")

shutil.rmtree(f".build/{target}")
print("Cleaned up directories")
48 changes: 24 additions & 24 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
---
name: Bug report
about: 'Report a bug you found in Schoology Plus. PLEASE NOTE: Only use issues for
bug reports, submit feature requests through our Discord server only please.'
title: ''
labels: Bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
---
name: Bug report
about: 'Report a bug you found in Schoology Plus. PLEASE NOTE: Only use issues for
bug reports, submit feature requests through our Discord server only please.'
title: ''
labels: Bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,5 @@ typings/
# VSCode data
.vscode

SchoologyPlus.zip
SchoologyPlus.zip
SchoologyPlus*.zip
152 changes: 76 additions & 76 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,76 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [[email protected]](mailto:[email protected]). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ Pull requests are welcomed! If you would like to add a new feature, the best way
There are two ways you can report bugs you find in Schoology Plus:

1. Create a detailed [GitHub issue](https://github.com/aopell/SchoologyPlus/issues/new) describing the bug. Please provide detailed **steps to reproduce** and **screenshots** of the issue if applicable.
2. Send a message in the #bugs-and-features channel of our [Discord server](https://aopell.github.io/SchoologyPlus/discord.html).
2. Send a message in the #bugs-and-features channel of our [Discord server](https://discord.schoologypl.us).

## Feature Requests
To avoid the problem of issue spam, we'd appreciate if you kept all feature requests in the `#bugs-and-features` channel of our [Discord server](https://aopell.github.io/SchoologyPlus/discord.html). Please **do not create GitHub issues for feature requests**.
To avoid the problem of issue spam, we'd appreciate if you kept all feature requests in the `#bugs-and-features` channel of our [Discord server](https://discord.schoologypl.us). Please **do not create GitHub issues for feature requests**.

## Documentation
If you would like to help write documentation for Schoology Plus, please contact us in either the `#support` or `#bugs-and-features` channel of our [Discord server](https://aopell.github.io/SchoologyPlus/discord.html). We really appreciate all documentation contributions!
If you would like to help write documentation for Schoology Plus, please contact us in either the `#support` or `#bugs-and-features` channel of our [Discord server](https://discord.schoologypl.us). We really appreciate all documentation contributions!

## Content
If you would like to submit content for Schoology Plus (including, but not limited to: course icons, themes, and other assets) please contact us in either the `#support` or `#bugs-and-features` channel of our [Discord server](https://aopell.github.io/SchoologyPlus/discord.html).
If you would like to submit content for Schoology Plus (including, but not limited to: course icons, themes, and other assets) please contact us in either the `#support` or `#bugs-and-features` channel of our [Discord server](https://discord.schoologypl.us).

## Other Contributions
If you can think of another way of contributing to Schoology Plus that isn't listed here, please contact us in our [Discord server](https://aopell.github.io/SchoologyPlus/discord.html)!
If you can think of another way of contributing to Schoology Plus that isn't listed here, please contact us in our [Discord server](https://discord.schoologypl.us)!
42 changes: 21 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
MIT License

Copyright (c) 2017-2020 Aaron Opell and Glen Husman

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License
Copyright (c) 2017-2020 Aaron Opell and Glen Husman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion PRIVACY.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ Schoology Plus is not affiliated with Schoology Inc. or the Los Angeles Unified

## Contact

The developers of Schoology Plus can be contacted by email at [[email protected]](mailto:[email protected]) or through Discord at [this link](https://aopell.me/SchoologyPlus/discord).
The developers of Schoology Plus can be contacted by email at [[email protected]](mailto:[email protected]) or through Discord at [this link](https://discord.schoologypl.us).
Loading

0 comments on commit 4120564

Please sign in to comment.