No description
Find a file
2023-02-04 09:39:42 -06:00
docs/images Updating the docs and stuff 2023-02-04 09:39:42 -06:00
node_modules added boiler plate and stuff 2023-02-03 12:11:50 -06:00
src Updating the docs and stuff 2023-02-04 09:39:42 -06:00
esbuild.config.mjs added boiler plate and stuff 2023-02-03 12:11:50 -06:00
LICENSE added boiler plate and stuff 2023-02-03 12:11:50 -06:00
main.js far from done... but it's working in my two examples 2023-02-03 22:12:22 -06:00
manifest.json added boiler plate and stuff 2023-02-03 12:11:50 -06:00
package-lock.json added boiler plate and stuff 2023-02-03 12:11:50 -06:00
package.json added boiler plate and stuff 2023-02-03 12:11:50 -06:00
proto.html omg I cannot believe this recursive works 2023-02-03 16:30:39 -06:00
prototype.js thank you flying spagetti monster. I finally got this extension working 2023-02-03 20:31:12 -06:00
README.md Updating the docs and stuff 2023-02-04 09:39:42 -06:00
styles.css added boiler plate and stuff 2023-02-03 12:11:50 -06:00
tsconfig.json added boiler plate and stuff 2023-02-03 12:11:50 -06:00
version-bump.mjs added boiler plate and stuff 2023-02-03 12:11:50 -06:00
versions.json added boiler plate and stuff 2023-02-03 12:11:50 -06:00

Obsidian X86 Flow Graph

Obsidian File Color Banner

What is this?

This is a plugin for Obsidian, that converts x86 assembly into a flow diagram using Obsidian Canvases

Usage

This plugin adds a command called x86-create-flow-diagram. To use this plugin you must highlight a valid x86 code block (without the ``` at the start and end) and run the command.

This plugin requires a specific format for the assembly in order to properly generate nodes and edges for the flow graph.

The key format features are as a follows:

  1. All instructions must be indeneted
  2. Location for jumps must have no spaces before the location name
  3. jmp instruction must be used for unconditional jumps (1 branch)
  4. any other instruction beginning with a j is treated as a conditional jump (2 branches)

This is an example of a valid x86 code block for use with this plugin

	cmp [ebp+var_8], 1
	jz loc_401027
	cmp [ebp+var_8], 2
	jz loc_40103D
	cmp [ebp+var_8], 3
	jz loc_401053
	jmp loc_401058
loc_401027
	Code for case 1
	jmp loc_401058
loc_40103D
	Code for case 2
	jmp loc_401058
loc_401053
	Code for case 3
loc_401058
	Program end

running x86-create-flow-diagram on the above codeblock would result in the following graph being produced:

Sample Graph #1

Changing the palette

To add colors to the palette open the plugin settings, and click the + button. Then use the color picker to select the color, and input a name for the color. Afterwards it will appear in the Set color modal. You can add as many colors as you need.

Adding a color

Compatibility

This plugin has been tested with a few other community plugins:

  • Icon Folder
    • Should work out of the box, and colors should automatically be applied to the icons as well.
  • Folder Note
    • Will also work out of the box, however the underlines added to the files will not be colored.

    • Personally I use the following CSS snippet locally:

      .nav-folder.alx-folder-with-note>.nav-folder-title>.nav-folder-title-content {
        text-decoration-style: dotted;
        text-decoration-color: inherit;
      }
      

      Which will make make the underline use the colors defined by this plugin. The result looks something like this:

      Example with icons and folder notes