Add README master github/master
authorChristian Weiske <weiske@mogic.com>
Wed, 3 Aug 2016 07:55:29 +0000 (09:55 +0200)
committerChristian Weiske <weiske@mogic.com>
Wed, 3 Aug 2016 07:55:29 +0000 (09:55 +0200)
.gitignore
README.rst [new file with mode: 0644]

index 849ddff3b7ec917b5f4563e9a6d3ea63ea512a70..0ac97593e420c33f4c057252b41b90b8e63820fd 100644 (file)
@@ -1 +1,2 @@
 dist/
+/README.html
diff --git a/README.rst b/README.rst
new file mode 100644 (file)
index 0000000..8bf7041
--- /dev/null
@@ -0,0 +1,89 @@
+*********************
+MIME_Type_PlainDetect
+*********************
+Detect the MIME type of source code files.
+
+A self-made MIME magic file to detect if a source code file is
+CSS, rST or SQL.
+
+
+====================
+Supported file types
+====================
+- css
+- diff
+- htm
+- ini
+- js
+- php
+- rst (reStructuredText)
+- sh
+- sql
+- svg
+- ts (TypoScript)
+- txt
+- xml
+
+
+=====
+Usage
+=====
+
+Command line
+============
+Download ``data/programming.magic`` and then::
+
+    $ file -m programming.magic /path/to/file.css
+    text/css
+
+
+PHP
+===
+See ``examples/mimedetect.php``::
+
+
+    require_once 'MIME/Type/PlainDetect.php';
+    $type = MIME_Type_PlainDetect::autoDetect($file);
+    if ($type == 'text/plain') {
+        //do something
+    }
+
+
+Installation
+============
+
+PEAR
+====
+::
+
+   $ pear channel-discover zustellzentrum.cweiske.de
+   $ pear install zz/mime_type_plaindetect-alpha
+
+Composer
+========
+::
+
+   $ composer require cweiske/mime_type_plaindetect
+
+
+===========================
+About MIME_Type_PlainDetect
+===========================
+
+License
+=======
+MIME_Type_PlainDetect is licensed under the `OSL 3.0`__.
+
+__ http://opensource.org/licenses/osl-3.0
+
+
+Coding style
+============
+MIME_Type_PlainDetect follows the `PEAR Coding Standards`__.
+
+__ http://pear.php.net/manual/en/standards.php
+
+
+Author
+======
+Written by `Christian Weiske <http://cweiske.de/>`_.