Giter VIP home page Giter VIP logo

moo's People

Contributors

laurrentt avatar markstos avatar pyrocat101 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

moo's Issues

Wish: option to exclude formatting

One way I use moo.js is to write content in Markdown, render it in HTML, then copy/paste the result into a Google Doc. However, the formatting doesn't transfer well, and largely needs to be manually removed and re-done later in Google Docs.

However, the basic HTML structure with no formatting generated by pandoc from Markdown works very well. I can use pandoc for those cases, but I'm already in the flow of using moo.js for live previewing, so it would be nice to have a no styling option in Moo.js.

One approach might be have a link or button in the rendered HTML that toggles the styling. Another option would be an alternate --export option that omits the styling.

Thanks for considering the feature!

wish: absorb functionality of `readme`

I'd love to be able to do this with moo:

moo lodash

And the result would be that the lodash README file would be found and displayed.

If you are interested too, the source code for this is already in readme and could be incorporated.

(Even this is implemented, I still think it would be nice accept file input on STDIN as mentioned in a prior "wish" request).

Thanks for Moo!

pip install moo does not install templates

In the source setup.py and fro the whl file the template directories are not being installed to the correct place resulting in an "internal server error. Index not found"

Wish: retry once on "no longer exists"

Sometimes I get the error "no longer exists" When the file does exist and I've been editing it with Vim. This causes "moo" to quit.

I think perhaps the file might be temporarily locked while vim is saving the contents. The issue comes up rarely.

If this happens, consider sleeping 100 milliseconds and trying again once before exiting.

Packaging issues - ubuntu linux

Node/npm noob here, feel free to shoot back.

First, on my platform, apt-get install nodejs will provide "/usr/bin/nodejs"; so there is no "node" executable. This means the #! for ./bin/moo will not work as-is. "nodejs bin/moo flle.md" works great, as does changing the #! env argument to nodejs.

Second, there does not appear to be a moo.js, so "npm install moo.js" complains
npm WARN install Refusing to install moo.js as a dependency of itself

while adding sudo and -g will just hang.

thanks.

fork Python version

Hi,

Moo is pretty good software. I'm using to moo tool.
The present moo is using JavaScript(node.js).

I would like to base on the version using Python
And to release the version which added the function to change reST files.
(https://github.com/hhatto/moo)

Then, although it is consulted, may I fork based on the version using Python?
In that case, the name of a tool is changed and your name is added to a License file.

Sorry, My poor English.

Regards.

pip install error in new virtualenv: must manually install flask, misaka, and pygments

Running pip install moo in a new virtualenv results in ImportError: No module named flask

Ultimately I had to manually install flask, misaka, pygments into my virtualenv.

(Not sure if this is something wonky in my environment, need to know if this has happened to others... this is a fairly fresh 12.04 installation.)

Environment:

  • Ubuntu 12.04.1 LTS x86_64
  • Python 2.7.3
  • Virtualenv 1.8.4
  • pip 1.2.1

Please note that this happens whether I use virtualenv --distribute or the default setuptools option.

bash transcript

inactivist@inactivist-precise-vbox:/tmp$ virtualenv test; cd test; source bin/activate
New python executable in test/bin/python
Installing setuptools............done.
Installing pip........c.......done.
(test)inactivist@inactivist-precise-vbox:/tmp/test$ pip install moo
Downloading/unpacking moo
  Using download cache from /home/inactivist/.pip/cache/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fm%2Fmoo%2Fmoo-0.1.7.zip
  Running setup.py egg_info for package moo
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/test/build/moo/setup.py", line 2, in <module>
        from moo import __doc__ as long_descript, __version__ as version
      File "moo/__init__.py", line 16, in <module>
        import flask, misaka, sys, pygments, os, time, getopt, locale, urllib
    ImportError: No module named flask
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

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

  File "/tmp/test/build/moo/setup.py", line 2, in <module>

    from moo import __doc__ as long_descript, __version__ as version

  File "moo/__init__.py", line 16, in <module>

    import flask, misaka, sys, pygments, os, time, getopt, locale, urllib

ImportError: No module named flask

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/test/build/moo
Storing complete log in /home/inactivist/.pip/pip.log
(test)inactivist@inactivist-precise-vbox:/tmp/test$ pip install flask
Downloading/unpacking flask
  Using download cache from /home/inactivist/.pip/cache/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FF%2FFlask%2FFlask-0.9.tar.gz
  Running setup.py egg_info for package flask

    warning: no files found matching '*' under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'examples'
    warning: no previously-included files matching '*.pyo' found under directory 'examples'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'docs/_themes/.git'
Downloading/unpacking Werkzeug>=0.7 (from flask)
  Using download cache from /home/inactivist/.pip/cache/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FW%2FWerkzeug%2FWerkzeug-0.8.3.tar.gz
  Running setup.py egg_info for package Werkzeug

    warning: no files found matching '*' under directory 'werkzeug/debug/templates'
    warning: no files found matching '*' under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'examples'
    warning: no previously-included files matching '*.pyo' found under directory 'examples'
    no previously-included directories found matching 'docs/_build'
Downloading/unpacking Jinja2>=2.4 (from flask)
  Using download cache from /home/inactivist/.pip/cache/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FJ%2FJinja2%2FJinja2-2.6.tar.gz
  Running setup.py egg_info for package Jinja2

    warning: no previously-included files matching '*' found under directory 'docs/_build'
    warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
Installing collected packages: flask, Werkzeug, Jinja2
  Running setup.py install for flask

    warning: no files found matching '*' under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'examples'
    warning: no previously-included files matching '*.pyo' found under directory 'examples'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'docs/_themes/.git'
  Running setup.py install for Werkzeug

    warning: no files found matching '*' under directory 'werkzeug/debug/templates'
    warning: no files found matching '*' under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'examples'
    warning: no previously-included files matching '*.pyo' found under directory 'examples'
    no previously-included directories found matching 'docs/_build'
  Running setup.py install for Jinja2

    warning: no previously-included files matching '*' found under directory 'docs/_build'
    warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
Successfully installed flask Werkzeug Jinja2
Cleaning up...
(test)inactivist@inactivist-precise-vbox:/tmp/test$ pip install moo
Downloading/unpacking moo
  Using download cache from /home/inactivist/.pip/cache/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fm%2Fmoo%2Fmoo-0.1.7.zip
  Running setup.py egg_info for package moo
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/test/build/moo/setup.py", line 2, in <module>
        from moo import __doc__ as long_descript, __version__ as version
      File "moo/__init__.py", line 16, in <module>
        import flask, misaka, sys, pygments, os, time, getopt, locale, urllib
    ImportError: No module named misaka
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

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

  File "/tmp/test/build/moo/setup.py", line 2, in <module>

    from moo import __doc__ as long_descript, __version__ as version

  File "moo/__init__.py", line 16, in <module>

    import flask, misaka, sys, pygments, os, time, getopt, locale, urllib

ImportError: No module named misaka

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/test/build/moo
Storing complete log in /home/inactivist/.pip/pip.log
(test)inactivist@inactivist-precise-vbox:/tmp/test$ pip install misaka
Downloading/unpacking misaka
  Downloading misaka-1.0.2.tar.gz (78kB): 78kB downloaded
  Storing download in cache at /home/inactivist/.pip/cache/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fm%2Fmisaka%2Fmisaka-1.0.2.tar.gz
  Running setup.py egg_info for package misaka

Installing collected packages: misaka
  Running setup.py install for misaka
    building 'misaka' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/misaka.c -o build/temp.linux-x86_64-2.7/src/misaka.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/wrapper.c -o build/temp.linux-x86_64-2.7/src/wrapper.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/sundown/stack.c -o build/temp.linux-x86_64-2.7/src/sundown/stack.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/sundown/buffer.c -o build/temp.linux-x86_64-2.7/src/sundown/buffer.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/sundown/markdown.c -o build/temp.linux-x86_64-2.7/src/sundown/markdown.o
    In file included from src/sundown/markdown.c:42:0:
    src/sundown/html_blocks.h:90:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
    src/sundown/html_blocks.h:144:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/sundown/html.c -o build/temp.linux-x86_64-2.7/src/sundown/html.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/sundown/html_smartypants.c -o build/temp.linux-x86_64-2.7/src/sundown/html_smartypants.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/sundown/houdini_href_e.c -o build/temp.linux-x86_64-2.7/src/sundown/houdini_href_e.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/sundown/houdini_html_e.c -o build/temp.linux-x86_64-2.7/src/sundown/houdini_html_e.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/sundown/autolink.c -o build/temp.linux-x86_64-2.7/src/sundown/autolink.o
    gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/src/misaka.o build/temp.linux-x86_64-2.7/src/wrapper.o build/temp.linux-x86_64-2.7/src/sundown/stack.o build/temp.linux-x86_64-2.7/src/sundown/buffer.o build/temp.linux-x86_64-2.7/src/sundown/markdown.o build/temp.linux-x86_64-2.7/src/sundown/html.o build/temp.linux-x86_64-2.7/src/sundown/html_smartypants.o build/temp.linux-x86_64-2.7/src/sundown/houdini_href_e.o build/temp.linux-x86_64-2.7/src/sundown/houdini_html_e.o build/temp.linux-x86_64-2.7/src/sundown/autolink.o -o build/lib.linux-x86_64-2.7/misaka.so
    changing mode of build/scripts-2.7/misaka from 664 to 775

    changing mode of /tmp/test/bin/misaka to 775
Successfully installed misaka
Cleaning up...
(test)inactivist@inactivist-precise-vbox:/tmp/test$ pip install moo
Downloading/unpacking moo
  Using download cache from /home/inactivist/.pip/cache/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fm%2Fmoo%2Fmoo-0.1.7.zip
  Running setup.py egg_info for package moo
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/test/build/moo/setup.py", line 2, in <module>
        from moo import __doc__ as long_descript, __version__ as version
      File "moo/__init__.py", line 16, in <module>
        import flask, misaka, sys, pygments, os, time, getopt, locale, urllib
    ImportError: No module named pygments
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

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

  File "/tmp/test/build/moo/setup.py", line 2, in <module>

    from moo import __doc__ as long_descript, __version__ as version

  File "moo/__init__.py", line 16, in <module>

    import flask, misaka, sys, pygments, os, time, getopt, locale, urllib

ImportError: No module named pygments

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/test/build/moo
Storing complete log in /home/inactivist/.pip/pip.log
(test)inactivist@inactivist-precise-vbox:/tmp/test$ pip install pygments
Downloading/unpacking pygments
  Downloading Pygments-1.5.tar.gz (3.7MB): 3.7MB downloaded
  Storing download in cache at /home/inactivist/.pip/cache/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FP%2FPygments%2FPygments-1.5.tar.gz
  Running setup.py egg_info for package pygments

Installing collected packages: pygments
  Running setup.py install for pygments

    Installing pygmentize script to /tmp/test/bin
Successfully installed pygments
Cleaning up...
(test)inactivist@inactivist-precise-vbox:/tmp/test$ pip install moo
Downloading/unpacking moo
  Using download cache from /home/inactivist/.pip/cache/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fm%2Fmoo%2Fmoo-0.1.7.zip
  Running setup.py egg_info for package moo

Requirement already satisfied (use --upgrade to upgrade): Flask in ./lib/python2.7/site-packages (from moo)
Requirement already satisfied (use --upgrade to upgrade): pygments in ./lib/python2.7/site-packages (from moo)
Requirement already satisfied (use --upgrade to upgrade): misaka in ./lib/python2.7/site-packages (from moo)
Requirement already satisfied (use --upgrade to upgrade): Werkzeug>=0.7 in ./lib/python2.7/site-packages (from Flask->moo)
Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.4 in ./lib/python2.7/site-packages (from Flask->moo)
Installing collected packages: moo
  Running setup.py install for moo

    Installing moo script to /tmp/test/bin
Successfully installed moo
Cleaning up...
(test)inactivist@inactivist-precise-vbox:/tmp/test$ touch test.md
(test)inactivist@inactivist-precise-vbox:/tmp/test$ moo -p 8001 test.md
 * Running on http://127.0.0.1:8001/
 * Restarting with reloader
127.0.0.1 - - [01/Jan/2013 07:34:20] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [01/Jan/2013 07:34:21] "GET /static/md.css HTTP/1.1" 200 -
127.0.0.1 - - [01/Jan/2013 07:34:21] "GET /favicon.ico HTTP/1.1" 404 -
^C(test)inactivist@inactivist-precise-vbox:/tmp/test$ pip freeze
Flask==0.9
Jinja2==2.6
Pygments==1.5
Werkzeug==0.8.3
argparse==1.2.1
misaka==1.0.2
moo==0.1.7
wsgiref==0.1.2

wish: support markdown on STDIN (moo --)

Nicely behaved Unix utilities accept input on STDIN and produce output on STDOUT so they can be chained together pipes.

For example, there's a nice little utility called readme which finds Markdown for you and prints it to STDOUT. It would be great if such a utility could be chained with moo:

readme lodash | moo --

License?

Hi!

I love this software, I use it every day and would like to mirror it on my blog (justblog.co); would it be possible for you to add an explicit license to the source?

Thanks!
Rob

moo --help should show examples

moo --help doesn't show example use, while moo help oddly shows the example use 5 times with strange formatting:

$ moo help
  Examples: 0 [ '  Examples:',
  '',
  '    $ moo [-p 8080] README.md',
  '    $ moo -e *.md',
  '    $ cat README.md | moo -e - | less',
  '' ]
 1 [ '  Examples:',
  '',
  '    $ moo [-p 8080] README.md',
  '    $ moo -e *.md',
  '    $ cat README.md | moo -e - | less',
  '' ]
    $ moo [-p 8080] README.md 2 [ '  Examples:',
  '',
  '    $ moo [-p 8080] README.md',
  '    $ moo -e *.md',
  '    $ cat README.md | moo -e - | less',
  '' ]
    $ moo -e *.md 3 [ '  Examples:',
  '',
  '    $ moo [-p 8080] README.md',
  '    $ moo -e *.md',
  '    $ cat README.md | moo -e - | less',
  '' ]
    $ cat README.md | moo -e - | less 4 [ '  Examples:',
  '',
  '    $ moo [-p 8080] README.md',
  '    $ moo -e *.md',
  '    $ cat README.md | moo -e - | less',
  '' ]
 5 [ '  Examples:',
  '',
  '    $ moo [-p 8080] README.md',
  '    $ moo -e *.md',
  '    $ cat README.md | moo -e - | less',
  '' ]
fatal - expect one input file.

Besides showing the example use with --help is called, it would nice to show it in the README as well, so people can get a better sense of how moo.js works before installing it.

Not enough arguments for USAGE format string

diff --git a/moo/__init__.py b/moo/__init__.py
index 11a4d0a..a7323c0 100644
--- a/moo/__init__.py
+++ b/moo/__init__.py
@@ -127,7 +127,7 @@ def run_server():
         opts, args = getopt.getopt(sys.argv[1:], "p:h", ["help", "port="])
     except getopt.GetoptError, err:
         print str(err)
-        print USAGE
+        print USAGE % sys.argv[0]
         sys.exit(2)
     port = 5000
     for o, a in opts:

TemplateNotFound: export.html

Traceback (most recent call last):
  File "/sdk/anaconda2/lib/python2.7/site-packages/moo/__init__.py", line 227, in main
    export_files(files, options)
  File "/sdk/anaconda2/lib/python2.7/site-packages/moo/__init__.py", line 175, in export_files
    template = env.get_template('export.html')
  File "/sdk/anaconda2/lib/python2.7/site-packages/jinja2/environment.py", line 830, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/sdk/anaconda2/lib/python2.7/site-packages/jinja2/environment.py", line 804, in _load_template
    template = self.loader.load(self, name, globals)
  File "/sdk/anaconda2/lib/python2.7/site-packages/jinja2/loaders.py", line 115, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/sdk/anaconda2/lib/python2.7/site-packages/jinja2/loaders.py", line 189, in get_source
    raise TemplateNotFound(template)
TemplateNotFound: export.html

what minimum requirements for moo ?

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.