Skip to content

Commit 903d42b

Browse files
committed
documentation
1 parent 4ce22d0 commit 903d42b

File tree

5 files changed

+232
-3
lines changed

5 files changed

+232
-3
lines changed

CODE_OF_CONDUCT.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
We, as contributors and maintainers of the "Convert JavaScript To Python" project, pledge to make participation in our community a safe, respectful, and 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.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
- Using welcoming and inclusive language
12+
- Being respectful of differing viewpoints and experiences
13+
- Gracefully accepting constructive criticism
14+
- Focusing on what is best for the community
15+
- Showing empathy toward other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
- Trolling, insulting/derogatory comments, and personal or political attacks
21+
- Public or private harassment
22+
- Publishing others' private information, such as physical or electronic addresses, without explicit permission
23+
- Other conduct that could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
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.
28+
29+
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 with this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies both within the project's online community spaces, such as GitHub repositories and issue trackers, and outside of these spaces when representing the project or its community.
34+
35+
## Enforcement
36+
37+
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 promptly and fairly.
38+
39+
Project maintainers are obligated to respect the privacy and security of the reporter of any incident.
40+
41+
## Enforcement Guidelines
42+
43+
Project maintainers will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
44+
45+
- **Correction:** Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
46+
- **Consequence:** A private, written warning from project maintainers, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
47+
48+
- **Warning:** Community Impact: A violation through a single incident or series of actions.
49+
- **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. 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.
50+
51+
- **Temporary Ban:** Community Impact: A serious violation of community standards, including sustained inappropriate behavior.
52+
- **Consequence:** A temporary ban from any sort of interaction or public communication with the project or community for a specified period. 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.
53+
54+
- **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.
55+
- **Consequence:** A permanent ban from any sort of public interaction within the project community.
56+
57+
## Attribution
58+
59+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html), version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
60+
61+
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq).

