Re: [web2py] New Plugin: plugin_markitup

2013-01-18 Thread LightDot
How are you using the plugin? Can you post some code?

As to getting the code from BitBucket, go to:
https://bitbucket.org/PhreeStyle/web2py_markitup/downloads
And select "Tags" or "Branches", you'll see options to download as .zip, 
.tar.gz or .tar.bz2.

Regards,
Ales

On Saturday, January 19, 2013 1:39:02 AM UTC+1, Tito Garrido wrote:
>
> Hi Ross!
>
> Nice addition... I am trying to use it but I am getting:
>  global name 'markitup' is not defined 
> Version  web2py™ (2, 3, 2, datetime.datetime(2012, 12, 17, 15, 3, 30), 
> 'stable')  Python Python 2.6.6: /usr/bin/python  Traceback 
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
> 13.
> 14.
>
> Traceback (most recent call last):
>   File "/home/titog/Documents/Projetos/web2py/gluon/restricted.py", line 212, 
> in restricted
>
>
> exec ccode in environment
>   File 
> "/home/titog/Documents/Projetos/web2py/applications/cms/controllers/default.py"
>  , line 
> 81, in 
>
>
>   File "/home/titog/Documents/Projetos/web2py/gluon/globals.py", line 193, in 
> 
>
>
> self._caller = lambda f: f()
>
>
>   File 
> "/home/titog/Documents/Projetos/web2py/applications/cms/controllers/default.py"
>  , line 
> 22, in index
>
>
> form=SQLFORM(db.conteudo,conteudo)
>
>
>   File "/home/titog/Documents/Projetos/web2py/gluon/sqlhtml.py", line 1063, 
> in __init__
>
>
> inp = field.widget(field, default)
>
>
>   File "applications/cms/modules/plugin_markitup/markitup.py", line 131, in 
> widget
>
>
> return markitup(value, **attributes)
> NameError: global name 'markitup' is not defined
>
>
> Are you able to sent the plugin package? Maybe I missed something copying 
> it from source...
>
>
>
> On Mon, Feb 13, 2012 at 11:20 AM, Marin Pranjić 
> 
> > wrote:
>
>> Thanks, i will test by the end of the week.
>> I need this.
>>
>> Marin
>>
>>
>> On Sun, Feb 12, 2012 at 10:07 PM, Ross Peoples 
>> 
>> > wrote:
>>
>>> I have created another plugin for the MarkItUp widget. I know that 
>>> plugin_wiki has this currently, but I wanted a dedicated plugin for this 
>>> for an upcoming project I'm working on.
>>>
>>> You can get the plugin from Bitbucket: 
>>> https://bitbucket.org/PhreeStyle/web2py_markitup
>>>
>>> There is no documentation yet, as I just pushed the code. But I wanted 
>>> to announce in case anyone wants to play with this. It has not been 
>>> thoroughly tested and is only an alpha at this point. It can be used with 
>>> several different markup languages:
>>>
>>>- BBCode
>>>- HTML
>>>- Markdown
>>>- Markmin 
>>>- reStructuredText
>>>- Textile
>>>- Wiki
>>>
>>> The plugin can be used standalone, or as a form field widget. It 
>>> currently supports live previews for 4 markup languages: html, markmin, 
>>> markdown, textile, and bbcode. Code blocks for markmin and markdown markup 
>>> are highlighted by pygments, which is included as part of the plugin. No 
>>> external dependencies. Using pygments for code highlighting allows over 100 
>>> languages to be highlighted.
>>>
>>> Code highlighting in markmin:
>>>
>>> ``
>>> def testing():
>>> print 'Testing'
>>> ``:python
>>>
>>> Code highlighting in markdown:
>>>
>>> :::python
>>> def testing():
>>> print 'Testing'
>>>
>>> Markdown requires four spaces at the beginning of each line for code 
>>> blocks.
>>>
>>> Example for basic usage:
>>>
>>> from plugin_markitup.markitup import MarkItUp
>>>
>>> def test():
>>> widget = MarkItUp(set_name='markmin').markitup()
>>>  return dict(widget=widget)
>>>
>>>
>>> Example model for form fields:
>>>
>>> from plugin_markitup.markitup import MarkItUp
>>>
>>> db.define_table('content',
>>> Field('name', length=20),
>>> Field('description', 'text')
>>> )
>>> db.content.description.widget = MarkItUp().widget
>>>
>>>
>>> Example controller:
>>> def test():
>>> form = SQLFORM(db.content)
>>> if form.accepts(request, session):
>>> redirect(URL())
>>>
>>> return dict(form=form)
>>>
>>>
>>> This plugin is more of an alpha preview, so I expect there to be 
>>> problems and inconsistencies. Please try it out and let me know if you have 
>>> any questions, comments, or problems!
>>>
>>
>>
>
>
> -- 
>
> Linux User #387870
> .
>  _/_õ|__|
> ..º[ .-.___.-._| . . . .
> .__( o)__( o).:___ 
>

-- 





Re: [web2py] New Plugin: plugin_markitup

2013-01-18 Thread Tito Garrido
Hi Ross!

Nice addition... I am trying to use it but I am getting:
 global name 'markitup' is not defined Version
web2py™ (2, 3, 2, datetime.datetime(2012, 12, 17, 15, 3, 30), 'stable')
Python Python 2.6.6: /usr/bin/python  Traceback


1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.


Traceback (most recent call last):
  File "/home/titog/Documents/Projetos/web2py/gluon/restricted.py",
line 212, in restricted

exec ccode in environment
  File 
"/home/titog/Documents/Projetos/web2py/applications/cms/controllers/default.py"
,
line 81, in 

  File "/home/titog/Documents/Projetos/web2py/gluon/globals.py", line
193, in 

self._caller = lambda f: f()

  File 
"/home/titog/Documents/Projetos/web2py/applications/cms/controllers/default.py"
,
line 22, in index

form=SQLFORM(db.conteudo,conteudo)

  File "/home/titog/Documents/Projetos/web2py/gluon/sqlhtml.py", line
1063, in __init__

inp = field.widget(field, default)

  File "applications/cms/modules/plugin_markitup/markitup.py", line
131, in widget

return markitup(value, **attributes)
NameError: global name 'markitup' is not defined


Are you able to sent the plugin package? Maybe I missed something copying
it from source...



On Mon, Feb 13, 2012 at 11:20 AM, Marin Pranjić wrote:

> Thanks, i will test by the end of the week.
> I need this.
>
> Marin
>
>
> On Sun, Feb 12, 2012 at 10:07 PM, Ross Peoples wrote:
>
>> I have created another plugin for the MarkItUp widget. I know that
>> plugin_wiki has this currently, but I wanted a dedicated plugin for this
>> for an upcoming project I'm working on.
>>
>> You can get the plugin from Bitbucket:
>> https://bitbucket.org/PhreeStyle/web2py_markitup
>>
>> There is no documentation yet, as I just pushed the code. But I wanted to
>> announce in case anyone wants to play with this. It has not been thoroughly
>> tested and is only an alpha at this point. It can be used with several
>> different markup languages:
>>
>>- BBCode
>>- HTML
>>- Markdown
>>- Markmin
>>- reStructuredText
>>- Textile
>>- Wiki
>>
>> The plugin can be used standalone, or as a form field widget. It
>> currently supports live previews for 4 markup languages: html, markmin,
>> markdown, textile, and bbcode. Code blocks for markmin and markdown markup
>> are highlighted by pygments, which is included as part of the plugin. No
>> external dependencies. Using pygments for code highlighting allows over 100
>> languages to be highlighted.
>>
>> Code highlighting in markmin:
>>
>> ``
>> def testing():
>> print 'Testing'
>> ``:python
>>
>> Code highlighting in markdown:
>>
>> :::python
>> def testing():
>> print 'Testing'
>>
>> Markdown requires four spaces at the beginning of each line for code
>> blocks.
>>
>> Example for basic usage:
>>
>> from plugin_markitup.markitup import MarkItUp
>>
>> def test():
>> widget = MarkItUp(set_name='markmin').markitup()
>>  return dict(widget=widget)
>>
>>
>> Example model for form fields:
>>
>> from plugin_markitup.markitup import MarkItUp
>>
>> db.define_table('content',
>> Field('name', length=20),
>> Field('description', 'text')
>> )
>> db.content.description.widget = MarkItUp().widget
>>
>>
>> Example controller:
>> def test():
>> form = SQLFORM(db.content)
>> if form.accepts(request, session):
>> redirect(URL())
>>
>> return dict(form=form)
>>
>>
>> This plugin is more of an alpha preview, so I expect there to be problems
>> and inconsistencies. Please try it out and let me know if you have any
>> questions, comments, or problems!
>>
>
>


-- 

Linux User #387870
.
 _/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:___

-- 





Re: [web2py] New Plugin: plugin_markitup

2012-02-13 Thread Marin Pranjić
Thanks, i will test by the end of the week.
I need this.

Marin

On Sun, Feb 12, 2012 at 10:07 PM, Ross Peoples wrote:

> I have created another plugin for the MarkItUp widget. I know that
> plugin_wiki has this currently, but I wanted a dedicated plugin for this
> for an upcoming project I'm working on.
>
> You can get the plugin from Bitbucket:
> https://bitbucket.org/PhreeStyle/web2py_markitup
>
> There is no documentation yet, as I just pushed the code. But I wanted to
> announce in case anyone wants to play with this. It has not been thoroughly
> tested and is only an alpha at this point. It can be used with several
> different markup languages:
>
>- BBCode
>- HTML
>- Markdown
>- Markmin
>- reStructuredText
>- Textile
>- Wiki
>
> The plugin can be used standalone, or as a form field widget. It currently
> supports live previews for 4 markup languages: html, markmin, markdown,
> textile, and bbcode. Code blocks for markmin and markdown markup are
> highlighted by pygments, which is included as part of the plugin. No
> external dependencies. Using pygments for code highlighting allows over 100
> languages to be highlighted.
>
> Code highlighting in markmin:
>
> ``
> def testing():
> print 'Testing'
> ``:python
>
> Code highlighting in markdown:
>
> :::python
> def testing():
> print 'Testing'
>
> Markdown requires four spaces at the beginning of each line for code
> blocks.
>
> Example for basic usage:
>
> from plugin_markitup.markitup import MarkItUp
>
> def test():
> widget = MarkItUp(set_name='markmin').markitup()
> return dict(widget=widget)
>
>
> Example model for form fields:
>
> from plugin_markitup.markitup import MarkItUp
>
> db.define_table('content',
> Field('name', length=20),
> Field('description', 'text')
> )
> db.content.description.widget = MarkItUp().widget
>
>
> Example controller:
> def test():
> form = SQLFORM(db.content)
> if form.accepts(request, session):
> redirect(URL())
>
> return dict(form=form)
>
>
> This plugin is more of an alpha preview, so I expect there to be problems
> and inconsistencies. Please try it out and let me know if you have any
> questions, comments, or problems!
>