Closed toolleeo closed 2 years ago
How can post a link from the command line that has a description that should contain a newline when displayed in the shaarli online instance?
When trying something like (see the newlines in the description)
shaarli post-link --url 'http://test.url/' --title 'Test' --description 'One\nword\nper\nline.'
The shaarli script (v 0.3.0) returns
shaarli
{ "created": "2019-08-04T09:56:11+02:00", "description": "One\\nword\\nper\\nline.", "id": 2786, "private": false, "shorturl": "r-KS6g", "tags": [], "title": "Test", "updated": "", "url": "http://test.url/" }
The newlines are escaped, and the text in the online shaarli instance contains the '\n' text verbatim instead of the actual newline.
Using '\r\n' instead of '\n' does not work either.
May this be a shaarli API issue?
Related https://github.com/shaarli/Shaarli/issues/1360
After a few tests, you can use actual line breaks, or this syntax: --description $'One\nword\nper\nline.'
--description $'One\nword\nper\nline.'
https://github.com/shaarli/python-shaarli-client/pull/66
How can post a link from the command line that has a description that should contain a newline when displayed in the shaarli online instance?
When trying something like (see the newlines in the description)
The
shaarli
script (v 0.3.0) returnsThe newlines are escaped, and the text in the online shaarli instance contains the '\n' text verbatim instead of the actual newline.
Using '\r\n' instead of '\n' does not work either.
May this be a shaarli API issue?