Skip to content

Ovidios/otterwiki-plugins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plugins for Otterwiki

This is a collection of plugins I wrote for An Otter Wiki, a minimalist python-based wiki software I use.

I wrote these for personal use (documenting my solo D&D campaign) so there's no guarantee they will work (well) for anything else, but I though I might as well share them!

List of Plugins

otterwiki-infobox

Important

With version 2.18.0 of An Otter Wiki's experimental introduction of Embeddings, there's now a native way to handle Info Boxes, making this plugin obsolete!

Allows you to insert Wikipedia-style infoboxes into your Wiki pages by starting a code tag with ```infobox and describing the box's content using yaml. In general, the yaml object's keys go in the left, and the values in the right column, except for some special reserved fields, prefixed with i_[...].

For example, the image above can be created with the following:

i_title: Garlitz
i_image:
  url: https://images.metmuseum.org/CRDImages/ep/original/DT313144.jpg
  desc: \"A Village in a Valley\" (Théodore Rousseau, late 1820s)
i_section: Town
Population: 670
Region: "[[Great Eastern Plains|Places/Great Eastern Plains]]"
Government: Town Council (*see [Politics](#Politics)*)
Exports: Flowers

Additional images and sections can be created by appending something to the field name (i.e. i_image_2 or i_section_family.)

otterwiki-imperial-helper

This plugin simply adds tooltips for converting imperial units to normal (metric) units and inserting them as tooltips. Usually I would just use metric units to begin with, but alas, I'm stuck with D&D's bad decisions once again... 😔

The tooltips use the title html property, which isn't easily accessible on every platform (nor picked up by screen readers), so watch out!

Supported units:

Source Unit Expected Format Target Unit
feet and inches \d+' ?\d+" cm
feet \d+ ?ft(?!\w) cm
inches \d+ ?in(?!\w) cm
miles \d+ ?mi(?!\w) km
pounds \d+ ?lbs(?!\w) kg

otterwiki-date

Allows inserting dates and ages in a more flexible way, similar to how Wikipedia handles it (but not compatible!) using either real-world dates or a fantasy time system (though the latter is fairly limited.)

The plugin creates a date_config.yaml file where format strings and fantasy time system can be configured. By default, the plugin uses a 4-month, 90-days-per-month, regular weekdays fantasy system. The config file includes comments explaining how to modify it.

Dates are inserted as inline code blocks that are formatted as follows: `date-age 2012-03-16` where -age can be omitted for a pure date, as can the month and day (the last two values, date is formatted y-m-d).

otterwiki-imagebox

Important

With version 2.18.0 of An Otter Wiki's experimental introduction of Embeddings, there's now a native way to handle Image Boxes, making this plugin obsolete!

Similarly to otterwiki-infobox, this inserts a right-floating box into the document. It's also defined via a yaml code block starting with ```imagebox. This creates the above image box:

url: https://upload.wikimedia.org/wikipedia/commons/b/b1/1877_Charles_Mengin_-_Sappho.jpg
desc: Pritchard illustrated by James [MacArdell](https://en.wikipedia.org/wiki/James_MacArdell), 1762

About

My personal collection of plugins for an otter wiki

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages