10 min

Veery Blog App - April 2015

June To-Dos

For the Perl API and client code bases.

  • within API code, write to caching server.
  • modify how title is processed and change both client and API code.
  • add rss
    • shortform (first X-number of chars for intro text) done
    • longform (entire post) not now
  • default view is to list postings by updated date. should I add a view by created date? no
  • add view that only shows articles? no
  • add view that only shows notes? no


Proposed idea. Yet another blog or web-based publishing tool. Best way for me to learn new concepts.

Existing apps:

  • Junco - wiki and blog
  • Kinglet - private web-based messaging that's part email and microblog
  • Grebe - blog
    • Grebe-Client-NodeJS
  • Scaup - blog

I think that I will call this new app Veery. It will be based upon Scaup.

I'll create separate git repositories for:

  • Veery-API-Perl
  • Veery-Client-Perl
  • Veery-Client-NodeJS
  • Veery-API-Go

The first three can created by borrowing from Scaup, Grebe, and Grebe-Client-NodeJS. The last one will give me a chance to learn some Golang.

I can mix and match. I could use the Perl client against either the Perl API or the Go API, etc. I suppose that I can create multiple sub domains to use the different options, and have all of the API code point to the same database.

It would be fun to use the NodeJS client against the Go API. Of course, the JavaScript browser editor bypasses the server-side client code and talks directly to the API.

The rest of the stack will remain the same:

  • Nginx
  • CouchDB
  • Elasticsearch

The exception might be that I use Redis instead of Memcached. The reason: to use something different.

I used Redis for Grebe, but I was using the Perl code to read from Redis, instead of letting Nginx do it. That's because the Redis module was not installed by default for Nginx. The Nginx install included the Memecached module.

I'll need to upgrade my Digital Ocean account to the $10 per month plan, so that I can increase RAM from 512 meg to 1 gig, which will permit me to run all the different services that I want to test.

I'll need to download the appropriate Nginx Redis module, download the latest Nginx code, and rebuild Nginx with the Redis module.

Also, download the latest version of Redis.

Initially, I won't be doing anything fancy with Redis. I'll use simple key-value caching.

Steps

  1. upgrade DO account
  2. rebuild Nginx with the Redis module
  3. use Scaup to create the Veery API in Perl, using test scripts
  4. create the Perl client code
  5. create the NodeJS client code by using some code from Grebe-Client-NodeJS
  6. learn Go

Golang modules:

  • Redis
  • Markdown, MultiMarkdown, Textile (at least one)

I could simplify this and only support Markdown all API code.

Markup

The Perl version of MultiMarkdown does not support all of the so-called MultiMarkdown standard, therefore I will not use this module.

I cannot accept the default behavior of Markdown which does not convert newlines to the HTML br tag.

On occasion, it would be nice to use Textile's footnote and table formatting options.

Initially, I'll start with Markdown only, but I'll use my own flavored version of Markdown, which will be similar to what exists with Grebe.

My Formatting Options

My own flavored Markdown, which will have the option to turn on and off the newline_to_br.

It will also have the option to turn on and off the url_to_link where bare URLs are automatically converted to a clickable link.

In Scaup, I have a command which prevents the hashtags from being converted to link. Within code blocks, the pound sign is used within CSS, and I need to have the ability to set hashtag_to_link=no or I need to add the smarts to processing code blocks to avoid creating links.

Markdown has fence code block capabilities, but it's annoying to indent four spaces on each line. I greatly dislike hidden formatting commands. It's too word processor-like. I don't like how Markdown adds a br tag by requiring a user to type two blank spaces at the end of a line. Poor design and user experience.

I will include my own formatting commands:

  • br.
  • hr.

Keep q./q..
I'm unsure if I will include my old q./q.. block formatting command. But the solution within Markdown, however, is more annoying because it will require the greater-than sign on each paragraph versus surrounding the area with my own q./q.. command. The other option is to type our the HTML blockquote tag.

If I wanted to use HTML only then I would avoid these text markup languages. But I don't want to type a bunch of greater-than and less-than symbols, especially when creating a post on the phone.

That's why I'll add the ++ and -- commands so that I don't have to type out the HTML big and small tags. Same for strikethrough and underline.

Without Textile, I won't be able create simple tabular data. Maybe I'll continue to flavor my Markdown to include footnotes and tables. I can borrow code from Textile and MultiMarkdown.

I could also leave Markdown alone and add my additional formatting options in a separate module. I'll need to modify the Markdown module some.

Grebe and Scaup makes all headers as links. Junco doesn't do this. I rarely use a header link within another post, but it is nice to be able to link to a section of an article rather than to the top of an article, which would require the user to scroll down and find the pertinent article section.

Parula (toledotalk.com), Junco, and Grebe support the toc command, which produces a table of contents, Wikipedia-style, for an article page. Scaup does not contain this command. I'll probably leave it out of Veery.

I should scour my Parula, Junco, Grebe, Scaup, and Kinglet apps for ALL the formatting and power command options that I've created. I forgot that I added the hashtag_to_link=no option to Scaup, which is my most recently-created app.

Parula and Junco contain some wiki features, like double-bracket case to link to existing articles, ability to link to non-existent or new articles, template includes, redirects, etc.

Parula, Junco, and Grebe contain versions and differences, but Scaup does not. I may add versions and diffs to Scaup and/or Veery later. I don't want to get bogged down in too many features right now. I want to focus on CouchDB, Elasticsearch, NodeJS, and Go. I can add features from my other apps later.

