Compare commits
10 commits
a4d2c87e0c
...
a5f7418afb
| Author | SHA1 | Date | |
|---|---|---|---|
| a5f7418afb | |||
| f8463fdd98 | |||
| aadaf820f5 | |||
| 2996affa1c | |||
| 9101117cb5 | |||
|
|
d587c0c20c | ||
|
|
18905d1080 | ||
|
|
d299ef9996 | ||
|
|
5b9e05c195 | ||
|
|
eebb0729ea |
10 changed files with 216 additions and 29 deletions
31
.github/workflows/ci.yml
vendored
Normal file
31
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
release:
|
||||
types: [published]
|
||||
check_suite:
|
||||
types: [rerequested]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-18.04
|
||||
container: debian:buster
|
||||
|
||||
steps:
|
||||
- name: install dependencies
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get --no-install-recommends -y install admesh git imagemagick jekyll make openscad python3 python3-yaml xauth xvfb python3-pip python3-setuptools
|
||||
python3 -mpip install cookiecutter
|
||||
- name: git setup
|
||||
run: |
|
||||
git config --global user.name "${GITHUB_ACTOR}"
|
||||
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: cut a cookie
|
||||
run: cookiecutter --no-input .
|
||||
- name: build within the cookie
|
||||
run: xvfb-run make V=2 -O -j$(nproc) -C mystl jekyll
|
||||
126
CODE_OF_CONDUCT.md
Normal file
126
CODE_OF_CONDUCT.md
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: 2014 Coraline Ada Ehmke
|
||||
SPDX-FileCopyrightText: 2019 Kattni Rembor for Adafruit Industries
|
||||
SPDX-FileCopyrightText: 2020 Jeff Epler for unpythonic.net
|
||||
|
||||
SPDX-License-Identifier: CC-BY-4.0
|
||||
-->
|
||||
# Unpythonic Community Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and leaders 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 or type of
|
||||
experience, education, socio-economic status, nationality, personal appearance,
|
||||
race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
We are committed to providing a friendly, safe and welcoming environment for
|
||||
all.
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Be kind and courteous to others
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Collaborating with other community members
|
||||
* 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 sexual attention or advances
|
||||
* The use of inappropriate images, including in a community member's avatar
|
||||
* The use of inappropriate language, including in a community member's nickname
|
||||
* Any spamming, flaming, baiting or other attention-stealing behavior
|
||||
* Excessive or unwelcome helping; answering outside the scope of the question
|
||||
asked
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Promoting or spreading disinformation, lies, or conspiracy theories against
|
||||
a person, group, organisation, project, or community
|
||||
* 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
|
||||
|
||||
The goal of the standards and moderation guidelines outlined here is to build
|
||||
and maintain a respectful community. We ask that you don’t just aim to be
|
||||
"technically unimpeachable", but rather try to be your best self.
|
||||
|
||||
We value many things beyond technical expertise, including collaboration and
|
||||
supporting others within our community. Providing a positive experience for
|
||||
other community members can have a much more significant impact than simply
|
||||
providing the correct answer.
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project leaders 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 leaders have the right and responsibility to remove, edit, or
|
||||
reject messages, comments, commits, code, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any community member for other behaviors that they deem
|
||||
inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Moderation
|
||||
|
||||
Instances of behaviors that violate the Unpythonic Community Code of Conduct
|
||||
may be reported by any member of the community. Community members are
|
||||
encouraged to report these situations, including situations they witness
|
||||
involving other community members.
|
||||
|
||||
You may report in the following ways:
|
||||
|
||||
In any situation, you may send an email to <jepler@gmail.com>.
|
||||
|
||||
Email and direct message reports will be kept confidential.
|
||||
|
||||
These are the steps for upholding our community’s standards of conduct.
|
||||
|
||||
1. Any member of the community may report any situation that violates the
|
||||
Unpythonic Community Code of Conduct. All reports will be reviewed and
|
||||
investigated.
|
||||
2. If the behavior is an egregious violation, the community member who
|
||||
committed the violation may be banned immediately, without warning.
|
||||
3. Otherwise, moderators will first respond to such behavior with a warning.
|
||||
4. Moderators follow a soft "three strikes" policy - the community member may
|
||||
be given another chance, if they are receptive to the warning and change their
|
||||
behavior.
|
||||
5. If the community member is unreceptive or unreasonable when warned by a
|
||||
moderator, or the warning goes unheeded, they may be banned for a first or
|
||||
second offense. Repeated offenses will result in the community member being
|
||||
banned.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct and the enforcement policies listed above apply to all
|
||||
Unpythonic Community venues. This includes but is not limited to any community
|
||||
spaces (both public and private), the entire Unpythonic Discord server, and
|
||||
Unpythonic GitHub repositories. Examples of Unpythonic Community spaces include
|
||||
but are not limited to meet-ups, audio chats on the Unpythonic Discord, or
|
||||
interaction at a conference.
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. As a community
|
||||
member, you are representing our community, and are expected to behave
|
||||
accordingly.
|
||||
|
||||
## 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>,
|
||||
and the [Rust Code of Conduct](https://www.rust-lang.org/en-US/conduct.html).
|
||||
|
||||
For other projects adopting the Unpythonic Community Code of
|
||||
Conduct, please contact the maintainers of those projects for enforcement.
|
||||
If you wish to use this code of conduct for your own project, consider
|
||||
explicitly mentioning your moderation policy or making a copy with your
|
||||
own moderation policy so as to avoid confusion.
|
||||
29
CONTRIBUTING.md
Normal file
29
CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
|
||||
SPDX-FileCopyrightText: 2020 Jeff Epler
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
-->
|
||||
|
||||
# Contributing
|
||||
Please note that this project is released with a
|
||||
[Contributor Code of Conduct](https://github.com/jepler/cookiecutter-mystl/blob/main/CODE_OF_CONDUCT.md).
|
||||
By participating in this project you agree to abide by its terms. Participation
|
||||
covers any forum used to converse about cookiecutter-mystl including unofficial and official spaces. Failure to do
|
||||
so will result in corrective actions such as time out or ban from the project.
|
||||
|
||||
## Licensing
|
||||
By contributing to this repository you are certifying that you have all necessary
|
||||
permissions to license the code under a CC0 License. You still retain the
|
||||
copyright but are granting many permissions under the CC0 License.
|
||||
|
||||
If you have an employment contract with your employer please make sure that they
|
||||
don't automatically own your work product. Make sure to get any necessary approvals
|
||||
before contributing. Another term for this contribution off-hours is moonlighting.
|
||||
|
||||
## Ways to contribute
|
||||
As cookiecutter-mystl grows, there are more and more ways to contribute. Here are some ideas:
|
||||
|
||||
* Post your own 3D printed projects using cookiecutter-mystl
|
||||
* Work on any of the reported Issues, especially those marked "help wanted"
|
||||
* Improve the templates and contribute the result back to cookiecutter-mystl
|
||||
10
README.md
10
README.md
|
|
@ -20,11 +20,5 @@ cookiecutter-mystl produces.
|
|||
|
||||
## Requests for Contributions
|
||||
|
||||
Contributions welcome! Here are some of the directions I'd like to see
|
||||
cookiecutter-mystl project grow:
|
||||
|
||||
- integrations with other hosting and CI services (gitlab, travis, etc)
|
||||
- improve lightbox & 3d viewer
|
||||
- work with other file types (.stp? FreeCAD?)
|
||||
- display & download bill of material for non 3d-printed parts
|
||||
|
||||
Contributions welcome! See the issue tracker, especially items tagged "enhancement"
|
||||
and "help wanted".
|
||||
|
|
|
|||
21
hooks/post_gen_project.py
Normal file
21
hooks/post_gen_project.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# -*- python3 -*-
|
||||
import subprocess
|
||||
|
||||
def step(args):
|
||||
try:
|
||||
subprocess.run(args, check=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
raise SystemExit(e.returncode)
|
||||
|
||||
try:
|
||||
subprocess.run(['git', 'version'], check=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print("Could not execute git - Did not create initial commit")
|
||||
raise SystemExit
|
||||
|
||||
step(["git", "init"])
|
||||
step(["git", "add", "."])
|
||||
step(["git", "commit", "-m", "initial commit, created by cookiecutter-mystl"])
|
||||
step(["git", "branch", "-m", "{{ cookiecutter.main_branch_name }}"])
|
||||
|
||||
print("Successfully made initial commit of project")
|
||||
|
|
@ -22,7 +22,8 @@ jobs:
|
|||
uses: actions/checkout@v2
|
||||
- name: build
|
||||
run: |
|
||||
xvfb-run make V=2 -O -j$(nproc) jekyll
|
||||
echo "sourceurl: https://github.com/${GITHUB_REPOSITORY}" >> _config.yml
|
||||
env JEKYLL_ENV=production xvfb-run make V=2 -O -j$(nproc) jekyll
|
||||
- if: github.event_name == 'push' && github.ref == 'refs/heads/{{ cookiecutter.main_branch_name }}'
|
||||
name: publish
|
||||
run: |
|
||||
|
|
|
|||
1
{{cookiecutter.repo_name}}/.gitignore
vendored
1
{{cookiecutter.repo_name}}/.gitignore
vendored
|
|
@ -1 +1,2 @@
|
|||
_site/
|
||||
resources/gen
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# cookiecutter.repo_name
|
||||
# {{ cookiecutter.repo_name }}
|
||||
|
||||
{{ cookiecutter.project_short_description }}
|
||||
|
||||
|
|
@ -6,8 +6,6 @@ This is a project created with [cookiecutter-mystl](https://github.com/jepler/co
|
|||
Use cookiecutter-mystl to host your own OpenSCAD and STL models!
|
||||
Have improvements to your site? Contribute them back to cookiecutter-mystl!
|
||||
|
||||
My STL
|
||||
|
||||
## Requirements
|
||||
|
||||
See .github/workflows/publish.yml for the canonical requirements.
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@
|
|||
<p>
|
||||
{% raw %}
|
||||
This 3D printable project is offered under <a href="{{ relative }}LICENSE.html">an open source license</a>.
|
||||
{% if site.sourceurl and site.sourceurl != "" %}
|
||||
The source is managed at <a href="{{ site.sourceurl }}">{{ site.sourceurl }}</a>.
|
||||
{% endif %}
|
||||
The site is built with software under <a href="{{ relative }}other-licenses.html">various open source licenses</a>.
|
||||
{% endraw %}
|
||||
Create your own MySTL site with <a href="https://github.com/jepler/cookiecutter-mystl">cookiecutter-mystl</a>.
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
# resources/gen/main has no recognized extension
|
||||
|
||||
-include resources/gen/main.stl.d
|
||||
resources/gen/main.stl: resources/main.scad
|
||||
mkdir -p $(dir resources/gen/main.stl)
|
||||
openscad -o resources/gen/main.stl.tmp.stl -d resources/gen/main.stl.d $(SCAD_FLAGS) resources/main.scad
|
||||
admesh -b resources/gen/main.stl resources/gen/main.stl.tmp.stl
|
||||
rm -f resources/gen/main.stl.tmp.stl
|
||||
default:: resources/gen/main.stl
|
||||
|
||||
|
||||
-include resources/gen/main.png.d
|
||||
resources/gen/main.png: resources/main.scad
|
||||
mkdir -p $(dir resources/gen/main.png)
|
||||
openscad -o resources/gen/main.png -d resources/gen/main.png.d $(SCAD_FLAGS) resources/main.scad
|
||||
default:: resources/gen/main.png
|
||||
|
||||
Loading…
Reference in a new issue