-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1342 from wiremod/master
workshop branch update
- Loading branch information
Showing
169 changed files
with
5,564 additions
and
714 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
language: python | ||
|
||
before_install: | ||
- pip install hererocks | ||
- hererocks env --luajit 2.0.3 --luarocks latest | ||
- source env/bin/activate | ||
|
||
install: | ||
- luarocks install luacheck | ||
|
||
script: | ||
- git diff --check $TRAVIS_COMMIT_RANGE | ||
- git diff --name-only $TRAVIS_COMMIT_RANGE | grep '\.lua$' | xargs --no-run-if-empty luacheck --std min+garrysmod+wiremod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Coding Guidelines | ||
|
||
Please see https://github.com/wiremod/wire/wiki/Coding-style for information on how code formatting is standardized in the Wiremod project. | ||
|
||
--- | ||
|
||
# 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, gender identity and expression, level of experience, 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 | ||
|
||
We do understand that participants who know one another may act in ways between them that could be considered unacceptable. It is our belief that this is not an issue so long as it is consentual. However, participants must still be concious, respectful, and considerate of third party observers, and as such we ask that participants keep unacceptable behavior minimal. | ||
|
||
### 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. 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, version 1.4, available at http://contributor-covenant.org/version/1/4. | ||
|
||
Modified by the WireTeam. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
base_url='http://wiki.garrysmod.com' | ||
|
||
detag() { | ||
printf '%s' "${1##*>}" | ||
} | ||
|
||
wget -o /dev/null -O - "$base_url"/navbar/ | | ||
sed -r ' | ||
# Split up before each closing tag | ||
s#</#\n\0#g | ||
' | | ||
sed -r ' | ||
# Remove navbarlink tags | ||
s/<a class='\''navbarlink'\'' .*>//g | ||
# Remove everything before the last tag | ||
s/.*</</ | ||
' | | ||
{ | ||
section= | ||
while read -r line; do | ||
detagged="$(detag "$line")" | ||
|
||
case "$line" in | ||
'<h2'*' »') | ||
# Parse menu headers | ||
detagged="${detagged% »}" | ||
case "$section" in | ||
Hooks|Libraries|Classes|Panels) | ||
printf ' "%s",\n' "$detagged" | ||
;; | ||
|
||
Structures|Shaders|'Lua Reference'|Global|Enumerations) | ||
: | ||
;; | ||
|
||
*) | ||
echo >&2 "unknown section '$section' for '$detagged'" | ||
;; | ||
esac | ||
;; | ||
|
||
'<a'*) | ||
# Parse menu entries | ||
case "$section" in | ||
Global) | ||
printf ' "%s",\n' "$detagged" | ||
;; | ||
|
||
Enumerations) | ||
printf '\n --- %s\n' "$detagged" | ||
echo >&2 "Retrieving enum data for $detagged" | ||
|
||
url="$base_url/page/Enums/$detagged" # TODO: use URL from the <a> tag | ||
wget "$url" -o /dev/null -O - | | ||
sed -rn 's/^<td> ('"$detagged"'_[^[:space:]]+|[A-Z][A-Z0-9_]{2,})$/ "\1",/p' | ||
;; | ||
|
||
Structures|Shaders|'Lua Reference'|Hooks|Libraries|Classes|Panels) | ||
: | ||
;; | ||
|
||
*) | ||
echo >&2 "unknown section '$section' for '$detagged'" | ||
;; | ||
esac | ||
;; | ||
|
||
'<h1>'*) | ||
section="$detagged" | ||
case "$section" in | ||
Reference) | ||
: | ||
;; | ||
|
||
*) | ||
echo >&2 "Parsing section $section" | ||
printf '\n -- %s\n' "$section" | ||
;; | ||
esac | ||
;; | ||
|
||
'<h2>'*) | ||
section="$detagged" | ||
case "$section" in | ||
Enumerations) | ||
echo >&2 "Parsing section $section" | ||
printf '\n -- %s' "$section" # No newline after this, to avoid double newlines | ||
;; | ||
esac | ||
;; | ||
|
||
'</'*|'<ul'*) | ||
# Ignore closing tags and <ul> tags | ||
: | ||
;; | ||
|
||
*) | ||
echo >&2 "Warning: Unhandled line '$line'" | ||
esac | ||
done | ||
|
||
printf '\n' | ||
} | | ||
sed -ri ' | ||
0,/BEGIN_GENERATED_CODE/ { | ||
/BEGIN_GENERATED_CODE/ { | ||
r /dev/stdin | ||
} | ||
b | ||
} | ||
/END_GENERATED_CODE/,$ b | ||
d | ||
' .luacheckrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.