[ckan-dev] API: how to insert carriage return in the description?

andy aborruso at gmail.com
Tue Oct 29 12:17:06 UTC 2019


The way is to use `$`. In example and ` \r\n`

```
http --json POST http://myURL/api/3/action/package_create
<http://myurl/api/3/action/package_create> \
    Authorization:XXXxxx \
    name=test \
    identifier="test" \
    title="test" \
    private=True \
    frequency=DAILY \
    holder_identifier=test \
    holder_name="test" \
    modified=2019-06-27 \
    notes=$'hello\r\nhow are you'\
    publisher_identifier=test \
    publisher_name="test" \
    theme=ENVI \
    owner_org="test" \
    license_id=cc-by
```

On Tue, 29 Oct 2019 at 12:23, andy <aborruso at gmail.com> wrote:

> Hi,
> I need to insert some carriage return in dataset description. If I use
> `\n` or `\r\n` inside notes property, I have these chars in the
> description, and I do not have carriage returns in the dataset webpage.
>
> I'm using this kind of command
>
> ```
> http --json POST http://myURL/api/3/action/package_create \
>     Authorization:XXXxxx \
>     name=test \
>     identifier="test" \
>     title="test" \
>     private=True \
>     frequency=DAILY \
>     holder_identifier=test \
>     holder_name="test" \
>     modified=2019-06-27 \
>     notes="hello\nhow are you" \
>     publisher_identifier=test \
>     publisher_name="test" \
>     theme=ENVI \
>     owner_org="test" \
>     license_id=cc-by
> ```
>
> Thank you
>
> --
> ___________________
>
> Andrea Borruso
> website: https://medium.com/tantotanto
> 38° 7' 48" N, 13° 21' 9" E, EPSG:4326
> ___________________
>
> "cercare e saper riconoscere chi e cosa,
>  in mezzo all’inferno, non è inferno,
> e farlo durare, e dargli spazio"
>
> Italo Calvino
>


-- 
___________________

Andrea Borruso
website: https://medium.com/tantotanto
38° 7' 48" N, 13° 21' 9" E, EPSG:4326
___________________

"cercare e saper riconoscere chi e cosa,
 in mezzo all’inferno, non è inferno,
e farlo durare, e dargli spazio"

Italo Calvino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20191029/44d5fc8d/attachment-0002.html>


More information about the ckan-dev mailing list