A plugin for tracking and visualizing timeline events in Obsidian with advanced features.
- Automatic extraction of timeline events from diary files
- Display events in chronological order (newest first)
- Support for custom event marker formats
- Configurable diary folder path
- Filtering and searching timeline events
- Basic statistics with visible event count
-
Beautiful Vertical Timeline Visualization:
- Vertical timeline axis with nodes
- Event cards with hover effects and shadows
- Responsive design for different screen sizes
- Loading and empty states for better user feedback
-
Enhanced Event Extraction:
- Extract events from content under specific headers (like Dataview)
- Support for customizable tag identifiers (
## 时间线or## Timeline) - Extract content from specified header to next same or higher level header
- Support for sub-headers and nested content structure
- Only explicitly marked timeline events are displayed
- No fallback to diary file first line content
-
Subheader Filtering:
- Extract and display all subheaders from timeline events
- Checkbox-based filtering by subheaders
- Select/Deselect all subheaders with one click
- Real-time filtering of timeline events based on selected subheaders
-
Smart Filtering Options:
- Show Same Day Subheaders: When filtering by subheader, show all subheaders from the same day
- Combined search and subheader filtering
- Search results respect current subheader filter selections
- Diary Folder Path: Specify the folder containing your diary files (default: "日记")
- Event Marker: Customize the text used to mark timeline events (default: "[时间线]")
- Tag Identifier: Identifier used to extract tagged content (default: "时间线")
- Show Same Day Subheaders: Toggle to control same-day subheader visibility during filtering
- Automatic detection of new, modified, or deleted diary files
- Instant timeline refresh when diary files change
- No need to restart the plugin for updates
- Download the plugin files
- Place the plugin folder in your Obsidian vault's
.obsidian/pluginsdirectory - Enable the plugin in Obsidian's settings
- Node.js
- npm
-
Install dependencies:
npm install -
Build the plugin:
npm run build -
For development with automatic rebuilding:
npm run dev
- Open Obsidian Settings
- Find "Timeline Tracker" plugin settings
- Configure the diary folder path (optional, default: "日记")
- Set the event marker (default is "[时间线]")
- Configure tag identifier (default is "时间线")
- Toggle "Show Same Day Subheaders" option
In your diary files, add timeline events using the following format:
- [时间线] Event descriptionOr use a custom event marker:
- [Timeline] Event descriptionCreate sections with specific headers to organize timeline events:
# 2023-08-25
Today is an important milestone.
## 时间线
### 本周完成工作
- 完成用户反馈分析
- 确定下一阶段开发计划
### 下周计划
- 准备项目演示材料
- 开始新功能开发
### 风险与问题
- 资源不足可能影响进度- Open the command palette (Ctrl/Cmd + P)
- Run "Timeline Tracker: Open Timeline View"
- The timeline view will appear in the right sidebar
- Use the checkboxes below the search box to filter by subheaders
- Click "全选/全不选" to toggle all subheaders
- Only events containing selected subheaders will be displayed
- Type in the search box to filter events by content
- Search results will respect current subheader filter selections
- Clear the search box to return to subheader filtering
- When enabled, filtering by subheaders shows all subheaders from the same day
- When disabled, only the selected subheaders are displayed
Here's an example of a diary file:
# 2023-06-15
Today I started a new project.
## 时间线
### 今日完成
- [时间线] Project kickoff meeting
- [时间线] Technology stack decision
- [时间线] Initial task assignment
### 明日计划
- [时间线] Set up development environment
- [时间线] Create project documentation
## Project Notes
This project is very important to our team.You can customize the following options in the settings:
- Diary Folder Path: Specify the folder containing your diary files
- Event Marker: Customize the text used to mark timeline events
- Tag Identifier: Identifier used to extract tagged content (e.g., ## 时间线 or ## Timeline)
- Show Same Day Subheaders: When filtering by subheader, show all subheaders from the same day
obsidian-timeline-plugin/
├── manifest.json # Plugin metadata
├── main.js # Compiled plugin code
├── styles.css # Plugin styles
├── src/
│ ├── main.ts # Main plugin logic
│ ├── view.ts # Timeline view component
│ ├── settings.ts # Settings tab
│ ├── data-fetcher.ts # Data fetching logic
│ ├── constants.ts # Plugin constants
│ └── types.d.ts # Type definitions
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── esbuild.config.mjs # Build configuration
Feel free to fork this repository and submit pull requests with improvements.
MIT