# 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 40
# self = https://watcher.sour.is/conv/k3qmxgq
@mckinley How's the website going? šŸ˜›
@adi (#k3qmxgq) Very minimal progress has been made since my last twt about it. After working for hours and making glacial progress, I couldn't get titles to work, got frustrated, and left to go do something else. Haven't worked on it since that day. Now that I think of it, I couldn't take advantage of pp in the content of documents anyway because I'm escaping everything.
@adi (#k3qmxgq) Very minimal progress has been made since my last twt about it. After working for hours and making glacial progress, I couldn't get titles to work, got frustrated, and left to go do something else. Haven't worked on it since that day. Now that I think of it, I couldn't take advantage of pp in the content of documents anyway because I'm escaping everything.
@mckinley Haha, well maybe it's a bad fit for you then. šŸ˜€
@mckinley Haha, well maybe it's a bad fit for you then. šŸ˜€
@adi @mckinley I'm surprised tho https://mckinley.cc/, looks like a very good candidate.
@adi @mckinley I'm surprised tho https://mckinley.cc/, looks like a very good candidate.
@adi If all the documents were in the root directory and I could get used to not using quotes, mkws would most certainly be my pick.
@adi If all the documents were in the root directory and I could get used to not using quotes, mkws would most certainly be my pick.
@mckinley @eldersnake Doesn't have all the documents in his root directory, he has a custom layout, my blog posts are stored in a separate p directory, about quotes, maybe you can sed files. You really don't have to use mkws but I'm just saying that it's not impossible.
@mckinley @eldersnake Doesn't have all the documents in his root directory, he has a custom layout, my blog posts are stored in a separate p directory, about quotes, maybe you can sed files. You really don't have to use mkws but I'm just saying that it's not impossible.
@adi Huh, I tried going back to stock mkws while I was working on my own script, and it wouldn't generate pages in other directories. I didn't really poke through it and figure out why. Do you have to add the new directories manually in the script?
@adi Huh, I tried going back to stock mkws while I was working on my own script, and it wouldn't generate pages in other directories. I didn't really poke through it and figure out why. Do you have to add the new directories manually in the script?
@mckinley Yeah, that's the whole point, it's very basic. You don't _configure_ it, you _program_ it. Edit the main mkws script to your preference, this is how I generate my blog:\n\n
\nfor p in "$srcdir"/p/*\ndo\n        test "${p##*.}" == "html" && continue\n        echo "Making p/$(echo "${p##*/}" | cut -c21-).html"\n        pp "$sharedir"/l.upphtml "$p" "$1" > "p/$(echo "${p##*/}" | cut -c21-).html"\n\ndone\n
\nDo some loops there. Here's how @eldersnake does it https://www.andrewjvpowell.com/pastebin/1612574353/. It doesn't have to be great, just make it work.
@mckinley Yeah, that's the whole point, it's very basic. You don't _configure_ it, you _program_ it. Edit the main mkws script to your preference, this is how I generate my blog:


for p in "$srcdir"/p/*
do
        test "${p##*.}" == "html" && continue
        echo "Making p/$(echo "${p##*/}" | cut -c21-).html"
        pp "$sharedir"/l.upphtml "$p" "$1" > "p/$(echo "${p##*/}" | cut -c21-).html"

done

Do some loops there. Here's how @eldersnake does it https://www.andrewjvpowell.com/pastebin/1612574353/. It doesn't have to be great, just make it work.
@mckinley Yeah, that's the whole point, it's very basic. You don't _configure_ it, you _program_ it. Edit the main mkws script to your preference, this is how I generate my blog:\n\n
\nfor p in "$srcdir"/p/*\ndo\n        test "${p##*.}" == "html" && continue\n        echo "Making p/$(echo "${p##*/}" | cut -c21-).html"\n        pp "$sharedir"/l.upphtml "$p" "$1" > "p/$(echo "${p##*/}" | cut -c21-).html"\n\ndone\n
\nDo some loops there. Here's how @eldersnake does it https://www.andrewjvpowell.com/pastebin/1612574353/. It doesn't have to be great, just make it work.
@adi As for seding files, that's what I'm already doing. At the moment, I just can't benefit from pp inside my content documents because I'm escaping everything. I agree it's not impossible, I'm sure I could make sed skip sections for pp, but the end result would be even more of a complicated mess of a shell script than the one I have now. I really don't want to deal with something like that when it's not that much of a chore, in the grand scheme of things, to maintain it manually.
@adi As for seding files, that's what I'm already doing. At the moment, I just can't benefit from pp inside my content documents because I'm escaping everything. I agree it's not impossible, I'm sure I could make sed skip sections for pp, but the end result would be even more of a complicated mess of a shell script than the one I have now. I really don't want to deal with something like that when it's not that much of a chore, in the grand scheme of things, to maintain it manually.
@mckinley No, I probably would sed the quoted documents to unquoted ones and process those using temp files. Again, if your current setup works don't change it especially not for that sake of change.\n\n> But the end result would be even more of a complicated mess of a shell script than the one I have now.\n\nDepends on what you understand by "mess" and "complicated". šŸ˜
@mckinley No, I probably would sed the quoted documents to unquoted ones and process those using temp files. Again, if your current setup works don't change it especially not for that sake of change.

> But the end result would be even more of a complicated mess of a shell script than the one I have now.

Depends on what you understand by "mess" and "complicated". šŸ˜
@mckinley No, I probably would sed the quoted documents to unquoted ones and process those using temp files. Again, if your current setup works don't change it especially not for that sake of change.\n\n> But the end result would be even more of a complicated mess of a shell script than the one I have now.\n\nDepends on what you understand by "mess" and "complicated". šŸ˜
@adi @mckinley mkws is very tolerant to "mess".
@adi @mckinley mkws is very tolerant to "mess".
@adi I really appreciate your help but as I said in my blog post, I just need to make my own generator in a real programming language if I want it to be exactly right for my website.
> Depends on what you understand by "mess" and "complicated"
It's 55 lines long and I'm having trouble understanding it as I read through it, less than a week after it was written.
@adi I really appreciate your help but as I said in my blog post, I just need to make my own generator in a real programming language if I want it to be exactly right for my website. \n> Depends on what you understand by "mess" and "complicated"\nIt's 55 lines long and I'm having trouble understanding it as I read through it, less than a week after it was written.
@adi @mckinley Please excuse me, I don't know how formatting works on this thing. Second line of the quote is supposed to be my response.
@adi @mckinley Please excuse me, I don't know how formatting works on this thing. Second line of the quote is supposed to be my response.
@mckinley However you prefer.
@mckinley However you prefer.
@mckinley

No need to apologize.


> Depends on what you understand by ā€œmessā€ and ā€œcomplicatedā€

Itā€™s 55 lines long and Iā€™m having trouble understanding it as I read through it, less than a week after it was written.


> Depends on what you understand by ā€œmessā€ and ā€œcomplicatedā€

Itā€™s 55 lines long and Iā€™m having trouble understanding it as I read through it, less than a week after it was written.
@mckinley \n\nNo need to apologize.\n\n
\n> Depends on what you understand by ā€œmessā€ and ā€œcomplicatedā€\n\nItā€™s 55 lines long and Iā€™m having trouble understanding it as I read through it, less than a week after it was written.\n
\n\n> Depends on what you understand by ā€œmessā€ and ā€œcomplicatedā€\n\nItā€™s 55 lines long and Iā€™m having trouble understanding it as I read through it, less than a week after it was written.
@mckinley \n\nNo need to apologize.\n\n
\n> Depends on what you understand by ā€œmessā€ and ā€œcomplicatedā€\n\nItā€™s 55 lines long and Iā€™m having trouble understanding it as I read through it, less than a week after it was written.\n
\n\n> Depends on what you understand by ā€œmessā€ and ā€œcomplicatedā€\n\nItā€™s 55 lines long and Iā€™m having trouble understanding it as I read through it, less than a week after it was written.
@adi Thanks. Blank line under the quote, noted.
@adi Thanks. Blank line under the quote, noted.
@mckinley \n\n> I really appreciate your help but as I said in my blog post, I just need to make my own generator in a real programming language if I want it to be exactly right for my website.\n\nI personally don't believe you need help and I don't believe you need to make your own generator, but if you personally decide it's a good idea go for it.
@mckinley

> I really appreciate your help but as I said in my blog post, I just need to make my own generator in a real programming language if I want it to be exactly right for my website.

I personally don't believe you need help and I don't believe you need to make your own generator, but if you personally decide it's a good idea go for it.
@mckinley \n\n> I really appreciate your help but as I said in my blog post, I just need to make my own generator in a real programming language if I want it to be exactly right for my website.\n\nI personally don't believe you need help and I don't believe you need to make your own generator, but if you personally decide it's a good idea go for it.
Good thing about keeping things simple is thereā€™s so many possible ways to do things yourself. In a case where even mkws would be slightly overkill (or at least I donā€™t need pp) I basically just do this:
o
echo "Making $i..."
cat templates/header-begin.html ${i%.html}.meta templates/header-end.html $i templates/footer.html > public/$i
done

Then my working directory looks like index.html index.meta about-us.html about-us.meta etc etc.
Good thing about keeping things simple is thereā€™s so many possible ways to do things yourself. In a case where even mkws would be slightly overkill (or at least I donā€™t need pp) I basically just do this:\n
for i in $dir/*.html; do\necho "Making $i..."\ncat templates/header-begin.html ${i%.html}.meta templates/header-end.html $i templates/footer.html > public/$i\ndone\n
\nThen my working directory looks like index.html index.meta about-us.html about-us.meta etc etc.
Okay I mangled the code formatting in the twt, but hopefully you get the idea