Giter Site home page Giter Site logo

tushar5526 / autotype Goto Github PK

View Code? Open in Web Editor NEW
42.0 4.0 26.0 82.61 MB

Autotype on websites that have copy-paste disabled like Moodle, HackerEarth contest etc.

License: Creative Commons Zero v1.0 Universal

Python 100.00%
hacktoberfest hacktoberfest2022 python3 tkinter

autotype's Introduction

Autotype πŸ–Š

A quick and small python script that helps you autotype on websites that have copy paste disabled like Moodle, HackerEarth contests etc as it is difficult to efficiently debug your code on an online compiler.

Say Thanks! GitHub issues GitHub forks GitHub stars GitHub license Open Source Love svg1 PRs Welcome contributions welcome GitHub contributors

Works for windows, mac and linux

Pre-requisites

python3.9.x pip

Development Setup

  • Create a new virtual environment using pipenv
pip install pipenv --user

# create venv and install dependencies from Pipfile
pipenv install
  • Activate the environment
pipenv shell

# check if activated
pip -V

pip install -r requirements.txt
  • For Linux
For Ubuntu or other distros with Apt:

sudo apt-get install python3-tk

For Fedora:

sudo dnf install python3-tkinter

For Arch Based

sudo pacman -S tk
  • Run it as CLI app

Provide the path of the file to be autotyped and the delay time through teminal/shell.

python3 command_line_script --path filePath --delay delay_before_typing

Run the GUI if you are not familiar with CLI apps.

  • Run the script python3 GUI_script.py

  • You can simply type your code in the textbox , enter the time delay and click the Start Typing button.The script will then type your code for you.

  • If your code is in a file , then leave the textbox blank , enter the time delay and click Start Typing button.A file exploror prompt will open asking you to select the file.Simply select your file and Done! Autotype will type your code for you.

  • There are two themes in the GUI Script: Dark and Light. By clicking the toggle in the bottom left corner of the window, you can switch between the two.

Run it as follows if you are not familiar with CLI apps.

Put the text inside code in Simulator/simulate_keyboard.py as follows

Line 13
code = """
    #include<bits/stdc++.h>
    {
        .
        .
        .
    }
"""
# Make sure to use triple quotes as it will preserve the code format.
  • Run the script python3 Simulator/simulate_keyboard.py
  • The script will start typing after 3s (wait or delay time can be tuned)
  • After running the script click on the window to move your cursor wherever you want to auto-type.

πŸ’ͺ Thanks to all Wonderful Contributors

Thanks a lot for spending your time helping AutoType grow. Thanks a lot! Keep rocking 🍻

Contributors

πŸ™ Support++

This project needs your shiny star ⭐. Don't forget to leave a star ⭐️

forthebadge made-with-python forthebadge

autotype's People

Contributors

aman-senpai avatar divyankgoyal avatar g-paras avatar joaofaveri avatar mr-sunglasses avatar nkilm avatar ryanwalker277 avatar shashwat1005 avatar srijan-ss02 avatar tushar5526 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

autotype's Issues

Publish Autotype to PIP

Publish Autotype to PIP

Overview

Make Autotype to Install Trough pip

Description

Package Installer for Python is the de facto and recommended package-management system written in Python and is used to install and manage software packages. It connects to an online repository of public packages, called the Python Package Index. Our Goal is the publish Autotype to pip so that users can install Autotype Via pip3 install Autotype and use is as a command line executable file ex - Autotype --help.

Expected outcomes

pip package for Autotype.

Skills

Python, pip, Unix Executable File.

Possible mentors

Kanishk Pachauri, Anjuman Hassan

Expected project size

100 hours.

Difficulty

Hard

Gui For Autotype

The Command Line Interface of Autotype is great but we should enhance it with the support of GUI app. We can Create this App with the Help of Tkinter.

Add the black formatter GitHub Action

Add the black formatter GitHub Action

Overview

Currently, there is no Code Formatter used in Autotype, Our Goal is to add a Black code formattingr in Autotype.

Description

Describe the solution you'd like - Add a GitHub action that checks a PR for coding style using black. The GHA should be able to format the code and commit it to the PR if the PR is not following the coding style.

Expected outcomes

A uniform coding style across Autotype, that Autoformat code on every PR.

Skills

GitHub Actions, Python

Possible mentors

Kanishk Pachauri, Anjuman Hassan

Expected project size

50 hours.

Difficulty

Hard.

Code Refactoring and Publish to pypi

before creating the pull request to make sure you follow all the standards. -->

Description

Refactor Code to Better Standards and Publish the Autotype to Pypi.

Changes

  • Code Refactoring
  • Use of setup.py for installing and setup of CLI script
  • Add missing docstrings
  • Add a continuous integration service (e.g. Travis)

Reduce the project Size.

Currenty due to all that demo media the size of the project is around 70 mb we need to get in down.

Migrate to Pyautogui from Pynput

Migrate to Pyautogui from Pynput

Description

Pynput itself contains many other problems and packages to be configured, it is better to use Pyautogui rather than pynput

Changes

  • Change dependency to pyautogui from pynput

