From 2e4c16423963bdf137ccebc66109afa14eb6672c Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Fri, 21 Dec 2012 19:22:18 +0530 Subject: started writing the README file; added .html files in docs/ removed: docs/scruf added: README docs/scruf-howto.html docs/scruffy-markup.html modified: etc/TODO --- docs/scruf | 88 -------------- docs/scruf-howto.html | 258 ++++++++++++++++++++++++++++++++++++++++ docs/scruffy-markup.html | 298 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 556 insertions(+), 88 deletions(-) delete mode 100644 docs/scruf create mode 100644 docs/scruf-howto.html create mode 100644 docs/scruffy-markup.html (limited to 'docs') diff --git a/docs/scruf b/docs/scruf deleted file mode 100644 index 63f0b3e..0000000 --- a/docs/scruf +++ /dev/null @@ -1,88 +0,0 @@ -scruf - documentation - -========== -scruf - documentation -========== - - ''scruf'' is a simple program that converts text marked-up in -''scruffy'' mark-up to HTML5 files. It was written specifically for -generating blog posts. The way ''scruf'' works is straight forward -- -it takes in directory and converts all the ''scruffy'' marked-up -plain-text files into corresponding HTML5 files. After the conversion, -''scruf'' puts links to the generated HTML5 files in the `index.html` -file of that directory. So, that's how ''scruf'' works. - -==================== -using scruf -==================== - -Before you plunge into learning about scruf and eventually using -it. Let me run you through the pre-requisites. - - '''Paraphernalia''': ''scruf'' is written in Java, therefore, you'll - need the `openjdk` package, inorder to be able to compile and run - scruf. Go ahead and install `openjdk` before proceeding - forward. Number two, ''scruf'' was written on a GNU/Linux machine, - so, it should work well on all Unix-based operating systems. - -Once, you have a copy of `openjdk` installed on your machine, you're -all set to start licking ''scruf''. Here we go. - -============================== -scruffy mark-up -============================== - -Inorder to convert plain-text files into HTML5 using ''scruf'', you -got to mark it up with the ''scruff'' mark-up, so that ''scruf'' -understands the elements of the plain-text document and duly converts -them into HTML5. As the name suggests ''scruffy'' mark is pretty -shabby when compared to cleaner mark-ups like -[[http://daringfireball.net/projects/markdown/|Markdown]]. ''scruffy'' -is inspired, to an extent, from [[http://moinmo.in/|MoinMoin]] & -[[http://www.mediawiki.org/wiki/MediaWiki|MediaWiki]] syntax. - - -======================================== -basic structure -======================================== - -The ''scruffy'' plain-text document that is going to be converted by -''scruf'', follows a format and here it is: - -### - -title - -========== -foo heading -========== - -$$$ 1 January 1970 $$$ - -The bar blog post goes like this... -... -... -the bar blog post ends - ----------------------------------------------------------------------- -author's signature ----------------------------------------------------------------------- - -### - -The first line in the ''scruffy'' document __must__ always begin with -the text of the title of the document. The ''title'' is the string -that is going to be displayed on the browser tabs and for compliance -sake, it is recommended that it be same as the ''heading'' of the -''scruffy'' document. Followed by the ''title'' is the heading, then -the body of the post/essay/whatever and finally the author's -signature. This is the basic structure of a ''scruffy'' document. - - -======================================== -syntax -======================================== - -============================== -running scruf -============================== diff --git a/docs/scruf-howto.html b/docs/scruf-howto.html new file mode 100644 index 0000000..09eb543 --- /dev/null +++ b/docs/scruf-howto.html @@ -0,0 +1,258 @@ + + + + + + scruf manual + +
+ + + +

scruf manual

+ +

scruf

+ +

+scruf is a dirty, but minimalistic, program that spits out valid HTML5 +files from marked up plain text files. +

+ +

scruffy markup

+ +

+The markup that is understood by scruf is called scruffy. The +scruffy markup is inspired from +MoinMoin's markup. +

+ +

+To learn about the syntax and details about the scruffy markup, +take a look at the documentation page of +scruffy markup. +

+ +

how scruf works

+ +

+The way scruf works is darn straightforward. You give it a directory +and it recursively checks for scruffy marked up files and converts +them into valid HTML5. +

+ +

+In each directory that contains scruffy marked up files, scruf +automatically creates an index.scruffy file and a corresponding +index.html,to which it appends links to all the HTML5 files that it +has converted. +

+ +

+scruf provides its own style sheet which is placed in each directory +that has HTML5 files produced by scruf. +

+ +

using scruf

+ +

+At present, scruf is cursed to only run on GNU/Linux based operating +systems. +

+ +

+scruf is written in Java, therefore, there is a strong possibility +that it could work out of the box in Windows, Mac, etc. But, be aware +that it was never tested in platforms other than GNU/Linux, so there +is no assurance that it will work as it should on other platforms. +

+ +

+To be able to use scruf, the openjdk package is required, in order to +compile and run scruf. +

+ +

installing the jdk

+ +

+On a Debian GNU/Linux based system, the JDK +can be installed with: +

+ +

# apt-get update
# apt-get install default-jdk
+ +

+If the above install command does not work, do: +

+ +

# apt-cache search jdk
+ +

+to find the appropriate package name for the JDK and then install the +package with: +

+ +

# apt-get install appropriate-package-name
+ +

+For installing the JDK on other GNU/Linux systems, take a look at +openjdk's homepage for more information. +

+ +

compiling scruf

+ +

+You must compile scruf's source files, before it can be run to eat +your scruffy marked up files. +

+ +

+Extract the tar archive and cd to scruf's territory: +

+ +

$ tar -xvzf scruf-X.X.X.tar.gz
$ cd scruf-X.X.X/
+ +

+The 'X's represent the version number of the scruf package. +

+ +

+The compilation procedure is arduous at present, it will be made +simpler and nicer in the future to come. +

+ +

+Here's how the source is compiled at present: +

+ +

$ javac scruf/*.java
$ javac scruf/*/*.java
$ javac scruf/*/*/*.java
+ +

+By now, scruf is cooked and read to be exploited by your sweet +hands. +

+ +

convert scruffy files to HTML5

+ +

+To convert scruffy marked up files, cd to the directory where +scruf is: +

+ +

$ cd /path/to/scruf-X.X.X/
+ +

+and do: +

+ +

$ java scruf.Run /path/to/scruffy-files-directory/
+ +

+scruf will convert the scruffy marked up files and place the +generated HTML5 files in the same directory where the scruffy +marked up files reside. +

+ +

+The HTML5 files, generated by scruf, must not be manually edited, +if you wish to edit a HTML5 file, edit the corresponding scruffy marked +up file and generate the HTML5 files again by doing: +

+ +

$ java scruf.Run
+ +

+As is seen above, it is not required to give the path to the scruffy +files directory every time. scruf is intelligent enough to remember +the directory. So from the second time on, it is just enough to run +the program. +

+ +

+When a directory is given to scruf, when it is invoked: +

+ +

$ java scruf.Run /path/to/directory
+ +

+It stores the absolute path of the directory in ~/.scruf/list. +

+ +

+Every time, scruf is run: +

+ +

$ java scruf.Run
+ +

+it checks all the directories is the list for new/modified scruffy +marked up files and converts them into HTML5. +

+ +

ignoring directories

+ +

+As previously mentioned, scruf recursively checks the given directory +to find scruffy marked up files. There will be times when it doesn't +make sense to let scruf loiter in sub-directories. It is possible to +tell scruf to ignore the respective sub-directories. +

+ +

+To do this, create a .ignored file in the respective directory and +list all the sub-directories that has to be ignored. The +sub-directories listed in .ignored should be line seperated. +

+ +

+For instance, if audio/, video/, images/ are the +sub-directories, that are to be ignored by scruf in the respective +directory. The .ignore file, in this case, will look like this: +

+ +

audio/
video/
images/
+ +

Cascading Style Sheets(CSS)

+ +

+scruf places style.css in each directory in which it finds a scruffy +marked up file. Feel free to edit & modify the style sheet. but please +remember not to change/remove the names of classes, it may +mess up the formatting of all the HTML5 files that are dependent on the +style sheet. +

+ +

+The style.css is valid CSS3. +

+ +

have problems?

+ +

+If there are/is any issue(s) with using scruf or understanding how it +works. Please subscribe & send an email to the +scruf-friends +mailing list. That way we can solve your problem together. +

+ + +
a scruffy howto.
+ + +
+ + source +
+ +
+ +
+ Last Updated on: 21 December, 2012
+ +
+powered by scruf +
+ + + diff --git a/docs/scruffy-markup.html b/docs/scruffy-markup.html new file mode 100644 index 0000000..c367a5b --- /dev/null +++ b/docs/scruffy-markup.html @@ -0,0 +1,298 @@ + + + + + + the scruffy markup + +
+ + + +

the scruffy markup

+ +

+ scruffy is the markup that is understood by scruf. +

+ +

+All scruffy marked up documents must have a .scruffy extension +-- that is how scruf comes to know that a particular file is, indeed, +a scruffy document. +

+ +

+The following sections will get you acquainted with the scruffy +markup. +

+ +

meta things

+ +

+First things first. At the beginning of the scruffy document, it +is required to specify some meta things -- the document title & the +author of the document. +

+ +

+This is how it is done. +

+ +

meta-title: Title of Your Document
meta-author: Author
+ +

document date

+ +

+To specify the date of creation of the document, surround the date +with a pair of $$$. +

+ +

$$$ 1 January, 1984 $$$
+ +

+It can be made verbose too. +

+ +

$$$ Posted on 1 January, 1984 $$$
+ + +

headings

+ +

+The mark-up for specifying the heading is the clumsiest of all. Now is +the time to hate scruffy for what it is. +

+ +

+To specify a <h1> heading, surround the heading string with a pair +of 10 equals sign(=). +

+ +

==========
Heading 1
==========
+ +

+For a <h2> heading, the heading string is surrounded by a pair of +20 equals sign. +

+ +

====================
Heading 2
====================
+ +

+So the math is: +

+ +

no of equals signs = ((heading size) * 10)
+ +

+For <h3> (head size is 3), the number of equals signs is equal to +30. Therefore, a to get a <h3> heading, the heading string should +be surrounded by a pair of 30 equals signs. +

+ +

paragraphs

+ +

+Paragraphs are delimited by a blank line. +

+ +

foo is good at drinking.

bar loves to hack code.
+ +

+The above two lines are converted to: +

+ +

<p> foo is good at drinking.</p>

<p> bar loves to hack code.</p>
+ +

word decoration

+ +

+ Bold text is surrounded by three singles quotes('''). +

