GithubHelp home page GithubHelp logo

scragg0x / realms-wiki Goto Github PK

View Code? Open in Web Editor NEW
834.0 30.0 91.0 2.63 MB

Git based wiki inspired by Gollum

Home Page: http://realms.io

License: GNU General Public License v2.0

Shell 0.80% Python 67.26% CSS 2.82% JavaScript 12.09% HTML 15.98% Dockerfile 1.06%

realms-wiki's Issues

Images and other assets with relative paths

If you (like me, due to re-publishing needs) use relative paths to images in your wiki, you may notice that they (1) break in the editor due to the /_edit/ URL scheme. This is similar to travs/markdown-pdf#8. They also (2) needlessly appear in the Index, along with files like .gitignore.

Is there a preferred development route to resolve this, or are users advised not to store assets in their wiki repo?

Index to use timestamps from Git log

In my fix for #44 (changing owner), the filesystem dates are changed. So the creation/modification times in the Index are no longer accurate. Would it be possible to use the more reliable timestamps in the Git log instead? It would also be nice if the Index only showed Markdown files.

Unable to add user because 'application not registered on db instance'

I installed realms-wiki with pip, created a realms-wiki.json using realms-wiki setup, realms-wiki start to start service and it seems to be fine in the browser. But when I tried to create a user by command ...

realms-wiki auth create_user username [email protected]

It returned:

