Index: openacs-4/packages/rss-support/rss-support.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/rss-support.info,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/rss-support/rss-support.info 13 Nov 2001 05:36:48 -0000 1.4 +++ openacs-4/packages/rss-support/rss-support.info 12 Dec 2001 02:58:23 -0000 1.5 @@ -53,7 +53,7 @@ - + Index: openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl 4 Dec 2001 04:57:20 -0000 1.7 +++ openacs-4/packages/rss-support/tcl/rss-generation-service-procs.tcl 12 Dec 2001 02:58:23 -0000 1.8 @@ -63,7 +63,7 @@ set xml [apply rss_gen $args] # Write report. - set report_file [rss_gen_report_file -summary_context_id $summary_context_id -impl_name $impl_name -assert -url] + set report_file [rss_gen_report_file -summary_context_id $summary_context_id -impl_name $impl_name -assert] set fh [open $report_file w] puts $fh $xml @@ -140,11 +140,11 @@ -summary_context_id -impl_name -subscr_id - {-assert:boolean f} + -assert:boolean } { Return a directory path, relative to the pageroot, for the rss subscription with subscr_id or impl_name + summary_context_id - provided. + provided. If the assert flag is set, create the directory. } { if {!([info exists summary_context_id] && \ [info exists impl_name])} { @@ -165,24 +165,24 @@ set report_dir /[ad_parameter -package_id [rss_package_id] RssGenOutputDirectory rss-support rss]/$impl_name/${summary_context_id} if $assert_p { - rss_assert_dir $report_dir + rss_assert_dir [ns_info pageroot]$report_dir } return $report_dir } -ad_proc -private rss_gen_report_file { +ad_proc -public rss_gen_report_file { -summary_context_id -impl_name -subscr_id - {-assert:boolean f} - {-url:boolean t} + -assert:boolean + -url:boolean } { Return a file path for the rss subscription with subscr_id or impl_name + summary_context_id provided. If the -assert flag is set, the parent directory is created if - it doesn't exist (default: false). - If the -url flag is set, return a url (default: true); otherwise + it doesn't exist + If the -url flag is set, return a url; otherwise return a Unix file path. } { if {!([info exists summary_context_id] && \ Index: openacs-4/packages/rss-support/www/delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/delete-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/rss-support/www/delete-2.tcl 12 Dec 2001 02:58:23 -0000 1.1 @@ -0,0 +1,21 @@ +ad_page_contract { + Delete the subscription, and maybe the report. +} { + subscr_id:notnull,naturalnum + return_url:notnull + delete_file_p:optional +} + +ad_require_permission $subscr_id admin + +if [info exists delete_file_p] { + ns_unlink -nocomplain [rss_gen_report_file -subscr_id $subscr_id] +} + +db_exec_plsql delete_subscr { + select rss_gen_subscr__delete ( + :subscr_id + ) +} + +ad_returnredirect $return_url Index: openacs-4/packages/rss-support/www/delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/delete.adp,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/rss-support/www/delete.adp 4 Dec 2001 04:57:20 -0000 1.1 +++ openacs-4/packages/rss-support/www/delete.adp 12 Dec 2001 02:58:23 -0000 1.2 @@ -12,8 +12,7 @@ -Delete subscription
-Delete report +Delete report (@report_url@)

Index: openacs-4/packages/rss-support/www/delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/delete.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/rss-support/www/delete.tcl 4 Dec 2001 04:57:20 -0000 1.1 +++ openacs-4/packages/rss-support/www/delete.tcl 12 Dec 2001 02:58:23 -0000 1.2 @@ -22,6 +22,7 @@ if [file exists [rss_gen_report_file -subscr_id $subscr_id]] { set offer_file 1 + set report_url [rss_gen_report_file -subscr_id $subscr_id -url] } else { set offer_file 0 } \ No newline at end of file Index: openacs-4/packages/rss-support/www/my-subscrs.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/my-subscrs.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/rss-support/www/my-subscrs.adp 12 Dec 2001 02:58:23 -0000 1.1 @@ -0,0 +1,10 @@ + +Your Report Generation Subscriptions + +

Report Generation Subscriptions

