coleslaw-org / coleslaw

Flexible Lisp Blogware
BSD 2-Clause "Simplified" License
560 stars 82 forks source link

roswell script #146

Closed guicho271828 closed 5 years ago

guicho271828 commented 6 years ago

Command line syntax:

Syntax:

coleslaw setup                       --- set up a new .coleslawrc file in the current directory.
coleslaw new [TYPE] [NAME]           --- creates a new content file with the correct format. TYPE defaults to 'post', NAME defaults to the current date.
coleslaw generate                    --- generates the static html according to .coleslawrc .
coleslaw copy-theme THEME [TARGET] --- copy the installed THEME in coleslaw to the current directory with a different name TARGET.
coleslaw                             --- shorthand of 'coleslaw generate'.
coleslaw -h                          --- show this help

Examples:

* set up a blog

    mkdir yourblog ; cd yourblog
    git init
    coleslaw setup
    git commit -a -m 'initial repo'

* Create a post

    coleslaw new

* Create a page (static page)

    coleslaw new page

* Generate a site

    coleslaw generate # or just: coleslaw

* Copy the base theme to the current directory for modification

    coleslaw copy-theme hyde mytheme

without renaming:
    coleslaw copy-theme hyde
PuercoPop commented 6 years ago

<3 The Roswell support, the PR is a little on the fat side. I'll review it over the week.

guicho271828 commented 6 years ago

I should clean up the commit a little bit.

guicho271828 commented 6 years ago

I first separate the bugfix PR.

guicho271828 commented 6 years ago

but hey, I have time recently, I can help cleaning up the other PRs too

guicho271828 commented 6 years ago

want to make this repo in a more healthy state

guicho271828 commented 6 years ago

Cleaned up the commits, hope I did nothing wrong during rebase.

svetlyak40wt commented 6 years ago

I've reviewed this pull and found that links https://github.com/redline6561/coleslaw should be changed to https://github.com/kingcons/coleslaw.

Other staff is great!

svetlyak40wt commented 6 years ago

By the way, @guicho271828 what do you think about a https://github.com/40ants/defmain? This could be a good replacement for trivia in terms of command-line arguments parsing.

guicho271828 commented 6 years ago

It is up to you, I believe you can choose to switch later.

guicho271828 commented 6 years ago

I wish other, smaller PRs get merged first

svetlyak40wt commented 6 years ago

Actually, I'm not a repository's owner. Just decided to review interesting pull, because I've wrote a roswell script too, but it is much simpler than yours. I think it would be useful to have a command line utility out of the box.

guicho271828 commented 5 years ago

I made the minimal changes since the the original 2-years old commits:

guicho271828 commented 5 years ago

Also, minor changes:

guicho271828 commented 5 years ago

Both cli and repl commands have the unit test.

guicho271828 commented 5 years ago

I guess it is fine now.