Bhishan Posted August 11, 2021 Share Posted August 11, 2021 My attempt: https://github.com/bhishanpdl/Shared/blob/master/Alfred_questions/aa 05 universal action practice.alfredworkflow I was trying to do some manipulation on multiline string using Alfred Universal Action. But only single line can be processed. How to process multi-line strings? **I am trying to do following** ``` This is item 1. This it item 2. ``` I am trying to create an Alfred Universal Action that will append user suggested prefix (for example: “1. “ which will make it list in Markdown). How can we do so? Can we give any prefix to the lines? Such as “1. “, “</br>” and so on? Final output will look like: ``` 1. This is item 1. 1. This it item 2. ``` Link to comment
deanishe Posted August 12, 2021 Share Posted August 12, 2021 Did you actually look in Alfred's debugger? It tells you exactly what's wrong. 11 hours ago, Bhishan said: How can we do so? Don't use "with input as {query}". Always use "with input as argv". Link to comment
Bhishan Posted August 13, 2021 Author Share Posted August 13, 2021 Thanks a lot. I used `args = sys.argv[1]` and it works for multiline. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now