18 votes

What tasks on your computer have you automated?

After using Shreddit to delete my Reddit history periodically for some time now, I finally decided to make a cron job to automate it on a weekly basis. I use it to delete every post and comment that isn't whitelisted, which right now is just a tiny subreddit for a musician I like that I solely moderate and a pinned post explaining why I have a bunch of karma but barely any posts.

After setting this up, it got me curious as to what tasks other people automate in their lives in order to streamline their workflows and eliminate minor (or major) routine tasks.

So, what do you automate, and how did you go about doing it?

18 comments

  1. [4]
    hungariantoast
    Link
    I wrote a Python script that automatically posted topics to Tildes on a recurring schedule. I automated the execution of the script with cron. However, now that recurring topics are a native...

    I wrote a Python script that automatically posted topics to Tildes on a recurring schedule. I automated the execution of the script with cron. However, now that recurring topics are a native feature of the site, I don't use the script anymore.

    I use i3-layout-manager for automating a lot of the tedious resizing and rearranging that one normally has to do with a titling window manager.

    I use Taskwarrior to manage all my tasks. It has built-in support for recurring tasks, but its implementation is kind of a mess. Taskwarrior does not check for or eliminate duplicate recurring tasks when you sync your task list, the syntax can be confusing, and I am generally not a fan of the implementation.

    Especially since I sync my task list to six different devices, I decided to not bother with the native recurrence feature and just use cron jobs. I have a Raspberry Pi that my task list is synced with. Since Taskwarrior is just a command-line program, I can use cron and shell scripts to automatically add tasks as needed. The Pi then syncs the task list to a VPS, to/from which all of my other devices sync as well.

    I also use cron for automatic backups. I have tried a couple different tools for backups, but Borg and rsync are my favorite.

    Perhaps the most useful thing I have the power to automate is my keyboard, thanks to the QMK firmware. Unfortunately, I am not really taking advantage of the firmware's potential at the moment. I can switch my keyboard between different layouts by pressing a key combination (QWERTY to Dvorak, to Colemak, to Workman, to QGMLWB, then back to QWERTY), but that's about the most powerful thing I do with the firmware at the moment.

    (Also, no, I don't use all those layouts, that would be insane. I just have them defined in my keymap because they don't take up a lot of space. I use the Workman layout most of the time, but switch to QWERTY for playing games if needed.)


    In the future, I would really like to automate the management of my music library. Manually editing and moving music files around is a fun way to waste time, but I feel like it would be funner to have my computer do it for me. There are tools like beets that look really neat, but I think I would like to try writing my own script first.


    Finally, I have never used it before, but it looks super neat and others might find it useful:

    8 votes
    1. [3]
      acdw
      Link Parent
      How do you like Borg? I've used it before but I don't think I ever "got it" -- I'm just dumping everything in a borg backup place before I install a new OS, then I have my old stuff in a folder in...

      How do you like Borg? I've used it before but I don't think I ever "got it" -- I'm just dumping everything in a borg backup place before I install a new OS, then I have my old stuff in a folder in ~/Downloads. I feel that's not ideal.

      3 votes
      1. [2]
        hungariantoast
        Link Parent
        I only use Borg for one thing: making large backups of everything on my computer. That includes digital artwork, media files, everything. Obviously such backups take up quite a bit of space....

        I only use Borg for one thing: making large backups of everything on my computer. That includes digital artwork, media files, everything. Obviously such backups take up quite a bit of space. That's why I use Borg, it makes compressed, deduplicated, space-efficient backups easy (easier than anything else, in my opinion).

        However, when I actually plan on restoring from a backup, I use rsync.

        So when I reinstall Linux or whatever, I use rsync to back up my files to another drive. Later, once the install is done, I just restore the files using the same rsync command, but reversed.

        3 votes
        1. acdw
          Link Parent
          Oh okay! So Borg is your "just in case my computer catches fire and I lose everything" command, but when you're reinstalling, you're just a quick rsync round-trip from having the same computer but...

          Oh okay! So Borg is your "just in case my computer catches fire and I lose everything" command, but when you're reinstalling, you're just a quick rsync round-trip from having the same computer but with a different OS.

          4 votes
  2. [4]
    joplin
    Link
    Much to the dismay of my coworkers, I automated style checking on commits to our source repository. I'm probably going to hell for it because nobody (including me) likes to follow style guides...

    Much to the dismay of my coworkers, I automated style checking on commits to our source repository. I'm probably going to hell for it because nobody (including me) likes to follow style guides when coding, and it's all done with regular expressions, which I'm not very good at, so it has several false positives and probably a bunch of false negatives I don't know about.

    We would normally use clang-tidy for this, but we are required to wait until it's put into our build bots' tool chain by our build team, which won't be for a while because reasons.

    6 votes
    1. [2]
      entangledamplitude
      Link Parent
      It's unfortunate that you've had to roll your own style checker. These kinds of things absolutely ought to be automated so that people can focus on a higher plane. Maybe you can all agree on a...

      It's unfortunate that you've had to roll your own style checker. These kinds of things absolutely ought to be automated so that people can focus on a higher plane. Maybe you can all agree on a style config which can be checked into the code repository, so each person can feed that config into their editor for auto-formatting.

      A coworker took the initiative of setting up "black" on our (Python) codebase, and it's been fantastic to not have repeated stylistic changes polluting diffs, now that we're all using the same autoformatting convention. We're now trying out the same with flake8 warnings. IMHO it's ideal to fix those in a tight loop when coding, rather than after making a PR -- especially because it's quite annoying to change the branch/worktree in git to go back and make changes.

      8 votes
      1. joplin
        Link Parent
        Yeah, it's really just a stop-gap until clang-tidy gets added. (Any day now, they swear!) But I agree. If we could have everything auto formatted it would make stuff easier. The problem we have is...

        Yeah, it's really just a stop-gap until clang-tidy gets added. (Any day now, they swear!) But I agree. If we could have everything auto formatted it would make stuff easier.

        The problem we have is that our source tree contains 6 different products started by different teams at different times, and which now share large pieces of code and are shipped as a single unit to customers. So there are different styles for files in different directories. Considering that, things are working reasonably well. There are pretty clear delineations about which directories use which styles, and people do their best to follow them. But automation would make it so much simpler!

        2 votes
    2. Macil
      Link Parent
      Setting up Prettier to auto-format code on every commit in my work's javascript/typescript codebase has been a huge hit. I feel like it's changed me to consider code more as an abstract syntax...

      Setting up Prettier to auto-format code on every commit in my work's javascript/typescript codebase has been a huge hit. I feel like it's changed me to consider code more as an abstract syntax tree than as written text that can be arbitrarily formatted and happens to be machine-executable. It makes it easier for me to consider the meaning of unfamiliar code rather than wasting cycles thinking about how it's formatted. I barely think about formatting any more; it's somebody else's problem (the auto-formatter's) now.

      2 votes
  3. Enigma
    Link
    I have a custom Vivaldi configuration, and every time you update the browser, you have to redo the configuration changes. Someone on their forums came up with a method to automate the changes, so...

    I have a custom Vivaldi configuration, and every time you update the browser, you have to redo the configuration changes. Someone on their forums came up with a method to automate the changes, so I'm using that with an Alfred workflow such that if I enter "vivup" in Alfred's search, it automatically updates the configuration. Granted, while I do have this aspect "automated," I still haven't gotten around to cleaning up my actual code. >.<

    1 vote
  4. [9]
    babypuncher
    Link
    So you're one of the reasons I often find my way into an old thread about a question I need answered and the top voted response is [deleted]. I wish Reddit wouldn't allow users to delete comments,...

    So you're one of the reasons I often find my way into an old thread about a question I need answered and the top voted response is [deleted].

    I wish Reddit wouldn't allow users to delete comments, just take their name off of them.

    14 votes
    1. [5]
      cfabbro
      (edited )
      Link Parent
      Allow authors to disassociate comments from their handle. Once that feature gets implemented, hopefully it will help prevent that issue here. :) But for privacy's sake, I don't think preventing...

      Allow authors to disassociate comments from their handle. Once that feature gets implemented, hopefully it will help prevent that issue here. :)

      But for privacy's sake, I don't think preventing people from deleting their comments' content is a good idea. That should always be an option, IMO.

      7 votes
      1. [4]
        babypuncher
        Link Parent
        There are so many sites out there archiving every Reddit comment that deleting your whole comment history does not actually remove it from the internet. I'm half tempted to write a browser...

        There are so many sites out there archiving every Reddit comment that deleting your whole comment history does not actually remove it from the internet. I'm half tempted to write a browser extension that automatically restores deleted comments using removedit, and provides a button to show a comment's edit history.

        I don't think there is a realistic expectation of privacy when it comes to content you submit to public websites. It is impossible to enforce regulations on people scraping and hoarding publicly available data.

        3 votes
        1. [3]
          cfabbro
          (edited )
          Link Parent
          Just because other people are acting unethically, that doesn't means Tildes (or reddit) should too. And the other thing to consider here is that not allowing people to delete their comments would...

          Just because other people are acting unethically, that doesn't means Tildes (or reddit) should too. And the other thing to consider here is that not allowing people to delete their comments would likely violate the GDPR's "right to be forgotten" in Europe, CCPA's "right to deletion" in California (where reddit operates), and PIPEDA's "right to deletion" in Canada (where Tildes operates). If you're just some random person running a homebrew data mirroring service, that's unlikely to be a problem, but if you're a registered company and want to stay in business (like Tildes and reddit are/do), I would not recommend doing that, as it potentially opens you up to lawsuits and massive fines.

          It is impossible to enforce regulations on people scraping and hoarding publicly available data.

          Sure, but "don't let perfect be the enemy of good" applies here IMO. It may be "impossible" to prevent scraping and permanent data hoarding by people willing to break the law, but the vast majority of companies will not risk doing so, and the vast majority of people are unlikely to care enough to actually seek out mirrors for any deleted content. So it being "impossible" to entirely prevent doesn't really matter at the practical level, since deletion still accomplishes its intended purpose in the vast majority of cases.

          And it should also be noted that in the case of Tildes, you will very likely be banned if you maliciously counteract other users attempts to delete their content. See: https://docs.tildes.net/policies/code-of-conduct

          Do not maliciously attempt to counteract other users' attempts to delete or edit their content, such as by deliberately re-posting content they want to be deleted.

          6 votes
          1. [2]
            babypuncher
            (edited )
            Link Parent
            I disagree in principal with many "right to be forgotten" laws. They feel like bandaids for a broader problem they do not actually address, and have the potential to allow individuals to...

            I disagree in principal with many "right to be forgotten" laws. They feel like bandaids for a broader problem they do not actually address, and have the potential to allow individuals to essentially rewrite history.

            I'll gladly respect any given site's code of conduct, I was specifically referring to Reddit which as far as I know does not have any policy against scraping sites like removedit, and is where I frequently run into old missing information.

            2 votes
            1. cfabbro
              (edited )
              Link Parent
              I definitely agree with you that they are bandaid solutions regarding online privacy and data collection, as I would prefer significantly strengthened protections and rights for people in that...

              I definitely agree with you that they are bandaid solutions regarding online privacy and data collection, as I would prefer significantly strengthened protections and rights for people in that area. However I strongly believe you shouldn't let perfect be the enemy of good, and at least they are a step in the right direction IMO.

              Out of curiosity, what principle makes you disagree with such laws?

              p.s. Also, don't get me wrong, I find missing information on reddit and other social sites incredibly annoying too (especially when they were answers to tech support questions), which is why I really like the idea of giving people the "dissociation" option as an alternative to outright deletion. But despite that I still think someone's right to privacy, and to delete the content they have submitted to a site, is far more important than my curiosity or desire/need to know what they said... in most cases, anyways. The exceptions mostly being "public figures" (e.g. politicians, CEOs, etc.), since with them it's potentially in the public's interest to know what they have said in the past, even if they would prefer others don't find out.

              2 votes
    2. envy
      Link Parent
      I was so frustrated once by this exact thing that I used Google BigData to query up the old comment. The replies to the deleted comment all agreed: "that is the best summary I have ever read."...

      I was so frustrated once by this exact thing that I used Google BigData to query up the old comment.

      The replies to the deleted comment all agreed: "that is the best summary I have ever read."

      When I finally found the comment, it was not memorable.

      6 votes
    3. Crestwave
      (edited )
      Link Parent
      If you need the comment, you can replace "reddit" in the url with "removedit", and it should appear if it was up for long enough. EDIT: It's removeddit; only noticed my typo now.

      If you need the comment, you can replace "reddit" in the url with "removedit", and it should appear if it was up for long enough.

      EDIT: It's removeddit; only noticed my typo now.

      1 vote
    4. orbit
      Link Parent
      I only really post in music subreddits these days so thankfully you're not missing much not seeing my consistently bad opinions

      I only really post in music subreddits these days so thankfully you're not missing much not seeing my consistently bad opinions

      1 vote