Skip to content

Fix broken scripts

HostGrady requested to merge HostGrady/fix-scripts into master

This merge request addresses issue #52 (closed).

General notes:

  • These fixes are config breaking changes because the way they were implemented was fundamentally flawed and over designed.
  • dm-currencies and dm-weather are essentially rewritten to reflect the changes I wanted in the config. Though they aren't done in the traditional "bash" way, they're still very simple to modify and it should be easier to maintain the main scripts should future problems arise
  • Personally, I am fine with removing the scripts I didn't fix today because most of the scripts are either:
    • Not something I care to maintain
    • Had no real use anyways (ie: solving a problem nobody had)
    • Weren't conforming with how the other dmscripts were set up (took in arguments, weren't using the config file, etc.
    • Some combination of the previous 3

To summarize why each thing was broken (so it doesn't happen again):

dm-currencies was broken purely because the web API was broken. This wasn't something we could control. The fix is to scrape a website and obtain the currency translation that way. It isn't perfect and if that website ever changes my script also breaks but for now it's good enough. I'd also opt to remove this one eventually as it is usually a simple google search away anyways but for now it stays because I fixed it and I don't want my efforts to feel useless.

dm-record was broken because it was poorly structured. It never properly imported the config (despite using the variables anyways). This caused bugs for anyone who used the script without setting up the DMENU environment variable outside of the config file.

dm-weather was actually not broken at all. The original author just wrote it poorly to where if there wasn't any locations set up in the configuration (ie, the default) than it wouldn't work correctly thus making it appear broken. The fix here was to change how you configure dm-weather. Personally I think the new configuration syntax is more sane and better off

Merge request reports