Rst2HTML

My "ReStructured Text to HTML translator in a webpage" is a single-page application. That means that for all intents and purposes you'll be working in a single webpage (technically this may be a different story, just look at the url field in the browser - but there is only one page layout).

The possible downside of this is that there are a lot of fields and buttons on the screen:

some picture

On the other hand the buttons kind of reflect the intended workflow of the application:

  • load a setup for a collection of pages
  • (re)save it if necessary
  • load a restructured text file
  • save it when done editing
  • preview how it will look when converted to HTML
  • save the converted HTML
  • load the converted HTML, e.g. for finetuning that can't be done in the rst source
  • preview how it will look when edited
  • save the edited version
  • copy the edited version to a "mirror" destination (local copy of the live site)

Obviously for these things to work you need to be able to specify:

  • the settings file you're using - more about this here
  • the restructured text source you're working on - see here
  • the HTML file where you store the converted result - see here
  • a new name when you don't want to use the current one

The "new name" field works as an override for what you're currently trying to do:

  • when you push save settings it overrides the selected settings name, making it possible to define a new site
  • when you push save source it overrides the selected source name, making it possible to define a new document or directory
  • when you push save converted or save html it overrides the selected target name (or maybe not, I'm not sure if this is a sensible thing to do)

A couple of extra features are provided:

  • you can create an index over the complete collection; for that you need to specify references in the source texts with the refkey directive; pushing the rightmost button on the screen will then build an index page using these references
  • you can divide the site you're working on into subsections by specifying a source name ending in a slash; this will create a subdirectory that you can move into by choosing it in the source selector and hitting load source. Going back to the root is done by selecting the .. entry and loading it.
  • for implementing css stuff or standard pieces of text with or without varying content, you can use the ReST directives feature. Some of these are predefined, it's also possible to create, view and edit your own site-specific directives (these go into a file that resides on the server and can't be accessed from another site unlike the global directives that come with this application).

Also some convenience functions:

  • regenerate all pages and copy them to the mirror location in one go
  • create an overview of which pages are in what stage of development

The most recent addition is the possibility to choose your own data backend; a small server-side settings file makes it possible to switch between storage on the file system or using a database (MongoDB and PostgreSQL is provided, SQLite may also be in the works sometime).

Currently this is an application meant to be run on a local webserver; there are no features for uploading images and such. I made it so that when you place them in the "mirror" directories they also can be seen from the previews, so you only need one location for them. Maybe in the future I might rebuild it so that it can also be used as a remote application (directly updating your live server files).