]> gitweb.factorcode.org Git - factor.git/commitdiff
webbrowser: move to basis for tools.deploy.unix
authorJoe Groff <arcata@gmail.com>
Mon, 26 Mar 2012 17:18:10 +0000 (10:18 -0700)
committerJoe Groff <arcata@gmail.com>
Mon, 26 Mar 2012 17:18:10 +0000 (10:18 -0700)
20 files changed:
basis/webbrowser/authors.txt [new file with mode: 0644]
basis/webbrowser/linux/linux.factor [new file with mode: 0644]
basis/webbrowser/linux/platforms.txt [new file with mode: 0644]
basis/webbrowser/macosx/macosx.factor [new file with mode: 0644]
basis/webbrowser/macosx/platforms.txt [new file with mode: 0644]
basis/webbrowser/summary.txt [new file with mode: 0644]
basis/webbrowser/webbrowser-docs.factor [new file with mode: 0644]
basis/webbrowser/webbrowser.factor [new file with mode: 0644]
basis/webbrowser/windows/platforms.txt [new file with mode: 0644]
basis/webbrowser/windows/windows.factor [new file with mode: 0644]
extra/webbrowser/authors.txt [deleted file]
extra/webbrowser/linux/linux.factor [deleted file]
extra/webbrowser/linux/platforms.txt [deleted file]
extra/webbrowser/macosx/macosx.factor [deleted file]
extra/webbrowser/macosx/platforms.txt [deleted file]
extra/webbrowser/summary.txt [deleted file]
extra/webbrowser/webbrowser-docs.factor [deleted file]
extra/webbrowser/webbrowser.factor [deleted file]
extra/webbrowser/windows/platforms.txt [deleted file]
extra/webbrowser/windows/windows.factor [deleted file]

