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

Publish/edit webposts directly via web server? #373

Open
harrdb12 opened this issue Jan 15, 2018 · 6 comments
Open

Publish/edit webposts directly via web server? #373

harrdb12 opened this issue Jan 15, 2018 · 6 comments
Assignees

Comments

@harrdb12
Copy link

Auto-reviewers: @NiharikaRay @matthewwardrop @earthmancash @danfrankj

Hi there. I currently have a knowledge repo server running, and am looking to expand its usage, especially among those who aren't using Python (or simply don't want to download the package and learn how to interface via the tooling). Obviously, in order to do this, I am looking to make the web server and as user-friendly as possible.

To that end, I'd like to 1) be able to allow users to publish directly to the web server and 2) allow users to edit their posts. I know there are reasons why these behaviors are not the default, but for myself (and I think for many) it would help with getting more usage among teams, so it would be nice if it were possible to easily enable them.

Regarding 1), the current behavior I've seen is that trying to create a webpost creates a branch for that post, and approving that post simply submits that branch to the knowledge repo repository. The web server itself doesn't publish the post until it has been merged with GitHub, which requires manually merging with git. Does anybody know where in the source code I can modify this default behavior? I would like web posting to be akin to using knowledge_repo add --branch master ... so that when the post is submitted to GitHub the web server will automatically update.

I have seen a pull request regarding this in #162, but having made those changes I still see the default behavior of 'save draft' being creating a new branch, meaning somebody has to manually merge that branch to master.

Regarding 2), it seems that in #192, there was at one point a way to edit webposts after they have been published. However, my knowledge repo version, which I believe is fairly recent (0.7.6), I do not see the files referenced by this pull request, and so no way of doing it on my deployed web server. Was the feature to edit published webposts removed at some point? If so, is there any easy way to reimplement it?

@matthewwardrop
Copy link
Collaborator

Hi @harrdb12 ,

Thanks for reaching out about this. We at Airbnb also found it useful to allow users to directly edit posts outside of the context of a Python/Jupyter/R session, and so we added the notion of "web posts". Currently, though, we have only thoroughly tested webposts using a database backend, rather than a git backend. Since the API is (mostly) the same, I suspect posts are mostly created, but not fully integrated into the system. At Airbnb, security policies make two-way integration with our git knowledge repository problematic, and so we haven't had the opportunity to test it out. [Patches welcome].

If you experience the same issue with the database backend, let us know, but we have been using it without issues for about a year now.

@matthewwardrop matthewwardrop self-assigned this Jan 21, 2018
@harrdb12
Copy link
Author

harrdb12 commented Jan 22, 2018 via email

@harrdb12
Copy link
Author

harrdb12 commented Jan 23, 2018

Hi @matthewwardrop,

After playing around a bit, I am fairly certain there's no quick way to implement what I want. While it's possible to publish webposts directly via the website via the database backend, this doesn't create an actual knowledge post; it's only saved to the database. Also, it requires the rather inconvenient method of having to name webposts with only certain paths.

I think I will stick to the method I've been using and just use a Cron job to automatically push and merge webposts. You can go ahead and close this issue; possibly mark it as a feature request, esp. for more support of the Git backend, and being able to publish/edit webposts/knowledge posts directly via the web interface.

@alecraso
Copy link
Contributor

@harrdb12 Per the README, you can deploy the server with more than one KnowledgeRepo backend. I think this is what you might be looking for.

@harrdb12
Copy link
Author

@aaronbiller Yes I have tried that but it doesn't produce the behavior I desired/expected. See my post above.

@timkpaine
Copy link

Not sure if this is what this is asking, but I'd like to send a jupyter notebook directly from a running JupyterLab to a running Knowledge-repo instance to "publish" it. Looks like I can just markdownify and hit this ?

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

4 participants