From 0b6cabd40f2cb5978e69977f483d9ce30a3d2360 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Thu, 25 Oct 2012 02:48:09 +0530 Subject: removed: 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. --- index/IndexCreator.java | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'index') diff --git a/index/IndexCreator.java b/index/IndexCreator.java index 76f8ebc..49aa16c 100644 --- a/index/IndexCreator.java +++ b/index/IndexCreator.java @@ -1,3 +1,24 @@ +/*+ + * Copyright 2012 rsiddharth + * Email: + * + * This file is part of Scruf. + * + * Scruf is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + package scruf.index; import java.io.*; @@ -50,4 +71,4 @@ public class IndexCreator { boolean add = (check1 && check2); return add; } -} \ No newline at end of file +} -- cgit v1.2.3 From 8ea18f49eb5ed2034c1903c9e50aa6c3cbb0f896 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Fri, 26 Oct 2012 21:38:13 +0530 Subject: modified: index/IndexCreator.java Structural modification. parsers/CodeBlocks.java replacement string was edited. @@ -33,7 +33,7 @@ - replacement.append("
"); + replacement.append("
"); 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("`","$7"); + tagMap.put("`","$7"); unknown: parsers/DocumentDate.java (will add it in next commit) --- index/IndexCreator.java | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'index') diff --git a/index/IndexCreator.java b/index/IndexCreator.java index 49aa16c..fc469ce 100644 --- a/index/IndexCreator.java +++ b/index/IndexCreator.java @@ -54,21 +54,21 @@ public class IndexCreator { } } public boolean write() { - if(modified) - new WriteFile(index,indexContent.toString()).write(); - return modified; + if(modified) + new WriteFile(index,indexContent.toString()).write(); + return modified; } public File indexFile() { - return index; + return index; } private boolean shouldAdd(String fileName) { - String regex = ".*"+fileName+".*"; - // checks if fileName is already there in index. - boolean check1 = !(Pattern.compile(regex). - matcher(indexContent.toString()).find()); - // checks if fileName is index itself. - boolean check2 = !(Pattern.matches(fileName,"index")); - boolean add = (check1 && check2); - return add; + String regex = ".*"+fileName+".*"; + // checks if fileName is already there in index. + boolean check1 = !(Pattern.compile(regex). + matcher(indexContent.toString()).find()); + // checks if fileName is index itself. + boolean check2 = !(Pattern.matches(fileName,"index")); + boolean add = (check1 && check2); + return add; } } -- cgit v1.2.3