Git Product home page Git Product logo

ps-typer's Introduction

ps-typer

Linux OSX Windows Python Version PyPi Black

PS-Typer demo

Description

A Python program built on the PyQt5 GUI framework, used for practicing your typing skills and keeping track of your progress.

Index

Dependencies

Installation

Using pip (if you're on Windows, replace python3 with just python down below):

python3 -m pip install ps-typer

Then, launch the program by running the command:

ps-typer

Note that if the command does not work you may need to configure your system PATH variable (check out some Stack Overflow answers linked below).

Usage

  1. Select a mode from the dropdown menu (My recommendation is always Random Text: Brown)
  2. Click on begin and start typing! Characters typed correctly are highlighted green and characters typed incorrectly are highlighted red.
  3. When finished, a window will appear displaying your accuracy, average w.p.m and whether or not you set a daily or all-time high score.
  4. Check out the Statistics section below

Modes

Select one of the following options to choose what you will be typing out:

  • Common Phrases

  • Facts

  • Famous Literature Excerpts

  • Famous Quotes

  • Random Text Options

    • These 3 options are achieved using corpora from nltk, for which documentation can be found here. The corpora included are:
    1. Brown, which is the first million-word electronic corpus of English.
    2. Gutenberg, which is a small selection of texts from the Project Gutenberg electronic text archive, which contains some 25,000 free electronic books, hosted here.
    3. Webtext, a collection of web text includes content from a Firefox discussion forum, conversations overheard in New York, the movie script of Pirates of the Carribean, personal advertisements, and wine reviews, for more informal text.
    • To reduce the number of dependencies, as well as the processing that needs to be done for formatting the text, the corpora are already processed into plain text files stored in the assets/texts/ directory, along with the python script used to generate them.

W.P.M.

Your typing speed is measured by your average wpm, multiplied by your accuracy.

Wpm is calculated as words per minute (w.p.m) using (characters typed/5)/minutes This gives a more fair w.p.m calculation since longer words would be worth more than short words.

This figure is then multiplied by the accuracy percentage, but note that accuracy lower than 75% results in a 0 w.p.m. score. Accuracy is taken into account to incentivise you to type all the text out correctly and not enforce bad habits.

Statistics

The program will save all of your daily high scores and keep track of your all-time highscore. This data is then visualised in the Statistics window using a graph of wpm over time so you can get a sense of how you're progressing.

From here you can also reset your highscores if you so wish.

Please note: All the (very limited) data this program stores can be found in the user's data directory under ps-typer. By default, these should be:

  • Linux: /home/your_username/.local/share/ps-typer
  • Mac: /Users/your_username/Library/Application Support/ps-typer
  • Windows: C:\\Users\\your_username\\AppData\\Local\\ps-typer

License

MIT

ps-typer's People

Contributors

rolv-apneseth avatar

Stargazers

 avatar

Watchers

 avatar

ps-typer's Issues

Add shortcuts to typing window

Buttons cannot be tab focused so shortcuts for going back to main menu, restarting and getting a new text would be very useful.

Hover

Add hover property to buttons to make them feel more responsive and modern.

Add more facts

The list of facts is a bit short and so it could use some more entries.

Update README

Readme needs to have install etc. information updated and have a gif added where the link to the video currently is.

Small bug #2

Today's highscore is not being set to 0 for new day.

Small bug

Got the following error when spamming keys very quickly in the typing window:

Traceback (most recent call last):
File "C:\Repos\speed-typer\speed-typer\type_test.py", line 134, in on_input_text_changed
if self.text[i] == character:
IndexError: string index out of range

Fullscreen

Need some way to make windows fullscreen. Also need every window to match i.e. if one is made fullscreen they all should be

Improve 'randomness'

Make it so the same text is impossible/unlikely to come up more than once when choosing text for the user to type out.

Brown

Specify in the readme how to downloadthe brown corpus for nltk or find a way to include it in requirements.txt

This is so the 'randomly generated text' option for mode works, asit uses the brown corpus

Mode window

The title of 'Mode' should change to the corresponding mode.

Remove nltk as a dependency

Nltk is a huge dependency so if I could work it out of the necessary dependencies to run the program that would be ideal.

One way to work towards this goal is to have the corpora it downloads and processes as static, preprocessed files.

Points on graph

Add points to the graph so it's clear what days the user had activity.

Single highscore object

Remove the need for 2 highscore objects.

Currently type_test.py creates it's own highscore object, which should be unecessary.

Better colours

Need to make light mode more visually appealing colour wise (I am not good with colour palettes)

Add settings

Plan to add settings to:
- turn on an off a sound to emulate a mechanical keyboard
- switch between light and dark mode
- change font size of text to be typed
- possibly more

QFont being set to -1

Errors pop up during use of program because font sizes are being set to -1. This originates in the source ui files as designer.exe automatically sets the font sizes to -1 when you set the font in the style sheet for some reason.

improve random text

Needs improvements, with both small errors (';;' and ' : ') as well as larger problems like not starting and ending with a sentence

Unify windows (big)

Currently each screen is a whole different window, whereas they should probably all be widgets on the main window.

This change will require a big refactor but it's how the program should have been laid out in the first place.

Use appdirs for storing user data in correct location

User data is currently just stored wherever the project is installed which is not correct, I plan to instead use appdirs for storing user data and also perhaps moving all user data to a single file with 1 backup, probably just a json or yaml file.

Centering text on typing window

When text is too short (not on the common phrases window, as text for that mode is always set to center alignment), the typing window can look weird as the text is left aligned but does not make it the full way across the screen.

Some way of checking whether the text is less wide than the screen and using that to set center alignment might be one way to fix this, or perhaps allowing the qlabel to shrink based on the text size.

Statistics

Add a way to log user statistics and make that information available to the user

Fix background colour

Gradient on the background needs changing as currently on bigger screens you can see distinct lines where the gradient changes slightly (i.e. not blended)

Accuracy

Include accuracy into score calculations so the user is penalised for low accuracy and high wpm scores are only possible when you are actually typing correctly.

Save dropdown choice

Add the choice on the drop down menu in the main window to the saved settings so that on startup the users previous choice can be set as the default rather than always resetting to 'Common Phrases'.

This is mostly to save time and as a QOL feature.

Fact check

'Facts' need to be fact checked, and some more added in

Add tests

This may have to come after a pull request for #60 but adding tests and having them automated is the next highest priority for this repo

Feedback for apply button

In the settings window, unless the theme is changed, there is no feedback letting the user know something has happened after clicking the apply button. This would be nice to have so you can be sure the button click took effect.

Rounded buttons

Round out the edges of the buttons to make the ui appear nicer and more modern.

Lightmode

Adjust the colours of lightmode, as the current palette does not look ideal.

Letters clipping

When in the typing window, the top of capital letters clip, and the highlight is not centered on the letter but offset on the y axis.

This may be an issue with either padding or line-height.

Restart button

Restart button should show clearly that it has been triggered and should clear what the user has already typed as well.

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.