+@context_bar@ +
+ +Subscriptions created by you. + + \ No newline at end of file Index: openacs-4/packages/rss-support/www/my-subscrs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/my-subscrs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/rss-support/www/my-subscrs.tcl 12 Dec 2001 02:58:23 -0000 1.1 @@ -0,0 +1,5 @@ +set context_bar [ad_context_bar Subscriptions] + +set enc_url [ad_urlencode [ad_conn url]?[ad_conn query]] + +set user_id [ad_conn user_id] Index: openacs-4/packages/rss-support/www/subscr-ae.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/subscr-ae.adp,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/rss-support/www/subscr-ae.adp 19 Nov 2001 04:02:28 -0000 1.2 +++ openacs-4/packages/rss-support/www/subscr-ae.adp 12 Dec 2001 02:58:23 -0000 1.3 @@ -1,7 +1,7 @@ Add or Edit a Subcription -

@action@ a Subscription

+

@pretty_action@ a Subscription

@context_bar@
@@ -19,7 +19,7 @@ hours days - + @formvars@ Index: openacs-4/packages/rss-support/www/subscr-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/subscr-ae.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/rss-support/www/subscr-ae.tcl 4 Dec 2001 04:57:20 -0000 1.4 +++ openacs-4/packages/rss-support/www/subscr-ae.tcl 12 Dec 2001 02:58:23 -0000 1.5 @@ -40,7 +40,8 @@ } if [info exists subscr_id] { - set action Edit + set action edit + set pretty_action Edit ad_require_permission $subscr_id admin db_1row subscr_info { select impl_id, @@ -52,7 +53,8 @@ where subscr_id = :subscr_id } } else { - set action Add + set action add + set pretty_action Add ad_require_permission $summary_context_id admin set subscr_id [db_nextval acs_object_id_seq] set timeout 3600 @@ -69,7 +71,7 @@ assistance." } -if { [string equal $channel_title ""] || [string equal $channel_link ""] } { +if { ![info exists channel_title] || [string equal $channel_title ""] || [string equal $channel_link ""] } { if !$meta { if [string equal $channel_title ""] { set channel_title "Summary Context $summary_context_id" Index: openacs-4/packages/rss-support/www/subscrs-include.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/subscrs-include.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/rss-support/www/subscrs-include.adp 12 Dec 2001 02:58:23 -0000 1.1 @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + +
NameTimeoutLast BuiltLast Time To BuildCreated ByActions
@subscrs.channel_title@@subscrs.channel_title@@subscrs.timeout@s@subscrs.lastbuild@@subscrs.last_ttb@ seconds@subscrs.creator@edit | + run | + delete
Index: openacs-4/packages/rss-support/www/subscrs-include.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/subscrs-include.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/rss-support/www/subscrs-include.tcl 12 Dec 2001 02:58:23 -0000 1.1 @@ -0,0 +1,23 @@ +if [info exists user_id] { + set maybe_restrict_to_user "and creation_user = :user_id" +} else { + set maybe_restrict_to_user "" +} + +db_multirow subscrs get_subscrs " + select s.subscr_id, + s.timeout, + person__name(o.creation_user) as creator, + coalesce(to_char(s.lastbuild,'YYYY-MM-DD HH24:MI:SS'),'never built') as lastbuild, + s.last_ttb, + s.channel_title, + s.channel_link + from rss_gen_subscrs s, + acs_objects o + where o.object_id = s.subscr_id $maybe_restrict_to_user + order by s.last_ttb desc +" { + if [string equal $channel_title ""] { + set channel_title "Subscription #$subscr_id" + } +} Index: openacs-4/packages/rss-support/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/admin/index.adp,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/rss-support/www/admin/index.adp 19 Nov 2001 04:02:28 -0000 1.1 +++ openacs-4/packages/rss-support/www/admin/index.adp 12 Dec 2001 02:58:23 -0000 1.2 @@ -6,7 +6,7 @@







\ No newline at end of file Index: openacs-4/packages/rss-support/www/admin/subscrs.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/admin/subscrs.adp,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/rss-support/www/admin/subscrs.adp 4 Dec 2001 04:57:20 -0000 1.3 +++ openacs-4/packages/rss-support/www/admin/subscrs.adp 12 Dec 2001 02:58:23 -0000 1.4 @@ -5,24 +5,4 @@ @context_bar@
- - - - - - - - - - - - - - - - - - -
NameTimeoutLast BuiltLast Time To BuildCreated ByActions
@subscrs.channel_title@@subscrs.channel_title@@subscrs.timeout@s@subscrs.lastbuild@@subscrs.last_ttb@ seconds@subscrs.creator@edit | - run | - delete
+ \ No newline at end of file Index: openacs-4/packages/rss-support/www/admin/subscrs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/admin/subscrs.tcl,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/rss-support/www/admin/subscrs.tcl 4 Dec 2001 04:57:20 -0000 1.3 +++ openacs-4/packages/rss-support/www/admin/subscrs.tcl 12 Dec 2001 02:58:23 -0000 1.4 @@ -1,21 +1,3 @@ -db_multirow subscrs get_subscrs { - select s.subscr_id, - s.timeout, - person__name(o.creation_user) as creator, - coalesce(to_char(s.lastbuild,'YYYY-MM-DD HH24:MI:SS'),'never built') as lastbuild, - s.last_ttb, - s.channel_title, - s.channel_link - from rss_gen_subscrs s, - acs_objects o - where o.object_id = s.subscr_id - order by s.last_ttb desc -} { - if [string equal $channel_title ""] { - set channel_title "Subscription #$subscr_id" - } -} - set context_bar [ad_context_bar Subscriptions] set enc_url [ad_urlencode [ad_conn url]?[ad_conn query]] \ No newline at end of file Index: openacs-4/packages/rss-support/www/doc/bboard.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/doc/bboard.html,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/rss-support/www/doc/bboard.html 13 Nov 2001 03:18:20 -0000 1.2 +++ openacs-4/packages/rss-support/www/doc/bboard.html 12 Dec 2001 02:58:23 -0000 1.3 @@ -25,23 +25,19 @@
  • Define the implementation procs. This example implements the contracted procs. -
  • Create a subscription for each context to be summarized. -Until admin pages are available, do this by hand as follows: +
  • Create a subscription for each forum to be summarized. +This can be accomplished by querying for the implentation's +impl_id as follows +
    -select rss_gen_subscr__new (
    -       null,				-- subscr_id
    -       2752,				-- impl_id
    -       2746,				-- summary_context_id (forum_id)
    -       0,				-- timeout
    -       null,				-- lastbuild
    -       'rss_gen_subscr',		-- object_type
    -       now(),				-- creation_date
    -       null,				-- creation_user
    -       null,				-- creation_ip
    -       null				-- context_id
    -);
    +select acs_sc_impl__get_id('RssGenerationSubscriber','bboard_forum');
     
    +and navigating to +/rss/subscr-ae?impl_id=$impl_id&summary_context_id=$forum_id (note +that subscr-ae doesn't accept impl_name as a URL parameter +for security reasons). +
  • The scheduled proc rss_gen_service will create a binding for the implementation and generate summaries for each subscription if the conditions for summary generation are met (i.e. if Index: openacs-4/packages/rss-support/www/doc/design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/doc/design.html,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/rss-support/www/doc/design.html 19 Nov 2001 04:02:28 -0000 1.2 +++ openacs-4/packages/rss-support/www/doc/design.html 12 Dec 2001 02:58:23 -0000 1.3 @@ -126,13 +126,6 @@ reasonably small, as we will have to parse this list-of-lists to generate a summary. -

    2. Feed Parsing

    - -(aeg's vague ideas: needs can vary. I can imagine slurping the content into -the db or converting to includable ADPs using XSLT. Service contract -operations are used to generate mappings to RDBMS tables or stylesheets. - -
    aegrumet@alum.mit.edu, Index: openacs-4/packages/rss-support/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/doc/index.html,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/rss-support/www/doc/index.html 13 Nov 2001 05:35:59 -0000 1.7 +++ openacs-4/packages/rss-support/www/doc/index.html 12 Dec 2001 02:58:23 -0000 1.8 @@ -15,7 +15,6 @@

  • To-do's
      -
    1. Admin screens for subscription management (** add/edit functional **)
    2. Exception handling
    3. Testing
    4. Port to Oracle