Skip to content

Commit

Permalink
Removed unused code and started updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
saschwarz committed Aug 27, 2014
1 parent 39a63c8 commit 87f4926
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 570 deletions.
30 changes: 26 additions & 4 deletions README.rst
Expand Up @@ -4,11 +4,11 @@ django-gcse

.. image:: https://badge.fury.io/py/django-gcse.png
:target: http://badge.fury.io/py/django-gcse

.. image:: https://travis-ci.org/saschwarz/django-gcse.png?branch=master
:target: https://travis-ci.org/saschwarz/django-gcse

.. image:: https://coveralls.io/repos/saschwarz/django-gcse/badge.png?branch=master
.. image:: https://coveralls.io/repos/saschwarz/django-gcse/badge.png?branch=master
:target: https://coveralls.io/r/saschwarz/django-gcse?branch=master

.. image:: https://pypip.in/d/django-gcse/badge.png
Expand All @@ -31,9 +31,31 @@ Install django-gcse::

Then use it in a project::

import django-gcse
import gcse

Features
--------

* TODO
* Import existing Custom Search Engines and their Annotations via URLs or files via a management command.

* Convert OPML files into Annotations for use in a Custom Search Engine via a management command.

* Share Annotations across multiple Custom Search Engines to ease maintenance.

* Browsable views for all Custom Search Engines, Annotations and Labels. Search the entries for a CSE using Google directly from the CSE view. Browsable views can be disabled.

* All entries can be managed via django admin screens.

* TODO:

* Slugify Label and Annotation classes.

* Admin handle ordering of FacetItems within a CustomSearchEngine.

* Browsing views visible via settings configuration.

* Create demo/tests with Annotations shared across multiple CSEs.

* Define caching attributes on XML views sent to Google.

* Admin access to management commands.
32 changes: 25 additions & 7 deletions docs/usage.rst
@@ -1,17 +1,35 @@
========
=====
Usage
========
=====

To use django-gcse in a project::
To use ``django-gcse`` in a project::

import django-gcse
import gcse

'django-gcse' dynamically generates the files used by Google Custom Search Engines (CSE) to implement a `Linked Custom Search Engine <https://www.google.com/cse/docs/cref.html>`_. Use the Django admin screens to enter the URLs to be searched (Annotations) and their search refinement Labels. Then you configure your Google CSE to retrieve the Annotations from your 'django-gcse' URL.
``django-gcse`` dynamically generates the files used by Google Custom Search Engines (CSE) to implement a `Linked Custom Search Engine <https://www.google.com/cse/docs/cref.html>`_.

'django-gcse' makes it easy to maintain your Annotations.
Custom Search Engines must first be created within the Google administration screen **add link here** and then they are imported into ``django-gcse`` via the ``import_cse`` management command.

Due to the vast number of configuration options available ``django-gcse`` maintains a hybrid representation of the CSE. Fields likely to change are stored in the ``django-gcse`` database and less frequently changed values are stored in the XML supplied by Google. When a search is performed the database and XML data is merged and supplied to Google. Of course caching of that rarely changing view is useful.

You can import an existing CSE along with it's Annotations or create a new one and populate it all from within the 'django-gcse' admin screens.
The Linked Annotation file(s) **add link here** for a CSE are generated by collecting all the Annotations with the background Labels for that CSE and including them in the CSE XML. Each Linked Annotation file is served and is also cached.

There are three ways to add Annotations:

# Directly via the Django admin.

# From an OPML file.

# From an existing Annotation XML file or URL.

Annotations can be shared across multiple CSEs by adding the background Label with the FILTER mode of the CSE to tthe Annotation.

Use the Django admin screens to enter the URLs to be searched (Annotations) and their search refinement Labels. Then you configure your Google CSE to retrieve the Annotations from your ``django-gcse`` URL(s).

``django-gcse`` makes it easy to maintain your Annotations.


You can import an existing CSE along with it`s Annotations or create a new one and populate it all from within the ``django-gcse`` admin screens.

1. First `create a Google Custom Search Engine <https://www.google.com/cse/all>`_ and configure the settings as you desire.

Expand Down
267 changes: 0 additions & 267 deletions gcse/country_field.py

This file was deleted.

29 changes: 0 additions & 29 deletions gcse/feeds.py

This file was deleted.

0 comments on commit 87f4926

Please sign in to comment.