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 auto-tagging option to journal-entry script #792

Closed
sanderboom opened this Issue Nov 27, 2017 · 27 comments

Comments

Projects
None yet
2 participants
@sanderboom
Contributor

sanderboom commented Nov 27, 2017

Expected behaviour

Specify tags to be set when a new journal entry is created.

@pbek

This comment has been minimized.

Owner

pbek commented Nov 28, 2017

Looking good. Can you please also increment the version number of the script and add yourself to the list of authors.

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Nov 28, 2017

@pbek

Looking good.

Thanks.

Can you please also increment the version number of the script and add yourself to the list of authors.

Currently we have: "version": "0.0.2". The way I see it, version should be (at least) 1.0.0. It's stable and public, right? What do you think?

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Nov 28, 2017

BTW: do you know a way to implement the component in the tag panel in the settings for the script? Or do you think this is overkill?

I'm talking about:
image

@pbek

This comment has been minimized.

Owner

pbek commented Nov 28, 2017

The way I see it, version should be (at least) 1.0.0

ok

BTW: do you know a way to implement the component in the tag panel in the settings for the script?

I think I don't know what you are talking about :) your tags are added to the note, correct?

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Nov 28, 2017

I think I don't know what you are talking about :) your tags are added to the note, correct?

Yes everything works fine. I'm talking about making the settings a bit more luxurious ;)

Now in the setting for the script we have:
image

The component in the image included above is more user friendly. But if that can't be included in the settings form without a lot of effort it is not worth it. That's why I asked if you think it is overkill ;)

@pbek

This comment has been minimized.

Owner

pbek commented Nov 28, 2017

Ah, now I understand. Nah, that would be a very specialized case and a lot of work. :D

sanderboom added a commit to sanderboom/scripts that referenced this issue Nov 28, 2017

Add auto-tagging option to journal-entry script.
Update version to 1.0.0 and add @sanderboom to authors.

Refs pbek/QOwnNotes#792
@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Nov 28, 2017

Ok, thanks.

@pbek

This comment has been minimized.

Owner

pbek commented Nov 28, 2017

I merged your commits. Thank you for your additions!

@pbek pbek closed this Nov 28, 2017

@pbek

This comment has been minimized.

Owner

pbek commented Nov 28, 2017

That's why I asked if you think it is overkill

@sanderboom if you want to implement a settings control to add strings in a tag-like manner for the script-settings you can of course do that!
src/widgets/scriptsettingwidget.ui would be your starting point...

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Nov 28, 2017

Thanks for merging. How is this distributed? Does everybody who has this script installed receive the update when restarting?

@sanderboom if you want to implement a settings control to add strings in a tag-like manner for the script-settings you can of course do that!
src/widgets/scriptsettingwidget.ui would be your starting point...

I might get to that in the future ;)

Higher prio would now be to besides auto-tagging, being able to add a new journal entry to a subfolder. Any thoughts on how I should implement this / where to start? Thanks.

@pbek

This comment has been minimized.

Owner

pbek commented Nov 28, 2017

Does everybody who has this script installed receive the update when restarting?

no, you currently only get an update-button in the script repository when visiting the script

I might get to that in the future ;)

nice! 👍

Higher prio would now be to besides auto-tagging, being able to add a new journal entry to a subfolder. Any thoughts on how I should implement this / where to start? Thanks.

It maybe would best to create a scripting function to change the current note subfolder in src/services/scriptingservice.cpp (like when you are clicking on the note subfolder). Then the newly created note will be placed there.

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Nov 28, 2017

no, you currently only get an update-button in the script repository when visiting the script

Ah that's too bad. You have the great update popup for the main version. An idea to add a check for new installed script versions in the same routine?

It maybe would best to create a scripting function to change the current note subfolder in src/services/scriptingservice.cpp (like when you are clicking on the note subfolder). Then the newly created note will be placed there.

When I have time I could check on how to add a scripting function. Or you could do that and I can update the script ;)

@pbek

This comment has been minimized.

Owner

pbek commented Nov 28, 2017

An idea to add a check for new installed script versions in the same routine?

One would most likely create a different service that does that periodically for all installed scripts from the script repository.

When I have time I could check on how to add a scripting function.

this kind of scripting function is not very difficult to implement... documentation for it usually takes longer... but in this case one would need to look how to best switch to another note-subfolder.

@pbek

This comment has been minimized.

Owner

pbek commented Nov 29, 2017

Took a while to implement....

17.11.6

  • you can now use the new scripting function script.jumpToNoteSubFolder()
    to jump to a note-subfolder in scripts
@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Nov 29, 2017

Awesome! I'll take a look.

@pbek

This comment has been minimized.

Owner

pbek commented Nov 29, 2017

There now is a new release, could you please test it and report if it works for you?

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Nov 29, 2017

Works like a charm! Just have to finalize a bit (later) and I will push a new journal-entry version.

@pbek

This comment has been minimized.

Owner

pbek commented Nov 29, 2017

Great, thank you for testing!

@pbek

This comment has been minimized.

Owner

pbek commented Nov 30, 2017

I will push a new journal-entry version

don't forget to increase the min-required version of QON too ;)

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Nov 30, 2017

Thanks for the reminder ;)

Any idea on how to make the description for settingsVariables wrap? Or should I just put some <br>'s in?

image

@pbek

This comment has been minimized.

Owner

pbek commented Nov 30, 2017

Oh, I will enable the wrapping for the labels!

@pbek

This comment has been minimized.

Owner

pbek commented Nov 30, 2017

17.12.0

  • enabled text wrapping for the script settings
@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Nov 30, 2017

Awesome, thanks.

One more question. Do I need to check if users have this enabled before presenting the 'Default folder' setting? Or will it do no harm?

image

@pbek

This comment has been minimized.

Owner

pbek commented Nov 30, 2017

You mean for jumpToNoteSubFolder? Nah, it is ok if it is turned off.

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented Nov 30, 2017

Ok, cool.

@pbek

This comment has been minimized.

Owner

pbek commented Dec 1, 2017

There now is a new release, could you please test it and report if it works for you?

@pbek

This comment has been minimized.

Owner

pbek commented Dec 14, 2017

17.12.5

  • there now is a new menu entry Check for script updates in the Scripting
    menu and the Scripting settings to open a dialog where you can update
    scripts that need an update

There now is a new release, could you please test it and report if it works for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment