Topic: vii - zero conf, commandline blog tool

I hammered this out over the last couple of days because I accidentally nuked my WP installation.  I went look for a commandline blog utility that wasn't a pain in the ass to set up, and could find none.  I also wanted to play with a vi-wrapper script, so voila!

http://www.0x743.com/vii.html

I would appreciated any feedback - good, bad, and ugly.  I plan on refning this, but what you see is pretty much what you get wrt intended functionality.

BTW, vii is pronounced like wii - I thought that made it sound nifty wink

To use:

1) download script (one file)
2) follow instructions in script

It is truly zero conf - copy the script and start using.  The index will be a file called vii.html, and will be located wherever you are when you type the command...so be sure you are in the directory you intend on keeping your vii-log in smile.

Cheers.

http://www.0x743.com/vee (the program formerly known as vii)

Re: vii - zero conf, commandline blog tool

I do have WP but I'll try it, there and back again  - first WP, then blosxom, then nanoblogger, then WP and now maybe  vii big_smile

F!XMBR

Freedom is the sure possession of those alone who have the courage to defend it. --Pericles

Re: vii - zero conf, commandline blog tool

WP == WordPress ?

Re: vii - zero conf, commandline blog tool

Yes Wordpress.

F!XMBR

Freedom is the sure possession of those alone who have the courage to defend it. --Pericles

Re: vii - zero conf, commandline blog tool

Oliver wrote:

I do have WP but I'll try it, there and back again  - first WP, then blosxom, then nanoblogger, then WP and now maybe  vii big_smile

It is not polished at all, and I am sure that there may be some features lacking - even for a minimally functionally tool - so any feedback is encouraged! smile

http://www.0x743.com/vee (the program formerly known as vii)

Re: vii - zero conf, commandline blog tool

I added a feature to allow you to reformat all entries.  It lets you, outside of modifying the formatting shell block, adjust the columns so that you can pick which width suits you.  If you don't write a lot of stuff per entry, it might be useful to have such a low number - the post looks much less impressive when it is only a couple of lines smile.

I also made a tweak that I think would allow one to create their own formatting shell block, then specify that one as the default.

Next step: rebuilding the indexing using only the set of raw files.  This should be pretty easy.

http://www.0x743.com/vee (the program formerly known as vii)

Re: vii - zero conf, commandline blog tool

Would be nice to see a proper XHTML layout (especially because of the encoding utf ...) too, but it's indeed nice.

F!XMBR

Freedom is the sure possession of those alone who have the courage to defend it. --Pericles

Re: vii - zero conf, commandline blog tool

I like it a lot!

My only complaint is that it does not create valid html pages - fix this and you're onto a winner!

"UBER" means I don't drink the coffee... I chew the beans instead
             -- Copyright BSDnexus

Re: vii - zero conf, commandline blog tool

Cool - and by "valid html," you mean?

I don't want to get bogged down into HTML formatting, but I do like the fixed width formatting offered by the PRE tag and I do want it to be "valid" in the sense that it is not ridiculously naive.  Thoughts?

Thanks for the feedback!

http://www.0x743.com/vee (the program formerly known as vii)

Re: vii - zero conf, commandline blog tool

Ok, I made opening and closing tags for all the major parts of the HTML doc.

Check out http://www.0x743.com/.vii/1173376533.20 … 55:33.html for details, and a glimpse at the new output.  Cool side effect - the title and time stamp are in the <title>... </title>.

Cheers

http://www.0x743.com/vee (the program formerly known as vii)

Re: vii - zero conf, commandline blog tool

It's rather simple to fulfill for example XHTML (my prefered way), if you follow these instructions,

http://validator.w3.org/

There should be for example character-encoding and doctype.

http://www.w3schools.com/tags/tag_doctype.asp


For example (part of my homepage),

<!-- <?xml version="1.0" encoding="UTF-8" ?> -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
F!XMBR

Freedom is the sure possession of those alone who have the courage to defend it. --Pericles

Re: vii - zero conf, commandline blog tool

Did some small change in xhtml, should now be validated.

http://www.from-hades.de/vii/vii.sh

Test: http://www.from-hades.de/vii/.vii/11734 … 58:47.html

Validated page

F!XMBR

Freedom is the sure possession of those alone who have the courage to defend it. --Pericles

Re: vii - zero conf, commandline blog tool

MUCH better perlfan!

"UBER" means I don't drink the coffee... I chew the beans instead
             -- Copyright BSDnexus

Re: vii - zero conf, commandline blog tool

I had a lot of help!  If you set up a test vii-log let me know so that I can create a vii-log list.  This includes any use that might involve vii, cron+cmd output, email piping, etc. 

..and of course, ideas and suggestions are always welcome!

Cheers,

