Re: vii - zero conf, commandline blog tool

I don't think so, but there are lot of solutions for RSS feeds like Magpie, http://magpierss.sourceforge.net/

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 don't think so, but there are lot of solutions for RSS feeds like Magpie, http://magpierss.sourceforge.net/

1. Do you want to visit a site every day instead of just checking your feedreader?

2. I know Magpie, but it's an RSS *parser* for PHP. How could it be of any help for generating feeds in a shell blog engine?


The curved braces in the function definitions seem to be the only thing which makes vii incompatible with sh. What about removing them? (Seems to work without it)

And what about using $EDITOR if set? (it's set to vim, of course big_smile)

Last edited by Maxx (2007-03-12 12:54:21)

Re: vii - zero conf, commandline blog tool

1.) it depends, I'm visiting this forum day by day for example. And I kill people if they don't visit my blog - sometimes I do think about disabling the feed big_smile

2.) build a connection; vii + RSS would be in my opinion overkill (*KISS*).. try nanoblogger instead wink

>And what about using $EDITOR if set? (it's set to vim, of course

Yes, thats a point - but what about 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

Oliver wrote:

1.) it depends, I'm visiting this forum day by day for example. And I kill people if they don't visit my blog - sometimes I do think about disabling the feed big_smile

A feedreader allows me to get a quick overview of what happened in my favourite blogs (yeah, that kinda includes yours.)

Oliver wrote:

2.) build a connection; vii + RSS would be in my opinion overkill (*KISS*).. try nanoblogger instead wink

nanoblogger is already too big for me to take out the Bash-isms.

I just had a quick look at the vii code: Looks like it's possible to generate a RSS feed by writing an additional format_func.

Re: vii - zero conf, commandline blog tool

I never heard of nanoblogger, but I agree - seems nice but bloated.  I don't intend on having categories as such - if I wanted to key the reader in on a topic I would put [TOPIC] in the title or I would create a different index with "-i".  I just don't want to have to manage categories, relate them explicitly to messages, etc.

Also, I suppose it would be easy enough to dump some RSS for an index using the same <!--;<integer>;--> per line to ensure proper ordering.  I am willing to consider anything for inclusion as long as it fits in with my goals.  I just don't want to get into managing entries, etc.  I feel like I am already going down a road of managing entries that might start increasing the complexity greatly for less and less return on functionality.

As far as not-bourne compatible, what about it makes it not?  I don't know offhand, that is why I ask.  I would prefer to have it work under "/bin/sh" for 99.99% of *nix systems - or at least the ones I work on.  Any pointers about doing that would be appreciated.  If it is too much duct tape to do so, I'll concede to using bash.

Regarding the braces - I like them and it helps me see the code better.  You could remove them in your version if you wish smile.  Lastly, the idea of checking for $EDITOR in the home env is not _bad_, but I also don't want to have to account for all the various ways different editors open new files, etc.  In a nutshell, I don't want to go down that road.

I appreciate everyone playing around with it and welcome more suggestions ... and better yet, code!  If there is a format you think might be useful, please write it up, test the code within vii, and send me a link of what the output looks like.  Here is a hint though - it must look okay and be easily navigated inside of something like lynx.

Cheers!

Last edited by perlfan (2007-03-12 15:31:54)

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

Re: vii - zero conf, commandline blog tool

perlfan wrote:

As far as not-bourne compatible, what about it makes it not?  I don't know offhand, that is why I ask.  I would prefer to have it work under "/bin/sh" for 99.99% of *nix systems - or at least the ones I work on.  Any pointers about doing that would be appreciated.  If it is too much duct tape to do so, I'll concede to using bash.

Regarding the braces - I like them and it helps me see the code better.  You could remove them in your version if you wish smile.  Lastly, the idea of checking for $EDITOR in the home env is not _bad_, but I also don't want to have to account for all the various ways different editors open new files, etc.  In a nutshell, I don't want to go down that road.

Okay so after I got a few seconds to run through this thing, it would seem to the only shell issue is the braces. Now, to be fair, this could be some wierdness on my system since I'm using OpenBSD and sh is actually ksh in sh mode.

The man page says functions should be written like this (and this is how I've always done it myself.

function { some command; some other command; }

/bin/sh, or at least my version is choking on the () and lack of ;  but I've fixed this in the version I'm playing around with.

perlfan wrote:

I appreciate everyone playing around with it and welcome more suggestions ... and better yet, code!  If there is a format you think might be useful, please write it up, test the code within vii, and send me a link of what the output looks like.  Here is a hint though - it must look okay and be easily navigated inside of something like lynx.

I'm glad someone still cares about the text browser users of the world. I died a little inside when Wintellect suggested CSS. tongue

... 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

perlfan wrote:

Lastly, the idea of checking for $EDITOR in the home env is not _bad_, but I also don't want to have to account for all the various ways different editors open new files, etc.  In a nutshell, I don't want to go down that road.!

The only thing I ask of you is to replace vi with $EDITOR ;-)

