Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): Update+add documentation #42

Merged
merged 14 commits into from
Jan 11, 2022
12 changes: 7 additions & 5 deletions docs/docs/CONTRIBUTING.MD → docs/docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
---
sidebar_position: 2
id: contributing
title: Contributing to TimerX
---

# Contributing to TimerX

TimerX is written in **Python**, so you have to install it if you want to contribute.
You can download the latest version from [here](https://www.python.org/downloads/).
Make sure to check `Add Python 3.10 to path` when installing it.
After installing Python, get [Git](https://git-scm.org). It's version control, so that will help you in adding your changes over here.
Make sure to check `Add Python 3.10 to PATH` when installing it.
After installing Python, install [Git](https://git-scm.org). It's version control, so that will help you in adding your changes over here.
Click the `Fork` button on the top-right in the GitHub page. Give it a few seconds to fork TimerX and then execute these series of commands in your Terminal/Command Prompt.
```shell
git clone https://github.com/your-username/TimerX && cd TimerX
python3 -m pip install -r requirements.txt
python3 -m pip install -r windows-requirements.txt
```
After following the series of commands, open your favourite text editor. We recommend that you use [Visual Studio Code](https://code.visualstudio.com). Make your changes and before committing, go to the status bar. There will be a place showing branches and the text `master`. Click that, click `New branch` and name your branch, such as `patch-1` or so. Make sure it correlates to your feature, if it's a patch, name it as a patch, if it's a feature, name the feature. Next, go to the Version Control tab from the sidebar and commit the file, _semantically_. We recommend you to use semantic commits since that is more concise.
Commit your changes to that new branch, [open a pull request](https://github.com/sumeshir26/TimerX/pulls) and someone will review it ASAP.
Commit your changes to that new branch, [open a pull request](https://github.com/sumeshir26/TimerX/compare) (click `Compare across forks`) and someone will review it ASAP.
im-coder-lg marked this conversation as resolved.
Show resolved Hide resolved

### Gitpod - Ready to code
We support Gitpod - a ready-to-code environment customised for TimerX. You could either customise the app or the TimerX website. To code on Gitpod, follow the steps below:
Expand All @@ -29,7 +31,7 @@ The environment is building itself. You'll have to wait for at least 2 minutes,
#### 4. Start coding!
When Gitpod loads, you will be greeted by a VS Code UI. You could start coding immediately. But be wary - the commits are forced to be semantic. Fortunately, we have a CLI tool called `cz` that could help you on committing.
#### Ready to commit?
First, create a new branch. Name it in a way that it tells your feature in a short, abstract way. After creating your branch, open a new terminal(<kbd>Ctrl</kbd> + <kbd>`</kbd>.
First, create a new branch. Name it in a way that it tells your feature in a short, abstract way. After creating your branch, open a new terminal by typing <kbd>Ctrl</kbd> + <kbd>`</kbd>.

The <kbd>`</kbd> symbol is beside the number 1 key or right above the Tab key. Then, type these commands:
```shell
Expand All @@ -40,4 +42,4 @@ It will ask you what type of change it is, the scope(just hit enter) and the com
```shell
git push
```
After that, you can open a PR [here](https://github.com/sumeshir26/TimerX/pulls) and a reviewer will review it soon.
After that, you can open a PR [here](https://github.com/sumeshir26/TimerX/pulls/new). Choose your branch and open it and a reviewer will review it soon.
75 changes: 75 additions & 0 deletions docs/docs/compile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
sidebar_position: 3
slug: compile
title: Compiling TimerX
---

# Compiling TimerX from source
Before compiling, make soure you have [Python 3.x](https://python.org/downloads/) with PIP and optionally [Git](https://git-scm.org) installed; we recommend you to use Python 3.10 for compiling TimerX.

Make sure Python is added to your PATH while installing.
## Step 1 {#repoclone}
Open your terminal and head to the TimerX folder; if you have Git, clone it with `git clone https://github.com/sumeshir26/TimerX.git` or download the ZIP file from [here](https://github.com/sumeshir26/TimerX/archive/refs/heads/master.zip).
## Step 2 {#packages}
After going inside your directory, make sure that you install the required packages via `pip3` or `pip` if you use Anaconda3:
```console
$ pip3 install -r requirements.txt
$ pip3 install -r packager-requirements.txt
OR, if you use Anaconda3,
$ pip install -r requirements.txt
$ pip install -r packager-requirements.txt
```
If you are on Windows, you can install the Windows requirements file by:
```batch
pip3 install -r windows-requirements.txt
REM or if you use Anaconda3,
pip install -r windows-requirements.txt
```

## Step 3 {#compile}
After you install the required packages, execute these commands in TimerX's root directory:
### Windows compiling
```batch
REM for making an unzipped executable package
python3 setup.py bdist_win
im-coder-lg marked this conversation as resolved.
Show resolved Hide resolved
REM for making an installer:
python3 setup.py bdist_msi
```
If you use Anaconda3:
```batch
REM if you want the unzipped package
python setup.py bdist_exe
REM if you need an installer:
python setup.py bdist_msi
```

### macOS compiling
```shell
# Standalone app
python3 setup.py bdist_mac
# Installer
python3 setup.py bdist_dmg
```
If you use Anaconda3:
```shell
# Standalone app
python setup.py bdist_mac
# Installer
python setup.py bdist_dmg
```
### Linux
You can generate only a DEB or RPM installer for Linux.
For Debian-based distros:
```shell
# If on Anaconda3, use `python setup.py bdist_rpm`
python3 setup.py bdist_rpm
cd dist
sudo apt install alien
sudo alien -d TimerX-*.tar.gz --version=1.0
```
For RHEL-based distros:
```shell
python3 setup.py bdist_rpm
# Anaconda3
python setup.py bdist_rpm
```
5 changes: 3 additions & 2 deletions docs/docs/intro.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
sidebar_position: 1
slug: intro
title: Welcome to TimerX Docs
---

# Under development
# Welcome to TimerX Docs
12 changes: 10 additions & 2 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const config = {
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
editUrl: 'https://github.com/sumeshir26/TimerX',
editUrl: 'https://github.com/sumeshir26/TimerX/blob/master/docs',
},
blog: false,
theme: {
Expand Down Expand Up @@ -63,9 +63,17 @@ const config = {
title: 'Docs',
items: [
{
label: 'Under work',
label: 'Documentation',
to: '/docs/intro',
},
{
label: 'Contributing to TimerX',
to: '/docs/contributing',
},
{
label: 'Compiling from source',
to: '/docs/compile',
},
],
},

Expand Down