Thank you for sharing this tweak! Is is possible to cut selected content after processing? Not coping I mean, or delete used text after?
This is great, and I love being able to select the text.
I wonder if someone may be able to help me.
This may be a big ask, but I was wondering if ti is possible to modify this to do a few things.
1,Is is possible to have one draft with multiple lists?
If I understand correctly the current action lets you, add a list to a draft with that title (a separate draft is created for each category, but they all share the same tag).
But is it possible to make it so that all categories are in 1 draft, under heading that are categories.
So for example, you would see Book, Movies, TV Shows, Blog Ideas all in 1 draft(note), and the check lists beneath them?
I understand the conplexities this would cause since, you have to append, or prepend under the correct heading.
I canât code much my self, but wondering if this was doable.
2, I notice that this always creates a checkbox before the text, even if there is already a checkbox next to it.
I guess that itâs not really a big deal, since I could just remember to not make a check box, but is there a way to not create a check box if 1 has already been created?
Also I tried the âAdd to list plusâ action by @dchar as well.
I love the prepending, but it seems to only add a check list for the 1st item in the draft, and the rest continue as a non-check-list.
Is there a way to make this work like the original âAdd to listâ?
Iâm very new here, and to forums in general, and apologize if my questions are âoffâ in any way
In general termsâŚ
- Yes.
I actually have a function in my TADpoLe library that letâs you simply add content to a section by heading name for the currently loaded draft, which could make things a lot simpler.
- Yes.
It is just a case of checking and determining what needs to be added or removed accordingly.
If no one else takes a shot at it, Iâm sure I could put something together, but itâs getting late here, so not tonight for me Iâm afraid.
@sylumer
Thank you for looking into my request. I assume that to utilize the items in the link I would have to install/run all the core items and libraries right?
No rush. I know it isnât a really big matter, as long as I remove the checkboxes beforehand, but it was just, since the way to run on selections were introduced I wanted to run the action for sections of my meeting notes which are usually already in a checklist or list.
Many many thanks
To use the function, you would need to have the library file present, and the easiest way to use and keep the library up to date is via the core ThoughtAsylum action group, which includes the TAD
action which you can then just include in any other action to load in the library.
It could of course be done without utilising the library, but the whole point is to have a single source of code you can reuse and that you donât have to design and build yourself. Why reinvent the wheel every time you want to drive?
@sylumer Understood. Thank you!
On a separate note, are there any illegal inputs for the category step of this action, for example length of the category title?
Some categories I entered, it didnât let me append, and instead it creates a new list every time.
This isnât the actual category, but I had a category with the name that was something like
âLearn code (Drafts - Actions)â
And it would create a new draft.
I changed the title now, and it works so it doesnât seem to be the spaces, hyphen or brackets, and it seems to just be the length that was ultimately changed, but didnât know if that could make a difference like this.
It works now, but wanted to know for future reference.
Thank you.
Not that I am aware of.
As long as you have something listed as a valid navigation marker, it should be okay. I donât know what your script looks like so I cannot definitively tell you why it would create a new list.
I tried it with your example, and the function worked fine.
If you have an example that fails, then that would be useful to know because I could then reproduce the issue and figure out why it is happening.
Thatâs different to a new list in a draft as noted above, so I couldnât tell if this was a different issue or not.
Iâve tried it with a 385 character title (which is pretty long), and that works just fine. I also tried it with a long title containing lots of symbols and that worked fine too.
The only thing I can think of that might cause âunexpected behaviourâ would be if you had no navigation markers. Here I can see sections when a draft is displayed as Markdown and I have Markdown headings specified.
If I switch to a syntax that does not support navigation markers, those markers will disappear from the navigation menu.
The only flaw in this is that I canât envisage how you would have inadvertently changed syntax when working on your section titles, so it does not seem to fit your scenario.
If there is an issue, it would be important to get the exact action, an example draft, some instructions to reproduce it, and a clear indication of what the issue is (in case my interpretation were different somehow (e.g. drafts vs lists). As it currently stands, I have spent a good thirty minutes testing cases and putting together these details, but I have not been able to produce an effect where the TA_sectionAppendByHeading()
function does not work as expected. It could even come down to something in your script and what it is doing with the results of the function.
Sorry I donât have a clear reason for the issue you encountered. I would need more data to investigate it effectively.
@sylumer You are totally right
I should have known better. Sorry about thatâŚ
Here are the details.
I have recreated this, and just checked that it actually acts oddly.
Unlisted link of the action here
I just tried this action 3 times, and here are the results
What I did
- type random text to a new draft
- Run action
- Repeat x2 more times
Results
- Created a new draft all 3 times
- On the 3rd try it failed to delete the original draft even though the action tells it too
Here are the screen shots.
Also, thank you for going so far to even check the possibility of the syntax, but I have the preinstalled markdown as default, and all original drafts, and results say that it is markdown.
Now the only thing I have changed is the category title in the 1st step of the action
âDrafts (Actions - JavaScript)â to âDrafts _Actions-JavaScriptâ
And this now seems to work fine
Also, the other category in the exact same action âApple shortcutsâ seems to work fine.
This is why I started wondering if it was an illegal input(is that the correct term?) in the category title.
Does this issue seem to only happen for me?
Or had I done something wrong in naming the categories?
I thought youâd tried some things, it was a bit weird, and the it was working fine?
Iâve just downloaded and tried the action. Nothing particularly odd about the results for the Apple Shortcuts category. I realise the check boxes are doubling up, but it is just dropping in the line and prefixing a checkbox as is (not checking for an existing one).
If I do the same on the second category, I get a new draft each time.
So, definitely down to the category name.
If you type Drafts (Actions - JavaScript)
into the filter in Drafts, youâll see it doesnât return any matches.
If you type "Drafts (Actions - JavaScript)"
, you do get matches.
If you look at the advanced query options, and in particular the enforced omission option, Iâm sure youâll see why there is an issue in practice with the name.
I made a little modification to how the name is handled in the search to work around this. Give it a try.
How would one go about adding existing drafts to a list? I have a very disorganised collection, with lots of books in individual drafts, or sometimes two or three titles in one draft: how do I use Add to List to bring them all together? Most of them are tagged books
This action will work on any draft, does not matter if itâs a newly captured one, or old one. As long as you have one book per line in a draft, you can just look up those old drafts and process them with the âAdd to Listâ action.
Excellent, thanks very much
Greetings. I have just started using this Add To List action. I am finding that the action is placing my lists in the archive area. Is this expected behavior?
For some reason I expected the result to appear in the inbox.
Thanks in advance for your reply.
It should be putting the relevant lines from the current draft into the lists in otherr drafts and then archiving that original draft. It shouldnât be archiving the list drafts it is adding to.
The archiving of the original draft is maintained by the âAfter Successâ setting on the action.
The list drafts are created in the archive. This is by design and is mentioned in the original post at the top of this topic. In general, workflow-wise, the âinboxâ is for unprocessed items â the archive for long term storage. You will note the âListsâ workspace included as part of this workflow also automatically switches to the archive tab when loaded to display those lists as well.
If you prefer to have them created in the inbox, just change the line draft.isArchived = true
to draft.isArchived = false
in the script for the âAdd to Listâ action.
Thanks for replying so quickly.
I should probably try to understand what purpose the inbox and archive areas serve.
In my mind, archive was deep storage for âdoneâ items and inbox was for ânewâ and âin progressâ items. Sounds like the âin progressâ items belong in the archives(?)
At least now I know I wasnât encountering a bug and the action is doing what it is supposed to do.
The purposes the inbox and the archive serve are yours to decide, especially if you have multiple workspaces. You donât have to decide immediately because it will probably become apparent to you as you use Drafts.
The good part of a flexible app like drafts is that you can use these tabs just how you want.
I personally have in-progress stuff in my inbox tab BUT I donât consider this as the real inbox as you would for email or a todo list. I have a separate INBOX workspace that looks for untagged drafts â these are the drafts I still need to process.
I recommend to decide for yourself how you want to use those tabs (what to archive, what to delete, how long to keep stuff in the inbox) itâs your system, you donât need to copy somebody elseâs
I guess in terms of these lists I would also archive them since most of those lists will exist âforeverâ and I use an open list action to open them quicklyâŚ