Scripts for website related stuff
Local server maintenance
My server (Nginx) has a default location to serve webpages from that I can't access freely, I call this the "server root". I made a mirror directory to build and edit pages for it, I call this "home root". Should I have Apache installed, it would have a location like Nginx, I call that one "apache root". I made a couple of scripts for these:
- www.edit
edit indicated file(s) in home root
- www.copy
copy indicated file(s) from home root to server root
- www.link
copy indicated symlink(s) from home root to server root
- www.list-wwwroot
list files in server root
- www.edit-apache
edit indicated file in apache root (if I had one) as-if edited directly
- www.list-apache
list files in apache root
- www.permits
reset permits for dirs/files under web-accessible root (in the past I needed this a couple of times, originally created under the name "chmodrecursive")
Maintenance for sites built with Rst2HTML
- www.stage <sitename> [<options>]
stage modified files and commit
as options you can specify - '--new_only': only stage new files, - '--filename=...': restrict staging to only this/these filename(s), - '--list-only': do not actually stage, just show the names
- www.list-staged <sitename> [--full]
list staged files
option --full betekent "include subdirectories". Misschien mag dat de default worden of dat de optie --short wordt voor 'only show site root"
- www.clear-staged
clear staging area after copying files to live site
Miscellaneous
- www.startapp
start webapp created from webpage
- www.update-sites
update mydomains database and localhost/sites.html from /etc/hosts