bostrt / bostrt/quikey

Just an idea - qka - interactively add a phrase

Open
#46 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
37
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Python is not my favourite, but something like this:
```
qka ()
{
echo -n "Enter Shortcut: "
read scut
echo -n "Enter Phrase : "
read phrase
cmd="qk add -n '$scut' -p '$phrase'"
eval $cmd
}
```
Which I have been using for a while. I am trying to force myself to learn python:

```
#!/usr/bin/env python
from dearpygui import core, simple
import os

wid=500
hgt=150

core.set_main_window_size(wid, hgt)

core.add_additional_font("SourceCodePro-Bold.otf", 25, "")

def save_callback(sender, data):

# Store Data to variables:
tSC = core.get_value("##scut")
tPH = core.get_value("##phrase")

cmd = "qk add -n "+"'"+tSC+"' -p "+"'"+tPH+"'"
print(cmd)
os.system(cmd)

# Clear previous input data:
tSC = core.set_value("##scut", "")
tPH = core.set_value("##phrase", "")

with simple.window("Quikey - Add Phrase"):

core.add_text("Shortcut:")
core.add_same_line()
core.add_input_text("##scut")

core.add_text("phrase :")
core.add_same_line()
core.add_input_text("##phrase")

core.add_button("Save", callback=save_callback)

# Run the script:
core.start_dearpygui(primary_window="Quikey - Add Phrase")
```
Been playing with dearpygui, it is great for quick prototypes.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the existing `qk add` command referenced in the issue and review how phrases are currently added. The issue offers shell and Python Dear PyGui prototypes but does not specify which interface to adopt; done would require an agreed interactive add-phrase design integrated with the project and verified for saving shortcut and phrase values.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, shell
Domain
cli, desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.