Skip to content
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

Add Awesome Brain Manager plugin #1647

Merged
merged 3 commits into from
Mar 28, 2023
Merged

Add Awesome Brain Manager plugin #1647

merged 3 commits into from
Mar 28, 2023

Conversation

JuckZ
Copy link
Contributor

@JuckZ JuckZ commented Feb 10, 2023

I am submitting a new Community Plugin

Repo URL

Link to my plugin: https://github.com/JuckZ/awesome-brain-manager

Release Checklist

  • I have tested the plugin on
    • Windows
    • macOS
    • Linux
    • Android (if applicable)
    • iOS (if applicable)
  • My GitHub release contains all required files
    • main.js
    • manifest.json
    • styles.css (optional)
  • GitHub release name matches the exact version number specified in my manifest.json (Note: Use the exact version number, don't include a prefix v)
  • The id in my manifest.json matches the id in the community-plugins.json file.
  • My README.md describes the plugin's purpose and provides clear usage instructions.
  • I have read the tips in https://github.com/obsidianmd/obsidian-releases/blob/master/plugin-review.md and have self-reviewed my plugin to avoid these common pitfalls.
  • I have added a license in the LICENSE file.
  • My project respects and is compatible with the original license of any code from other plugins that I'm using.
    I have given proper attribution to these other projects in my README.md.

@github-actions
Copy link

Hello!

I found the following issues in your plugin submission

Errors:

❌ Unable to find a release with the tag 1.0.0. Make sure that the version in your manifest.json file in your repo points to the correct Github Release.


This check was done automatically. Do NOT open a new PR for re-validation. Instead, to trigger this check again, make a change to your PR and wait a few minutes, or close and re-open it.

@joethei
Copy link
Collaborator

joethei commented Feb 22, 2023

This plugin does to many things at once, and some of them are just straight up taken from other plugins, would recommend splitting it up into seperate ones.

Please credit the plugins you have taken code from properly,
I can see that some of it is from the reminder plugin for example.

Copyright (c) [year] [fullname]
Replace these placeholders.

- 🎨 More and more elaborate designs will be added, and your obsidian will be different
looks like a bad translation

import moment from 'moment';
Already included in Obsidian, can import with import { moment } from "obsidian";

/* An asynchronous sleep function. To use it you must await as it hands
The Obsidian API already brings a function with the same name, that does the same thing.

this.app.workspace.getUnpinnedLeaf();
Deprecated method, use getLeaf(false) instead.

private async addACheck(path, filename, time, content) {
Would recommend the new app.adapter.process API, which is atomic,
https://github.com/obsidianmd/obsidian-api/blob/bceb489fc25ceba5973119d6e57759d64850f90d/obsidian.d.ts#L749-L752

await app.vault.adapter.write(normalizedPath, newFileContent.content);
It's highly discouraged that you use the global app instance in your plugin. It's currently accessible from the global context for debugging purposes, and might be removed in the future. Instead, you should use the reference to App that you have from your plugin instance.

id: 'awesome-brain-manager-check-in',
Obsidian will automatically prefix the command id with the plugin id,
you don't need to include it yourself.

import { App, TFile, TFolder } from 'obsidian';
Please use only one import style.

notify
What is this for?

@joethei joethei self-assigned this Feb 22, 2023
JuckZ added a commit to JuckZ/awesome-brain-manager that referenced this pull request Feb 23, 2023
github-actions bot pushed a commit to JuckZ/awesome-brain-manager that referenced this pull request Mar 5, 2023
# [1.4.0](1.3.5...1.4.0) (2023-03-05)

### Bug Fixes

* 1. obsidianmd/obsidian-releases#1647 ([bd9ed43](bd9ed43))
* 1.createEl异步创建,onNodeInserted回调中才能get到该元素 ([9f4fa80](9f4fa80))
* 1.return ([5bcd1dc](5bcd1dc))
* 1.typecheck feat: 1.add theme.scss(from blue topaz theme) ([ea94373](ea94373))
* 1.构建库模式,不允许pinia动态修改process.env,因为会导致手机端报错 process not found: https://cn.vitejs.dev/guide/build.html#library-mode ([6e71794](6e71794))

### Features

* 1. base framework for chatGPT and bing chat 2. rename plugin name ([73d2c57](73d2c57))
* 1.add font ([ca113ee](ca113ee))
* 1.add some tags 2. add https://github.com/mgmeyers/obsidian-style-settings/blob/main/obsidian-default-theme.css ([f1e5eca](f1e5eca))
* 1.add tags: review, flashcards ([0a6da0c](0a6da0c))
* 1.click effect: show a string ([761902e](761902e))
* 1.desktop support ([10a2afe](10a2afe))
* 1.emoji picker support ([e1368d2](e1368d2))
* 1.fullwidth support fix: 1.variable scope ([dd18cf4](dd18cf4))
* 1.lots of work ([456ee92](456ee92))
* 1.moment typefile 2.NotifyUtil refactor: 1.something ([d9729d0](d9729d0))
* 1.move some api outside ([5fb7be5](5fb7be5))
* 1.ntfy support 2.server host config ([8939289](8939289))
* 1.pinia support 2.change to pnpm fix: 1.scroll not working in PomodoroHistoryView ([b96d837](b96d837))
* 1.scss project structure ([3be6c30](3be6c30))
* 1.support vue codeblock ([2b7d66f](2b7d66f))
* **menu:** add Reveal current file in navigation menu ([51ac849](51ac849))
@JuckZ
Copy link
Contributor Author

JuckZ commented Mar 7, 2023

Thank you for taking the time to perform a code review and provide such detailed feedback. I have addressed each of your suggestions and would appreciate it if you could review my code again.

  1. This plugin does to many things at once, and some of them are just straight up taken from other plugins, would recommend splitting it up into seperate ones.
    I have deleted many redundant codes and functions, and now it is mainly pomodoro and simple special effects.

  2. Please credit the plugins you have taken code from properly,
    Yes, of course, I should put my thanks in a prominent position. REDEME#Thanks

  3. Copyright (c) [year] [fullname]
    I have replaced these placeholders. License

4.- 🎨 More and more elaborate designs will be added, and your obsidian will be different
I have tried my best to retranslate it.

  1. import moment from 'moment';
    I have imported 'moment' from obsidian instead.

  2. /* An asynchronous sleep function. To use it you must await as it hands
    Done.

  3. this.app.workspace.getUnpinnedLeaf();
    Done.

  4. private async addACheck(path, filename, time, content) {
    Would recommend the new app.adapter.process API, which is atomic,
    https://github.com/obsidianmd/obsidian-api/blob/bceb489fc25ceba5973119d6e57759d64850f90d/obsidian.d.ts#L749-L752
    Done.

  5. await app.vault.adapter.write(normalizedPath, newFileContent.content);
    Done.

  6. id: 'awesome-brain-manager-check-in',
    Done.

  7. import { App, TFile, TFolder } from 'obsidian';
    Done.

  8. notify
    Due to limitations in the Electron API, it is not possible to receive message notifications on mobile devices. However, this functionality can be achieved using the ntfy tool, which provides an official service address that users can utilize. The official website for ntfy is https://ntfy.sh/.
    @joethei

@liamcain liamcain merged commit 2c0c4c3 into obsidianmd:master Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants