summaryrefslogtreecommitdiffstats
path: root/parsers
Commit message (Collapse)AuthorAgeFilesLines
* add some code for debugging + TODO update.rsiddharth2014-07-172-1/+3
|
* now, scruf does'nt wrap <p> around text inside HTML blocks in scruffy markup ↵rsiddharth2013-11-152-25/+48
| | | | | | file. With this, I guess, HTML can be written in scruffy marked up files.
* parser/QuoteSpecialText doesn't escape `<` if it is part of a HTML tag.rsiddharth2013-11-122-6/+80
| | | | I'm trying accomadate HTML markup into the scruffy markup. ;)
* removed extraneous whitespace in a bunch of parsers.rsiddharth2013-11-123-5/+5
|
* parsers/WordDecoration.java: replace <i> -> <em> & <b> -> <strong>rsiddharth2013-11-101-2/+2
| | | | Better semantic.
* parsers/Header.java: set the viewport width to device-width.rsiddharth2013-11-101-3/+4
| | | | This is for Mobile support.
* parsers/CodeBlocks.java. wrapped <code> inside <pre>.rsiddharth2013-11-101-2/+2
| | | | I guess this is better semantic.
* removed extraneous whitspace.rsiddharth2013-11-061-4/+4
|
* wrote a new parser: parsers/UList.javarsiddharth2013-11-052-1/+71
| | | | now scruf can parse <ul> lists.
* updated the year in the Copyright block in all source files.rsiddharth2013-11-0221-45/+27
| | | | used license/Liberate.java to do the job. automation rocks.
* parsers/Images.java: minor change to the alt text block.rsiddharth2013-11-021-2/+2
|
* modified: parsers/CodeBlocks.java ( code blocks are wrapped around <pre> ↵rsiddharth2013-06-261-2/+2
| | | | element)
* modified: parsers/Images.java (`alt' attribute constructs itself nicely now)rsiddharth2013-06-261-2/+2
|
* modified: parsers/Images.java (now scruffy-markup accepts svg images)rsiddharth2013-04-271-1/+1
|
* modified: parsers/Images.java (Pattern for image recognitionrsiddharth2013-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | updated. Now scruf can detect images with png|jpg|jpeg extension)x -------------- This line and the following will be ignored -------------- === modified file 'parsers/Images.java' --- a/parsers/Images.java 2012-11-30 13:18:40 +0000 +++ b/parsers/Images.java 2013-03-23 13:00:50 +0000 @@ -28,7 +28,7 @@ private String openTag = "<img src=\"$1\" alt=\" \\[$"; private String closeTag = " />"; public String parse(String fileContent) { - Pattern pattern = Pattern.compile("\\{\\{(.+?\\.(png|jpg))(\\|(.+?))?\\}\\}", Pattern.DOTALL); + Pattern pattern = Pattern.compile("\\{\\{(.+?\\.(png|jp[e]?g))(\\|(.+?))?\\}\\}", Pattern.DOTALL); Matcher matcher = pattern.matcher(fileContent); StringBuffer sbuffer = new StringBuffer(); StringBuilder replacementString =new StringBuilder();
* modified: parsers/QuoteSpecialText.java (regex that recognizes special-text ↵rsiddharth2013-03-101-1/+1
| | | | | | modified) now, HTML special codes/numbers are not quoted by this class.
* [bug-fix]: The `Footer` parser now allows the text, inside the markep up ↵rsiddharth2012-12-231-1/+1
| | | | | | | footer block, to be multi-line. modified: parsers/Footer.java
* added license text to parsers/SymbolMap.java.rsiddharth2012-12-211-0/+21
| | | | | modified: parsers/SymbolMap.java
* [bug-fix]: From now on, all the special characters in the stringrsiddharth2012-12-201-2/+28
| | | | | | | inside "monospace" blocks (the ones surrounded by ` character) are quoted to the corresponding HTML number. modified: parsers/WordDecoration.java
* SymbolMap class which was in CodeBlock.java is shifted to a dedicatedrsiddharth2012-12-202-56/+63
| | | | | | | | file -- parsers/SymbolMap.java. added: parsers/SymbolMap.java modified: parsers/CodeBlocks.java
* [bug-fix]: Back Buttons were not put in webpages that were present inrsiddharth2012-12-201-2/+3
| | | | | | the "root" directory. This commit fixes this. modified: parsers/BackButton.java
* new feature: I have added support for <audio> tags for Ogg audio.rsiddharth2012-12-022-0/+53
| | | | | | | added: parsers/Audio.java (to parse audio) modified: parsers/ParserList.java (new parser added, see above)
* minor-fix(es) to comply with standardsrsiddharth2012-11-301-2/+2
| | | | | | | modified: index/IndexCreator.java (added space after the link mark-up) parsers/Images.java (now the string for the alt parameter in the <img> will be surrounded by square brackets)
* bug fix: parser/Nullit.java quotes the full regex before sending thersiddharth2012-11-301-7/+9
| | | | | | | regex to Pattern.compile(). modified: parsers/NullIt.java
* bug-fixes; now the final HTML adornings are done in Header,rsiddharth2012-11-284-10/+71
| | | | | | | | | | | | | LastUpdate & CloseHtmlTags parsers added: parsers/CloseHtmlTags.java (closes the HTML tags) modified: index/IndexCreator.java (bug fix) parsers/Header.java (couple of lines moved to CloseHtmlTag parser) parsers/MetaParser.java (copyright text added) parsers/ParserList.java (new parser + some parser sequence re-arrangements)
* new feature: meta tag for author info is available.rsiddharth2012-11-284-40/+41
| | | | | | | | | | | | | removed: parsers/DocumentName.java (MetaParser supersedes this Parser) added: parsers/MetaParser.java (it looks for meta info and updates them to PresentFile) modified: conversion/ConvertFile.java (now it initiates some of the PresentFile fields to null) parsers/Header.java (Meta field 'author' added) parsers/ParserList.java (added MetaParser, removed DocumentName) status/PresentFile.java (new field 'author') todo (update todo)
* parsers/LastUpdate.java was baptized, todo was updatedrsiddharth2012-11-271-1/+22
| | | | | | modified: parsers/LastUpdate.java todo
* new feature: Now Scruf appends a 'last updated' string at the end ofrsiddharth2012-11-272-0/+31
| | | | | | | | | | all html files, it generates. parsers/LastUpdate.java does this job. added: parsers/LastUpdate.java (new parser) modified: parsers/ParserList.java (added new Parser: see above) todo (now scruf todos are in org-mode)
* new feature: special text (symbols) are quoted to HTML number inside arsiddharth2012-11-113-13/+78
| | | | | | | | | | | | | code-block modified: parsers/CodeBlocks.java (new class 'SymbolMap' which has a list of symbols & their corresponding HTML number) ( quote() in 'CodeBlock' class uses the SymbolMap to quote text) parsers/ParserList.java (list re-ordered, CodeBlock has gone up) parsers/QuoteSpecialText.java ( if regex matches '&#35;', it leaves the text un-quoted)
* New Parser: Source; Bug-fix for conversion/CanConvert.java & ↵rsiddharth2012-11-102-0/+37
| | | | | | | | | | | | | | license/Liberate.java. added: parsers/Source.java (New Parser, adds a link to the 'scruffy' source file) modified: conversion/CanConvert.java (bug-fix) conversion/CreateHtmlFile.java (we have two versions of the create() method now) license/Liberate.java (regex fix) parsers/ParserList.java (new parser added, see above)
* marked-up files should have a '.scruffy' extension from now on. Thisrsiddharth2012-11-103-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | commit is an un-stable commit. It has bugs. removed: io/PresentFile.java (moved to status/PresentFile.java) added: conversion/CreateHtmlFile.java (creates a corresponding '.html' file for a given '.scruffy' marked-up file) (needs some fine-tuning) status/PresentFile.java (see above) modified: conversion/ConvertFile.java (CreatHtmlFile object takes care of producing a corresponding html 'File') conversion/FileSieve.java (regex modified to reflect the '.scruffy' extension) index/IndexCreator.java (edits to reflect the '.scruffy' extension) parsers/BackButton.java (edit to reflect the '.scruffy' extension) parsers/DocumentName.java (edit to reflect the package change for PresentFile class) parsers/Header.java (edit to reflect the package change for PresentFile class) todo (updated todo)
* modified:rsiddharth2012-11-021-2/+1
| | | | | parsers/Header.java (now the 'scruf' footer links to project's homepage) todo (new things to do)
* added:rsiddharth2012-11-014-5/+52
| | | | | | | | | | parsers/QuoteSpecialText.java (new parser to quote special text) modified: parsers/CodeBlocks.java (the regex was made more strict) parsers/Footer.java (fix: appendTail() was added after while()) parsers/ParserList.java (new parser, see above) (parser order changed) todo
* added:rsiddharth2012-10-313-22/+22
| | | | | | | | | | | | | | | | | | | | | | status/ status/DirectoryInfo.java (record the directory 'level' at which scruf is parsing with respect to 'root' directory.) modified: Scruf.java (added a line to start the directory level count at zero) conversion/ConvertDirectory.java (DirectoryInfo.level used to take count of directory 'leve') conversion/ConvertFile.java (lines related to 'footer' things were removed) io/PresentFile.java ( 'footer' & 'backButton' field removed) parsers/BackButton.java (back button placement happens in the parse method itself, instead of doing it in Header.java) (back button is not placed, if the present directory is root directory) parsers/Footer.java (footer placement happens in the parse method itself, instead of doing it in Header.java) parsers/Header.java (back button placement & footer placement removed.)
* modified:rsiddharth2012-10-311-1/+1
| | | | | | | | | conversion/ConvertDirectory.java (minor edit) index/IndexCreator.java (removed code which (1) creates a index file, if it is not present (2) checks for the existence of index.html) io/WriteFile.java (made the stdout message more verbose) parsers/Header.java ('scruf' footer links to scruf's project page) todo (1 task completed)
* added license info to parsers/DocumentDate.javarsiddharth2012-10-301-1/+22
|
* added:rsiddharth2012-10-262-1/+17
| | | | | | parsers/DocumentDate.java modified: parsers/Paragraphs.java
* modified:rsiddharth2012-10-266-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | index/IndexCreator.java Structural modification. parsers/CodeBlocks.java replacement string was edited. @@ -33,7 +33,7 @@ - replacement.append("<div class=\\\"code\\\">"); + replacement.append("<div class=\"code\">"); parsers/DocumentName.java Structural modification. parsers/Header.java "powered by scruf" was linked. parsers/Paragraphs.java Display message. (should remove it in next commit). parsers/ParserList.java New parser -- DocumentDate parsers/WordDecoration.java replacement string was edited. @@ -34,7 +34,7 @@ - tagMap.put("`","<span class=\\\"monospace\\\">$7</span>"); + tagMap.put("`","<span class=\"monospace\">$7</span>"); unknown: parsers/DocumentDate.java (will add it in next commit)
* removed:rsiddharth2012-10-2513-11/+284
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | notes writefile added: COPYING -- gpl text (full) modified: Initialization.java Scruf.java conversion/CanConvert.java conversion/ConvertDirectory.java conversion/ConvertFile.java conversion/FileSieve.java index/IndexCreator.java io/PresentFile.java io/ReadFile.java io/WriteFile.java license/Liberate.java parsers/BackButton.java parsers/CodeBlocks.java parsers/DocumentName.java parsers/Footer.java parsers/Header.java parsers/Headings.java parsers/Images.java parsers/LineBreak.java parsers/Links.java parsers/NullIt.java parsers/Paragraphs.java parsers/ParserList.java parsers/WordDecoration.java styling/StyleChecker.java >> All the .java files were 'baptized' for 100% software freedom. todo -- minor edit. license/gpl -- minor edit again.
* modified:rsiddharth2012-10-252-2/+2
| | | | | parsers/CodeBlocks.java parsers/Paragraphs.java
* [Break-through]: a code-block is properly formatted now and arsiddharth2012-10-251-2/+2
| | | | | | | | 'monospace' marked-up phrased is properly turned to monospace again with proper formatting. modified: parsers/WordDecoration.java
* added:rsiddharth2012-10-252-8/+9
| | | | | | | | notes modified: license/gpl parsers/CodeBlocks.java parsers/WordDecoration.java
* Modified parsers/Paragraphs.java & styling/style.cssrsiddharth2012-08-041-4/+6
|
* parsers/BackButton.javarsiddharth2012-06-275-18/+34
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parsers/Footer.java parsers/Header.java: all the three file underwent a cosmetic edit. parsers/Paragraphs.java: Now I have found a pretty good way of properly deducting paragraphs, to realize this I have an extra regex to specificly deduct whether the "block" deducted by the "paragraph Matcher" is a "html block", if it is, then nothing is done to it, if it is not, then it means that the "block" is necessarily a paragraph. With this revision, it is apparently true that the html files generated by scruf is HTML5 compatible. parsers/ParserList.java: The List is re-ordered again. Now, Headings is parsed before Paragraphs.
| * Paragraphs.java changedrsiddharth2012-06-271-4/+7
|/
* conversion/FileSieve.java: modified the regex to ignore backup file (#*#).rsiddharth2012-06-266-18/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | parsers/Footer.java: Aesthetic modification. parsers/Header.java: add "meta" tags for the html output, mainly for compliance sake. I have also re-arranged the html tags a bit -- the "back button" is now the last thing in the <article> block. parsers/Images.java (bug-fix): The regex had small precisely deducting images, so the regex was slightly modified to make all work properly. There was another significant change made to the way the image tag is created -- "alt" is mandatory now, even if the markup doesn't give a "alt" for the <img> tag, a default "alt" is created -- the image-file-name. parsers/Links.java: From now on, the links generated will not have 'target="_blank"`, I felt that the reader must choose whether to open the link in a new window/tab, so the change. Period. In the last revision, link description was made optional in the link mark-up, the regex was slightly erroneous, I rectified it. parsers/Paragraphs.java: As of this revision, the <p> generation is still rough around the edges, I need to smoothen it in future revisions. parsers/ParserList.java: Order of parser list was modified -- now, Paragraphs comes before Headings, it was the reverse before.
* Images.java && Links.java (bug fix) : regex modified to properly parse the ↵rsiddharth2012-06-252-6/+22
| | | | | | | | respective mark-up when the marked-uped a a whole runs into more than one line. Before this modification the "marked-uped" lines which ran into two (or more) different lines were not properly parsed, by these parsers, and thus was not properly converted. With this fix, things _seem_ to work good.
* conversion/ConvertDirectory.java: only a small addition -- to print out the ↵rsiddharth2012-06-242-5/+22
| | | | | | | | | | | | | | file that is under "conversion" conversion/FileSieve.java: update the regex to ignore hidden files, ".ttf" files. parsers/Header.java: * Now the blog post goes bettween the <article> & </article> tag, Header class was modified to reflect this change. * "Powered by scruf" line must go at the bottom of every html page that is generated by this program, Header class was modified to reflect this. parsers/Images.java: I have modified the "regex" and relevant code to make the "image description" optional.
* Two files were modified (bug fix):rsiddharth2012-06-241-3/+1
| | | | | | | | --> conversion/FileSieve.java : regex modified to ignore hidden files. --> parsers/Images.java : html tag (for image) was erroneous, it was rectified and as a consequence we got rid of 3 lines of code.
* scruf is "bzr"ed now.rsiddharth2012-06-2314-0/+330