passiomatic / coldsweat

Web RSS aggregator and reader compatible with the Fever API
MIT License
145 stars 21 forks source link

Installation issue ..! #61

Closed rajasimon closed 10 years ago

rajasimon commented 10 years ago

Here what i did

Using git i cloned the coldsweat into my workspace folder

Then i changed config.sample to config and then i execute requirement command there i see some errors ..

vijay@vijay-Ideapad-Z570:~/workspace/readtamil$ pip install -r requirements.txt Requirement already satisfied (use --upgrade to upgrade): Feedparser==5.1.3 in /usr/local/lib/python2.7/dist-packages/feedparser-5.1.3-py2.7.egg (from -r requirements.txt (line 1)) Downloading/unpacking Peewee>=2.1.7 (from -r requirements.txt (line 2)) Running setup.py egg_info for package Peewee

Downloading/unpacking Requests>=2.2.0 (from -r requirements.txt (line 3)) Running setup.py egg_info for package Requests

Downloading/unpacking WebOb==1.3.1 (from -r requirements.txt (line 4)) Running setup.py egg_info for package WebOb

no previously-included directories found matching '*.pyc'
no previously-included directories found matching '*.pyo'

Downloading/unpacking Tempita==0.5.1 (from -r requirements.txt (line 5)) Running setup.py egg_info for package Tempita

Installing collected packages: Peewee, Requests, WebOb, Tempita Running setup.py install for Peewee error: could not create '/usr/local/lib/python2.7/dist-packages/playhouse': Permission denied Complete output from command /usr/bin/python -c "import setuptools;file='/home/vijay/workspace/readtamil/build/Peewee/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record /tmp/pip-595Csq-record/install-record.txt: running install

running build

running build_py

running build_scripts

running install_lib

creating /usr/local/lib/python2.7/dist-packages/playhouse

error: could not create '/usr/local/lib/python2.7/dist-packages/playhouse': Permission denied


Command /usr/bin/python -c "import setuptools;file='/home/vijay/workspace/readtamil/build/Peewee/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record /tmp/pip-595Csq-record/install-record.txt failed with error code 1 Storing complete log in /home/vijay/.pip/pip.log

and also i see the error from python sweat.py setup

vijay@vijay-Ideapad-Z570:~/workspace/readtamil$ python sweat.py setup Traceback (most recent call last): File "sweat.py", line 9, in from coldsweat.commands import run File "/home/vijay/workspace/readtamil/coldsweat/init.py", line 17, in from webob.exc import status_map ImportError: No module named webob.exc vijay@vijay-Ideapad-Z570:~/workspace/readtamil$

rajasimon commented 10 years ago

Help me to solve that pls

passiomatic commented 10 years ago

ImportError: No module named webob.exc

Indeed, it looks like you don't have the privileges to install packages into "/usr/local/lib/python2.7/dist-packages/...", so when you try to import the webob.exc module from Python it fails.

If it is a shared hosting machine obviously you cannot install extra packages on the file system, except into you home dir. If it's your machine you should issue a sudo pip install -r requirements.txt so the script will run as superuser with the necessary privileges.

Please copy the entire /home/vijay/.pip/pip.log here.

rajasimon commented 10 years ago

Ya .. that`s right , working fine i completed the setup now its up and running .

And i have the doubt about shall i install coldsweat into openshift ?

and also for my community i just want to print latest 10 feeds ... user without login in .. ! is it possible ?

passiomatic commented 10 years ago

And i have the doubt about shall i install coldsweat into openshift ?

I don't know Openshift and other shared hosting services except Dreamhost (which I don't recommend) so you have to do a bit of research of your own.

and also for my community i just want to print latest 10 feeds ... user without login in .. ! is it possible ?

With the current codebase it isn't possible, since Coldsweat has been developed to be a personal aggregator and reader. However, It is definitely possible to add some custom code to do what you need.

First in frontend.py the FrontendApp class needs a new handler, something like:

@GET(r'^/latest/?$')
def latest_entry_list(self, request):
    '''
    Show latest fetched entries
    '''
    page_title = 'Latest'
    entries = Entry.select(Entry, Feed, Icon).join(Feed).join(Icon).order_by(Entry.last_updated_on.desc()).limit(10) 
    return self.respond_with_template('latest.html', locals())

The @GET decorator will hook the method to the {{application_url}}/latest URL. Then you will need a new template. Create the templates/latest.html as:

{{inherit "site.html"}}

{{def container_block}}
   <section  class="panel">
        <div class="panel-title">
            <h2 class="h3"><i class="fa fa-clock-o"></i>&ensp;Latest</h2>
        </div>
        <div class="panel-content">
            <ul class="view list-view">                      
                {{for e in entries}}        
                    <li data-entry="{{e.id}}" class="entry">
                        <div class="item-inner">
                            <h3 class="h4">
                                <img class="favicon" src="{{e.feed.icon.data}}" width="16" height="16"  alt="*"><a href="{{e.link}}">{{e.title|html}}</a>
                            </h3>
                            <div class="meta dim">
                                <span class="feed">{{e.feed.title|html}}</span>
                            </div>                  
                        </div>
                    </li>
                {{endfor}}
            </ul>
        </div>
    </section>
{{enddef}}

This is pretty crude but it works. It "jumps" when you hover the pointer on the entries cause it expects to load the save/read icons which aren't present since it is a public page. Tweak the CSS and you should be fine.