Skip to content

Commit

Permalink
Merge pull request #12 from pr2tik1/blog
Browse files Browse the repository at this point in the history
Add docs
  • Loading branch information
pr2tik1 authored Oct 23, 2024
2 parents 9595590 + e4d7336 commit 435d192
Show file tree
Hide file tree
Showing 41 changed files with 11,709 additions and 26 deletions.
Binary file added .DS_Store
Binary file not shown.
27 changes: 1 addition & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,32 +57,7 @@ If you encounter any PATH issues, you can use:
PATH="/usr/bin:/usr/local/bin" termipy
```

## 📚 Available Commands

| Command | Description
|-----|-----
| `echo <message>` | Print a message to the terminal
| `getwd`, `ls` | Get current working directory
| `setwd <directory>` | Change directory
| `typeof <command>` | Show command type
| `clear` (aliases: `cls`, `clr`) | Clear the screen
| `tree [directory]` | Show directory structure
| `create <path>` | Create file or directory
| `search <filename>` | Search for a file
| `setpyenv [name] [version]` | Create Python virtual environment
| `setrenv [name]` | Initialize R environment
| `about <file>` | Show file details
| `commands` | List all available commands
| `delete <path>` | Delete file or directory
| `rename <old> <new>` | Rename file or directory
| `diskusage [path]` | Show disk usage
| `permissions <file>` | Show file permissions
| `resource`, `resources`, `stats` | Show system resource usage
| `help` | Display help information
| `exit` | Exit TermiPy


For more information on a specific command, use: `<command> -h`
Visit Documentation here for more detailed usage and examples - https://pr2tik1.github.io/termipy/

## 🤝 Contributing

Expand Down
1 change: 1 addition & 0 deletions blog/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.quarto/
Binary file added blog/TermiPy-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions blog/_quarto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
project:
type: book

book:
title: "TermiPy"
author: "Pratik Kumar"
date: "10/22/2024"
cover-image: TermiPy-logo.png
chapters:
- index.qmd
- getting-started.qmd
- file-handling.qmd
- setting-environment.qmd
- resource-stats.qmd
- about.qmd

format:
html:
theme: cosmo
toc: true
number-depth: 0

50 changes: 50 additions & 0 deletions blog/about.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# About {.unnumbered}

TermiPy is a simple command-line shell providing essential shell functionalities such as directory navigation, file listing, and command execution. It is designed to be minimal, lightweight, and highly extensible for users looking to interact with their file systems through a custom terminal interface.

## Why TermiPy?

- **Simplicity**: TermiPy focuses on core functionalities without unnecessary complexity.
- **Extensibility**: Easily add new commands and features to suit your needs.
- **Cross-Platform**: Works seamlessly on Linux, macOS, and Windows.
- **Python-Based**: Leverages the power and flexibility of Python.

## Key Features

1. **File and Directory Operations**:
- Navigate directories
- List files
- Create, delete, and rename files/directories

2. **Command Execution**:
- Execute shell commands directly through TermiPy

3. **System Resource Monitoring**:
- View real-time CPU, memory, disk, and network usage statistics

4. **Environment Setup**:
- Set up Python and R environments with ease

5. **Cross-Platform Compatibility**:
- Works on Linux, macOS, and Windows

## Author

TermiPy is created and maintained by Pratik Kumar.

- Website: [pr2tik1](https://pr2tik1.github.io/)
- Twitter: [@pr2tik1](https://twitter.com/pr2tik1)
- GitHub: [@pr2tik1](https://github.com/pr2tik1)
- LinkedIn: [@pratik-kumar](https://www.linkedin.com/in/pratik-kumar/)

## License

TermiPy is open-source software licensed under the MIT License. For more details, see the [LICENSE](https://github.com/pr2tik1/termipy/blob/main/LICENSE) file in the project repository.

## Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the [issues page](https://github.com/pr2tik1/termipy/issues) on GitHub.

## Show Your Support

If you find TermiPy helpful, please give it a star on GitHub!
123 changes: 123 additions & 0 deletions blog/file-handling.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@

# File Handling {.unnumbered}

TermiPy provides a range of commands for file and directory operations. This guide covers the most commonly used file handling commands.

## Listing Files and Directories

### getwd or ls
List contents of the current directory

```bash
@termipy >> getwd
@termipy >> ls
```

### tree [directory]

Show directory structure

```bash
@termipy >> tree
@termipy >> tree /path/to/directory
```

## Navigating Directories

### setwd `<directory>`

Change the current working directory

```bash
@termipy >> setwd /path/to/directory
```

## Creating Files and Directories

### create `<path>`

Create a new file or directory

```bash
@termipy >> create new_file.txt
@termipy >> create new_directory/
```

## Deleting Files and Directories

### delete `<path>`

Delete a file or directory

```bash
@termipy >> delete old_file.txt
@termipy >> delete old_directory/
```

## Renaming Files and Directories

### rename `<old>` `<new>`

Rename a file or directory

```bash
@termipy >> rename old_name.txt new_name.txt
```

## Searching for Files

### search `<filename>`

Search for a file in the current directory and subdirectories

```bash
@termipy >> search important_doc.pdf
```

## File Permissions

### permissions `<file>`

Show file permissions

```bash
@termipy >> permissions myfile.txt
```

## Disk Usage

### diskusage [path]

Show disk usage for a specific path or the current directory

```bash
@termipy >> diskusage
@termipy >> diskusage /home/user
```

## File Details

### about `<file>`

Show file details

```bash
@termipy >> about myfile.txt
```

## Tips for File Handling

1. Use tab completion to quickly navigate directories and input file names.
2. When dealing with files or directories with spaces in their names, use quotes:

```bash
@termipy >> setwd "My Documents"
```


3. Be cautious when using the `delete` command, as it permanently removes files and directories.
4. Use the `tree` command with a depth parameter to limit the levels shown:

```bash
@termipy >> tree -L 2
```
107 changes: 107 additions & 0 deletions blog/getting-started.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@

# Getting Started {.unnumbered}

This guide will help you install TermiPy and get familiar with its basic usage.

## Installation

You can install TermiPy using pip, the Python package installer:

```bash
pip install termipy
```

Visit PyPi for more releases - https://pypi.org/project/termipy/

## Running TermiPy

After installation, you can start TermiPy by running:

```bash
termipy
```

If you encounter any PATH issues, you can use:

```bash
PATH="/usr/bin:/usr/local/bin" termipy
```

## Basic Usage

Once TermiPy is running, you'll see the TermiPy prompt:

```bash
@termipy >>
```

You can now start entering commands. Here are some basic commands to get you started:

1. **echo `<message>`**: Print a message to the terminal

```bash
@termipy >> echo Hello, TermiPy!
```


2. **getwd** or **ls**: Get current working directory

```bash
@termipy >> getwd
```


3. **setwd `<directory>`**: Change directory

```bash
@termipy >> setwd /path/to/directory
```


4. **typeof `<command>`**: Show command type

```bash
@termipy >> typeof echo
```


5. **clear** (aliases: **cls**, **clr**): Clear the screen

```bash
@termipy >> clear
```


6. **tree [directory]**: Show directory structure

```bash
@termipy >> tree
```


7. **help**: Display help information

```bash
@termipy >> help
```


8. **exit**: Exit TermiPy

```bash
@termipy >> exit
```


For a full list of available commands, use the `commands` command:

```bash
@termipy >> commands
```

## Next Steps

- Explore [File Handling](file-handling.qmd) operations.
- Learn about [Setting Up Environments](setting-environment.qmd).
- Explore [Resource Monitoring](resource-stats.qmd).
- Check out the [About](about.qmd) for more documentation and support.
5 changes: 5 additions & 0 deletions blog/index.aux
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
\relax
\providecommand*\new@tpo@label[2]{}
\providecommand\hyper@newdestlabel[2]{}
\providecommand*\HyPL@Entry[1]{}
\HyPL@Entry{0<</S/D>>}
Binary file added blog/index.pdf
Binary file not shown.
Loading

0 comments on commit 435d192

Please sign in to comment.