insanum / gcalcli

Google Calendar Command Line Interface
MIT License
3.33k stars 314 forks source link

multiline description #506

Open joukio opened 4 years ago

joukio commented 4 years ago

hi,

when I list an event with a multilined description field with the --tsv option I get the following output:

ftest1\ntest2\ntest3\ntest4\ntest5\ntest6\ntest7\ntest8\ntest9

however, when I add a similar event with gcalcli with the same as above in the description field, the line will be put exactly like that in the description.

I would like to be able to add a multilined description in an event. Am I doing something wrong?

kind regards

Jouk Hettema

jcrowgey commented 4 years ago

I have to admit, it's not 100% clear to me what your issue is. Can you provide a sample session to show the issue you're trying to solve?

joukio commented 4 years ago

ok, I will try to explain it better.

when I add a new event to my google calendar via de web interface I can use multi lines in the description field. image

When I list this event with gcalcli I see image

When I list this event with gcalcli in tsv format I see image

When I add an event to my google calendar with gcalcli: image

When I lookup this event in de webgui of google calendar it makes one string of the description: image

I would like to be able to use multiline descriptions if possible.

jcrowgey commented 4 years ago

I think you just need to use a literal newline in that description instead of an escape sequence:

jcrowgey@tsuga:~$ gcalcli add --when "tomorrow" --allday --duration=1 --color=peacock --title "test event" --description="test1
> test2
> test3"
Location: here
Enter a valid reminder or "." to end: .
0 joshua.crowgey@gmail.com
Specify calendar from above: 0
jcrowgey@tsuga:~$ gcalcli agenda --details=all

Sun Jan 26           test event
                     Calendar: joshua.crowgey@gmail.com
                     Link: https://www.google.com/calendar/event?eid=NzRqM2ltcGUyNnE1cjRnc3RtdHJvcWxwdHMgam9zaHVhLmNyb3dnZXlAbQ
                     Location: here
                     Length: 1 day, 0:00:00
                     Email: joshua.crowgey@gmail.com
                     Description:
                     ┌─────────────────────────────────────────────────────────┐
                     │ test1                                                   │
                     │ test2                                                   │
                     │ test3                                                   │
                     └─────────────────────────────────────────────────────────┘
dbarnett commented 2 months ago

@joukio did that clear things up for you or is there still an issue?