diff --git a/basis/webbrowser/authors.txt b/basis/webbrowser/authors.txt
new file mode 100644 (file)
index 0000000..e091bb8
--- /dev/null
@@ -0,0 +1 @@
+John Benediktsson
diff --git a/basis/webbrowser/linux/linux.factor b/basis/webbrowser/linux/linux.factor
new file mode 100644 (file)
index 0000000..70a0ee9
--- /dev/null
@@ -0,0 +1,9 @@
+! Copyright (C) 2011 John Benediktsson
+! See http://factorcode.org/license.txt for BSD license
+
+USING: io.launcher kernel sequences system webbrowser ;
+
+IN: webbrowser.linux
+
+M: linux open-file ( path -- )
+    { "xdg-open" } swap suffix try-process ;
diff --git a/basis/webbrowser/linux/platforms.txt b/basis/webbrowser/linux/platforms.txt
new file mode 100644 (file)
index 0000000..a08e1f3
--- /dev/null
@@ -0,0 +1 @@
+linux
diff --git a/basis/webbrowser/macosx/macosx.factor b/basis/webbrowser/macosx/macosx.factor
new file mode 100644 (file)
index 0000000..18157df
--- /dev/null
@@ -0,0 +1,9 @@
+! Copyright (C) 2011 John Benediktsson
+! See http://factorcode.org/license.txt for BSD license
+
+USING: io.launcher kernel sequences system webbrowser ;
+
+IN: webbrowser.macosx
+
+M: macosx open-file ( path -- )
+    { "open" } swap suffix try-process ;
diff --git a/basis/webbrowser/macosx/platforms.txt b/basis/webbrowser/macosx/platforms.txt
new file mode 100644 (file)
index 0000000..6e806f4
--- /dev/null
@@ -0,0 +1 @@
+macosx
diff --git a/basis/webbrowser/summary.txt b/basis/webbrowser/summary.txt
new file mode 100644 (file)
index 0000000..65e60ae
--- /dev/null
@@ -0,0 +1 @@
+Open URLs in your web browser
diff --git a/basis/webbrowser/webbrowser-docs.factor b/basis/webbrowser/webbrowser-docs.factor
new file mode 100644 (file)
index 0000000..264de1d
--- /dev/null
@@ -0,0 +1,19 @@
+! Copyright (C) 2011 John Benediktsson
+! See http://factorcode.org/license.txt for BSD license
+
+USING: help.markup help.syntax strings webbrowser ;
+
+IN: webbrowser
+
+HELP: open-file
+{ $values { "path" string } }
+{ $description
+    "Open a specified file or directory using the default "
+    "application, similar to double-clicking the file's icon."
+} ;
+
+HELP: open-url
+{ $values { "url" string } }
+{ $description
+    "Open a specified url in the default web browser."
+} ;
diff --git a/basis/webbrowser/webbrowser.factor b/basis/webbrowser/webbrowser.factor
new file mode 100644 (file)
index 0000000..ba586e4
--- /dev/null
@@ -0,0 +1,19 @@
+! Copyright (C) 2011 John Benediktsson
+! See http://factorcode.org/license.txt for BSD license
+
+USING: combinators present system ui.operations urls vocabs ;
+
+IN: webbrowser
+
+HOOK: open-file os ( path -- )
+
+{
+    { [ os macosx?  ] [ "webbrowser.macosx"  ] }
+    { [ os linux?   ] [ "webbrowser.linux"   ] }
+    { [ os windows? ] [ "webbrowser.windows" ] }
+} cond require
+
+: open-url ( url -- )
+    >url present open-file ;
+
+[ url? ] \ open-url H{ } define-operation
diff --git a/basis/webbrowser/windows/platforms.txt b/basis/webbrowser/windows/platforms.txt
new file mode 100644 (file)
index 0000000..8e1a559
--- /dev/null
@@ -0,0 +1 @@
+windows
diff --git a/basis/webbrowser/windows/windows.factor b/basis/webbrowser/windows/windows.factor
new file mode 100644 (file)
index 0000000..1f7448b
--- /dev/null
@@ -0,0 +1,9 @@
+! Copyright (C) 2011 John Benediktsson
+! See http://factorcode.org/license.txt for BSD license
+
+USING: system kernel webbrowser windows.shell32 windows.user32 ;
+
+IN: webbrowser.windows
+
+M: windows open-file ( path -- )
+    [ f "open" ] dip f f SW_SHOWNORMAL ShellExecute drop ;
diff --git a/extra/webbrowser/authors.txt b/extra/webbrowser/authors.txt
deleted file mode 100644 (file)
index e091bb8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-John Benediktsson
diff --git a/extra/webbrowser/linux/linux.factor b/extra/webbrowser/linux/linux.factor
deleted file mode 100644 (file)
index 70a0ee9..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-! Copyright (C) 2011 John Benediktsson
-! See http://factorcode.org/license.txt for BSD license
-
-USING: io.launcher kernel sequences system webbrowser ;
-
-IN: webbrowser.linux
-
-M: linux open-file ( path -- )
-    { "xdg-open" } swap suffix try-process ;
diff --git a/extra/webbrowser/linux/platforms.txt b/extra/webbrowser/linux/platforms.txt
deleted file mode 100644 (file)
index a08e1f3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-linux
diff --git a/extra/webbrowser/macosx/macosx.factor b/extra/webbrowser/macosx/macosx.factor
deleted file mode 100644 (file)
index 18157df..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-! Copyright (C) 2011 John Benediktsson
-! See http://factorcode.org/license.txt for BSD license
-
-USING: io.launcher kernel sequences system webbrowser ;
-
-IN: webbrowser.macosx
-
-M: macosx open-file ( path -- )
-    { "open" } swap suffix try-process ;
diff --git a/extra/webbrowser/macosx/platforms.txt b/extra/webbrowser/macosx/platforms.txt
deleted file mode 100644 (file)
index 6e806f4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-macosx
diff --git a/extra/webbrowser/summary.txt b/extra/webbrowser/summary.txt
deleted file mode 100644 (file)
index 65e60ae..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Open URLs in your web browser
diff --git a/extra/webbrowser/webbrowser-docs.factor b/extra/webbrowser/webbrowser-docs.factor
deleted file mode 100644 (file)
index 264de1d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-! Copyright (C) 2011 John Benediktsson
-! See http://factorcode.org/license.txt for BSD license
-
-USING: help.markup help.syntax strings webbrowser ;
-
-IN: webbrowser
-
-HELP: open-file
-{ $values { "path" string } }
-{ $description
-    "Open a specified file or directory using the default "
-    "application, similar to double-clicking the file's icon."
-} ;
-
-HELP: open-url
-{ $values { "url" string } }
-{ $description
-    "Open a specified url in the default web browser."
-} ;
diff --git a/extra/webbrowser/webbrowser.factor b/extra/webbrowser/webbrowser.factor
deleted file mode 100644 (file)
index ba586e4..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-! Copyright (C) 2011 John Benediktsson
-! See http://factorcode.org/license.txt for BSD license
-
-USING: combinators present system ui.operations urls vocabs ;
-
-IN: webbrowser
-
-HOOK: open-file os ( path -- )
-
-{
-    { [ os macosx?  ] [ "webbrowser.macosx"  ] }
-    { [ os linux?   ] [ "webbrowser.linux"   ] }
-    { [ os windows? ] [ "webbrowser.windows" ] }
-} cond require
-
-: open-url ( url -- )
-    >url present open-file ;
-
-[ url? ] \ open-url H{ } define-operation
diff --git a/extra/webbrowser/windows/platforms.txt b/extra/webbrowser/windows/platforms.txt
deleted file mode 100644 (file)
index 8e1a559..0000000
+++ /dev/null
@@ -1 +0,0 @@
-windows
diff --git a/extra/webbrowser/windows/windows.factor b/extra/webbrowser/windows/windows.factor
deleted file mode 100644 (file)
index 1f7448b..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-! Copyright (C) 2011 John Benediktsson
-! See http://factorcode.org/license.txt for BSD license
-
-USING: system kernel webbrowser windows.shell32 windows.user32 ;
-
-IN: webbrowser.windows
-
-M: windows open-file ( path -- )
-    [ f "open" ] dip f f SW_SHOWNORMAL ShellExecute drop ;