-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Webshooter is a command-line assistant to the static website generator Hyde. It produces Hyde-ready websites in the user's choice of layout and automates page creation and site configuration through user prompts and command line arguments.
Webshooter is built to be compatible with the following site layouts, but should
still work in templates that have matching variable names in config.yaml
:
- Python
- pip
- distribute==0.6.19
- fs==0.4.0
- hyde==0.8.4
- wsgiref==0.1.2
- [Documentation][documentation]
To generate a new site, run
./webshooter.py new
which will prompt you for a details about your desired site, then create a new folder in the current working directory to hold it.
To regenerate the static content of an existing site, run
./webshooter.py gen <path>
where path
is the full or relative path to a site which has been generated
with new
. For now, this is identical to running hyde gen
inside path
.
If the template you're using gets updated after you've generated your site and
you want to incorporate some or all of those changes into your site, you can use
git cherry-pick
to selectively grab the commits you want.
Let's assume your website is its own git repository, with no more ties to the template repo. Let's also assume you're using hyde-bootstrap as your template (though the process is the same for other templates as well).
First, set up your parent template as a remote and fetch its changes:
git remote add hyde-bootstrap git://github.com/aims-group/hyde-bootstrap
git fetch hyde-bootstrap
Fetching doesn't overwrite anything or try to merge any code (pulling does). Once you've fetched changes, you can cherry-pick the ones you want. If you just want the changes performed by the most recent commit of hyde-bootstrap, you can do
git cherry-pick hyde-bootstrap/master
Otherwise you can specify a specific commit hash or use one of several other
ways of specifying commits. See man git-cherry-pick
for more info.
When you're done, just git commit
, add to the prepopulated commit message if
you like, and you're ready to push.
$> python webshooter.py
I was written in Python 3.x, but you're running me with Python 2.x! I was NOT
tested with this version. Run anyway? [y/N]
usage: webshooter.py <command> [--help]
commands:
new Interactively create a new website
gen <site_path> Regenerate the content for the site at `site_path`