Closed bevanjkay closed 4 years ago
Okay @caleb531 I found the settings to adjust the formatting and can remove the extra line break. Just not sure if there is a way to pass through the bold formatting. I have the clipboard mode set to Rich Text, but not sure what code is required to make this work.
@bevanjkay Yep, you found it! Back in v10 of YouVersion Suggest, I introduced a "Reference Format" preference. To use it, enter yvset refformat
into Alfred. I've included several default options to choose from, but let me tell you about the secret way to set a custom format.
Navigate to the following file in the Finder:
If you are using Alfred 4:
~/Library/Application Support/Alfred/Workflow Data/com.calebevans.youversionsuggest/preferences.json
If you are using Alfred 3:
~/Library/Application Support/Alfred 3/Workflow Data/com.calebevans.youversionsuggest/preferences.json
This file stores all of the preferences for YVS in JSON format. You can edit the refformat
value to whatever you desire, and YVS will honor that custom format when you save the file.
In your case:
{
"refformat": "{name} ({version})\n{content}",
"version": 59,
"copybydefault": false,
"language": "eng",
"versenumbers": false
}
Regarding the ability to format in bold, that should be possible, but it would require some modifications to the YVS code (namely, the copy_ref.py
module and the "Copy to Clipboard" workflow object). I agree that rich text formatting for verses would be a useful feature; let me try some things and get back to you.
Also, what version of Alfred are you using?
@caleb531 Thanks for the response. I came up with a solution to achieve exactly what I want.
Edit filter_pref.py object to be: ref_formats = [ '{content}', ]
I now see I could have edited the preferences.json as your comment above also.
So that it only copies the content of the verse into the variable.
Then set the Copy Clipboard widget to the following settings.
@bevanjkay Clever solution! I might actually take inspiration from that for a future release of YouVersion Suggest—to make this easier in the future.
Please feel free to reach out with any other questions you may have in the future!
Blessings, Caleb
Hi Caleb, I love the workflow that you have created. I am wondering if there is a way to adjust the formatting for when the verses are copied to clipboard.
At the moment the verses copy like the folllowing;
John 3:16 (NLT)
“For this is how God loved the world: He gave his one and only Son, so that everyone who believes in him will not perish but have eternal life.
I would like to be able to adjust the formatting to be like this;
John 3:16 (NLT) For this is how God loved the world: He gave his one and only Son, so that everyone who believes in him will not perish but have eternal life.
Quite pedantic I know, but I much prefer the formatting automatically so I don't have to manually adjust each time I paste.