Git Product home page Git Product logo

obsidian-pikt's Introduction

Obsidian Pikt

A plugin to parse Pikchr codeblocks.

Changelog

  • 0.2.0:
    • Handle pikchr codeblocks to align closer with Pikchr expectations.
  • 0.1.0:
    • Add plugin with pikt render logic.

Configuration

This plugin will insert the generated SVG into the DOM with a class pikt. By design Pikchr expects colours to be defined as part of the script and similarly does this plugin.

By default this plugin inverts colours when the Obsidian theme is dark. You can counter that by:

.theme-dark svg.pikt {
  filter: invert(0%);
}

Usage

This plugin will attempt to render any codeblock with the language set to pikt, For example:

```pikt
box "A simple Pikchr box"
```

If you are not familiar with the Pikchr script, the Pikchr website is the best place to get started. The Tutorial Analysis Of A Pikchr Diagram is particularly nice.

By default, Pikchr takes as much space as possible for the diagram, sometimes though, the result is too big. If this is the case, I recommend using a scale = 1.2 for better sized diagrams. For example:

scale = 1.2

box "Pikt"

Installation

From Obsidian:

  • Ensure Community Plugins are enabled.
  • Browse community plugins searching for pikt.
  • Click install.
  • Enable the plugin in the “Community Plugins” Settings section.
  • Open a file (notice that previously opened files won't get the effects of the plugin until reopened or changed).

From release:

  • Download the obsidian-pikt-{version}.zip file from the chosen release, for example the latest release.
  • Ensure “Community Plugins” are enabled in Settings.
  • Ensure the .obsidian/plugins/ directory exists in your vault directory.
  • Expand the zip file into the .obsidian/plugins/ directory such that an obsidian-pikt directory is a direct child of plugins.
  • Enable the plugin in the “Community Plugins” Settings section.
  • Open a file (notice that previously opened files won't get the effects of the plugin until reopened or changed).

From source:

  • Clone the source repository.
  • Run npm install.
  • Run npm run build.
  • Create a obsidian-pikt under your vault's .obsidian/plugins/ directory.
  • Copy over main.js, styles.css, versions.json and manifest.json.
  • Enable the plugin in the “Community Plugins” Settings section.
  • Open a file (notice that previously opened files won't get the effects of the plugin until reopened or changed).

Licence

Arnau Siches under the MIT License

obsidian-pikt's People

Contributors

arnau avatar

Stargazers

a13ph avatar  avatar Huy Z avatar Rafsan Ratul avatar Enoch Solano-Sanchez avatar  avatar Austin Pahl avatar  avatar max avatar sharfaroz avatar JohnnyLearns avatar

Watchers

 avatar  avatar

obsidian-pikt's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.