vitor Posted April 20, 2017 Author Share Posted April 20, 2017 Update. New icon, new style for footnotes, and lists and code blocks now remove the lines above and below, because otherwise this forum leaves huge gaps of blank space. To update, download the latest version (same URL) or wait a few days (15 or less) and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted May 1, 2017 Author Share Posted May 1, 2017 Update. Removed support for code blocks starting with spaces or tabs. Fixed code blocks with backticks when they’re the first thing in the text. Other code improvements with no outside consequence. To update, download the latest version (same URL) or wait a few days (15 or less) and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
deanishe Posted July 23, 2017 Share Posted July 23, 2017 Re-installed this workflow today, as it handles a few things better than my Pandoc-based one. Couple of bugs/feature requests: Could you add support for level 4+ headers? The workflow also processes the contents of code blocks. Newlines get doubled and comments starting with # get turned into level-1 headers, both of which are undesirable. Link to comment
vitor Posted July 23, 2017 Author Share Posted July 23, 2017 4 hours ago, deanishe said: Could you add support for level 4+ headers? On these forums, regular text is size 4 and the maximum size rendered is 7 (8 or above is ignored and shown as 4). That’s the reason there’s only 3 levels. That said, I never use headers, so as long as regular text stays at 4 tell me which sizes you’d like for the headers (which markdown level translates to which BBCode size, and which should be bold (currently, they all are), and I’ll change it. 4 hours ago, deanishe said: The workflow also processes the contents of code blocks. Newlines get doubled and comments starting with # get turned into level-1 headers, both of which are undesirable. I agree and would also like to change that. I’ll have to think a bit as to how, though, since I likely won’t be able to keep using the regex method. Link to comment
deanishe Posted July 23, 2017 Share Posted July 23, 2017 3 minutes ago, vitor said: That said, I never use headers, so as long as regular text stays at 4 tell me which sizes you’d like for the headers size=4 is fine for level-4 headers (####). Not sure I need more than that. 5 minutes ago, vitor said: I likely won’t be able to keep using the regex method. Should be doable, as long as you extract code blocks first and don't pass them through the rest of your regexes. Link to comment
vitor Posted July 23, 2017 Author Share Posted July 23, 2017 Updates: Added support for #### headers (same size as regular text, but bolded). Better handling of code blocks (no longer affected by markdown characters). To update, download the latest version (same URL) or wait a few days (15 or less) and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted July 31, 2017 Author Share Posted July 31, 2017 Update. New icon. To update, download the latest version (same URL) or wait a few days (15 or less) and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
nikivi Posted August 16, 2017 Share Posted August 16, 2017 Hey @vitor Perhaps I am missing something but this workflow doesn't seem to work on converting multiple URLs. For example, running the workflow on this line : I like [GitHub](https://github.com) and [Alfred](https://www.alfredforum.com/) Will get me this : I like GitHub and [Alfred It seems to break off. It happens 100 % of the times too. Link to comment
vitor Posted August 16, 2017 Author Share Posted August 16, 2017 (edited) @nikivi Can’t reproduce. That lines works fine here. Make sure you have the latest version and check the debugger. Edited August 16, 2017 by vitor Link to comment
nikivi Posted August 16, 2017 Share Posted August 16, 2017 Oh nvm, you are right. I was using this workflow : And thought it was yours. It does work now. Link to comment
vitor Posted October 2, 2017 Author Share Posted October 2, 2017 Major update. The Workflow is now called MarkdownTransform. It continues to support Markdown → BBCode transformations, hopefully better and more reliably. Instead of a regex solution, it now uses Redcarpet and a custom renderer, tailored specifically to this forum. It now also supports Markdown → RTF. This is ideal for writing emails in Markdown in most email apps. See the top post for the new download link, or keep using MarkdownBulletin and eventually the auto-update mechanism will fire and download a transitional version that’ll then download MarkdownTransform on the next use. This new version might not immediately work on your machine, due to your ruby version. The top post also addresses that. Link to comment
xilopaint Posted October 2, 2017 Share Posted October 2, 2017 (edited) @vitor, I know nothing about ruby. What's the best way to install the latest version without mess with the ruby's macOS installation? Should I use Homebrew? Here I see that I can use RVM or rbenv (I don't have a clue about the difference). Edited October 2, 2017 by xilopaint Link to comment
vitor Posted October 2, 2017 Author Share Posted October 2, 2017 1 hour ago, xilopaint said: I know nothing about ruby. What's the best way to install the latest version without mess with the ruby's macOS installation? Should I use Homebrew? Here I see that I can use RVM or rbenv (I don't have a clue about the difference). If you already have Homebrew, simply brew install ruby and you’re good to go. xilopaint 1 Link to comment
vitor Posted October 12, 2017 Author Share Posted October 12, 2017 Update. On the RTF conversion, have a 1rem bottom margin on paragraphs. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
iandol Posted November 27, 2017 Share Posted November 27, 2017 Hi vitor, perhaps I'm being blind but I cannot see what the actual version of Ruby is needed for this? Also, it would be great if you could add rbenv installed ruby support, you need to add: $HOME/.rbenv/shims/ to the path and then it should work (i have 2.4.2 installed via rbenv, 2.3.3 system ruby). Link to comment
vitor Posted November 27, 2017 Author Share Posted November 27, 2017 (edited) 1 hour ago, iandol said: it would be great if you could add rbenv installed ruby support At the moment, I don’t intend to add direct support for ruby version managers. You can fix that easily, though. Go into the Run Scripts of the Workflow and alter the PATH there. It’s the first line. Edited November 27, 2017 by vitor Link to comment
iandol Posted November 27, 2017 Share Posted November 27, 2017 Thanks vitor, would you be willing to make a generic path workflow variable we could edit so that we didn't lose the path every new new version? Link to comment
vitor Posted November 27, 2017 Author Share Posted November 27, 2017 12 minutes ago, iandol said: Thanks vitor, would you be willing to make a generic path workflow variable we could edit so that we didn't lose the path every new new version? If I make a new version, sure. As it is the Workflow is pretty much feature-complete. Unless there’s a bug that needs fixing or it breaks with a new macOS release, it’s unlikely there’ll be a new release. iandol 1 Link to comment
iandol Posted November 27, 2017 Share Posted November 27, 2017 No problems if there is no update, no problem with the path — could you tell us the minimum required Ruby version (RedCarpet only needs 1.9.2)? Link to comment
vitor Posted November 27, 2017 Author Share Posted November 27, 2017 40 minutes ago, iandol said: RedCarpet only needs 1.9.2 Ostensibly, yes. In practice, it’s failing to require in the default ruby version of Sierra. No idea why. iandol 1 Link to comment
iandol Posted November 27, 2017 Share Posted November 27, 2017 (edited) I've tried MerkdownTransform using Ruby V2.4.2p198 installed via rbenv and it fails (same error as if I use System Ruby 2.0.0p648 in Sierra): Starting debug for 'MarkdownTransform' [2017-11-27 23:42:37][trigger.hotkey] Processing output of 'action.script' with arg 'Here is a **test** text' [2017-11-27 23:42:38][ERROR: action.script] /Users/ian/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/Users/ian/Dropbox/Assorted/Alfred Settings/Alfred.alfredpreferences/workflows/user.workflow.B3480116-6231-4778-AD34-B08AA40F9A5D/_licensed/Redcarpet/gems/redcarpet-3.4.0/lib/redcarpet.bundle, 9): Library not loaded: /usr/local/opt/ruby/lib/libruby.2.4.2.dylib (LoadError) Referenced from: /Users/ian/Dropbox/Assorted/Alfred Settings/Alfred.alfredpreferences/workflows/user.workflow.B3480116-6231-4778-AD34-B08AA40F9A5D/_licensed/Redcarpet/gems/redcarpet-3.4.0/lib/redcarpet.bundle Reason: image not found - /Users/ian/Dropbox/Assorted/Alfred Settings/Alfred.alfredpreferences/workflows/user.workflow.B3480116-6231-4778-AD34-B08AA40F9A5D/_licensed/Redcarpet/gems/redcarpet-3.4.0/lib/redcarpet.bundle from /Users/ian/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /Users/ian/Dropbox/Assorted/Alfred Settings/Alfred.alfredpreferences/workflows/user.workflow.B3480116-6231-4778-AD34-B08AA40F9A5D/_licensed/Redcarpet/gems/redcarpet-3.4.0/lib/redcarpet.rb:1:in `<top (required)>' from /Users/ian/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /Users/ian/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require' from ./bbcode:4:in `<main>' [2017-11-27 23:42:38][action.script] Processing output of 'output.clipboard' with arg '' [2017-11-27 23:42:38][output.clipboard] Processing output of 'action.script' with arg '' I can test on another machine with High Sierra and Ruby V2.3 tomorrow see if I also get the Library not loaded: /usr/local/opt/ruby/lib/libruby.2.4.2.dylib (LoadError) Edited November 27, 2017 by iandol Link to comment
vitor Posted November 27, 2017 Author Share Posted November 27, 2017 10 minutes ago, iandol said: I've tried MerkdownTransform using Ruby V2.4.2p198 installed via rbenv and it fails I’m using that exact same version with ruby installed via Homebrew, and it works. Simply adding it to the PATH may not be enough. I seem to recall that with rbenv you usually add a command to call it in the shell’s startup files. That command should be set in the Run Script as well. Link to comment
iandol Posted November 28, 2017 Share Posted November 28, 2017 I tried in High Sierra with the system ruby, and see the same issue with the (ruby 2.3.3p222) there as well as rbenv; that a dynamically linked library libruby.2.4.2.dylib cannot be found: required dylib '/usr/local/opt/ruby/lib/libruby.2.4.2.dylib' not found, needed by '...Redcarpet/gems/redcarpet-3.4.0/lib/redcarpet.bundle'. Did try: file not found '/usr/lib/libruby.2.4.2.dylib', file not found '/usr/local/lib/libruby.2.4.2.dylib', file not found '/usr/local/opt/ruby/lib/libruby.2.4.2.dylib' I don't think this is a ruby version issue, but that the redcarpet that you bundle has a specific dylib dependency that is not met. I have RedCarpet gem installed locally, but it does not get used by your workflow. I tried searching in my rbenv install for 2.4.2 and cannot find libruby.2.4.2.dylib anywhere. rbenv uses ruby-build to install a ruby from source and I don't know why this is different than the homebrewed ruby. I need to use rbenv for other things, so don't want to install a third copy of ruby with homebrew. I can stick to your old workflow. Anyway, thank you for all your excellent workflows! vitor 1 Link to comment
vitor Posted November 28, 2017 Author Share Posted November 28, 2017 15 hours ago, iandol said: I have RedCarpet gem installed locally, but it does not get used by your workflow. You can force it. Open the bbcode and/or rtf files in the Workflow and remove the $LOAD_PATH.unshift line. 15 hours ago, iandol said: Anyway, thank you for all your excellent workflows! Thank you for using them and for the kind words! Link to comment
vitor Posted December 19, 2017 Author Share Posted December 19, 2017 Update. Should now work with system ruby. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. deanishe 1 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