This plugin for Obsidian.md helps you to keep attendance inside of your notes.
If you like this plugin, consider buying me a coffee.
⚠ This plugin is still in early stages of development, expect some bugs and make sure to backup your vault regularly!
Create a code block with the attendance
type:
```attendance
date: 2022-03-26
title: History Class
query: #person
```
The date
, title
and query
fields are all required.
⚠ If you create multiple attendance lists in the same note, make absolutely sure they have either different "date" ore "title" attributes. Otherwise when you want to update the second attendance list, the plugin will overwrite the first list.
currently unused
The date field lets you specify the date of the event you want to take attendance for. This field is currently unused, but will be used in the future for exporting attendance lists.
currently unused
The title field lets you specify the title of the event. This field is currently unused but will be used in the future to allow exporting only certain events. This could for example be set to a specific class name if you are taking attendance for a class.
The query field lets you specify what notes are considered possible attendees of the event. The list will include all notes that match the query field.
The following query fields are currently supported:
Example:
query: #person/class-a
This query will match all notes with the #person/class-a
tag.
Example:
query: "people"
This query will match all notes in the people
folder.
Example:
query: [[PersonMOC]]
This query will match all notes that are linked from the [[PersonMOC]]
note or that link to it.
Example:
query: #class-a and [[Students]]
This will only match notes that have the tag #class-a
and either link to the [[Students]]
note or are linked from it.
When combining more than two queries it is recommended to use parentheses to keep the query readable. If none are explicitly set, the plugin will automatically put the parentheses as follows:
query: (#tag-a and (#tag-b and (#tag-c or #tag-d)))
When you click on one of the three buttons ("present", "absent", "excused"), the codeblock behind the list will be modified to save the attendance state that you selected. The following shows an example of a codeblock with one present and one excused attendee:
```attendance
date: 2022-03-26
title: History Class
query: #person
* [[Ray M. Smart.md]], "present", ""
* [[Winona Philpott.md]], "excused", ""
```
- Download the
main.js
,styles.css
andmanifest.json
files from the latest release. - Create the folder
MyVault/.obsidian/plugins/obsidian-attendance
and put the downloaded files in there. - Enable the plugin in the community plugins page in the settings.
You are more than welcome to contribute to this plugin! You can contribute by:
- Filing issues for bugs you encountered
- Adding to the documentation
- Adding a feature request
- Making a pull request to the code
- Clone this repo into the folder
MyTestVault/.obsidian/obsidian-attendance
npm i
to install dependenciesnpm run dev
to start compilation in watch mode.
To conveniently reload the plugin every time you make a change, use the hot-reload plugin.
Run npm run lint
to see all the errors and npm run lint -- --fix
to fix all errors that are automatically fixable.
- Update minimum obsidian version in
manifest.json
. - Run
npm run build && npm run test
- Run
npm version [patch, minor, major]
to update the version. - Run
git push && git push --tags
- Run
gh release create $(cat manifest.json | jq ".version" -r) --generate-notes
to create the github release - Run
gh release upload $(cat manifest.json | jq ".version" -r) manifest.json styles.css main.js
- Check https://github.com/obsidianmd/obsidian-releases/blob/master/plugin-review.md
- Publish an initial version.
- Make sure you have a
README.md
file in the root of your repo. - Make a pull request at https://github.com/obsidianmd/obsidian-releases to add your plugin.
See https://github.com/obsidianmd/obsidian-api
This plugin is inspired and uses code from the following plugins:
- Obsidian Dataview