Skip to content

Commit

Permalink
chore: 👷 Update build stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
mcndt committed Mar 4, 2023
1 parent 629099b commit 6c153d4
Show file tree
Hide file tree
Showing 69 changed files with 27,442 additions and 14,865 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
OUTDIR="/Users/maximecannoodt/Documents/obsidian-test-vault/test-vault/.obsidian/plugins/obsidian-toggl-integration"
DEBUG=TRUE
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
OUTDIR="./test-vault/.obsidian/plugins/obsidian-toggl-integration"
66 changes: 44 additions & 22 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,23 +1,45 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"env": { "node": true },
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"parserOptions": {
"sourceType": "module"
},
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }],
"@typescript-eslint/ban-ts-comment": "off",
"no-prototype-builtins": "off",
"@typescript-eslint/no-empty-function": "off"
}
}
"root": true,
"parser": "@typescript-eslint/parser",
"env": { "node": true },
"plugins": ["@typescript-eslint", "import", "sort-keys-fix"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript"
],
"parserOptions": {
"sourceType": "module"
},
"rules": {
"sort-keys-fix/sort-keys-fix": "warn",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }],
"@typescript-eslint/ban-ts-comment": "off",
"no-prototype-builtins": "off",
"@typescript-eslint/no-empty-function": "off",
"import/no-unresolved": "off",
"import/order": [
"warn",
{
"groups": ["builtin", "external", "internal", "parent", "sibling"],
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": [],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": false
}
}
]
}
}
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release Obsidian plugin
on:
push:
tags:
- '*'
- "*"

env:
PLUGIN_NAME: obsidian-toggl-integration # Change this to match the id of your plugin.
Expand All @@ -17,7 +17,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
node-version: "14.x"

- name: Build
id: build
Expand Down
9 changes: 5 additions & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"semi": true,
"trailingComma": "none",
"singleQuote": true,
"useTabs": true,
"trailingComma": "all",
"singleQuote": false,
"useTabs": false,
"tabWidth": 2,
"printWidth": 80,
"jsxBracketSameLine": true
}
}
29 changes: 15 additions & 14 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"editor.formatOnSave": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.rulers": [
80
],
"conventionalCommits.scopes": [
"reports",
"api"
]
}
},
"editor.rulers": [80],
"editor.tabSize": 2,
"editor.detectIndentation": false,
"conventionalCommits.scopes": ["reports", "api"],
"editor.definitionLinkOpensInPeek": true
}
23 changes: 10 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## [0.9.0]

- Some code cleanup
- Some code cleanup
- Big queries are now performed sequentially to prevent all queries failing due to rate limiting (API error 429)
- Timer suggestions now come from up to 10 days in the past (previously 7 days)

Expand All @@ -16,13 +16,12 @@

- Reverted features from 0.8.0 release due to breaking errors. I will polish this up in the future for a rerelease.

## [0.8.0]
## [0.8.0]

### ✨ Features

- Toggl reports are now cached for the duration of an Obsidian user session, meaning that reports are only fetched once. Subsequent reports over the same time spans should now load nearly instantly!


## [0.7.3]