http://www.0x743.com/vee (the program formerly known as vii)

Re: vii - zero conf, commandline blog tool

CSS perhaps?

"UBER" means I don't drink the coffee... I chew the beans instead
             -- Copyright BSDnexus

Re: vii - zero conf, commandline blog tool

That is probably where I'd draw the line - that said, you can easily put it in your own copy of vii since it is just bourne shell. I certainly don't want another file to have to send out, but if you can suggest a way that wouldn't require distributing a second file and only adds a few extra "echos", then I am all for it. 

I think this is where it goes from just right in my mind to a bit much.  Figure out the above for me, and I'll happily add a few more lines of html goodness.

http://www.0x743.com/vee (the program formerly known as vii)

Re: vii - zero conf, commandline blog tool

This is good stuff. Once I figured out that it's not really bourne compatible and just ran it under a bash shell, that is. I've got 18MB of text file technical notes at work I was going to put in HTML format at some point and I'm thinkin this thing plus batch mode might just do the trick.

... and then they said "I bet you can't make MINIX kernel panic!!!" And that's when I got mad

Re: vii - zero conf, commandline blog tool

KernelPanicked wrote:

This is good stuff. Once I figured out that it's not really bourne compatible and just ran it under a bash shell, that is. I've got 18MB of text file technical notes at work I was going to put in HTML format at some point and I'm thinkin this thing plus batch mode might just do the trick.

If this is the case, I need to be sure to state this.  Thanks for pointing this out!

Also, I think it is cool that you might find it useful. If you get something publicly accessible up, let me know smile

http://www.0x743.com/vee (the program formerly known as vii)

Re: vii - zero conf, commandline blog tool

I do actually find this quite useful and since I long ago blew up my WP blog I might as well start another with this. What I'd like to do, as soon as I have a little time, is modify this or write a wrapper that I can set up a mail alias to pipe to. Basically I want to mail in my blog entries, because I'm extremely lazy and don't want to log into my server.

... and then they said "I bet you can't make MINIX kernel panic!!!" And that's when I got mad

Re: vii - zero conf, commandline blog tool

Did some small advert for German people, http://www.from-hades.de/2007/03/11/vii … geek-blog/ big_smile

F!XMBR

Freedom is the sure possession of those alone who have the courage to defend it. --Pericles

Re: vii - zero conf, commandline blog tool

KernelPanicked wrote:

I do actually find this quite useful and since I long ago blew up my WP blog I might as well start another with this. What I'd like to do, as soon as I have a little time, is modify this or write a wrapper that I can set up a mail alias to pipe to. Basically I want to mail in my blog entries, because I'm extremely lazy and don't want to log into my server.

Let me know if some small tweaks to vii would help facilitate this.

I know that it is easy to pipe the message itself into vii, but as of right now it would use everything you printed into it as the message body.  It might be easier if there was a flag that told it to strip out the headers, use the email body for the main message, and use the subject for the title.  That way, it would be trivial to set up a mail filter for updating your blog.

I totally agree that emailing blog entries is idea, and when I wrote this I was thinking, "what is as good or almost as good as being able to email a blog entry".

So keep me posted, and I'll be thinking about where to put all of this.  I am probably going to write a formatting-dispatch shell block that allows one to add any number of formatting styles by putting an entry in a case statement that then calls the function they specify.  This would facilitate a "-f format_label" commandline flag that makes it easy for people to add their own.

Cheers,

http://www.0x743.com/vee (the program formerly known as vii)

Re: vii - zero conf, commandline blog tool

Oliver wrote:

Did some small advert for German people, http://www.from-hades.de/2007/03/11/vii … geek-blog/ big_smile

Awesome, Oliver.  Thanks!

http://www.0x743.com/vee (the program formerly known as vii)

Re: vii - zero conf, commandline blog tool

In this latest release (http://www.0x743.com/vii/.vii/117363965 … 00:53.html), I organized the code better to facilitate different formatting options. 

The current options are: groff, fold, and none.  None simply cat's the contents as is while groff and fold try to format things a bit.  KernelPanicked, if you wrote one for breaking the body and subject/title out of an email that was piped into it, I would happily add it to the list of "out of the box" options.

I also made added the following options recently:

-I 
   forces index to be "index.html"

-i 'myindex.html'
   makes vii use "myindex.html" as index

-d dir
   uses this directory as the "base" from which it looks for the index file and the .vii directory

Cheers

http://www.0x743.com/vee (the program formerly known as vii)

Re: vii - zero conf, commandline blog tool

Wow this is development at warp 8 big_smile

F!XMBR

Freedom is the sure possession of those alone who have the courage to defend it. --Pericles

Re: vii - zero conf, commandline blog tool

It might make it too complex, but I think a blog engine needs something to generate a feed...