semvec/pypi-packages huggingface dataset:
NCPrase 0.0.13
Streaming video data via networks
Keywords: python,CNC,GCode,MCode,HAAS


# NCParse (Formally GCodeParser)
Python library to parse GCode into its components

## About
GCode Parser was originally packed into my newest project [CNClingish](https://github.com/CodeNameMPC/CNClingish). However, I thought it would be just as useful by itself. 

## Install
Install via pip
```
python3 -m pip install NCParse
```
[pip Page](https://pypi.org/project/NCParse/)

## Code Sample
```python
file = '../test.nc'

dirname = os.path.dirname(__file__)
filename = os.path.join(dirname, file)
with open(filename, 'r') as f:
    for line in f:
        line = line.strip()
        if not line.startswith('(') and not line.startswith('%') and len(line) > 0:
            print('> ' + line)
           GCode.parse_line(line)
```

The above code will take a .nc file, look at each line, and run it through parse_line method of the GCode class and split it into its components.

## Sample Ouput
the non-indented lines are the original line of code passed into the parser. The indented code are each of the parsed commands with their letter, number, and coordinates (if provided)

```bash
> T1 M06 (Select tool 1) ;
        T 1
        M 06
> G00 G90 G40 G49 G54 (Safe startup) ;
        G 00
        G 90
        G 40
        G 49
        G 54
> G00 X0 Y0 (Rapid to 1st position) ;
        G 00 (0, 0, 0)
> S1000 M03 (Spindle on CW) ;
        S 1000
        M 03
> G43 H01 Z0.1 (Tool offset 1 on) ;
        G 43
        H 01 (0, 0, 0.1)
> M08 (Coolant on) ;
        M 08
> G12 I0.75 F10. Z-1.2 D01 (Finish pocket CW) ;
        G 12
        I 0.75
        F 10. (0, 0, -1.2)
        D 01
> G00 Z0.1 (Retract) ;
        G 00 (0, 0, 0.1)
> G00 Z0.1 M09 (Rapid retract, Coolant off) ;
        G 00 (0, 0, 0.1)
        M 09
> G53 G49 Z0 M05 (Z home, Spindle off) ;
        G 53
        G 49 (0, 0, 0)
        M 05
> G53 Y0 (Y home) ;
        G 53 (0, 0, 0)
> M30 (End program) ;
        M 30
```

## TODO
* [ ] Implement parsing for if statements used by some machines (HAAS)
* [ ] Clean-up
tudu 0.2
simple command line tool with a tui mode for managing your to-do lists
Requires Python: >=3.6

# tudu

`tudu` is a simple command line tool with a tui mode for managing your to-do lists

## Installation

#### pip

```console
# pip3 install tudu
```
#### locally

You will need to have `SQLAlchemy` and `plyer` packages installed
```
$ git clone https://github.com/lubczanska/tudu
$ cd tudu
$ python3 tudu.py
```  

## Usage

```console
$ tudu --help

usage: tudu [-h] [--quiet]
               {add,rm,edit,check,uncheck,sticky,ls,show} ...

A simple to-do list app

options:
  -h, --help            show this help message and exit
  --quiet, -q           run tui without triggering notifications

commands:
  {add,rm,edit,check,uncheck,sticky,ls,show}
    add                 add new list or tasks
    rm                  remove list or tasks
    edit                edit list/task details
    check               mark task as completed
    uncheck             mark task as not completed
    sticky              add task to startup list
    ls                  display all tasks in a list in tui mode
    show                display task details

If no command is specified tui mode will be opened. In tui mode
press ':' to enter commands

```
#### EXAMPLES
Add a weekly reminder to water plants by sunday
```console
$ tudu add "My list" "Water plants" --deadline sunday --priority 1 --repeat 7
```
Edit a typo in task name
```console
$ tudu edit "My list" "Task with a tpyo in name" --name "Task with no typo in name"
```
Remove "My list"
```console
$ tudu rm "My list"
```
### TUI mode

##### WARNING
Resizing the terminal may lead to visual bugs, especially when entering characters or viewing help.
In that situation resize the terminal properly

#### Navigation
Use arrow keys or `h` `j` `k` `l` to navigate, `Enter` or `Space` to check tasks and `q` to quit

Other keybindings:
- `:` open the command prompt, that supports all cli commands except `ls` and `show`. Additionally, when executing commands like `add` you can use `.` as name of the currently displayed list or type `help` `--help` or `-h` for tui-specific help
- `a` Start adding a list or a task to the currently displayed list
- `d` Start deleting selected entry
- `e` Start editing selected entry
- `i` Show more information