Deleted unused ./test directory
[feedcatcher.git] / README.rdoc
1 == Welcome to Feedcatcher
2 Feedcatcher is a lightweight RSS server that accepts write requests from anonymous clients. It was developed for the {Sense programming environment}[http://sense.open.ac.uk].
3
4 Feedcatcher was the first version of the RSS server. It has since been reimplemented, more robustly, by the {Open University}[http://www.open.ac.uk] for use in the {My Digital Life module}[http://www3.open.ac.uk/study/undergraduate/course/tu100.htm]. However, this version should still work with Sense. It's not been tested with the very latest versions, but nothing in that part of Sense has changed since it used this implementation of Feedcatcher.
5
6 Feel free to clone and modify this application. Let me know what you do with it!
7
8 == Installation
9 Feedcatcher is written in Rails 4.0.2 and runs on Ruby 2.1.0.
10
11 You'll need to update the create the +database.yml+ and +deploy.rb+ files for your installation. You can use the +database.sample.yml+ and +deploy.sample.rb+ files as templates.
12
13 == Instructions
14 Visiting http://feedcatcher.example.com in a browser will give you an HTML view of the feeds available.
15
16 Visiting http://feedcatcher.example.com/feed-a or http://feedcatcher.example.com/feed-a.html will show you the contents of that feed. The HTML pages also have a little form to allow you to update the contents of feeds.
17
18 Asking the server for RSS content will give you RSS content. That's most easily done with cURL.
19
20 These give you HTML:
21 curl http://feedcatcher.example.com/
22 curl http://feedcatcher.example.com/index
23 curl http://feedcatcher.example.com/index.html
24
25 These all give you RSS:
26 curl -H "Accept: application/rss+xml" http://feedcatcher.example.com/
27 curl -H "Accept: application/rss+xml" http://feedcatcher.example.com/index
28 curl -H "Accept: application/rss+xml" http://feedcatcher.example.com/index.rss
29 curl http://feedcatcher.example.com/index.rss
30
31 These give you a feed:
32 curl -H "Accept: application/rss+xml" http://feedcatcher.example.com/test1
33 curl -H "Accept: application/rss+xml" http://feedcatcher.example.com/test1.rss
34 curl http://feedcatcher.example.com/test1.rss
35
36 These give you the same feed but as HTML:
37 curl http://feedcatcher.example.com/test1
38 curl http://feedcatcher.example.com/test1.html
39
40 This generates a 404 error:
41 curl -H "Accept: application/rss+xml" -D headers.txt \ http://feedcatcher.example.com/test%2099
42 ('test 99' is not a valid feed name)
43 (the -D saves the HTTP response header into the given file, so you can see it)
44
45 This creates (or updates) a feed item:
46 curl -D headers.txt -H "Accept: application/rss+xml" \
47 --data-urlencode "feed_name=test5" \
48 --data-urlencode "title=test 5 item 2" \
49 --data-urlencode "description=updated content"' \
50 -d "commit=Update" \
51 http://feedcatcher.example.com
52
53 This deletes an item:
54 curl -D headers.txt -H "Accept: application/rss+xml" \
55 --data-urlencode "feed_name=test5" \
56 --data-urlencode "title=test 5 item 2" \
57 --data-urlencode 'description=' \
58 -d "commit=Update" \
59 http://feedcatcher.example.com
60
61 ===Notes
62 When you ask for HTML pages, the responses are likely to be redirects to the next page. You shouldn't get HTTP error codes.
63
64 Responses to POSTs made with "Accept: application/rss+xml" headers will often be empty, with the success or failure of the action indicated in the HTTP response code.