Daily Activity

approved

by trydalch

Output a list of the files changed/created today in the active file.

47 stars16,556 downloadsUpdated 11mo ago
View on GitHub

Obsidian Activity Plugin

GitHub release (latest SemVer) GitHub All Releases

This is a plugin for Obsidian (https://obsidian.md).

This plugin is very young and written quickly, but can be used effectively with daily notes to keep a record of the work done and which files you continue to come back to.

Please open an issue for any bugs, feature requests, or feedback at https://github.com/trydalch/obsidian-daily-activity/issues/new

Commands

CommandDescription
Links to Files Created from date to dateInserts a list of links to files created between two dates. You can specify dates and filters in the modal window. The default is today and there are no filters. Supports natural language dates.
Links to Files Modified from date to dateInserts a list of links to files modified between two dates. You can specify dates and filters in the modal window. The default is today and there are no filters. Supports natural language dates.
Plain Text List of Files Created from date to dateInserts a list of files created between two dates. You can specify dates and filters in the modal window. The default is today and there are no filters. Supports natural language dates.
Plain Text List of Files Modified from date to dateInserts a list of files modified between two dates. You can specify dates and filters in the modal window. The default is today and there are no filters. Supports natural language dates.
Stats for dateInserts a table with counts of files modified & files created by date. Defaults for today, but dates can be specified by selecting them in the editor. Supports natural language dates. See below for an example.
(Deprecated) Today's StatsInserts a table containing stats from today's writing activity. <br> Will be removed in future version
View Recent Activity LogsDisplays a formatted log of your recent activity from the last 24 hours, including event types and file changes.
Daily SummaryInserts a summary of today's activity including total events, event types breakdown, and content changes.
Weekly OverviewGenerates a comprehensive overview of your activity for the past 7 days, with daily breakdowns and weekly totals.
Today's TimelineCreates a chronological timeline of today's activity, organized by hour and event type.
Export Activity DataExports your activity data to CSV or JSON format with customizable date ranges and fields.
Generate Activity DashboardCreates a comprehensive dashboard with visualizations of your activity data.
Refresh DashboardUpdates your activity dashboard with the latest data.
Clear Failed OperationsClears any failed database operations that may have occurred during plugin operation.

Settings

The plugin now includes settings to customize its behavior:

General Settings

SettingDescription
Insert locationChoose whether to insert content at the cursor position or append to the end of the document
Default link styleSet whether to use wiki-style links or plain text by default
Include headerToggle whether to include a header above inserted lists
Header templateCustomize the header format. You can use {type} for file type (Created/Modified) and {date} for the date
Exclude current noteWhen enabled, excludes the current note from the generated lists

Filter Settings

SettingDescription
Show filter dialogControls whether to show the filter dialog when running commands. If enabled (default), you'll be prompted each time and the settings below will be disabled. If disabled, the plugin will use the filters defined below.
Include regex patternsFiles matching these regex patterns will be included in the results (only available when "Show filter dialog" is disabled)
Exclude regex patternsFiles matching these regex patterns will be excluded from the results (only available when "Show filter dialog" is disabled)
Include pathsFiles containing these path segments will be included in the results (only available when "Show filter dialog" is disabled)
Exclude pathsFiles containing these path segments will be excluded from the results (only available when "Show filter dialog" is disabled)

Activity Tracking Settings

SettingDescription
Enable activity trackingTurns on/off the detailed tracking of file events
Track file creationWhen enabled, tracks creation of new files
Track file modificationWhen enabled, tracks modifications to existing files
Track file deletionWhen enabled, tracks when files are deleted
Track file renameWhen enabled, tracks when files are renamed
Content tracking debounce intervalThe minimum time (in milliseconds) between content tracking events
Database write debounce intervalThe minimum time (in milliseconds) between database writes
Activity tracking include pathsPaths to include in activity tracking
Activity tracking exclude pathsPaths to exclude from activity tracking

Batch Modification Settings

SettingDescription
Enable modification batchingWhen enabled, combines multiple modifications into a single event after inactivity
Inactivity thresholdRecords modifications after this period of inactivity (in milliseconds)

Export Settings

SettingDescription
Default export formatChoose between CSV or JSON format for data exports
Auto-export scheduleSet to never, daily, weekly, or monthly
Auto-export pathPath in your vault to save exported files
Export fieldsSelect which fields to include in your exports

Dashboard Settings

SettingDescription
Enable dashboardTurns on/off the activity dashboard feature
Dashboard pathThe file path where the dashboard will be created
Auto-update dashboardWhen enabled, automatically updates the dashboard at set intervals
Update interval (hours)How often to automatically update the dashboard
Use Charts pluginWhen enabled, uses the Obsidian Charts plugin for visualizations if available

Logging Settings

SettingDescription
Log levelControls the verbosity of plugin logs

Examples

  • Stats for date

    • No selection: Outputs stats for today
    • yesterday: Stats for yesterday
    • 2021-02-20: Stats for 2021-02-20
    • 2021-02-15 to 2021-02-20: Stats between those dates, inclusive range.
    • 5 days ago to today: Stats for that range

    For more examples of natural language date formats, see here: https://github.com/wanasit/chrono

Roadmap

  • Add Activity Stats Command (# files created, # modified)
  • Add option to insert stats for dates
  • Add stats for date range
  • Add support for natural language dates
  • Add settings page
  • Add filtering options
  • Add templating
  • Add filtering stats by tag
  • Add background file monitoring with detailed stats
  • Implement memory optimizations for large vaults

Future Features

Enhanced Statistics Tracking (Coming in 1.0.0+)

The plugin will soon support advanced statistics tracking including:

  1. Writing Velocity Metrics

    • Track words written per hour/day
    • Monitor your most productive times
    • Compare performance across different time periods
  2. File Interaction Analytics

    • Identify your most frequently edited files
    • Track files with most additions/deletions
    • Analyze which files receive continuous attention vs. occasional edits
  3. Time Pattern Analysis

    • Discover your most productive hours
    • Identify weekly activity patterns
    • Track long-term productivity trends
  4. Content Evolution Tracking

    • Monitor how files grow and mature over time
    • Analyze editing vs. adding content patterns
    • Track when files stabilize (editing decreases)

Memory Optimizations for Large Vaults

For users with large vaults, we're planning several optimizations:

  1. Smart Content Tracking

    • Configurable file size limits for detailed tracking
    • Metadata-only tracking for very large files
    • Efficient storage of file differences
  2. Adaptive Memory Management

    • Automatically unload inactive files from memory
    • Prioritize actively edited files
    • Balance between tracking accuracy and memory usage

For Developers

Releasing a New Version

This plugin uses GitHub Actions to automate the release process. To release a new version:

  1. Make sure your changes are committed to the feature branch
  2. Merge your feature branch to master
  3. Check out the master branch locally
  4. Make sure you have no uncommitted changes
  5. Run the release command:
    npm run release
    

This will:

  • Build the plugin
  • Bump the version number in package.json
  • Update manifest.json and versions.json via the version script
  • Create a git commit with all version changes
  • Create a git tag
  • Push the commit and tag to GitHub

The GitHub Action will automatically:

  • Create a new release on GitHub
  • Generate release notes
  • Attach the necessary plugin files

For a major or minor version instead of a patch:

npm run release-minor
# or
npm run release-major

Manual Version Process

If you need more control over the process:

  1. Make sure all your changes are committed
  2. Build the plugin:
    npm run build
    
  3. Bump the version (creates a commit and tag):
    npm version patch  # or minor/major
    
  4. Push changes and tags:
    git push --follow-tags
    

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.