Git Product home page Git Product logo

obsidian-tidy-footnotes's Introduction

Obsidian Tidy Footnotes

Adds a command in Obsidian that tidies your footnotes so they're easy to follow:

  • Consolidates all footnote definitions into one place, sorted by appearance
  • Re-indexes numbered footnotes (e.g., [^1][^4][^2] becomes [^1][^2][^3])

Demo

Inspired by obsidian-footnotes plugin.

How to Install

From inside Obsidian:

  1. Go to Settings β†’ Community plugins.
  2. Disable Safe mode.
  3. Click Browse, search for Tidy Footnotes, and click Install.
  4. Click the toggle button to enable the plugin.

For manual installation, download this repo and copy over main.js and manifest.json to your vault: VaultFolder/.obsidian/plugins/tidy-footnotes/.

How to Use

Run Tidy Footnotes: Tidy Footnotes from the Command Palette. Or, set it as a hotkey from Settings β†’ Hotkeys.

Caveats

  • Currently, footnotes in code blocks are also parsed instead of being ignored.
  • The original positions of footnote definitions are not maintained. The plugin will always move all definitions to where the first definition is found.
  • Non-numbered foonotes (e.g., [^abc]) doesn't affect the re-indexing of numbered footnotes.

Development

  1. Clone this repo.
  2. npm i or yarn to install dependencies.
  3. npm run dev to start compilation in watch mode.
  4. bash install-built.sh /path/to/your/vault -d to create symbolic links of built files to your vault for quick development.
  5. npm run test to run unit tests.

Note: CodeMirror is imported for testing with the Doc interface. It may break in the future if the version no longer matches what Obsidian uses.

Release

  1. Run yarn build.
  2. Bump version in manifest.json and versions.json.
  3. Add changes in CHANGELOG.md.
  4. Add a new release in Github with the changelog texts and the built main.js and manifest.json attached.

Support

If you really like this plugin and want to support its development, please consider buying me a coffee πŸ™‚ Thanks!

Buy Me A Coffee

obsidian-tidy-footnotes's People

Contributors

charliecm avatar ryanpcmcquen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

obsidian-tidy-footnotes's Issues

This plugin doesn't work well in a compiled note with the Longform plugin

I was trying to compile three notes with the Longform plugin and the footnote numbers were expected to be put in an order with this plugin but it didn't work.

Here is the snapshot before I used this plugin:
image

Here is after using the plugin:
image

FYI, I am using Windows and Minimal Theme, Obsidian v.0.12.15

Thanks

[Feature Request] Tidy links too

Say I have a table like this:

| Device                                                                                                                                                       | Connector                 | Output Power                  |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------- | ----------------------------- |
| **USB PD (Extended Power Range)**                                                                                                                            | USB-C                     | 240W (5/9/15/20/28/35/48V 5A) |
| [Apple 140W USB-C Power Adapter](https://www.apple.com/shop/product/MLYU3AM/A/140w-usb-c-power-adapter)                                                      | USB-C (& MagSafe 3 cable) | 140W (28V 5A)                 |

The link makes the table very hard to edit since it's so wide. It would be great if there were a way to tidy these up and convert the hyperlinks into footnotes too

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.