Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output just URL of imported note #33

Closed
davidak opened this issue Mar 21, 2020 · 1 comment
Closed

Output just URL of imported note #33

davidak opened this issue Mar 21, 2020 · 1 comment

Comments

@davidak
Copy link

davidak commented Mar 21, 2020

According to the unix philosophy, you should be able to pipe the output of a tool into another. With the output of this script, it is not possible.

The actual output of ./codimd import test.md is

Found. Redirecting to https://pad.nixnet.services/gNvbypueQ6awH73V3nx_jw

(don't forget to update usage information when this is changed)

Workaround

Use awk to manipulate the text:

./codimd import test.md | awk '{print $4}'
https://pad.nixnet.services/zKOoDxhQTuaT4dnJAybrfw
@pirate
Copy link
Member

pirate commented Mar 24, 2020

This is a bug, not an intentional design, see #31.

It's supposed to return just the note ID, then the user can get the url from that themselves by concatenating it with $CODIMD_SERVER.

@pirate pirate closed this as completed Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants