Initial commit
Signed-off-by: Louis Hollingworth <louis@hollingworth.nl>
This commit is contained in:
commit
4362601b5a
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
/target
|
||||
.DS_Store
|
132
CODE_OF_CONDUCT.md
Normal file
132
CODE_OF_CONDUCT.md
Normal file
|
@ -0,0 +1,132 @@
|
|||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, caste, color, religion, or sexual
|
||||
identity and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the overall
|
||||
community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or advances of
|
||||
any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email address,
|
||||
without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders 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, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
[me(at)ludoviko.ch](mailto:me@ludoviko.ch).
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series of
|
||||
actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or permanent
|
||||
ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within the
|
||||
community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.1, available at
|
||||
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
||||
|
||||
Community Impact Guidelines were inspired by
|
||||
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
||||
[https://www.contributor-covenant.org/translations][translations].
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
||||
[Mozilla CoC]: https://github.com/mozilla/diversity
|
||||
[FAQ]: https://www.contributor-covenant.org/faq
|
||||
[translations]: https://www.contributor-covenant.org/translations
|
119
CONTRIBUTING.md
Normal file
119
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,119 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: 2023 Louis Hollingworth <louis@hollingworth.nl>
|
||||
|
||||
SPDX-License-Identifier: CC0-1.0
|
||||
-->
|
||||
|
||||
# How to contribute
|
||||
|
||||
<!-- TODO: Change <PROJECT_NAME> -->
|
||||
|
||||
Contributions to Diru are highly encouraged and desired. Below are some guidelines that will help make the process as smooth as possible.
|
||||
|
||||
## Getting Started
|
||||
|
||||
- Make sure you have a [Ludo Git account](https://git.ludoviko.ch/user/sign_up)
|
||||
- Submit a new issue, assuming one does not already exist.
|
||||
- Clearly describe the issue including steps to reproduce when it is a bug.
|
||||
- Make sure you fill in the earliest version that you know has the issue.
|
||||
- Fork the repository on GitHub
|
||||
|
||||
## Suggesting Enhancements
|
||||
|
||||
- When submitting an issue for an enhancement, please be as clear as possible about why you think the enhancement is needed and what the benefit of
|
||||
it would be.
|
||||
|
||||
## Making Changes
|
||||
|
||||
- From your fork of the repository, create a topic branch where work on your change will take place.
|
||||
- To quickly create a topic branch based on main; `git checkout -b my_contribution main`. Please avoid working directly on the `main` branche.
|
||||
- Make commits of logical units.
|
||||
- Check for unnecessary whitespace with `git diff --check` before committing.
|
||||
- Please follow the prevailing code conventions in the repository. Differences in style make the code harder to understand for everyone.
|
||||
- Make sure you have added all the necessary unit tests for your changes.
|
||||
- Run _all_ unit tests to assure nothing else was accidentally broken.
|
||||
- Make sure your commit messages are in the proper format.
|
||||
- The first line of the commit message should be a short description around 50 characters in length and be prefixed with the GitHub issue it refers to with parentheses surrounding that. If the GitHub issue is #25, you should have `(#25)` prefixed to the message.
|
||||
- If the commit is about documentation, the message should be prefixed with `(doc)`.
|
||||
- If it is a trivial commit or one of formatting/spaces fixes, it should be prefixed with `(maint)`.
|
||||
- After the subject, skip one line and fill out a body if the subject line is not informative enough.
|
||||
- Sometimes you will find that even a tiny code change has a commit body that needs to be very detailed and make take more time to do than the actual change itself!
|
||||
- The body:
|
||||
- Should wrap at `72` characters.
|
||||
- Explains more fully the reason(s) for the change and contrasts with previous behavior.
|
||||
- Uses present tense. "Fix" versus "Fixed".
|
||||
- Contains a sign off statement to confirm that you agree to the [DCO](#DCO)
|
||||
|
||||
A good example of a commit message is as follows:
|
||||
|
||||
```text
|
||||
(#123) Add more cowbell to Get-Something
|
||||
|
||||
The functionality of Get-Something would be greatly improved if there was a little
|
||||
more 'pizzazz' added to it. I propose a cowbell. Adding more cowbell has been
|
||||
shown in studies to both increase one's mojo, and cement one's status
|
||||
as a rock legend.
|
||||
|
||||
Signed-off-by: Your Name <your@email.address>
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
We are not infallible and as such the documentation may need corrections. Please feel free to contribute changes to improve the documentation as described in the [Making Changes](#making-changes) and [Submitting Changes](#submitting-changes) sections.
|
||||
|
||||
## Submitting Changes
|
||||
|
||||
- Push your changes to a topic branch in your fork of the repository.
|
||||
- Submit a pull request to the main repository.
|
||||
- Once the pull request has been reviewed and accepted, it will be merged with the master branch.
|
||||
- Celebrate
|
||||
|
||||
## DCO
|
||||
|
||||
```text
|
||||
Developer Certificate of Origin
|
||||
Version 1.1
|
||||
|
||||
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
|
||||
1 Letterman Drive
|
||||
Suite D4700
|
||||
San Francisco, CA, 94129
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
|
||||
|
||||
Developer's Certificate of Origin 1.1
|
||||
|
||||
By making a contribution to this project, I certify that:
|
||||
|
||||
(a) The contribution was created in whole or in part by me and I
|
||||
have the right to submit it under the open source license
|
||||
indicated in the file; or
|
||||
|
||||
(b) The contribution is based upon previous work that, to the best
|
||||
of my knowledge, is covered under an appropriate open source
|
||||
license and I have the right under that license to submit that
|
||||
work with modifications, whether created in whole or in part
|
||||
by me, under the same open source license (unless I am
|
||||
permitted to submit under a different license), as indicated
|
||||
in the file; or
|
||||
|
||||
(c) The contribution was provided directly to me by some other
|
||||
person who certified (a), (b) or (c) and I have not modified
|
||||
it.
|
||||
|
||||
(d) I understand and agree that this project and the contribution
|
||||
are public and that a record of the contribution (including all
|
||||
personal information I submit with it, including my sign-off) is
|
||||
maintained indefinitely and may be redistributed consistent with
|
||||
this project or the open source license(s) involved.
|
||||
```
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- [General GitHub documentation](https://help.github.com/)
|
||||
- [GitHub forking documentation](https://guides.github.com/activities/forking/)
|
||||
- [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
|
||||
- [GitHub Flow guide](https://guides.github.com/introduction/flow/)
|
||||
- [GitHub's guide to contributing to open source projects](https://guides.github.com/activities/contributing-to-open-source/)
|
3040
Cargo.lock
generated
Normal file
3040
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
15
Cargo.toml
Normal file
15
Cargo.toml
Normal file
|
@ -0,0 +1,15 @@
|
|||
[package]
|
||||
name = "diru-matrix"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0.75"
|
||||
deepl = "0.4.4"
|
||||
dotenvy = "0.15.7"
|
||||
matrix-sdk = { version = "0.6.2", features = ["anyhow", "markdown", "rustls-tls"] }
|
||||
tokio = { version = "1.34.0", features = ["macros", "rt-multi-thread", "full"] }
|
||||
tracing = "0.1.40"
|
||||
tracing-subscriber = "0.3.18"
|
21
LICENSE
Normal file
21
LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2023 Ludoviko
|
||||
|
||||
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.
|
4
src/main.rs
Normal file
4
src/main.rs
Normal file
|
@ -0,0 +1,4 @@
|
|||
fn main() {
|
||||
tracing_subscriber::fmt::init();
|
||||
println!("Hello, world!");
|
||||
}
|
Loading…
Reference in a new issue