how do we get line breaks in photo captions?

38 views
Skip to first unread message

ClintJCL

unread,
Oct 27, 2011, 4:13:25 PM10/27/11
to fbcmd
I tried passing \n, but it simply came out as \n.

Sometimes my caption is a paragraph or two. Sometimes it's a list of
the objects in a photo. Either way, line breaks are not totally
unreasonable here. Is there a way to do this?

casper.la...@gmail.com

unread,
Apr 21, 2012, 4:38:46 AM4/21/12
to fb...@googlegroups.com
I am also looking for a way to do this.

Dave Tompkins

unread,
Jul 22, 2012, 12:04:10 AM7/22/12
to fb...@googlegroups.com, clin...@gmail.com, casper.la...@gmail.com
as per your suggestion...

in the new 2.0-beta1 (see the website: http://fbcmd.dtompkins.com/)

you can now use \n in the middle of any command and it will get expanded out:

fbcmd status "this\nis\na\nmulti-line\nstatus"

Dave Tompkins

unread,
Jul 25, 2012, 1:18:49 AM7/25/12
to fb...@googlegroups.com, clin...@gmail.com
I've extended this behaviour even further.
there are two new preferences:
  AddPreference('extra_subst','0');
  AddPreference('extra_subst_list','\\a=*,\\d=$,\\m=&,\\p=%,\\q=",\\s= ,\\u=\',\\w=?');

If extra_subst is turned on (which it won't be by default), then any of the special escaped characters will be substituted if used:
\a => *
\q => "
\d => $
and so on.  These are just the defaults -- You can customize your substitution characters yourself with the extra_subst_list preference (see above for syntax example).  Technically, they don't have to be in the \x form, and you could use it for mini-macros such as
hbd => Happy Birthday!

it's in the dev build now: [fbcmd update dev] if you want to play with it.  

If anyone knows of an existing standard convention for these type of substitutions (\a => *) let me know, I just made these up.

Caveat Emptor: Your shell may already make special substitutions before it gets to fbcmd.

-Dave
Reply all
Reply to author
Forward
0 new messages