aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authoralexbl <alexbl@FreeBSD.org>2006-12-17 17:40:21 +0800
committeralexbl <alexbl@FreeBSD.org>2006-12-17 17:40:21 +0800
commit7379c397459fed0b4cd8d0b08d4be0694f4fa4db (patch)
tree65768ef0c4b22a284cc863176b7275178caa0c2d /textproc
parentf21b8ec031c0dd2a8580acf408ae4eb95f982500 (diff)
downloadfreebsd-ports-gnome-7379c397459fed0b4cd8d0b08d4be0694f4fa4db.tar.gz
freebsd-ports-gnome-7379c397459fed0b4cd8d0b08d4be0694f4fa4db.tar.zst
freebsd-ports-gnome-7379c397459fed0b4cd8d0b08d4be0694f4fa4db.zip
Markdown is two things: (1) a plain text formatting syntax; and (2) a
software tool that converts the plain text formatting to (X)HTML. The formatting syntax is designed to be easy and intuitive for web authors and resembles typical email formatting conventions. The resultant (X)HTML is structurally valid. WWW: http://www.freewisdom.org/projects/python-markdown PR: ports/105992 Submitted by: Graham Todd <gtodd at bellanet.org>
Diffstat (limited to 'textproc')
-rw-r--r--textproc/Makefile1
-rw-r--r--textproc/py-markdown/Makefile23
-rw-r--r--textproc/py-markdown/distinfo3
-rw-r--r--textproc/py-markdown/pkg-descr7
-rw-r--r--textproc/py-markdown/pkg-plist3
-rw-r--r--textproc/py-markdown2/Makefile23
-rw-r--r--textproc/py-markdown2/distinfo3
-rw-r--r--textproc/py-markdown2/pkg-descr7
-rw-r--r--textproc/py-markdown2/pkg-plist3
9 files changed, 73 insertions, 0 deletions
diff --git a/textproc/Makefile b/textproc/Makefile
index 6c40a6fc9ca0..21e97c8986aa 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -738,6 +738,7 @@
SUBDIR += py-libxslt
SUBDIR += py-ltxml
SUBDIR += py-lucene
+ SUBDIR += py-markdown
SUBDIR += py-pyx12
SUBDIR += py-rdflib
SUBDIR += py-reverend
diff --git a/textproc/py-markdown/Makefile b/textproc/py-markdown/Makefile
new file mode 100644
index 000000000000..715f54b96bf2
--- /dev/null
+++ b/textproc/py-markdown/Makefile
@@ -0,0 +1,23 @@
+# New ports collection makefile for: py-markdown
+# Date created: 28 November 2006
+# Whom: Graham Todd <gtodd@bellanet.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= markdown
+PORTVERSION= 1.6
+CATEGORIES= textproc python
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= python-markdown
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= ${PORTNAME}-${PORTVERSION}a
+
+MAINTAINER= alexbl@FreeBSD.org
+COMMENT= Text markup to HTML conversion engine for Python
+
+USE_ZIP= yes
+USE_PYTHON= 2.4+
+USE_PYDISTUTILS= yes
+
+.include <bsd.port.mk>
diff --git a/textproc/py-markdown/distinfo b/textproc/py-markdown/distinfo
new file mode 100644
index 000000000000..481ae00cd494
--- /dev/null
+++ b/textproc/py-markdown/distinfo
@@ -0,0 +1,3 @@
+MD5 (markdown-1.6a.zip) = 21b5882f76264f84b0c6edf54ca38d2d
+SHA256 (markdown-1.6a.zip) = fbf349b8d4e4594eea50c9312754370c69d8df5ae7af4b6f5d857d17f871217b
+SIZE (markdown-1.6a.zip) = 25236
diff --git a/textproc/py-markdown/pkg-descr b/textproc/py-markdown/pkg-descr
new file mode 100644
index 000000000000..473b80fcdcb4
--- /dev/null
+++ b/textproc/py-markdown/pkg-descr
@@ -0,0 +1,7 @@
+Markdown is two things: (1) a plain text formatting syntax; and (2) a
+software tool that converts the plain text formatting to (X)HTML. The
+formatting syntax is designed to be easy and intuitive for web authors
+and resembles typical email formatting conventions. The resultant
+(X)HTML is structurally valid.
+
+WWW: http://www.freewisdom.org/projects/python-markdown
diff --git a/textproc/py-markdown/pkg-plist b/textproc/py-markdown/pkg-plist
new file mode 100644
index 000000000000..28c19b0a3bba
--- /dev/null
+++ b/textproc/py-markdown/pkg-plist
@@ -0,0 +1,3 @@
+%%PYTHON_SITELIBDIR%%/markdown.py
+%%PYTHON_SITELIBDIR%%/markdown.pyc
+%%PYTHON_SITELIBDIR%%/markdown.pyo
diff --git a/textproc/py-markdown2/Makefile b/textproc/py-markdown2/Makefile
new file mode 100644
index 000000000000..715f54b96bf2
--- /dev/null
+++ b/textproc/py-markdown2/Makefile
@@ -0,0 +1,23 @@
+# New ports collection makefile for: py-markdown
+# Date created: 28 November 2006
+# Whom: Graham Todd <gtodd@bellanet.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= markdown
+PORTVERSION= 1.6
+CATEGORIES= textproc python
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= python-markdown
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= ${PORTNAME}-${PORTVERSION}a
+
+MAINTAINER= alexbl@FreeBSD.org
+COMMENT= Text markup to HTML conversion engine for Python
+
+USE_ZIP= yes
+USE_PYTHON= 2.4+
+USE_PYDISTUTILS= yes
+
+.include <bsd.port.mk>
diff --git a/textproc/py-markdown2/distinfo b/textproc/py-markdown2/distinfo
new file mode 100644
index 000000000000..481ae00cd494
--- /dev/null
+++ b/textproc/py-markdown2/distinfo
@@ -0,0 +1,3 @@
+MD5 (markdown-1.6a.zip) = 21b5882f76264f84b0c6edf54ca38d2d
+SHA256 (markdown-1.6a.zip) = fbf349b8d4e4594eea50c9312754370c69d8df5ae7af4b6f5d857d17f871217b
+SIZE (markdown-1.6a.zip) = 25236
diff --git a/textproc/py-markdown2/pkg-descr b/textproc/py-markdown2/pkg-descr
new file mode 100644
index 000000000000..473b80fcdcb4
--- /dev/null
+++ b/textproc/py-markdown2/pkg-descr
@@ -0,0 +1,7 @@
+Markdown is two things: (1) a plain text formatting syntax; and (2) a
+software tool that converts the plain text formatting to (X)HTML. The
+formatting syntax is designed to be easy and intuitive for web authors
+and resembles typical email formatting conventions. The resultant
+(X)HTML is structurally valid.
+
+WWW: http://www.freewisdom.org/projects/python-markdown
diff --git a/textproc/py-markdown2/pkg-plist b/textproc/py-markdown2/pkg-plist
new file mode 100644
index 000000000000..28c19b0a3bba
--- /dev/null
+++ b/textproc/py-markdown2/pkg-plist
@@ -0,0 +1,3 @@
+%%PYTHON_SITELIBDIR%%/markdown.py
+%%PYTHON_SITELIBDIR%%/markdown.pyc
+%%PYTHON_SITELIBDIR%%/markdown.pyo
:#3a3935">(ETableHeaderClass), (GtkClassInitFunc) e_table_header_class_init, (GtkObjectInitFunc) NULL, NULL, /* reserved 1 */ NULL, /* reserved 2 */ (GtkClassInitFunc) NULL }; type = gtk_type_unique (gtk_object_get_type (), &info); } return type; } ETableHeader * e_table_header_new (void) { ETableHeader *eth; eth = gtk_type_new (e_table_header_get_type ()); return eth; } static void eth_do_insert (ETableHeader *eth, int pos, ETableCol *val) { memmove (&eth->columns [pos+1], &eth->columns [pos], sizeof (ETableCol *) * (eth->col_count - pos)); eth->columns [pos] = val; eth->col_count ++; } static void eth_update_offsets (ETableHeader *eth) { int i; int x = 0; for (i = 0; i < eth->col_count; i++){ ETableCol *etc = eth->columns [i]; etc->x = x; x += etc->width; } } void e_table_header_add_column (ETableHeader *eth, ETableCol *tc, int pos) { g_return_if_fail (eth != NULL); g_return_if_fail (E_IS_TABLE_HEADER (eth)); g_return_if_fail (tc != NULL); g_return_if_fail (E_IS_TABLE_COL (tc)); g_return_if_fail (pos >= -1 && pos <= eth->col_count); if (pos == -1) pos = eth->col_count; eth->columns = g_realloc (eth->columns, sizeof (ETableCol *) * (eth->col_count + 1)); /* * We are the primary owners of the column */ gtk_object_ref (GTK_OBJECT (tc)); gtk_object_sink (GTK_OBJECT (tc)); eth_do_insert (eth, pos, tc); eth_update_offsets (eth); gtk_signal_emit (GTK_OBJECT (eth), eth_signals [STRUCTURE_CHANGE]); gtk_signal_emit (GTK_OBJECT (eth), eth_signals [DIMENSION_CHANGE]); } ETableCol * e_table_header_get_column (ETableHeader *eth, int column) { g_return_val_if_fail (eth != NULL, NULL); g_return_val_if_fail (E_IS_TABLE_HEADER (eth), NULL); if (column < 0) return NULL; if (column >= eth->col_count) return NULL; return eth->columns [column]; } int e_table_header_count (ETableHeader *eth) { g_return_val_if_fail (eth != NULL, 0); g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0); return eth->col_count; } int e_table_header_index (ETableHeader *eth, int col) { g_return_val_if_fail (eth != NULL, -1); g_return_val_if_fail (E_IS_TABLE_HEADER (eth), -1); g_return_val_if_fail (col < eth->col_count, -1); return eth->columns [col]->col_idx; } int e_table_header_get_index_at (ETableHeader *eth, int x_offset) { int i, total; g_return_val_if_fail (eth != NULL, 0); g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0); total = 0; for (i = 0; i < eth->col_count; i++){ total += eth->columns [i]->width; if (x_offset < total) return i; } return -1; } ETableCol ** e_table_header_get_columns (ETableHeader *eth) { ETableCol **ret; g_return_val_if_fail (eth != NULL, 0); g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0); ret = g_new (ETableCol *, eth->col_count + 1); memcpy (ret, eth->columns, sizeof (ETableCol *) * eth->col_count); ret [eth->col_count] = NULL; return ret; } gboolean e_table_header_selection_ok (ETableHeader *eth) { g_return_val_if_fail (eth != NULL, FALSE); g_return_val_if_fail (E_IS_TABLE_HEADER (eth), FALSE); return eth->selectable; } int e_table_header_get_selected (ETableHeader *eth) { int i; int selected = 0; g_return_val_if_fail (eth != NULL, 0); g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0); for (i = 0; i < eth->col_count; i++){ if (eth->columns [i]->selected) selected++; } return selected; } int e_table_header_total_width (ETableHeader *eth) { int total, i; g_return_val_if_fail (eth != NULL, 0); g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0); total = 0; for (i = 0; i < eth->col_count; i++) total += eth->columns [i]->width; return total; } static void eth_do_remove (ETableHeader *eth, int idx, gboolean do_unref) { if (do_unref) gtk_object_unref (GTK_OBJECT (eth->columns [idx])); memmove (&eth->columns [idx], &eth->columns [idx+1], sizeof (ETableCol *) * eth->col_count - idx); eth->col_count--; } void e_table_header_move (ETableHeader *eth, int source_index, int target_index) { ETableCol *old; g_return_if_fail (eth != NULL); g_return_if_fail (E_IS_TABLE_HEADER (eth)); g_return_if_fail (source_index >= 0); g_return_if_fail (target_index >= 0); g_return_if_fail (source_index < eth->col_count); g_return_if_fail (target_index < eth->col_count); old = eth->columns [source_index]; eth_do_remove (eth, source_index, FALSE); eth_do_insert (eth, target_index, old); eth_update_offsets (eth); gtk_signal_emit (GTK_OBJECT (eth), eth_signals [STRUCTURE_CHANGE]); gtk_signal_emit (GTK_OBJECT (eth), eth_signals [DIMENSION_CHANGE]); } void e_table_header_remove (ETableHeader *eth, int idx) { g_return_if_fail (eth != NULL); g_return_if_fail (E_IS_TABLE_HEADER (eth)); g_return_if_fail (idx >= 0); g_return_if_fail (idx < eth->col_count); eth_do_remove (eth, idx, TRUE); gtk_signal_emit (GTK_OBJECT (eth), eth_signals [STRUCTURE_CHANGE]); gtk_signal_emit (GTK_OBJECT (eth), eth_signals [DIMENSION_CHANGE]); } void e_table_header_set_selection (ETableHeader *eth, gboolean allow_selection) { } void e_table_header_set_size (ETableHeader *eth, int idx, int size) { g_return_if_fail (eth != NULL); g_return_if_fail (E_IS_TABLE_HEADER (eth)); g_return_if_fail (idx >= 0); g_return_if_fail (idx < eth->col_count); g_return_if_fail (size > 0); eth->columns [idx]->width = size; gtk_signal_emit (GTK_OBJECT (eth), eth_signals [DIMENSION_CHANGE], idx); } int e_table_header_col_diff (ETableHeader *eth, int start_col, int end_col) { int total, col; g_return_val_if_fail (eth != NULL, 0); g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0); { if ( start_col < 0 ) start_col = 0; if ( end_col > eth->col_count ) end_col = eth->col_count - 1; total = 0; for (col = start_col; col < end_col; col++){ total += eth->columns [col]->width; } } return total; }