Hacker News new | past | comments | ask | show | jobs | submit login

And it would require a 1000x of the work to couple it, yes.

It always amaze me how a couple of shell scripts is almost always is the very sweet spot of any real life automation.




I'm not sure it would be 1000x the work. Just need a command line tool to parse ics which I can point at my nextcloud calendar, and then wrap it in another bash script called "atworktoday" or something, so I can do something like:

  50 7 * * 1-5 atworktoday && blanket on for 5 minutes
Would be nice if there was a tool which would allow me to do something like:

  curl -s https://link-to-my-ics | \
    ics --start $(date +%Y%m%dT000000Z) \
        --end   $(date +%Y%m%dT235959Z) \
        --filter-summary 'annual leave'
There must be loads of use cases for a tool which allows you to parse and filter ics. Even a tool which just converts ics to json would be pretty useful as we could then filter results with the excellent "jq" application:

  ANNUAL_LEAVE=$(curl -s https://link-to-my-ics \
    | ics2json --start $(date +%Y%m%dT000000Z) \
               --end   $(date +%Y%m%dT235959Z) \
    | jq 'map(select(.summary|ascii_downcase|contains("annual leave")))|length')
  if [[ "$ANNUAL_LEAVE" == "0" ]]; then
    echo "At work today"
  else
    echo "On holiday, wahoo!"
  fi
Somebody write this ;)


I was talking about coupling it with the smart alarm - that requires getting the realtime data from the smartwatch.


Oh right, yeah. I don't use the Pebble Smart Alarm. I tried to, but I don't believe it's any smarter than just picking a random time in a specified period. I mean, I know it claims to work based on when you're coming out of a deep sleep, but I saw no evidence that it actually did work that way when using it.


1000x is a real stretch depending on what data you have available. Not sure if this still works, but Google Home devices have a public API that gets you the alarms which have been set: https://rithvikvibhu.github.io/GHLocalApi/#assistant-assista.... True that this would require a fair bit more work, but personally I also find adding features to these sorts of systems a lot of fun.


It's 1000x considering the realtime data from smartwatch, which have no any API for that. So it includes decompiling smartwatches vendor's mobile app, or reverse engineering particular Bluetooth format the smartwatches use for sending the data to vendor's app.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: