this post was submitted on 17 Sep 2023
287 points (98.6% liked)

Asklemmy

43907 readers
1365 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy ๐Ÿ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~

founded 5 years ago
MODERATORS
 

Specifically thinking of stuff that make your life better in the long run but all kinds of answers are welcome!

I've recently learnt about lifetraps and it's made a huge positive impact on how I view myself and my relationships

you are viewing a single comment's thread
view the rest of the comments
[โ€“] pineapplelover@lemm.ee 5 points 1 year ago* (last edited 1 year ago) (2 children)

I know a little python but have no idea how I would use it to automate anything useful. Any suggestions? What do you do with it?

[โ€“] Cloudygrey@lemmy.world 11 points 1 year ago (2 children)

Look up Automate boring stuff with python

Not being sarcastic

[โ€“] captain_aggravated@sh.itjust.works 6 points 1 year ago (1 children)

To expand on this, it's a book/ebook with that title "Automate The Boring Stuff With Python."

[โ€“] Cloudygrey@lemmy.world 1 points 1 year ago

Also a course on udemy now, iirc

[โ€“] I_Has_A_Hat@startrek.website 4 points 1 year ago (2 children)

How much of the "boring stuff" is applicable to what most people do in every day life, rather than just what people with jobs in IT or CS would encounter?

[โ€“] bugsmith@programming.dev 4 points 1 year ago

Good question. I am now a software developer, but in a previous career I was a logistics manager. In that job I had a lot of repetitive report downloading and creating. It would take hours each day. I used techniques taught in that book to automate downloading reports directly, as well as generating some in SAP by automating mouse and keyboard movements, as well as generating CSVs and Excel spreadsheets. In all cases I either cut the time required or at least the time I had to be physically present. Many jobs could have similar applications of a little Python, I imagine. Certainly not all jobs though, of course.

I use Bash rather than Python for this, but I have scripts for doing things like converting a .docx to a .pdf file. Sure you can open MS Word, wait for it to load, navigate the menus, maybe have to know that some software still handles this via the Print dialog for some reason, that you "print to PDF,"...or write a little script that does the job, put it in a certain folder along with a little ~6 line config file, and now you can right click a file and click "convert to PDF" and it just does it without opening any apps.

I have occasional need to do things to image files, like rotate a batch of them, or convert them to gray scale. Once again I have bash scripts that call imagemagick for this, but it can be done in Python using the Python Image Library (PIL).

I use a Python-based autokeyer, I have a bunch of abbreviations or whatnot that I can type, like (asterisk)wtl becomes Welcome to the Linux community! because I used to type that so often when I was active in r/linuxmasterrace. That one is just a simple find-and-replace that takes no coding, but I have some that insert the correct date, that look up information from files on the fly and insert it...if you write business emails, you really should have an autokeyer.

[โ€“] Shady_Shiroe@lemmy.world 1 points 1 year ago

I made a script to go through a folder and move them to new folders if image is in portrait or landscape mode