CONTRIBUTING.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Contributing to Convert JavaScript To Python
2+
3+
Thank you for considering contributing to the "Convert JavaScript To Python" project! By contributing, you help improve this tool for everyone. Please take a moment to read through the guidelines below before getting started.
4+
5+
## How to Contribute
6+
7+
Here are the steps to contribute to this project:
8+
9+
1. Fork the Repository: Click the "Fork" button at the top-right of the [GitHub repository](https://github.com/PB2204/Convert-JavaScript-To-Python) to create your copy of the project.
10+
11+
2. Clone the Repository: Clone your forked repository to your local machine using the following command (replace `<your-username>` with your GitHub username):
12+
13+
```bash
14+
git clone https://github.com/<your-username>/Convert-JavaScript-To-Python.git
15+
```
16+
17+
3. Create a Branch: Create a new branch for your changes with a descriptive name. For example, if you're working on a bug fix, you might create a branch like `fix-issue-123`:
18+
19+
```bash
20+
git checkout -b fix-issue-123
21+
```
22+
23+
4. Make Changes: Make your desired code changes, improvements, or additions.
24+
25+
5. Commit Changes: Commit your changes with a meaningful commit message:
26+
27+
```bash
28+
git commit -m "Fix issue #123: Description of the fix"
29+
```
30+
31+
6. Push Changes: Push your changes to your GitHub repository:
32+
33+
```bash
34+
git push origin fix-issue-123
35+
```
36+
37+
7. Create a Pull Request: Go to the [original repository](https://github.com/PB2204/Convert-JavaScript-To-Python) and click the "New Pull Request" button. Compare your changes and create the pull request.
38+
39+
## Code of Conduct
40+
41+
Please review our [CODE_OF_CONDUCT.md](https://github.com/PB2204/Convert-JavaScript-To-Python/CODE_OF_CONDUCT.md) for guidelines on appropriate behavior within this community.
42+
43+
## Issues
44+
45+
If you find any issues, bugs, or have questions, please [open an issue](https://github.com/PB2204/Convert-JavaScript-To-Python/issues) on our GitHub page.
46+
47+
## Contact
48+
49+
For further assistance or inquiries, you can contact the developer:
50+
51+
- Developer Name: [Pabitra Banerjee](https://pabitrabanerjee.me)
52+
53+
- GitHub: [PB2204](https://github.com/PB2204)
54+
55+
Thank you for contributing to "Convert JavaScript To Python!" Your contributions are valuable and appreciated.

LEARN.md

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Learn about Convert JavaScript To Python
2+
3+
Welcome to the "Convert JavaScript To Python" project! This tool allows you to convert JavaScript code to Python and use it in your projects. Below, you'll find helpful information on how to get started, how to use the CLI command, project structure, and more.
4+
5+
## Table of Contents
6+
7+
- [Installation](#installation)
8+
- [Usage](#usage)
9+
- [CLI Command](#cli-command)
10+
- [Project Structure](#project-structure)
11+
- [Limitations](#limitations)
12+
- [License](#license)
13+
- [Contributing](#contributing)
14+
- [Code of Conduct](#code-of-conduct)
15+
- [Learn More](#learn-more)
16+
- [Issues](#issues)
17+
- [Contact](#contact)
18+
19+
## Installation
20+
21+
To get started with "Convert JavaScript To Python," follow these installation steps:
22+
23+
```bash
24+
npm install convert-js2py
25+
```
26+
27+
## Usage
28+
29+
You can use the package as a Node.js module to convert JavaScript code to Python. Here's a code example:
30+
31+
```javascript
32+
// Import the convertJsToPython function from your library
33+
const { translateJSToPython } = require('convert-js2py');
34+
35+
// Define your JavaScript code that you want to convert
36+
const jsCode = `
37+
console.log("Hello, World!");
38+
`;
39+
40+
// Use the convertJsToPython function to convert the JavaScript code to Python
41+
const pythonCode = translateJSToPython(jsCode);
42+
43+
// Print the generated Python code
44+
console.log(pythonCode);
45+
```
46+
47+
This example demonstrates how to convert JavaScript to Python and see the translated code in the terminal.
48+
49+
## CLI Command
50+
51+
The CLI command for "Convert JavaScript To Python" is as follows:
52+
53+
```bash
54+
npm install convert-js2py
55+
56+
# Convert a JavaScript file to Python
57+
js-to-python your-js-file.js output
58+
```
59+
60+
In this command, `your-js-file.js` is the input JavaScript file, and `output` is the folder where the `output.py` file will be written.
61+
62+
## Project Structure
63+
64+
The project structure for "Convert JavaScript To Python" is organized as follows:
65+
66+
```bash
67+
js-to-python-converter/
68+
├── bin/
69+
│ └── js-to-python.js
70+
├── lib/
71+
│ ├── converter.js
72+
│ └── index.js
73+
├── package.json
74+
├── LICENSE
75+
├── CODE_OF_CONDUCT.md
76+
├── LEARN.md
77+
├── CONTRIBUTING.md
78+
└── README.md
79+
```
80+
81+
## Limitations
82+
83+
Please note that the tool may have limitations, such as difficulty handling complex JavaScript code. The team is actively working on addressing these limitations.
84+
85+
## License
86+
87+
This project is licensed under the MIT License. For more details, see the [LICENSE](https://github.com/PB2204/Convert-JavaScript-To-Python/LICENSE) file.
88+
89+
## Contributing
90+
91+
Contributions to this project are welcome! Review the [CONTRIBUTING.md](https://github.com/PB2204/Convert-JavaScript-To-Python/CONTRIBUTING.md) for guidelines on contributing.
92+
93+
## Code of Conduct
94+
95+
Please follow our [CODE_OF_CONDUCT.md](https://github.com/PB2204/Convert-JavaScript-To-Python/CODE_OF_CONDUCT.md) to maintain a respectful and inclusive environment.
96+
97+
## Learn More
98+
99+
Explore additional resources, tutorials, and documentation related to this project in the [LEARN.md](https://github.com/PB2204/Convert-JavaScript-To-Python/LEARN.md) file.
100+
101+
## Issues
102+
103+
If you encounter issues, bugs, or have questions, please [open an issue](https://github.com/PB2204/Convert-JavaScript-To-Python/issues) on our GitHub page.
104+
105+
## Contact
106+
107+
For further information or inquiries about this project, contact the developer:
108+
109+
- Developer Name: [Pabitra Banerjee](https://pabitrabanerjee.me)
110+
111+
- GitHub: [PB2204](https://github.com/PB2204)
112+
113+
Happy coding! 🚀

js-to-python-converter/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js-to-python-converter/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "convert-js2py",
3-
"version": "1.0.2",
3+
"version": "1.1.2",
44
"description": "Convert JavaScript code to Python code",
55
"main": "lib/index.js",
66
"bin": {

0 commit comments

Comments
 (0)