Skip to content

New update adressing issue #7 and more #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
This plugin integrates [Markwhen](https://github.com/mark-when/markwhen/) into [Obsidian.md](https://obsidian.md/). You can use markwhen syntax to create timelines.

> [!Note]
> Latest release: 0.0.2
> Latest release: 0.0.3
> Document version: 0.0.2

## Installation
Expand Down
3 changes: 2 additions & 1 deletion copyAssets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

cp ./out/* ~/Documents/Obsidian\ Vault/.obsidian/plugins/markwhen
cp ./styles.css ~/Documents/Obsidian\ Vault/.obsidian/plugins/markwhen
cp ./manifest.json ~/Documents/Obsidian\ Vault/.obsidian/plugins/markwhen
cp ./manifest.json ~/Documents/Obsidian\ Vault/.obsidian/plugins/markwhen
cp ./markwhen.md ~/Documents/Obsidian\ Vault/.obsidian/plugins/markwhen
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"id": "markwhen",
"name": "Markwhen",
"version": "0.0.2",
"version": "0.0.3",
"minAppVersion": "1.0.0",
"description": "Create timelines, gantt charts, calendars, and more using markwhen.",
"author": "Markwhen",
"authorUrl": "https://github.com/mark-when",
"isDesktopOnly": true
}
}
197 changes: 197 additions & 0 deletions markwhen.md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not opposed to this but I think the file should be shorter. Most people should be deleting everything anyway after creation.

Does it need to be .md or can it be .mw?

Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
---
title: Welcome to Markwhen!

edit:
- [email protected]

view: \*

#Project1: #d336b1
---
section Welcome #welcome
now: This example timeline showcases some of markwhen's features.

now: For more information, view the documentation [here](https://docs.markwhen.com) or join the [discord](https://discord.gg/3rTpUD94ac)
#welcome

now: Note that changes you make here are not saved
If you want to make a new markwhen you should open a tab at the bottom or click open in the sidebar
endSection

section All Projects
group Project 1 #Project1
// Supports ISO8601
2023-01/2023-03: Sub task #John
2023-03/2023-06: Sub task 2 #Michelle
More info about sub task 2

- [ ] We need to get this done
- [x] And this
- [ ] This one is extra

2023-07: Yearly planning
endGroup
group Project 2 #Project2
2023-04/4 months: Larger sub task #Danielle

// Supports American date formats
03/2023 - 1 year: Longer ongoing task #Michelle

- [x] Sub task 1
- [x] Sub task 2
- [ ] Sub task 3
- [ ] Sub task 4
- [ ] so many checkboxes omg

10/2023 - 2 months: Holiday season
endGroup

group Project 3
01/2024: Project kickoff
02/2024-04/2024: Other stuff
endGroup
endSection

2023-01-03 every other week for 1 year: Biweekly meeting

// Events that don't have explicit end dates have inferred ranges - for example, when a year is specified, it lasts from the beginning of that year to the end of it.
2024: A year-long event

// Inferred ranges are as granular as their definitions.
09/2024: one month

2025-05-05: one day

Jan 4 2025 8am: instant

// You can also be specific with your ranges
2024/2025: An event that lasts two years

November 8, 2022 9am - November 9, 2023, 10am: one year, one day, and one hour

now: [More documentation](https://docs.markwhen.com/syntax/events.html)

// Event descriptions last from the date range definition up to the next event
2029-04-25/2029-05-03: Descriptions can be one line

2029-04-25/2029-05-03: Or
they can span
multiple lines

1/27/2025: [] An event can have a checkbox for completion
Put square brackets at the start of the event description

1/27/2026: [x] To mark an event as completed, put an x in the square brackets

1/27/2027: Events can have lists

- [ ] checkbox list item
- [x] a completed checkbox list item
- simple list item
- another simple list item

1/27/2028 - 1 year: 68% Manually indicate an event's completion with a percentage in the description

Partially completed events will have their event bar partially filled that amount

1 year: Links are markdown-style: [This is a link](https://markwhen.com)

1 year: Images are also markdown-style:
![](https://blog.markwhen.com/images/calendar1.png)

1 year: Locations (which are more useful for the map view) can be indicated in a similar way: [Hawaii](location) [Alaska](map)

2024: Refer to other markwhen documents with `@` syntax: @rob

now: [More documentation](https://docs.markwhen.com/syntax/event-descriptions.html)

// Events can be grouped together

group
1/27/2024: Happy birthday
2020-03: Covid started in the US
endGroup

group Group with title

Feb 2 2025: Interviewing
Feb 8 2025: Write report
Feb 19 2025: Presentation

endGroup

group Groups can contain other groups #big

group Smaller plan #small #nested

1 year: Accomplish something

2 years: Accomplish something else

endGroup

1 year: Things are accomplished

endGroup

section Sections extend across the screen

2023: Start year

section Nested section #nested

2025: End year

endSection
endSection

now: [More documentation](https://docs.markwhen.com/syntax/groups-and-sections.html)

// Specify tag colors in the header (before any event)
#Timeline: #abf

now: Events and groups can have tags

section Tagged events #Timeline
Feb 18 1999: back in the day #Past #The90s
2043: in the future #TheOther90s

now: [More documentation](https://docs.markwhen.com/syntax/event-descriptions.html#tag)

2025: Event

1 year: This event happens immediately after the previous event and lasts for 1 year

#after

3 months - 1 month: This event happens 3 months after the previous event and lasts for 1 month
#after

by 2 weeks - 1 month: This event happens 2 weeks before the previous event and lasts 1 month
#before


2023: Event !base

after !base 1 year - 1 month: This event happens 1 year after the event with with id `base` and lasts for 1 month
#after

before !base 1 week day - 1 hour: This event happens 1 week day before the event with id `base` and lasts 1 hour
#before

October 7, 1989 every year for 10 years: ...
2025-03-04 every week for 12 weeks: ...
2022-01/2022-03 every other year x9: ...
Feb 1 2023 every 6 months for 10 times: ...

// Visually indicate that an event is an era or milestone with the tag #era or #milestone

2023-06-01/2023-08-20: Summer time #vacation

2023-08-21/2023-12-17: Back to school

2023-12-18/2024-01-05: Winter break #vacation #milestone

2024-01-08/2024-05-31: Back to school

2024-05-27/2024-05-31: Final project due #milestone
18 changes: 13 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "markwhen",
"version": "0.0.2",
"version": "0.0.3",
"description": "Markwhen integration for Obsidian.md",
"main": "main.js",
"type": "module",
Expand Down Expand Up @@ -33,6 +33,7 @@
"@markwhen/parser": "^0.10.15",
"@markwhen/resume": "^1.1.0",
"@markwhen/timeline": "^1.3.3",
"@markwhen/view-client": "^1.4.4"
"@markwhen/view-client": "^1.4.4",
"async-mutex": "^0.5.0"
}
}
1 change: 1 addition & 0 deletions src/MarkwhenCodemirrorPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export class MarkwhenCodemirrorPlugin implements PluginValue {
view: EditorView;
worker = useParserWorker((mw) => {
this.markwhen = mw;

this.view.dispatch({
effects: parseResult.of(mw),
});
Expand Down
Loading