1. Alec Henriksen
  2. alecwh

Commits

Alec Henriksen  committed 434a231

Added setup.py script, removed storm (should have it installed on system from now on..), docs update, bug fixes

  • Participants
  • Parent commits 28aa736
  • Branches default

Comments (0)

Files changed (39)

File README

-Point-blank Web Application
-===========================
-* Author: Alec Henriksen <alecwh@gmail.com>
-* Website: [http://alecwh.com/point-blank/](http://alecwh.com/point-blank/)
-* Source: [http://bitbucket.org/alecwh/alecwh/](http://bitbucket.org/alecwh/alecwh/)
-* Version: 0.1
-
-Point-blank is very simple and intuitive blogging software. It allows you to write articles, allows your viewers to leave comments, and that's basically it. It allows for extention through plugins and templates.
-
-
-About & quick history
----------------------
-
-I wrote Point-blank in the Summer of 2009 for my personal blog at [http://alecwh.com/](http://alecwh.com/). It was designed to be extremely easy to use (because that is most important to me), fast, and comfortable. It is by no means intended to replace more functional content management systems. Point-blank also serves as an example application for mod_wsgi/web.py, and the software constructed for the first article on my blog.
-
-It is called "Point-blank" because there is little abstraction between you and the underlying software. All administration is done in `config.rc` and the actual web site.
-
-I included the plugins component of Point-blank in hopes that people will benefit form, and then extend this project.
-
-Features
---------
-
-* Well documented and organized code
-* Small, fast, minimalistic
-* Extendable through plugins
-* Inline administration (no seperate admin panel)
-* Uses Markdown for formatting
-* Intuitive, inviting comment system
-* Filtering system
-
-Install
--------
-
-Point-blank requires:
-
-1. Python 2.5 & above (not tested with earlier versions)
-2. WSGI implementation
-3. web.py (included)
-4. Storm ORM (included)
-5. jQuery (included)
-6. Pyfig (included)
-
-First, open `config.rc` and fill out the correct values.
-Second, run `python install.py install`
-Third, open browser
-
-Plugins and extendability
--------------------------
-
-Pyfig extends though a fairly simple API provided by `plugin.py`. You can find more information in `EXTEND`. Please publish your patches and mods to our Bitbucket project @ [http://bitbucket.org/alecwh/alecwh](http://bitbucket.org/alecwh/alecwh/).
-
-Authors and Contact
--------------------
-* Alec Henriksen \<[alecwh@gmail.com](mailto:alecwh@gmail.com)\>
-
-Copyright
----------
-
-Copyright 2008 Alec Henriksen <alecwh@gmail.com>
-This software is released under the GNU GPL v2, see the COPYING file.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-

File clean.sql

View file
 --
 
 INSERT INTO `articles` (`id_`, `url_id`, `title`, `tags`, `author`, `timestamp`, `content`, `comment_count`, `ip`, `active`) VALUES
-(1, 'welcome-to-point-blank', 'Welcome to Point-blank', 'announcements, help', '', '1275674040', 'Congrats on getting Point-blank up and running. Now just login (to the right) with the credentials you supplied in `config.rc`. Once logged in, you''ll be able to delete this article and create new ones from this page.\r\n\r\nWhat is Point-blank?\r\n--------------------\r\n\r\nPoint-blank is a content management system written in Python. It uses [web.py](#) for its framework and [Storm](#) for the ORM. It is intentionally minimal. Some of the benefits of Point-blank are:\r\n\r\n1. Simple to setup\r\n2. Simple to use (intuitive, uses Markdown text)\r\n3. Minimalistic, small size\r\n4. Extendable\r\n5. In-line, in-your-face administration.\r\n6. Portable (can be used on any WSGI server, selection of database types)\r\n\r\nPoint-blank is essentially an extremely lightweight blog mixed with a very simple wiki system. If you want to add static pages/content to your website, you need to create a page in `static/pages/` with the filename as the name of the page. There is a demo page included: [preview it and delete it if you want](#). Remember that while you can type in HTML, Markdown is also accepted as input. I suggest learning the [Markdown syntax](http://en.wikipedia.org/wiki/Markdown#Syntax_examples) to type faster and easier.\r\n\r\nChanging the default template\r\n-----------------------------\r\n\r\nFirst, you''ll probably going to want to modify the default template. You can find these in the `templates/` directory, and any CSS/JS/images can be edited in the `static/` directory. Before making any serious modifications to these templates, skim through and see how these templates are constructed. For example, it''s important to note that *all paths must include `$site_vars[''base_url'']` before the rest of the location.* This will be replaced with something like `http://example.com/`.\r\n\r\nFor example, this is the template for the login form:\r\n\r\n	<link rel="stylesheet" type="text/css" href="$site_vars[''base_url'']static/css/_main.css" />\r\n\r\nFinally, if you want to be able to use the CSS/JS files as templates, you must place an underscore before its name, like `_main.css`.\r\n\r\n\r\nModifying the configuration\r\n----------------------------\r\n\r\nAny change to `config.rc` will require a server restart, or at least the termination of the WSGI program. This is very easy to overlook, so hopefully this reminder will save you some headaches.\r\n\r\n\r\nPoint-blank is open-source\r\n--------------------------\r\n\r\nPoint-blank is [Free Software](#) and is licensed under the GNU GPL. That means you can change this program and share it easily with your friends or users. You can read more about the GPL at the [FSF](#).\r\n\r\nIf you are a programmer, you can help me out by fixing bugs, cleaning up code, and making things more efficient. I gladly accept community branches into the main codebase at [Bitbucket](#).\r\n\r\n\r\n', 0, 'localhost', 1);
+(1, 'welcome-to-point-blank', 'Welcome to Point-blank', 'announcements, help', '', '1275674040', 'Congrats on getting Point-blank up and running. Now just login (to the right) with the credentials you supplied in `config.rc`. Once logged in, you''ll be able to delete this article and create new ones from this page.\r\n\r\nWhat is Point-blank?\r\n--------------------\r\n\r\nPoint-blank is a content management system written in Python. It uses [web.py](#) for its framework and [Storm](#) for the ORM. It is intentionally minimal. Some of the benefits of Point-blank are:\r\n\r\n1. Simple to setup\r\n2. Simple to use (intuitive, uses Markdown text)\r\n3. Minimalistic, small size\r\n5. In-line, in-your-face administration.\r\n6. Portable (can be used on any WSGI server, selection of database types)\r\n\r\nPoint-blank is essentially an extremely lightweight blog mixed with a very simple wiki system. If you want to add static pages/content to your website, you need to create a page in `static/pages/` with the filename as the name of the page. There is a demo page included: [preview it and delete it if you want](#). Remember that while you can type in HTML, Markdown is also accepted as input. I suggest learning the [Markdown syntax](http://en.wikipedia.org/wiki/Markdown#Syntax_examples) to type faster and easier.\r\n\r\nChanging the default template\r\n-----------------------------\r\n\r\nFirst, you''ll probably going to want to modify the default template. You can find these in the `templates/` directory, and any CSS/JS/images can be edited in the `static/` directory. Before making any serious modifications to these templates, skim through and see how these templates are constructed. For example, it''s important to note that *all paths must include `$site_vars[''base_url'']` before the rest of the location.* This will be replaced with something like `http://example.com/`.\r\n\r\nFor example, this is the template for the login form:\r\n\r\n	<link rel="stylesheet" type="text/css" href="$site_vars[''base_url'']static/css/_main.css" />\r\n\r\nFinally, if you want to be able to use the CSS/JS files as templates, you must place an underscore before its name, like `_main.css`.\r\n\r\n\r\nModifying the configuration\r\n----------------------------\r\n\r\nAny change to `config.rc` will require a server restart, or at least the termination of the WSGI program. This is very easy to overlook, so hopefully this reminder will save you some headaches.\r\n\r\n\r\nPoint-blank is open-source\r\n--------------------------\r\n\r\nPoint-blank is [Free Software](#) and is licensed under the GNU GPL. That means you can change this program and share it easily with your friends or users. You can read more about the GPL at the [FSF](#).\r\n\r\nIf you are a programmer, you can help me out by fixing bugs, cleaning up code, and making things more efficient. I gladly accept community branches into the main codebase at [Bitbucket](#).\r\n\r\n\r\n', 0, 'localhost', 1);
 
 -- --------------------------------------------------------
 

File docs/EXTEND

View file
+Coming soon
+===========

File docs/INSTALL

View file
 * mysqldb, postgreSQL, or psycopg2
   (depending on database type)
 * python-markdown
-* wsgi implementation
+* wsgi server
 
 
 General Configuration and Installation
 Install the mod_wsgi module and add this to your virtual host file (possibly `/etc/apache2/sites-available/default`):
 
 	WSGIScriptAlias /myblog /var/www/point-blank/index.py
+	
+	* Change to wherever index.py is on your filesystem.
 
-This will make http://servername/point-blank point to the WSGI application. You will probably need to set the `WSGIPythonPath` directive so Point-blank can see its own local modules. These should go *above* your VirtualHost section.
-
-	WSGIPythonPath /var/www/point-blank
-	
-It's probably a good idea to add any other python libraries to this. Here is what mine looks like (Debian/Ubuntu):
-
-	WSGIPythonPath "/var/www/me/point-blank:/usr/lib/python2.6:/usr/lib/python2.6/plat-linux2:/usr/lib/python2.6/lib-tk:/usr/lib/python2.6/lib-old:/usr/lib/python2.6/lib-dynload:/usr/lib/python2.6/dist-packages:/usr/lib/python2.6/dist-packages/PIL:/usr/lib/python2.6/dist-packages/gst-0.10:/usr/lib/pymodules/python2.6:/usr/lib/python2.6/dist-packages/gtk-2.0:/usr/lib/pymodules/python2.6/gtk-2.0:/usr/lib/python2.6/dist-packages/wx-2.6-gtk2-unicode:/usr/local/lib/python2.6/dist-packages"
-	
-	
-	* More info @ http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIPythonPath
-	* You may also be able to set the WSGIPythonHome directive, which has roughly the same effect.
-	
-	
-Next, initialize your database and execute `clean.sql` (included in the root of this package) on it. This should create an initial database that will operate with Point-blank.
-
+This will make http://servername/point-blank point to the WSGI application.

File docs/README

View file
 
 It is called "Point-blank" because there is little abstraction between you and the underlying software. All administration is done in `config.rc` and the actual web site.
 
-I included the plugins component of Point-blank in hopes that people will benefit form, and then extend this project.
-
 
 Features
 --------
 
 * Well documented and organized code
 * Small, fast, minimalistic
-* Extendable through plugins
 * Inline administration (no seperate admin panel)
 * Uses Markdown for formatting
 * Intuitive, inviting comment system
 Pages
 -----
 
-Point-blank is primarily a blogging application, but includes functionality for adding pages (think "about" and "contact" pages). Just add a file to `/static/pages/`. The filename will be the page name, and its contents will be parsed/displayed.
+Point-blank is primarily a blogging application, but includes functionality for adding pages (think "about" and "contact" pages). Just add a file to `/static/pages/`. The filename will be the page name (appended with .html), and its contents will be parsed in Markdown.
 
 
 Plugins and extendability
 -------------------------
 
-Pyfig extends though a fairly simple API provided by `plugin.py`. You can find more information in `EXTEND`. Please publish your patches and mods to our Bitbucket project @ [http://bitbucket.org/alecwh/alecwh](http://bitbucket.org/alecwh/alecwh/).
+Point-blank does not yet include a plugin system. This is planned for future releases.
 
 
 Authors and Contact

File index.py

View file
 			
 			# execute query
 			# using SQL because Storm manual is incomplete...
-			db.store.execute("UPDATE `%sarticles` SET active ='0' WHERE id_='%s'" % (config.database.table_prefix, id_),
+			db.store.execute("UPDATE `articles` SET active ='0' WHERE id_='%s'" % id_,
 			noresult=True)
 			
-			db.store.execute("UPDATE `%sarticles` SET active ='0' WHERE id_='%s'" % (config.database.table_prefix, id_),
+			db.store.execute("UPDATE `articles` SET active ='0' WHERE id_='%s'" % id_,
 			noresult=True)
 			
 			web.webapi.header("Content-Type","text/html; charset=utf-8")