ports/96556: [patch] Add support for current XBEL bookmarks
Alexander Leidinger
netchild at FreeBSD.org
Sun Apr 30 16:50:17 UTC 2006
>Number: 96556
>Category: ports
>Synopsis: [patch] Add support for current XBEL bookmarks
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Apr 30 16:50:15 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Alexander Leidinger
>Release: FreeBSD 7.0-CURRENT i386
>Organization:
FreeBSD
>Environment:
System: FreeBSD 7.0-CURRENT #191: Sat Apr 29 10:56:49 CEST 2006
root at Magellan.Leidinger.net:/big/usr/src/sys/i386/compile/WORK
>Description:
bk2site doesn't know how to handle time_added/time_visited/time_modified in the XBEL file of Galeon (and probably all firefox based browsers). The patch fixes this.
>How-To-Repeat:
>Fix:
--- bk2site.diff begins here ---
Index: www/bk2site/Makefile
===================================================================
RCS file: /big/FreeBSD-CVS/ports/www/bk2site/Makefile,v
retrieving revision 1.15
diff -u -u -r1.15 Makefile
--- www/bk2site/Makefile 19 Feb 2005 18:19:23 -0000 1.15
+++ www/bk2site/Makefile 30 Apr 2006 16:14:37 -0000
@@ -8,7 +8,7 @@
PORTNAME= bk2site
PORTVERSION= 1.1.9
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
Index: www/bk2site/files/patch-XMLParser.C
===================================================================
RCS file: www/bk2site/files/patch-XMLParser.C
diff -N www/bk2site/files/patch-XMLParser.C
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ www/bk2site/files/patch-XMLParser.C 30 Apr 2006 16:30:24 -0000
@@ -0,0 +1,66 @@
+--- XMLParser.C.orig Sun Apr 30 18:27:46 2006
++++ XMLParser.C Sun Apr 30 18:30:18 2006
+@@ -426,6 +426,15 @@
+ else if (equalNoCase(tagName,"DESC")){
+ inDesc = true;
+ }
++ else if (equalNoCase(tagName,"TIME_ADDED")){
++ inAdded = true;
++ }
++ else if (equalNoCase(tagName,"TIME_VISITED")){
++ inVisited = true;
++ }
++ else if (equalNoCase(tagName,"TIME_MODIFIED")){
++ inModified = true;
++ }
+ else if (equalNoCase(tagName,"BOOKMARK")){
+ map<string, string>::const_iterator i;
+ string url = "";
+@@ -455,6 +464,15 @@
+ else if (equalNoCase(tagName,"DESC")){
+ inDesc = false;
+ }
++ else if (equalNoCase(tagName,"TIME_ADDED")){
++ inAdded = false;
++ }
++ else if (equalNoCase(tagName,"TIME_VISITED")){
++ inVisited = false;
++ }
++ else if (equalNoCase(tagName,"TIME_MODIFIED")){
++ inModified = false;
++ }
+ else if (equalNoCase(tagName,"FOLDER")){
+ rtStack.pop_back();
+ currentReferenceTree = rtStack.back();
+@@ -484,6 +502,15 @@
+ else if (inDesc){
+ currentFolder->comment = content;
+ }
++ else if (inAdded) {
++ currentFolder->creationTime = atoi(content.c_str());
++ }
++ else if (inVisited) {
++ currentFolder->visitTime = atoi(content.c_str());
++ }
++ else if (inModified) {
++ currentFolder->modifiedTime = atoi(content.c_str());
++ }
+ }
+ else if (inBookmark) {
+ if (inTitle) {
+@@ -492,6 +519,15 @@
+ }
+ else if (inDesc){
+ currentBookmark->comment = content;
++ }
++ else if (inAdded) {
++ currentBookmark->creationTime = atoi(content.c_str());
++ }
++ else if (inVisited) {
++ currentBookmark->visitTime = atoi(content.c_str());
++ }
++ else if (inModified) {
++ currentBookmark->modifiedTime = atoi(content.c_str());
+ }
+ }
+ }
Index: www/bk2site/files/patch-XMLParser.H
===================================================================
RCS file: www/bk2site/files/patch-XMLParser.H
diff -N www/bk2site/files/patch-XMLParser.H
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ www/bk2site/files/patch-XMLParser.H 30 Apr 2006 16:30:31 -0000
@@ -0,0 +1,32 @@
+--- XMLParser.H.orig Sun Apr 30 18:27:46 2006
++++ XMLParser.H Sun Apr 30 18:28:29 2006
+@@ -140,6 +140,9 @@
+ bool inFolder;
+ bool inDesc;
+ bool inTitle;
++ bool inAdded;
++ bool inVisited;
++ bool inModified;
+
+ public:
+
+@@ -152,6 +155,9 @@
+ inFolder = false;
+ inDesc = false;
+ inTitle = false;
++ inAdded = false;
++ inVisited = false;
++ inModified = false;
+ };
+
+ XBELParser(referenceTree * r) {
+@@ -165,6 +171,9 @@
+ inFolder = false;
+ inDesc = false;
+ inTitle = false;
++ inAdded = false;
++ inVisited = false;
++ inModified = false;
+ };
+
+ void startTag(string &tagName, map<string,string> & attributes);
--- bk2site.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list