Update Readme

Autotype now works on all three platforms (win, linux and mac). Update that in readme

Roadmap for the V1 of Autotype.

  1. Better File Format #39
  2. Migration from requirements.txt -> pipenv
  3. Publish to pip
  4. New GUI version (New UI) Fixed on #34
  5. executable GUI file Windows, Macos and Linux
  6. Dockerising Autotype
  7. Sphinx Docs

Add Templates of the Algorithms and Code to Autotype

before creating the pull request to make sure you follow all the standards. -->

Description

In Many coding contests people don't want to copy-paste their code, Sometimes they want just to write some template and with that template they write there own code.

Changes

List the changes done to fix a bug or introducing a new feature.

How to test

Describe the steps required to test the changes proposed in the pull request.

Please consider using the closing keyword if the pull request is proposed to
fix an issue already created in the repository

Adding virtualenv setup steps to the Readme

Description

Many new contributors are facing issues wth pipenv. It would be better to provide them alternate setiup instructions with classic virtualenv.

Changes

  • Add setup instructions to the readme with virtualenv

Fix indentation issue

Many websites have simple IntelliSense that automatically indents your cursor when you press Enter key.
This is adding extra tabs in the code that is being auto-typed.
As python depends on tabs/spaces to define blocks, we have to manually adjust the indent in python code after auto-typing.

Find a work-around for it.

GUI app crashing: AttributeError [in newer versions of customtkinter]

Description:
In the GUI app, when pressing Start Typing it throws an AttributeError

How to reproduce:
Just clone the Repository and open in your IDE, run the GUI using python3 GUI_script.py
Type anything in the code/text box, press Start Typing.

Screenshots:
Screenshot_20230202_221508

My Operating System : Manjaro (Arch Linux)

Logs:
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.10/tkinter/init.py", line 1921, in call
return self.func(*args)
File "/home/sam/.local/lib/python3.10/site-packages/customtkinter/windows/widgets/ctk_button.py", line 549, in _clicked
self._command()
File "/home/sam/Autotype/GUI_script.py", line 94, in start_typing
code = self.code.textbox.get("1.0", tk.END)
AttributeError: 'CTkTextbox' object has no attribute 'textbox'

Dockerize Autotype

Dockerizing Autotype

Overview

Make a Docker Container of Autotype for Easy Workflow.

Description

Docker is a set of platform-as-a-service products that use OS-level virtualization to deliver software in packages called containers.
Containers are isolated from one another and bundle their own software, libraries, and configuration files; they can communicate with each other through well-defined channels. The main goal is to dockerize Autotype, so that it can run on any platform without any conflict.

Expected outcomes

Working Docker Container of Autotype with proper documentation in Docs to Run it in the README.md.

Skills

Python, Docker

Possible mentors

Kanishk Pachauri, Anjuman Hassan

Expected project size

5 hours.

Difficulty

Easy

Improvement in the GUI of Autotype.

Improvement in the GUI of Autotype.

Overview

Improvement in the GUI of Autotype for Better User Experience.

Description

The default GUI of GUI_script.py is very Minimal the Approach is to Improve the UI of Autotype to Modern UI standards.

Expected outcomes

Improved GUI of Autotype

Skills

Python, Tkinter, Some Knowledge of Design.

Possible mentors

Kanishk Pachauri, Anjuman Hassan

Expected project size

20 hours.

Difficulty

Medium

The current Ui of the script can be improved

Description

The current Ui of the script is a bit outdated and can be replaced with a better looking UI.Instead of tinkter , customtkinter library can be used in the GUI_script.py for creating a smooth and modern UI

Changes

  • Re-wrote the whole GUI_script.py.
  • Moved the code = """ class Complex: def __init__(self, x, y): self.x = x self.y = y """ block inside the else block.This will make the code a bit more cleaner and readable.
  • Added a new attribute named Code in the Type function.

How to test

The new UI can be tested by just running the GUI_script.py in a virtual environment having all the requirements installed.

Screenshots

Dark Mode

image

Light Mode

image

Writing Unit Test For Autotype

Writing Unit Test For Autotype

Overview

Autotype is Widely Used For Typing Automation, It will be nice to Write Unit Test.

Description

Unit testing is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation. Using Pytest write some basic Unit Test to test the Simulation of the Files. Use Tox for the Automation of These Tests.

Expected outcomes

Working Unit Test For Autotype.

Skills

Python, Unit Testing.

Possible mentors

Kanishk Pachauri, Anjuman Hassan

Expected project size

100 hours.

Difficulty

Hard

Add Support for Poetry.

before creating the pull request to make sure you follow all the standards. -->

Description

When your Python project relies on external packages, you need to make sure you’re using the right version of each package. After an update, a package might not work as it did before the update. A dependency manager like Python Poetry helps you specify, install, and resolve external packages in your projects. This way, you can be sure that you always work with the right dependency version on every machine

Changes

  • Addition of Poetry and Update README.md

How to test

Describe the steps required to test the changes proposed in the pull request.

Please consider using the closing keyword if the pull request is proposed to
fix an issue already created in the repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.