raise RuntimeError('application not registered on db ' 
RuntimeError: application not registered on db instance and no application bound to current context

How should I solve this problem? Thanks!

Lost content on failed writes

Realms should return to the Edit screen in case there is any problem saving the content, notifying the user (as with the logged out message) to avoid data loss.

In my installation a user began reporting lost content. No errors, no popups, just edits that were gone as soon as she clicked Publish. In trying to reproduce the problem, I noticed erroneous permissions in the filesystem. Instead of deploy:deploy the owner became root:root on some of the files.

This is likely because I am synchronising the Git repository using an external git process as well as Realms. To me the ability to do this is one of the top features of the wiki. I am now ensuring that permissions are being correctly set, however the wiki interface must do everything possible to avoid data loss: in this case, at least alerting the user if the save did not succeed.

Renaming pages cause some history anomalies

When changing the page name, the wiki attempts to do a rename operation in git (or move). This history for said page contains history entries that simple doesn't seem right. I have to work on recreating the issue.

Manage subpages

It would be nice to manage subpages and/or subdirectories with realms-wiki.
E.g.: http://realms.io/asdf is a page and http://realms.io/asdf/subpage would be a subpage.

C

Add HTTP Basic authentication

An option to choose HTTP Basic authentication bypassing the built-in.

Also, when a user is successfully authenticated and not exists, will be created.

Another nice feature could be that realms-wiki manages the authentication file.

Explode metadata into a separate tab / editor / file?

Metadata can be separated from the Markdown and does have it's advantages. It can have a dedicated editor with YAML syntax highlighting. Also, less crowding of the main editor.

The metadata could even be it a separate file with separate revision history as opposed to prepending it.

home.md
home.yaml

When home is loaded, home.md is loaded, and if home.yaml exists, it's loaded as metadata. A branch worthy feature with implications I probably haven't thought of.

Unable to run realms-wiki in production mode

I'm trying to run realms-wiki as root using realms-wiki run or realms-wiki start. I get this output:

Server started. Port: 5000
Using default configuration

or

Server started. Port: 5000
Using config: ./realms-wiki.json

Now If I try to go on http://localhost:5000 I get: ERR_CONNECTION_REFUSED.

If I run the same wiki using realms-wiki dev, this is the output:

Starting development server
Using config: ./realms-wiki.json
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
 * Restarting with stat
Starting development server
Using config: ./realms-wiki.json

and the wiki is working.

Another strange behaviour is that after started the server, if I check its status, the server is turned off:

root@MACHINE:/opt# realms-wiki start
Server started. Port: 5000
Using config: ./realms-wiki.json
root@MACHINE:/opt# realms-wiki status
Server is not running

Python 2.7.9 and pip 1.5.6.

What is going wrong here?

Delete a page

This would be quite important for keeping things sane, since renaming a page clones it, and things are flat now. Yes, deleting via git seems to work fine (any issues to watch out for?) Yes, the question of undelete will come up (a log filter trashcan?) But, nonfunctioning buttons do not inspire user trust.

ALLOW_ANON is ignored

Setting "ALLOW_ANON": false in the configuration file does not actually prevent anonymous users from editing or creating pages in the wiki. The "new" and "edit" buttons still appear in the UI and anonymous edits are saved and commited in git as [email protected].

Plain text area editing option

It would be nice to have a workaround, turning off preview and just a TEXTAREA for the wiki to be editable on tablets (e.g. iPad iOS 7). Scrolling, selecting, arrow keys, are broken right now. Or is there a better plan?

The urls are not standard RESTful

I have seen the changes of urls when I click create and edit. It's not the standard RESTful API which treats the documents as resources.

Editing Broken?

Creating a new page seems to work great, but then I can't get any edits to save. Pressing save redirects as if everything worked fine, but the changes are not there.

Errors when editing with ALLOW_ANON=false

Hey!

When editing/creating pages as a registered user in a realms-wiki with ALLOW_ANON set to false, publishing will always fail with "Anonymous posting not allowed".

In realms/modules/wiki/views.py, line 39 and 113 you do:

    if not current_app.config.get('ALLOW_ANON') and current_user.is_anonymous: 
      return dict(error=True, message="Anonymous posting not allowed"), 403

current_user.is_anonymous is a method, not a property, this statement will always be True if ALLOW_ANON is False. adding parentheses helps.

    if not current_app.config.get('ALLOW_ANON') and current_user.is_anonymous(): 
      return dict(error=True, message="Anonymous posting not allowed"), 403

Enable custom backends via libgit2

Libgit2 supports different backends. See https://github.com/libgit2/libgit2-backends

This wiki uses dulwich which is a python git implementation, not libgit2 bindings like PyGit2. I can adapt the site to use either library I'm sure, but I don't believe either one support different backends besides filesystem and memory.

Solving this will enable this to become a 12-factor app, but I don't know how to do it.

Unable to install: no module pbr.pbr_json

Hi,

I'm trying to install the wiki and I'm getting this error after running pip install realms-wiki:

Installed /tmp/easy_install-OsO0yD/traceback2-1.4.0/pbr-1.2.0-py2.6.egg



Installed /tmp/pip-build-root/unittest2/traceback2-1.4.0-py2.6.egg

Searching for six>=1.4

Reading http://pypi.python.org/simple/six/

Best match: six 1.9.0

Downloading https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz#md5=476881ef4012262dfc8adc645ee786c4

Processing six-1.9.0.tar.gz

Running six-1.9.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Ubg0Jy/six-1.9.0/egg-dist-tmp-kANAIq

Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/tmp/pip-build-root/unittest2/setup.py", line 87, in <module>

    setup(**params)

  File "/usr/lib64/python2.6/distutils/core.py", line 113, in setup

    _setup_distribution = dist = klass(attrs)

  File "/usr/lib/python2.6/site-packages/setuptools/dist.py", line 221, in __init__

    self.fetch_build_eggs(attrs.pop('setup_requires'))

  File "/usr/lib/python2.6/site-packages/setuptools/dist.py", line 245, in fetch_build_eggs

    parse_requirements(requires), installer=self.fetch_build_egg

  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 538, in resolve

    dist = best[req.key] = env.best_match(req, self, installer)

  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 780, in best_match

    return self.obtain(req, installer) # try and download/install

  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 792, in obtain

    return installer(requirement)

  File "/usr/lib/python2.6/site-packages/setuptools/dist.py", line 293, in fetch_build_egg

    return cmd.easy_install(req)

  File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 472, in easy_install

    return self.install_item(spec, dist.location, tmpdir, deps)

  File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 502, in install_item

    dists = self.install_eggs(spec, download, tmpdir)

  File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 681, in install_eggs

    return self.build_and_install(setup_script, setup_base)

  File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 958, in build_and_install

    self.run_setup(setup_script, setup_base, args)

  File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 947, in run_setup

    run_setup(setup_script, args)

  File "/usr/lib/python2.6/site-packages/setuptools/sandbox.py", line 29, in run_setup

    lambda: execfile(

  File "/usr/lib/python2.6/site-packages/setuptools/sandbox.py", line 70, in run

    return func()

  File "/usr/lib/python2.6/site-packages/setuptools/sandbox.py", line 31, in <lambda>

    {'__file__':setup_script, '__name__':'__main__'}

  File "setup.py", line 31, in <module>



  File "/usr/lib64/python2.6/distutils/core.py", line 152, in setup

    dist.run_commands()

  File "/usr/lib64/python2.6/distutils/dist.py", line 975, in run_commands

    self.run_command(cmd)

  File "/usr/lib64/python2.6/distutils/dist.py", line 995, in run_command

    cmd_obj.run()

  File "/usr/lib/python2.6/site-packages/setuptools/command/bdist_egg.py", line 167, in run

    self.run_command("egg_info")

  File "/usr/lib64/python2.6/distutils/cmd.py", line 333, in run_command

    self.distribution.run_command(command)

  File "/usr/lib64/python2.6/distutils/dist.py", line 995, in run_command

    cmd_obj.run()

  File "<string>", line 11, in replacement_run

  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1948, in load

    entry = __import__(self.module_name, globals(),globals(), ['__name__'])

ImportError: No module named pbr.pbr_json

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-root/unittest2
Storing complete log in /root/.pip/pip.log

Here the full log.

How can I solve this issue?

File name extension

This may be related to the Relative Links issue #18 - Now, when I have a link like:

[test](test.md)

And click on it, it creates a file names

testmd.md

Shouldn't strip the dot in my opinion.

Thanks,
Bruce

Implement search feature

As a wiki system, search is really important. I think ElasticSearch could be the powerful and easy way to do that.

Localstorage draft is unaware if page has changed

This can happen easily if more than on browser is open or an edit occurs on a page where you have a draft. The user should be informed that a change occurred and given a choice to discard draft, keep, or, gulp, merge with the latest version (at least see the changes).

Private wiki

First of all I like this wiki system, it's really nice ๐Ÿ˜„ ๐Ÿ‘

But when I installed it, i found two things, that are improvable.

It would be nice, to use realms-wiki as a "private" wiki. So nobody can sees anything until he is logged in. This way I like to use it. So I solved this problem by adding to every route in the views.py @login_required. Maybe theres a way to make this configurable?

And after all the installation is a bit complicated. Are there ways to simplify this?

The README should have ".md" suffix

Now I'm reading the raw README file in realms-wiki github page. We should rename it as "README.md" so that Github will render the markdown file into HTML.

Namespaces/Tags/Categories

Do you plan on implementing namespaces (or similar features like tags or categories)?
Wikis with a lot of pages can get quite messy if everything is in the same namespace.

Using sub folders in the base git repository would be the easiest way to achieve some sort of categories/namespaces, although limiting the flexibility by allowing a page to be in one category only. But imho it's the only way to reproduce the wiki's structure in the file system.

Storing this information in a page's metadata on the other hand forces realms to look into each file - meh.

What are your thoughts on this?

500 error in _history when wiki has no pages

Hi, as said in the title, i got a 500 error in the history when the wiki is empty.

Here is the traceback message in my logs.

Sep 27 15:36:27 bananium realms-wiki[24223]: KeyError: 'HEAD'
Sep 27 15:36:27 bananium realms-wiki[24223]: raise KeyError(name)
Sep 27 15:36:27 bananium realms-wiki[24223]: File "/home/wiki/realms-wiki/.venv/lib/python2.7/site-packages/dulwich/refs.py", line 223, in __getitem__
Sep 27 15:36:27 bananium realms-wiki[24223]: return self.refs['HEAD']
Sep 27 15:36:27 bananium realms-wiki[24223]: File "/home/wiki/realms-wiki/.venv/lib/python2.7/site-packages/dulwich/repo.py", line 306, in head
Sep 27 15:36:27 bananium realms-wiki[24223]: include = [self.head()]
Sep 27 15:36:27 bananium realms-wiki[24223]: File "/home/wiki/realms-wiki/.venv/lib/python2.7/site-packages/dulwich/repo.py", line 427, in get_walker
Sep 27 15:36:27 bananium realms-wiki[24223]: walker = self.repo.get_walker(paths=[file_path], max_entries=100)
Sep 27 15:36:27 bananium realms-wiki[24223]: File "/home/wiki/realms-wiki/realms/modules/wiki/models.py", line 181, in get_history
Sep 27 15:36:27 bananium realms-wiki[24223]: return render_template('wiki/history.html', name=name, history=wiki.get_history(name))
Sep 27 15:36:27 bananium realms-wiki[24223]: File "/home/wiki/realms-wiki/realms/modules/wiki/views.py", line 48, in history
Sep 27 15:36:27 bananium realms-wiki[24223]: return self.view_functions[rule.endpoint](**req.view_args)
Sep 27 15:36:27 bananium realms-wiki[24223]: File "/home/wiki/realms-wiki/.venv/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
Sep 27 15:36:27 bananium realms-wiki[24223]: rv = self.dispatch_request()
Sep 27 15:36:27 bananium realms-wiki[24223]: File "/home/wiki/realms-wiki/.venv/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
Sep 27 15:36:27 bananium realms-wiki[24223]: reraise(exc_type, exc_value, tb)
Sep 27 15:36:27 bananium realms-wiki[24223]: File "/home/wiki/realms-wiki/.venv/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
Sep 27 15:36:27 bananium realms-wiki[24223]: rv = self.handle_user_exception(e)
Sep 27 15:36:27 bananium realms-wiki[24223]: File "/home/wiki/realms-wiki/.venv/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
Sep 27 15:36:27 bananium realms-wiki[24223]: response = self.full_dispatch_request()
Sep 27 15:36:27 bananium realms-wiki[24223]: File "/home/wiki/realms-wiki/.venv/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
Sep 27 15:36:27 bananium realms-wiki[24223]: reraise(exc_type, exc_value, tb)
Sep 27 15:36:27 bananium realms-wiki[24223]: File "/home/wiki/realms-wiki/.venv/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
Sep 27 15:36:27 bananium realms-wiki[24223]: response = self.make_response(self.handle_exception(e))
Sep 27 15:36:27 bananium realms-wiki[24223]: File "/home/wiki/realms-wiki/.venv/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
Sep 27 15:36:27 bananium realms-wiki[24223]: return self.wsgi_app(environ, start_response)
Sep 27 15:36:27 bananium realms-wiki[24223]: File "/home/wiki/realms-wiki/.venv/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
Sep 27 15:36:27 bananium realms-wiki[24223]: return super(Application, self).__call__(environ, start_response)
Sep 27 15:36:27 bananium realms-wiki[24223]: File "/home/wiki/realms-wiki/realms/__init__.py", line 48, in __call__
Sep 27 15:36:27 bananium realms-wiki[24223]: self.result = self.application(self.environ, self.start_response)
Sep 27 15:36:27 bananium realms-wiki[24223]: File "/home/wiki/realms-wiki/.venv/lib/python2.7/site-packages/gevent/pywsgi.py", line 494, in run_application
Sep 27 15:36:27 bananium realms-wiki[24223]: self.run_application()
Sep 27 15:36:27 bananium realms-wiki[24223]: File "/home/wiki/realms-wiki/.venv/lib/python2.7/site-packages/gevent/pywsgi.py", line 508, in handle_one_respons
Sep 27 15:36:27 bananium realms-wiki[24223]: Traceback (most recent call last):

Any plans for improved navigation?

Really slick project! One thing I noticed (unless I'm mistaken) is right now it doesn't seem like there is much facility for structured navigation around a wiki with multiple pages.

Some ideas for things that might help:

  • Ability to add a sidebar to some pages (a common feature with some wikis, like Gollum)
  • Some way to generate a list of links to all pages? (I.e. in the Github wiki)
  • Subpages (or categories, tags) would probably be helpful with generating any sort of auto-generated nav links. The left sidebar at https://torchpad.com/ might be an example to consider

The same-name document will be overrided without alert

When I try to create a new document with the same name of the previous one, it successes and the previous one is overrided with no alert. I think we should prevent from creating the same-name document and it would be better to remind us of editting the existing one.

Working diff on drafts

I regularly get the message "your draft differs .." but am confused by what's going on. Am I looking at the draft saved on my local machine, or remote? What's the difference between the buttons? The non-functioning diff button does not help. If you could explain what's going on a little, maybe we could come up with a better UI.

RSS support

Realms looks really good - great work!!

Is it possible to have RSS for Realms?

Why,

  • so can feed feeds of a page or group of pages
    -- and also limit the rss scope
  • so you can host a blog using realms

This is probably not what you expect people to use realms for, but they will :)

Thanks

Justin

question

Error messages are displayed incorrectly

Upon discovering the error mentioned in #33, I also discovered that error messages are displayed incorrectly:

realms_error

I've installed realms-wiki using pip on Debian 7.7 (Python 2.7.3). This happens in Firefox and Chrome.

Docker locks up in my_init

When running the current Docker build, the VM endlessly cycles in /sbin/my_init, with log messages like:

./run: line 33: setuid: command not found
./run: line 34: setgid: command not found
./run: line 39: respawn: command not found

It seemed something is amiss with the base image? I tried swapping out realms-base for:

FROM phusion/baseimage:0.9.15
RUN useradd -M deploy

But that had no effect.

Reseting cursor position within edit box

If person A is typing something in the edit box and person B begins typing somewhere else in the edit box, person A's cursor resets its position to the top left most corner of the edit box. This is unintuitive and likely a bug.

Relative links

Do relative links (i.e. no http and domain - test ) not work, or am I don't something wrong?

Was trying to not have to have the full domain, etc. in all the links.

Thanks!
Bruce

Git storage?

Sorry for creating an issue to ask questions, but I couldn't find a mailing list for the realms-wiki project.

Thanks for realms-wiki which sounds great and has a very appealing web interface!

I was wondering why realms-wiki needs a database (sqlite, mysql or postgres) if it is a Git based wiki: does realms-wiki really use a Git repository as storage?

I'm also interested in updating realms-wiki pages directly from Git cli (without using the web interface): does realms-wiki supports updating the wiki when we git push our changes to a repository (like Gollum)?

Last question, on http://realms.io/ the title is "Realms Wiki Beta": do you consider it as beta software, or can it be run in production? Is the project still active, and is there a roadmap somewhere?

Thanks!

How to list all documents

It redirects to the home document automatically but I want to see all my documents. How can I review the other documents without remembering their titles?

Ability to make Wiki Private

It would be very nice be able to control who can view and log into the wiki. an invite system would be gravy.

If there is interest i would contribute to a bountysource to make it happen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.