KernelPanicked wrote:

Okay so after I got a few seconds to run through this thing, it would seem to the only shell issue is the braces. Now, to be fair, this could be some wierdness on my system since I'm using OpenBSD and sh is actually ksh in sh mode.

The man page says functions should be written like this (and this is how I've always done it myself.

function { some command; some other command; }

/bin/sh, or at least my version is choking on the () and lack of ;  but I've fixed this in the version I'm playing around with.

That's what I meant.

Re: vii - zero conf, commandline blog tool

KernelPanicked wrote:
perlfan wrote:

As far as not-bourne compatible, what about it makes it not?  I don't know offhand, that is why I ask.  I would prefer to have it work under "/bin/sh" for 99.99% of *nix systems - or at least the ones I work on.  Any pointers about doing that would be appreciated.  If it is too much duct tape to do so, I'll concede to using bash.

Regarding the braces - I like them and it helps me see the code better.  You could remove them in your version if you wish smile.  Lastly, the idea of checking for $EDITOR in the home env is not _bad_, but I also don't want to have to account for all the various ways different editors open new files, etc.  In a nutshell, I don't want to go down that road.

Okay so after I got a few seconds to run through this thing, it would seem to the only shell issue is the braces. Now, to be fair, this could be some wierdness on my system since I'm using OpenBSD and sh is actually ksh in sh mode.

The man page says functions should be written like this (and this is how I've always done it myself.

function { some command; some other command; }

/bin/sh, or at least my version is choking on the () and lack of ;  but I've fixed this in the version I'm playing around with.

perlfan wrote:

I appreciate everyone playing around with it and welcome more suggestions ... and better yet, code!  If there is a format you think might be useful, please write it up, test the code within vii, and send me a link of what the output looks like.  Here is a hint though - it must look okay and be easily navigated inside of something like lynx.

I'm glad someone still cares about the text browser users of the world. I died a little inside when Wintellect suggested CSS. tongue

smile...that is funny.

Anyway, so all I need to do is to get rid of the "()"'s and add semi-colons at the end of eachline?  Do I need to add line continuation characters at all?

Maxx, would you settle for "$VI" instead of "$EDITOR"?  I know you want to use the environment EDITOR, but I don't want to encourage the use of other editors that I don't purport to support.  If you test it with your editor (assuming not vii) and tell me that it works fine with it, I'll mention that "users report that vii also works with the following editors"...how does that sound?

Cheers.

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

Re: vii - zero conf, commandline blog tool

perlfan wrote:

Maxx, would you settle for "$VI" instead of "$EDITOR"?  I know you want to use the environment EDITOR, but I don't want to encourage the use of other editors that I don't purport to support.  If you test it with your editor (assuming not vii) and tell me that it works fine with it, I'll mention that "users report that vii also works with the following editors"...how does that sound?

That's ok.

But all you do is open a file with the editor - and I think every editor allows to open files via command line arguments...

Re: vii - zero conf, commandline blog tool

Editors like ee, joe, vim, emacs, nano, pico should be just fine. They are working with plain text and output plain text again.

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

"EDITOR" support is here!  I also got rid of the "()"'s in the function names.

http://www.0x743.com/vii/.vii/117373056 … 16:07.html

Cheers.

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

Re: vii - zero conf, commandline blog tool

$EDITOR seems to work with vim, thanks.

As vii should now be Bourne-compatible (runs with OpenBSD's sh) you could apply this one:

--- vii.orig    Mon Mar 12 22:58:43 2007
+++ vii Mon Mar 12 22:58:47 2007
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 VERSION=0.9.7-beta

(I like diffs big_smile)

I'll probably create a format_func for RSS tomorrow,

Re: vii - zero conf, commandline blog tool

Btw. bash in FreeBSD is /usr/local/bin/bash and correct UTF-8 encoding yikes)

--- vii.txt     Tue Mar 13 00:44:22 2007
+++ vii.sh      Tue Mar 13 00:38:31 2007
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash

 VERSION=0.9.7-beta

@@ -176,7 +176,7 @@
   fi
   echo ${HEADERTXT} > ${FINAL}
   echo "<!-- <?xml version=\"1.0\" encoding=\"UTF-8\" ?> --><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><
-  echo "<head><title>${TITLE} - ${DATE}</title></head>"  >> ${FINAL}
+  echo "<head><title>${TITLE} - ${DATE}</title><meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" /></head>"  >> ${FINAL}
   echo "<body>"  >> ${FINAL}
   echo "<pre>"   >> ${FINAL}
   echo "<a href=\"../${INDEX}\">[index]</a><a href=\"./${RAWNAME}\">[raw]</a><a href=\"../\">[main]</a>" >> ${FINAL}
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:

Btw. bash in FreeBSD is /usr/local/bin/bash and correct UTF-8 encoding yikes)

Which is one more reason to make is sh-compatible.  /bin/sh is (usually) installed / available on every Unix system, while bash could be in any number of places (/bin, /usr/local/bin, /opt/bin, etc).

One less thing to worry about.  smile

Re: vii - zero conf, commandline blog tool

Maxx wrote:

$EDITOR seems to work with vim, thanks.

As vii should now be Bourne-compatible (runs with OpenBSD's sh) you could apply this one:

--- vii.orig    Mon Mar 12 22:58:43 2007
+++ vii Mon Mar 12 22:58:47 2007
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 VERSION=0.9.7-beta

(I like diffs big_smile)

I'll probably create a format_func for RSS tomorrow,

Thanks, I'll apply the patch sometime today wink.

Also, send me a copy of your RSS format thingy when you are done.  I still don't know where it would fit in, but I'd be will to figure out something to facilitate you. 

I've been thinking about following:

- allowing the specifying of a post-entry script; i.e., if someone wants to do something funky after the post has been written he can write his own script for it.  This could be formatting, indexing, or even a remote transfer.
- letting vii look for a .viirc file where someone could set stuff that he wishes to override in the defaults;

At this point it meets my needs, but I want to make it attractive and easy to use.  I think the above 2 things would do that, but I have to sit on it.  At the end of the day I absolutely want to have something that someone can run out of the box with NO set up required.  That said, I think many people would like a way to tweak and customize things once they get something going and get familiar with the system.

Cheers.

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

Re: vii - zero conf, commandline blog tool

Why not use a default css? Nothing special, but everyone who don't like the default outfit can change it with this and you don't need to customize in the code itself.

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

What does this css look like?  I don't want additional files to download.

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

Re: vii - zero conf, commandline blog tool

phoenix wrote:
Oliver wrote:

Btw. bash in FreeBSD is /usr/local/bin/bash and correct UTF-8 encoding yikes)

Which is one more reason to make is sh-compatible.  /bin/sh is (usually) installed / available on every Unix system, while bash could be in any number of places (/bin, /usr/local/bin, /opt/bin, etc).

This could be accomplished easily with "/usr/bin/env bash", but making it Bourne-compatible is even better.

Re: vii - zero conf, commandline blog tool

Maxx wrote:
phoenix wrote:
Oliver wrote:

Btw. bash in FreeBSD is /usr/local/bin/bash and correct UTF-8 encoding yikes)

