getnikola / nikola

A static website and blog generator
https://getnikola.com/
MIT License
2.6k stars 448 forks source link

Move out plugins to the Plugins Index #824

Closed Kwpolska closed 10 years ago

Kwpolska commented 10 years ago

So we do not forget. Should not be done before v7.0.0.

compile

We should leave markdown in, because it’s the second biggest. I’m not sure about ipynb and left it out, too.

task

damianavila commented 10 years ago

We should leave markdown in, because it’s the second biggest. I’m not sure about ipynb and left it out, too.

Probably ipynb is the third one... as far as I know, there are a lot of people using it, and probably will be even more when Nikola supports the generation of "series of post"... I mean books ;-), so I would keep it, but if there are some strong arguments to move, no problem to do it...

Kwpolska commented 10 years ago

I personally want to keep it in the core. Moreover, IPython is recommended by the console command (even though there are no docs about that).

Which makes me add it to requirements-full.txt (which also holds the bbcode dependency for some strange reason)

damianavila commented 10 years ago

Great! Regarding the nikola console, this is the first thing I do in my workflow to post ;-) (yep, I follow the IPython-do, he he). I also thought about to add IPython to the requirements... thanks for do it...

punchagan commented 10 years ago

@damianavila, would you mind elaborating on this workflow or pointing me to any links? I don't follow this. What do you mean?

Kwpolska commented 10 years ago

…which is great news, as at least 1/3 of this feature is continuously tested! (the other 2/3 are bpython which we could actually remove and the plain python console)

damianavila commented 10 years ago

@punchagan with IPython you can do a lot of things, ie. it can be used as a sort of system shell ;-) So, I enter nikola console and do whatever I want from there... ie, I can call nikola new_post, write my post in an IPython notebook, and inside the last one, I can push my content to github (and a gh-pages) with just a click on a button (with a little IPython extension I have written)... But, I will explain this more deeply in a blog post in a few days, because you have a lot of more possibilities.

punchagan commented 10 years ago

@damianavila what I didn't understand is, why the console needs to be a nikola console; anyway, looking forward to your post! Thanks!

Kwpolska commented 10 years ago

@punchagan

I imagine something like this (executed with the plain python console just because):

$ nikola console
Scanning posts....done!
Nikola v6.1.1 -- Python Console (conf = configuration, SITE = site engine)
>>> SITE.commands['new_post'].execute({
...     'title': 'Sample Worthless Post',
...     'tags': 'tag1, tag2',
...     'onefile': True,
...     'twofile': False,
...     'post_format': 'rest',
...     'schedule': None
... })
Creating New Post
-----------------

Title: Sample Worthless Post
[2013-10-14T07:42:46Z] NOTICE: new_post: Your post's text is at: posts/sample-worthless-post.rst
>>>
damianavila commented 10 years ago

@punchagan Yep @Kwpolska have showed a good example ;-)

Kwpolska commented 10 years ago

@damianavila but do you input all this crap that would be optional if you did it normally?

damianavila commented 10 years ago

@Kwpolska I use these options a lot... but as you have pointed out, sometimes I do simpler things ;-)... anyway, it is also a matter of taste, I mean, I like to do all the things inside IPython (console or notebook), and if Nikola gives me an IPython console with a nice integration and the possibility to investigate further Nikola options in an easier way, why not use it? ;-)

Kwpolska commented 10 years ago

well, we could work on making it easier to use it, or even make some sort of magic which would be a compromise between console and the standard execution.

Something like this:

Nikola v6.1.1 -- Python Console (conf = configuration, SITE = site engine, ACT = actions)
>>> ACT.new_post(title='Sample Worthless Post')
Creating New Post
-----------------

Title: Sample Worthless Post
[2013-10-14T07:42:46Z] NOTICE: new_post: Your post's text is at: posts/sample-worthless-post.rst
>>>

See issue #830

damianavila commented 10 years ago

Actually is easy ;-)

(blog)damian@damian-S400CA:/media/datos/Desarrollos/damian_blog$ nikola console
Scanning posts......done!
Python 2.7.4 (default, Apr 19 2013, 18:28:01) 
Type "copyright", "credits" or "license" for more information.

IPython 1.1.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

Nikola v6.1.1 -- IPython Console (conf = configuration, SITE = site engine)

In [1]: title = "I am testing title"

In [2]: tags = "lala, sure, foo"

In [3]: !nikola new_post -f ipynb -t "{title}" --tags="{tags}"
Creating New Post
-----------------

Title: I am testing title
Scanning posts......done!
Your post's metadata is at:  posts/i-am-testing-title.meta
[2013-10-15T14:27:19Z] NOTICE: new_post: Your post's text is at: posts/i-am-testing-title.ipynb

Although it would be great to have the ACT you proposed...

damianavila commented 10 years ago

And the blog post is here showing a simplified workflow... not addressing yet the manipulation of conf and SITE objects, but it is a beginning ;-)

ralsina commented 10 years ago

I will be doing all the moving tomorrow, since we are in full let's break-stuff mode.

ralsina commented 10 years ago

I should cleanup the whole v6 vs v7 plugins story first/at the same time/soon.

Kwpolska commented 10 years ago

What about planetoid? Should it stay or go?

ralsina commented 10 years ago

I say go, I put it on the list last night.

ralsina commented 10 years ago

I think I'll leave wordpress importer in main just because so many people used it.

Kwpolska commented 10 years ago

reST and markdown plugins haven’t been moved. IMO, there is no real reason to bother with them. @ralsina?

ralsina commented 10 years ago

Yeah, let's move on.