Package: youtyper
youtyperyoutyper is a customizable command-line touch-typing tutor.You can easily add your customized lesson with text, even Python function.MotivationThere're a lot of touch-typing tutor apps.
However, most of the apps doesn't come with the flexibility to maximize my learning rate.First, the flexibility of lessons.For example, I'm pretty bad at distinguish "c" and "d", which lies vertically on keyboards, but most of apps provides rowwise lessons.
I'm also not good at typing "y", "u", and "i", but most of apps also includes "o" and "p" in the lessons for these keys.
Some apps provide lessons with custom texts, but which cannot be dynamically generated.
And, I want to create lessons with Python.Second, the flexibility of analytics.I'm a pretty big fun of keybr.com, because of its beauty and detailed statistics. I may have spent more time watching the graphs than practicing. Though I can't create beautiful interfaces like them, I can provide more detailed statistics and even allow users to analyze their typing.Naming"y","o","u","t","p","e",and "r" are all on the upper row of the keyboardThese keys are why I created this app.This name may also indicates customizability of this app.Installpip install youtyperQuickstartyoutyper: will start a standard lesson with standard analytics enabled.Customize your lessonsUse--lesson_typeto choose your lesson.Load text to create lessonsyoutyper --lesson_type text --text_path path-to-your-lesson-textOther options available:--disable_shuffle: Disable shuffling of lessons  (default: false)--num_lessons 10: lessons to take (default: None, repeat until exit)--len_lessons 50: Number of maximum characters in a lesson (default: 100)Load python script to enable custom lessonyoutyper --lesson_type python --generator_path path-to-your-generator --generator_name YourLessonGeneratorClassNameUse the specifiedLessonGeneratorclass to generate lessons. Example generators are available underexamples.Load built-in lessons (default)youtyper --lesson_type built-in --lesson_name right_hand_home_rowUse the built-in lessons. Seelessons/README.mdfor available lessons.--lesson_name: lesson name of default lessons (default: "default_lesson")Customize your analyzerUse predefined analyzeryoutyper ... --analyzer cpm error_rate ...cpm: Character Per Minute (default: on)error_rate: The ratio of wrong key push (default: on)Other options available:--analyzer wpm: [To be implemented] Show words per minute--ignore_consecutive_errors: [To be implemented] Ignore the consecutive error by the same character (deafult: false)Use custome analyzeryoutyper ... --analyzer_path path-to-your-analyzer-file --analyzer_name YourStatisticsClassNameUse the specifiedAnalyzerclass to analyze lesson logs.Example analyzer are available underexamples.Build your own custom classCustom LessonYou must provide a customLessonGeneratorto create your custom lessons.LessonGenaratormust be a iterator yieldsLessonLessonGenaratormust implement__len__methodLessonis basically text to type and metadata.Unknown command line options are passed to theLessonGenaratorclass as list.Custom AnalyzerYou must provide a customAnalyzerto use your custom analytics.Analyzermust generate a printable text to show user and a dictionary of analytics summary to save.Analyzermust implementanalyzemethod which returns(Dict, str)Unknown command line options are passed to theLessonGenaratorclass as list.You can specify multipleAnalyzerand all the unknown options are passed to allAnalyzer.Check your option is not shared by other analyzers unintentionally.Lesson LogFor further analytics, youtyper saves every lesson log to the.youtyperdirectory under the user's homedir.A lesson log is a json file named asyyyymmdd_hhmmss_[lesson_name]_[lesson_id].json.The structure is as follows:{"lesson_name":"right_hand_home_row","lesson_id":"1","command-line-options":{"lesson_type":"built-in","lesson_name":"right_hand_home_row"},"text":"klj ;l;l;jjk ;ljl; kl;jkl jjlk ljk l; kl ;j","keystrokes":[{"timestamp":"2020/07/02 18:00:03","key":"k","target":"l"},{"..."}],"analytics":{"cpm":{"overall":100.0,"k":70.6,"l":116.4,"...":"..."},"error_rate":{"overall":0.043,"k":0.067,"l":0.032,"...":"..."},"...":"..."}}