Which is one more reason to make is sh-compatible.  /bin/sh is (usually) installed / available on every Unix system, while bash could be in any number of places (/bin, /usr/local/bin, /opt/bin, etc).

This could be accomplished easily with "/usr/bin/env bash", but making it Bourne-compatible is even better.

Yeah it would be cool if it just worked out of the box on any minimal/fresh install of *BSD, so I am going to go back to /bin/sh and fix the incompatibilities as they are made known.

Cheers.

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

Re: vii - zero conf, commandline blog tool

perlfan wrote:

- letting vii look for a .viirc file where someone could set stuff that he wishes to override in the defaults

One can easily store default arguments in a shell alias.

Re: vii - zero conf, commandline blog tool

I have added a feature that allows vii to look for top and bottom html (or whatever) when entries are created.

Right now, you can't use them with the "-d" option - you have to be in the main vii-log directory you are writing to, but it looks for:

./vii-top.tpl
./vii-bottom.tpl

I plan on making it so that it respects "-d" and lets you define top and bottom templates via script variables AND commandline args - I just need to take an hour sometime to put it in and test.  Maybe this will mark my "1.0" release.

The latest download has this template stuff and you can see it in action at my site http://www.0x743.com .

Cheers

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

Re: vii - zero conf, commandline blog tool

Now that version ROCKS!!!!

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

Re: vii - zero conf, commandline blog tool

Thanks man - let me know if you use it.  I can start a "vii-log" roll smile.  I'd appreciate any feedback that you guys have from using it.

BTW, I did apply the changes I mentioned above:

http://www.0x743.com/.vii/1175568935.20 … 55:35.html

I also determined that the template thing already respected the right directory since it looked for the top and bottom templates only *after* it had cd'd into the right directory.

The big caveat NOW is that the templates are only used in the default formatting.  I need to make it so that it is used for all formatting, so that means I need to extract things out to a more abstract level.  Once I do this, I will deem it "1.0".

Cheers.

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

Re: vii - zero conf, commandline blog tool

Hey this script develops very fast, good work 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

I  fixed things so that the top and bottom templates work for all
types of formatting available in the default code.  In fact, as a
result,  it  is a lot easier to add new formatting.  I might be a
lot more willing to add things now.

I am pretty much freezing things in order to test for the 1.0 re-
lease,  but if anyone would like to submit some formatting functions I'd be willing to try them out for possible inclusion.

Also, if anyone is really using this thing, let me know.

Cheers,

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