diff options
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 15 |
1 files changed, 11 insertions, 4 deletions
| @@ -165,9 +165,9 @@ int main(int argc, char *argv[]) | |||
| 165 | 165 | ||
| 166 | if (strcmp(cmd, "note") == 0) { | 166 | if (strcmp(cmd, "note") == 0) { |
| 167 | int status; | 167 | int status; |
| 168 | xs *data = NULL; | ||
| 169 | xs *content = NULL; | 168 | xs *content = NULL; |
| 170 | xs *f_content = NULL; | 169 | xs *msg = NULL; |
| 170 | xs *c_msg = NULL; | ||
| 171 | 171 | ||
| 172 | if (strcmp(url, "-") == 0) { | 172 | if (strcmp(url, "-") == 0) { |
| 173 | /* get the content from an editor */ | 173 | /* get the content from an editor */ |
| @@ -189,9 +189,16 @@ int main(int argc, char *argv[]) | |||
| 189 | else | 189 | else |
| 190 | content = xs_dup(url); | 190 | content = xs_dup(url); |
| 191 | 191 | ||
| 192 | not_really_markdown(content, &f_content); | 192 | msg = msg_note(&snac, content, NULL, NULL); |
| 193 | |||
| 194 | c_msg = msg_create(&snac, msg); | ||
| 195 | |||
| 196 | { | ||
| 197 | xs *j = xs_json_dumps_pp(c_msg, 4); | ||
| 198 | printf("%s\n", j); | ||
| 199 | } | ||
| 193 | 200 | ||
| 194 | printf("%s\n", f_content); | 201 | post(&snac, c_msg); |
| 195 | 202 | ||
| 196 | return 0; | 203 | return 0; |
| 197 | } | 204 | } |