Scaup did not include all the embed commands for various video types. Since Scaup and Veery will be single-user apps, then I won't limit the HTML allowed.

Grebe is nice because it's multi-user.

Scaup does not contain RSS. This needs to be supported in Veery.

Grebe and Scaup do not contain an archives function that will show posts by month. It's on the to-do list for Grebe. I'll leave this out for Veery. Let's keep this dead simple.

Definitely simplify the templates and CSS for Veery. Start with 1995 HTML. Should I include the HTML5 semantic tags, such as header, nav, article, section, footer? Probably.

Custom Formatting Commands

Commands must begin at beginning of line.

Junco

  • q. and q..
  • tmpl. and tmpl..
  • hr.
  • br.
  • pt=alphanumeric_plus_underscore and pt..
  • more.
  • code. and code..
  • fence. and fence..


Junco has the feed command that's used to display or embed an RSS or Atom feed within an article page.

{ {feed=http://toledotalk.com/jr.rss desc}}

No space between the first two curly braces. The 'desc' command is optional. Without it, only the titles are displayed. With it, then the text contained with the description tag is displayed.


Junco can embed text from another post by surrounding the title of the post to embed with two curly braces at each end.

{ {some article text to embed here}}

Again, no space between the two left curly braces.

The template include with the curly braces will embed the entire contents of the other article, or it will only embed the content that's surrounded by the tmpl./tmpl.. commands.


Junco is part wiki and can link to other articles by simply surrounding the title for the article with two brackets at each end.

[ [article to link to]]

No space between the left brackets.

The displayed link text can be controlled by dong:

[ [actual article title | link text to display]]


A "backlinks" link is displayed for an article when appropriate.

Related articles are displayed for an article based upon the tags used.

For the Parula app, tags are included by using the tag=tagname command at the start of a line. Multiple tags can be included by using the command on a separate line.

Junco, Grebe, Scaup, and Veery use the hashtag functionality.


Grebe

  • q. and q..
  • hr.
  • br.
  • more. and more..
  • code. and code..
  • fence. and fence..


Scaup

  • q. and q..
  • br.
  • hr.
  • more.

Power Commands

Commands must begin at beginning of line.

Junco

  • edit=no|owner|global (not implemented yet)
  • toc=yes|no (table of contents for the article)
  • draft=yes|no
  • replies=yes|no
  • private=yes|no
  • showintro=yes|no
  • code=yes|no
  • markdown=yes|no
  • multimarkdown=yes|no
  • webmention=yes|no


Grebe

  • toc=yes|no
  • draft=yes|no
  • code=yes|no
  • webmention=yes|no
  • newline_to_br=yes|no
  • url_to_link=yes|no
  • textile=yes|no
  • block_id=
  • more_text=yes|no


Scaup

  • url_to_link=yes|no
  • hashtag_to_link=yes|no
  • markdown=yes|no

special additional command:

intro=this would be text to show on the stream pages instead of the first X number of chars or the text up to the more. command.

Embedding Media Commands

Junco

  • gmap=
  • kickstarter=
  • facebook=
  • youtube=
  • vimeo=
  • gist=
  • calc=
  • insta=

Veery To-Do

Include these formatting and function commands:

  • q. and q.. (will probably produce blockquote html rather than my custom div)
    • kept the q. q.. with custom div like in other apps.
  • hr. (my hr. will produce a customized hr tag with a css class.)
    • yep, used a custom CSS attribute for this version of the horizontal rule. if the traditional look is desired, then the HTML tag can be used.
  • br.
  • ?? more. ?? (if only basic stream views, then not needed)
    • i kept the more. command.
  • fence. and fence..
  • ?? toc=yes|no ??
  • newline_to_br=yes|no
  • url_to_link=yes|no
  • hashtag_to_link=yes|no
  • intro=text to display on the stream view, but this text does not get displayed on the article view. or this is too fancy and not needed? keep the more. instead??
  • add the insta=url to photo page
    • done
  • added the pq./pq.. commands for display large quotes, centered on a page.

My Markdown-Flavored Additions

Add Textile and/or MultiMarkdown formatting options:

Now

  • small
  • strikethrough
  • big
  • underline

Later

  • footnotes
  • tables

I have never used or very rarely used the definition list formatting tag in HTML and the corresponding Textile option. For some reason, it has been format that I have never found useful. MultiMarkdown supports this too. I like the Textile implementation better than the MultiMarkdown usage.

def list one
this would be the definition.
def list two
this would be the 2nd definition.

June 2015

Add the following to the API code:

New formatting command: pq. (pull quote) added on Jun 3, 2015 but instead of using a custom div, i used html tags: center big em

The text line or para will be formatted via a div or a class assigned
to blockquote:
- text-align: center
- large font size
- italics
- text color may be greyed some


in article doc, add html_tag_list. create this list on the API side instead of on the client side.


separate the title from the body text for the formatted/html version of the article.

#veery #go #nodejs #perl #couchdb #programming #blogging

From JR's : articles
1886 words - 11442 chars - 10 min read
created on
updated on - #
source - versions - backlinks

Related articles
Scaup web publishing app update as of Feb 21, 2015 - Mar 02, 2015
Creating Perl Modules and OO Programming - Oct 17, 2013
Perl and Curl - Mar 23, 2015
Node.js and JSON - Dec 29, 2014
Yo-Perl Readme - Aug 19, 2014
more >>



A     A     A     A     A

© 2013-2017 JotHut - Online notebook

current date: Apr 18, 2024 - 11:31 p.m. EDT