Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
argenos committed Oct 26, 2020
1 parent 0ff9460 commit 7e6b32d
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
## Obsidian Sample Plugin
# nldates-obsidian

This is a sample plugin for Obsidian (https://obsidian.md).
Create date links using natural language processing using [chrono](https://github.com/wanasit/chrono) and some custom parsing.
To create a date link, select the text you want to change (e.g. `today`), and use the `NLP date` command. You can use the shortcut (default `CTRL + Y`) or the command palette (`Ctrl + P`).
For single-word dates (e.g. today, tomorrow, friday, etc.), it's possible to use the command without selecting the word first.

This project uses Typescript to provide type checking and documentation.
The repo contains the latest plugin API (obsidian.d.ts) in Typescript Definition format, which contains TSDoc comments describing what it does.
![fuzzy-dates](https://user-images.githubusercontent.com/5426039/89716767-1d768700-d9b0-11ea-99cf-b3bb6846a872.gif)

**Note:** The Obsidian API is still in early alpha and is subject to change at any time!
You can try with any of the standard dates, i.e. today, tomorrow, in 3 weeks, in 5 months, etc.
The only behaviours I changed were the following:

### How to use
| Write | Date |
| ----- | ---- |
| next week | next Monday |
| next [month] | 1st of next month |
| mid [month] | 15th of the month |
| end of [month] | last day of the month |

- Clone this repo.
- `npm i` or `yarn` to install dependencies
- `npm run dev` to start compilation in watch mode.

### How to install the plugin

- Copy over `main.js`, `styles.css`, `manifest.json` to your vault `vault/.obsidian/plugins/plugin-id/`.

### API Documentation

See https://github.com/obsidianmd/obsidian-api
If a date is not recognized, the link won't be created.

0 comments on commit 7e6b32d

Please sign in to comment.