+ +

'''This text will be in bold'''
+ + +

+ Italic text is surrounded by two single quotes(''). +

+ +

''This text will be italicized''
+ +

+ Underlined text is surrounded by two underscores (__). +

+ +

__This text will be underlined__
+ +

+Text may be monopspaced too, it is done by surrounding the text with +` symbol. +

+ +

`monospaced text`
+ +

+If the beginning of the text, in a paragraph, is decorated, +then, please remember to leave a space before starting the +paragraph. +

+ +

''This paragraph is'' decorated at the beginning with italics,
so, a space is left before starting the paragraph.
+ +

code blocks

+ +

+When it is desired to illustrate code or show verbatim text, the text +or code is put around a pair of ###. +

+ +

###

#include <beer.h>

void main() {
beer lager;
lager.drink();
return;
}

###
+ +

+Text inside code blocks cannot be marked up, as all special +characters are converted into their corresponding HTML number inside a +code block. +

+ +

+All through this document, those grayscaled blocks of text are, +indeed, code blocks. +

+ +

block quote

+ +

+A block of text is blockquoted when it is surrounded by %%% +string. +

+ +

%%%

The is phrase is fain to be blockquoted by scruf.

%%%
+ +

links

+ +

+The markup for links is very similar to +MoinMoin's markup +for links: +

+ +

[[http://en.wikipedia.org/wiki/Special:Random|Wikipedia Random Article]]
+ +

+As seen above, the link block is surround by [[ & ]]. The +first part inside the link block is the link and the second part +(which is optional) is a description of the link. The two parts of the +link block is separated by a | (pipe) symbol. +

+ +

+The pipe symbol (|) is eliminated from the link block, if the +link description is not specified. +

+ +

+The HTML form of the above link block will look like: +

+ +

<a href="http://en.wikipedia.org/wiki/Special:Random"> Wikipedia Random Article </a>
+ +

images

+ +

+The markup for the image block looks like this: +

+ +

{{/path/to/the/image.jpg|description of the image}}
+ +

+As seen above, the image block is enclosed with {{ & }}. The +first part of the image block is the path to the location where +the image stored. The second part (which is optional) is a textual +description of the image. The textual description is what that is +shown when the image cannot be displayed in the browser(text-only +browsers, for instance). +

+ +

+The two parts of the image block is separated by the | (pipe) +symbol. The pipe symbol is eliminated, if the textual description of +the image is not specified. +

+ +

audio

+ +

+scruf uses HTML5 <audio> tag to embed audio. +

+ +

+The markup for embedding audio: +

+ +

{{audio:/path/to/the/audio.ogg}}
+ +

+As seen above, the audio block is enclosed with {{ & +}}. Inside the braces, the audio block starts with audio: +followed by the path to the audio file. +

+ +

+At present, there is support for only Ogg Vorbis audio. +

+ +

footer

+ +

+The author's name and copyright information may be placed inside the +footer block. This block, as the name implies, is put at the end +of the document. +

+ +

----------------------------------------------------------------------
written by Audacius Scrooge. It is licensed under CC-BY-SA
----------------------------------------------------------------------
+ +

+The footer block is enclosed by a pair of seventy hyphens +(-). +

+ +

+In Emacs, the whopping seventy hyphens can be generated with a C-u 70 +-. +

+ +

have problems?

+ +

+If there are/is any issue(s) with understanding the scruffy +markup. Please subscribe & send an email to the +scruf-friends +mailing list. That way we can solve your problem together. +

+ +

+go back to the scruf-howto. +

+ + +
a scruffy markup.
+ + +
+ + source +
+ +
+ +
+ Last Updated on: 21 December, 2012
+ +
+powered by scruf +
+ + + -- cgit v1.2.3 From c86473d2299a264d50854b1df0a9f670c233b54d Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sun, 23 Dec 2012 18:23:35 +0530 Subject: added docs/style.css --- docs/style.css | 180 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 docs/style.css (limited to 'docs') diff --git a/docs/style.css b/docs/style.css new file mode 100644 index 0000000..d6a533a --- /dev/null +++ b/docs/style.css @@ -0,0 +1,180 @@ +/* + Author: rsiddharth + Contact: + License: Public Domain + +*/ + +article { + font-size:1.50em; + font-family:"Palatino Linotype","Book Antiqua",Palatino,"URW Palladio L",FreeSerif,serif; + color:#787878; + margin-left:auto; + margin-right:auto; + border:1px; + padding:5px; + width:97%; + box-shadow: 1px 1.5px 3px 0.5px #bababa; +} + +h1, h2, h3, h4, h5 { + margin-left:auto; + margin-right:auto; + border:1px; + padding:5px; + width:75%; + text-align:center; +} +h1 { + font-size:1.80em; +} + +p, i, b{ + margin-left:auto; + margin-right:auto; + border:1px; + padding:5px; + width:70%; + text-align:justify; + line-height:170%; + -moz-word-wrap:break-word; +} +.center { + text-align:center; +} + +blockquote { + font-size:0.77em; + font-style:oblique; + color:#888888; + text-align:justify; + background-color:#fcfcfc; + margin-left:auto; + margin-right:auto; + border:1px; + padding:5px; + width:60%; +} + +span.monospace { + border: 1px; + padding: 1px; + font-size:0.625em; + font-family:monospace; +} + +div.code { + font-family:monospace; + font-size:0.625em; + background-color:#fcfcfc; + margin-left:auto; + margin-right:auto; + border:1px; + padding:5px; + width:70%; +} + +div.time { + font-size:0.50em; + font-family:"Palatino Linotype","Book Antiqua",Palatino,"URW Palladio L",FreeSerif,serif; + color:#aaaaaa; + margin-left:auto; + margin-right:auto; + border:1px; + padding:5px; + width:20%; + text-align:center; +} + +img { + margin-left:auto; + margin-right:auto; + display:block; + border: 1px; + padding: 10px; +} + +audio { + margin-left:auto; + margin-right:auto; + display:block; + border: 1px; + padding: 10px; +} + +a:link,a:visited { + transition:border-bottom 0.3s, color 0.3s; + -moz-transition:border-bottom 0.3s, color 0.3s; + -webkit-transition:border-bottom 0.3s, color 0.3s; + -o-transition:border-bottom 0.3s, color 0.3s; + color:#686868; + border-bottom:1px dotted #d9d9d9; + text-decoration:none; +} +a:hover,a:active { + color:#000000; + border-bottom: 1px; + text-decoration:none; +} + +div.back { + font-size:0.7em; + font-family:junicode,"Palatino Linotype","Book Antiqua",Palatino,"URW Palladio L",FreeSerif,serif; + text-align:center; + color:#989898; + margin-left:auto; + margin-right:auto; + border:1px; + padding:5px; + width:7%; +} + +footer { + font-size:0.8em; + font-family:"Palatino Linotype","Book Antiqua",Palatino,"URW Palladio L",FreeSerif,serif; + text-align:center; + color:#989898; + margin-left:auto; + margin-right:auto; + border:1px; + padding:5px; + width:45%; +} + +div.lastupdate { + font-size:0.6em; + font-family:"Palatino Linotype","Book Antiqua",Palatino,"URW Palladio L",FreeSerif,serif; + text-align:center; + color:#989898; + margin-left:auto; + margin-right:auto; + border:1px; + padding:5px; + width:40%; +} + +div.source { + font-size:0.4em; + font-family:monospace; + text-align:center; + color:#989898; + margin-left:auto; + margin-right:auto; + border:1px; + padding:5px; + width:40%; +} + +div.scruf { + font-size:0.9em; + font-family:"Palatino Linotype","Book Antiqua",Palatino,"URW Palladio L",FreeSerif,serif; + text-align:center; + color:#bcbcbc; + margin-left:auto; + margin-right:auto; + border:1px; + padding:5px; + width:40%; + +} + -- cgit v1.2.3