# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 42
# self = https://watcher.sour.is/conv/oef3b3a
Check out some real life ‘shops’ examples 👈
Check out some real life ‘shops’ examples 👈
@prologic From the examples above I still don't get why do you have to use yaml as opposed to just writing a sh script and run it via https://github.com/rollcat/judo for example.
@prologic From the examples above I still don't get why do you have to use yaml as opposed to just writing a sh script and run it via https://github.com/rollcat/judo for example.
@prologic From the examples above I still don't get why do you have to use yaml as opposed to just writing a sh script.
@adi I think I already said before that ‘judo’ has no concept of “state”
@adi I think I already said before that ‘judo’ has no concept of “state”
@prologic But where is the state in your examples and how do you store state?
@prologic But where is the state in your examples and how do you store state?
@adi State is encoded in a sequence of checks and actions — So a spec is both stateful and self-healing
@adi State is encoded in a sequence of checks and actions — So a spec is both stateful and self-healing
@prologic So why https://raw.githubusercontent.com/prologic/shops/master/examples/resolvconf.yml and not https://clbin.com/vSfnO?
@prologic So why https://raw.githubusercontent.com/prologic/shops/master/examples/resolvconf.yml and not https://clbin.com/vSfnO?
@adi @prologic The final ] is extra\n\n
\n if [ -n "${NS1}" ] && ! grep -q "nameserver ${NS1}" "${RESOLVCONF}" ]; then\n
@adi @prologic The final ] is extra


 if [ -n "${NS1}" ] && ! grep -q "nameserver ${NS1}" "${RESOLVCONF}" ]; then
@adi @prologic The final ] is extra\n\n
\n if [ -n "${NS1}" ] && ! grep -q "nameserver ${NS1}" "${RESOLVCONF}" ]; then\n
@adi Isn’t that the same argument as “Why not just write HTML?” ! 🤣 Sorry I don’t mean to be rude but just say’! 😁

Yes technically you can just write shell scripts, scp ‘em across, ssh back in and run them in some way.

But that’s not the point 🤗
@adi Isn’t that the same argument as “Why not just write HTML?” ! 🤣 Sorry I don’t mean to be rude but just say’! 😁\n\nYes technically you can just write shell scripts, scp ‘em across, ssh back in and run them in some way.\n\nBut that’s not the point 🤗
@adi Isn’t that the same argument as “Why not just write HTML?” ! 🤣 Sorry I don’t mean to be rude but just say’! 😁

Yes technically you can just write shell scripts, scp ‘em across, ssh back in and run them in some way.

But that’s not the point 🤗
@adi also you’re picking a trivial example 🤣 more complex examples would get a bit gnarly with many layers of nested conditions 😁
@adi also you’re picking a trivial example 🤣 more complex examples would get a bit gnarly with many layers of nested conditions 😁
@prologic I ment running them via judo, not ssh, but if man if yaml is your thing, just do yaml.
@prologic I ment running them via judo, not ssh, but if man if yaml is your thing, just do yaml.
@adi It's not about the YAML :D It's what it does, judo doesn't do what shops does, rset is closer, but a bit more complicated/feature-rich(er).
@adi It's not about the YAML :D It's what it does, judo doesn't do what shops does, rset is closer, but a bit more complicated/feature-rich(er).
Here's another example I put together at work today using shops. Maybe this helps highlight the differences between shops and judo, it's not about just running a "whole" shell script.
Here's another example I put together at work today using shops. Maybe this helps highlight the differences between shops and judo, it's not about just running a "whole" shell script.
@prologic To me it still looks like it could be written like a single sh script, what am I missing?
@prologic To me it still looks like it could be written like a single sh script, what am I missing?
I don't know what you're missing :P
I don't know what you're missing :P
@prologic Might just be a thing of preference?
@prologic Might just be a thing of preference?
Sorry that I can't explain it very well. It's not a "preference" thing at all. It solves a particular set of problems that things like Chef/Puppet/Ansible also do fairly well but in an overly complicated way.
Sorry that I can't explain it very well. It's not a "preference" thing at all. It solves a particular set of problems that things like Chef/Puppet/Ansible also do fairly well but in an overly complicated way.
@prologic Ok, I assume it's simplification of Chef/Puppet/Ansible?
@prologic Ok, I assume it's simplification of Chef/Puppet/Ansible?
@adi That's one way to look at it, yes! But also take a look at InSpec. As I said I built this on a Friday a few weeks ago out of frustration at the complexity of what these other tools like Chef/Puppet/Ansible and evenInSpec attempt to do but with a high cognitive prive. Worse, InSpec (_if you look at it_) offloads "remediation" or "fixes" after is performed a bunch of "checks" to Chef/Puppet/Ansible! It can all be done in shell. Think of shops as an "orchestrator".
@adi That's one way to look at it, yes! But also take a look at InSpec. As I said I built this on a Friday a few weeks ago out of frustration at the complexity of what these other tools like Chef/Puppet/Ansible and evenInSpec attempt to do but with a high cognitive prive. Worse, InSpec (_if you look at it_) offloads "remediation" or "fixes" after is performed a bunch of "checks" to Chef/Puppet/Ansible! It can all be done in shell. Think of shops as an "orchestrator".
@prologic Yes I agree shops is an orchestrator for a custom language you defined in yaml which runs sh functions, and judo is an orchestrator for plain sh scripts.
@prologic Yes I agree shops is an orchestrator for a custom language you defined in yaml which runs sh functions, and judo is an orchestrator for plain sh scripts.
@prologic Yes I agree shops is an orchestrator for a custom language you defined in yaml which runs some sh functions, and judo is an orchestrator for plain sh scripts.