top of page

Creating a text-cleaning widget

  • Writer: Nicole Seah
    Nicole Seah
  • May 27, 2021
  • 1 min read

Updated: Jun 12, 2021

Today, I wanted to learn how to make a URL shortener using Python, which made me stumble into the Tkinter module. I understand that there isn't really a good demand for GUIs nowadays, but nevertheless it was quite fun to dive into it and explore around!


I wanted to adopt what I learnt into my own project, and I had an idea to incorporate a simple function I had written during the semester to help in my note-taking.


Basically, the PDF textbook I have been using isn't very user friendly and it doesn't allow you to copy paste the text with ease. There's always a '/n' in between lines, so imagine what it feels like having to 'backspace' a gazillion times manually. The program I made is quite simple but I thought it would be nice to fit it into a GUI app using the pyperclip module (in addition to Tkinter).


Here is a before and after sample of the text I had 'Ctrl+C'ed from my textbook. I had also included a wordcount - just for fun.


ree

I recognise it has some shortcomings - such as its inability to get rid of citation references. I had originally wanted to remove integers using .isdigit() but realised that there may be numbers within the text (i.e. money figures, statistics).


I think the most tedious part about using Tkinter was making the layout (just look at the code required for the layout itself compared to the function).


ree

Hopefully, I get to put this app into good use in the future when I continue doing my note-making during school semesters!

Recent Posts

See All
Our telegram bot for CodeFiesta

With what I learnt from the time I made my first telegram bot, making the second bot for the CodeFiesta hackathon became a lot easier. In...

 
 
 

Comments


©2021 by Nicole Seah. Proudly created with Wix.com

bottom of page