dynamic-cli icon indicating copy to clipboard operation
dynamic-cli copied to clipboard

Copy button in the terminal #177

Open Aspireve opened this issue 2 years ago • 5 comments

Related Issue

The Issue was to create a button to Copy the code snipped straight into the clipboard of the computer

Closes: #177

Describe the changes you've made

To create a copy method I used the pyperclip library from python The part of selecting the text to copy was a bit complex so I had to make up an elaborate method to do so. The method I used works on all types of code, keeping the indentation constant aswell, for both spaces and tabs

Note : I also added a requirement to the requirement.txt

Checklist:

  • [x] My code follows the style guidelines of this project.
  • [x] I have performed a self-review of my own code.
  • [x] I have commented my code, particularly in hard-to-understand areas.
  • [x] I have made corresponding changes to the documentation.
  • [x] My changes generate no new warnings.

Screenshots

Original Updated
image image

Aspireve avatar Jul 30 '22 11:07 Aspireve

Hey @GouravSardana do review it please

Aspireve avatar Jul 31 '22 09:07 Aspireve

@Aspireve can you please fix above warnings? These are from code scanner. You can use any plugin for pep8 and reformat the file and it’ll work

GouravSardana avatar Aug 01 '22 06:08 GouravSardana

Yup Sure, give me a minute

Aspireve avatar Aug 01 '22 11:08 Aspireve

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

sonarqubecloud[bot] avatar Aug 01 '22 12:08 sonarqubecloud[bot]

Aye there are a lot of errors, it'll take time, I'll solve it as soon as possible.

Aspireve avatar Aug 01 '22 12:08 Aspireve