### ⚙️ Internal
Expand All @@ -36,7 +35,7 @@
- Fix timers having "Unknown project" on opening Obsidian (issue #32)
- Fixed the start/stop button accent color to be more accessible on Minimal Theme (issue #67)

## [0.7.1]
## [0.7.1]

### ✨ Features

Expand All @@ -54,7 +53,7 @@
- Entries in a list report now show applied tags. Entries will only stack if their tags are the same. (issue #44)
- Added support for filtering reports by tags via `{INCLUDE|EXCLUDE} TAGS #tag1[, #tag2, ...]` (issue #55)

See the [documentation](https://github.com/mcndt/obsidian-toggl-integration/wiki/Toggl-Query-Language-(TQL)-Reference#filtering-tags) on how to use tag filters.
See the [documentation](<https://github.com/mcndt/obsidian-toggl-integration/wiki/Toggl-Query-Language-(TQL)-Reference#filtering-tags>) on how to use tag filters.

### ⚙️ Internal

Expand All @@ -77,14 +76,13 @@ See the [documentation](https://github.com/mcndt/obsidian-toggl-integration/wiki
### 🐛 Fixes

- Fixed summary report pie chart showing a black segment for time entries with no assigned project. (issue #53)
## [0.5.1]

## [0.5.1]

### ✨ Features

- Time entries with a Markdown link as description (e.g. automatically started from Todoist tasks) will now only display the link annotation in list reports. (issue #43)


### 🐛 Fixes

- Fix time entries with very long descriptions overflowing the rendered list report block (issue #43)
Expand All @@ -98,7 +96,7 @@ See the [documentation](https://github.com/mcndt/obsidian-toggl-integration/wiki
- Added support for filtering reports by client via `{INCLUDE|EXCLUDE} CLIENTS "Client A"[, "Client B", ...]`
- Added support for grouping list reports by client via `GROUP BY CLIENT`

## [0.4.1]
## [0.4.1]

### 🐛 Fixes

Expand Down Expand Up @@ -171,10 +169,10 @@ Hopefully this won't happen again!

Hello! This release features a basic implementation of the Toggl Track summary view for the sidebar.
Currently, this view can show you an overview of your day (total time + breakdown per project),
but in the future I will add more functionality to it (e.g. choose between day or week summary).
but in the future I will add more functionality to it (e.g. choose between day or week summary).
Additonally, you can see your current time entry here as well as a button to start or stop time entries.

If you have any suggestions on how this sidebar panel can be improved for your workflow, please post in the Discussions tab on GitHub or tag me on the Obsidian Discord server!
If you have any suggestions on how this sidebar panel can be improved for your workflow, please post in the Discussions tab on GitHub or tag me on the Obsidian Discord server!

### ✨ Features

Expand All @@ -194,9 +192,8 @@ If you have any suggestions on how this sidebar panel can be improved for your w

## [0.1.1] - 2021-08-08


### ✨ Features

- Add feature to view your current time entry in the toolbar
- Add command to start a new time entry (restart recent timer or choose project & description for new timer)
- Add command to stop a running time entry
- Add command to stop a running time entry
128 changes: 67 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,67 @@
[![GitHub tag (Latest by date)](https://img.shields.io/github/v/tag/mcndt/obsidian-toggl-integration)](https://github.com/mcndt/obsidian-toggl-integration/releases) ![GitHub all releases](https://img.shields.io/github/downloads/mcndt/obsidian-toggl-integration/total)
# Toggl Track Integration for Obsidian
Add integration with the Toggl Track API to manage your timers inside Obsidian.

## Functionality
-**NEW**: **Generate time tracking reports inside of your notes with code blocks**
- See your current timer and how long it has been running in the status bar
- Get a summary of your day in the side panel
- Create, start, and stop a new timer using the command palette, or restart an recent one

![](https://raw.githubusercontent.com/mcndt/obsidian-toggl-integration/master/demo2.gif)

## Rendering time reports inside your notes

Using simple code blocks it is possible to render time tracking reports inside your Obsidian notes. For example,

~~~
```toggl
SUMMARY
PAST 7 DAYS
```
~~~

Will result in something like:

![example-summary-report](https://user-images.githubusercontent.com/23149353/148293946-4e70ede9-0a9f-401e-af4b-f954caaeed84.png)

You can find a full tutorial and reference on rendering time reports in the [plugin wiki](https://github.com/mcndt/obsidian-toggl-integration/wiki/Toggl-Query-Language-(TQL)-Reference).

## Setup

Configuring this plugin requires you to first request an API token from Toggl. More info on how to do this [can be found here](https://support.toggl.com/en/articles/3116844-where-is-my-api-token-located).

To set up this plugin, simply enter your API token in the settings tab, click connect and select the Toggl Workspace you wish to use.

![settings](https://raw.githubusercontent.com/mcndt/obsidian-toggl-integration/master/settings.png)

## Use with other plugins:

### QuickAdd

The developer of the QuickAdd plugin has created a preset menu for timers using QuickAdd. Instructions are available [here](https://github.com/chhoumann/quickadd/blob/master/docs/Examples/Macro_TogglManager.md) and you can find out how he did it on the Obsidian Discord server ([link to message](https://discord.com/channels/686053708261228577/707816848615407697/876069796553293835)).

## Roadmap

You can see my more detailed roadmap for this plugin on this page: [Development Roadmap](https://github.com/mcndt/obsidian-toggl-integration/projects/1). I try to keep the cards in each column sorted by priority.

## Feature Requests
Please make feature requests in the GitHub discussions tab: [click here](https://github.com/mcndt/obsidian-toggl-integration/discussions/categories/feature-requests)

If you would to like to talk about the plugin with me more directly, you can find me in the Obsidian Discord server as `Maximio#6460`. Feel free to tag me!

## Dependencies
Currently I rely on this repo for providing a JavaScript interface with the Toggl Track API: https://github.com/saintedlama/toggl-client

However in the future I might write fork this so I can refactor it to use mobile friendly APIs (e.g. using Obsidian’s own request API).

## Support
If you like this plugin and want to support me, you can do so via *Buy me a Coffee*:

<a href="https://www.buymeacoffee.com/mcndt"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=mcndt&button_colour=5F7FFF&font_colour=ffffff&font_family=Inter&outline_colour=000000&coffee_colour=FFDD00"></a>
[![GitHub tag (Latest by date)](https://img.shields.io/github/v/tag/mcndt/obsidian-toggl-integration)](https://github.com/mcndt/obsidian-toggl-integration/releases) ![GitHub all releases](https://img.shields.io/github/downloads/mcndt/obsidian-toggl-integration/total)

# Toggl Track Integration for Obsidian

Add integration with the Toggl Track API to manage your timers inside Obsidian.

## Functionality

-**NEW**: **Generate time tracking reports inside of your notes with code blocks**
- See your current timer and how long it has been running in the status bar
- Get a summary of your day in the side panel
- Create, start, and stop a new timer using the command palette, or restart an recent one

![](https://raw.githubusercontent.com/mcndt/obsidian-toggl-integration/master/demo2.gif)

## Rendering time reports inside your notes

Using simple code blocks it is possible to render time tracking reports inside your Obsidian notes. For example,

````
```toggl
SUMMARY
PAST 7 DAYS
```
````

Will result in something like:

![example-summary-report](https://user-images.githubusercontent.com/23149353/148293946-4e70ede9-0a9f-401e-af4b-f954caaeed84.png)

You can find a full tutorial and reference on rendering time reports in the [plugin wiki](<https://github.com/mcndt/obsidian-toggl-integration/wiki/Toggl-Query-Language-(TQL)-Reference>).

## Setup

Configuring this plugin requires you to first request an API token from Toggl. More info on how to do this [can be found here](https://support.toggl.com/en/articles/3116844-where-is-my-api-token-located).

To set up this plugin, simply enter your API token in the settings tab, click connect and select the Toggl Workspace you wish to use.

![settings](https://raw.githubusercontent.com/mcndt/obsidian-toggl-integration/master/settings.png)

## Use with other plugins:

### QuickAdd

The developer of the QuickAdd plugin has created a preset menu for timers using QuickAdd. Instructions are available [here](https://github.com/chhoumann/quickadd/blob/master/docs/Examples/Macro_TogglManager.md) and you can find out how he did it on the Obsidian Discord server ([link to message](https://discord.com/channels/686053708261228577/707816848615407697/876069796553293835)).

## Roadmap

You can see my more detailed roadmap for this plugin on this page: [Development Roadmap](https://github.com/mcndt/obsidian-toggl-integration/projects/1). I try to keep the cards in each column sorted by priority.

## Feature Requests

Please make feature requests in the GitHub discussions tab: [click here](https://github.com/mcndt/obsidian-toggl-integration/discussions/categories/feature-requests)

If you would to like to talk about the plugin with me more directly, you can find me in the Obsidian Discord server as `Maximio#6460`. Feel free to tag me!

## Dependencies

Currently I rely on this repo for providing a JavaScript interface with the Toggl Track API: https://github.com/saintedlama/toggl-client

However in the future I might write fork this so I can refactor it to use mobile friendly APIs (e.g. using Obsidian’s own request API).

## Support

If you like this plugin and want to support me, you can do so via _Buy me a Coffee_:

<a href="https://www.buymeacoffee.com/mcndt"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=mcndt&button_colour=5F7FFF&font_colour=ffffff&font_family=Inter&outline_colour=000000&coffee_colour=FFDD00"></a>
10,715 changes: 10,714 additions & 1 deletion bulma.min.css

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions decs.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
declare module 'toggl-client';
declare module 'simple-svelte-autocomplete';
declare module "toggl-client";
declare module "simple-svelte-autocomplete";
declare module "obsidian";
declare module "env";
Loading

0 comments on commit 6c153d4

Please sign in to comment.