Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re: Personal Nodelet Maintenance

by valdez (Monsignor)
on Dec 04, 2003 at 17:07 UTC ( [id://312253]=note: print w/replies, xml ) Need Help??


in reply to Re: Personal Nodelet Maintenance
in thread Personal Nodelet Maintenance

In my opinion Scratchpad has some limitations:

  • space is limited and nothing will warn you when you reach the limit of 64Kb;
  • nodes are added using href links, wasting even more space but probably saving some load to the server;
  • it isn't devoted only to bookmarks;
  • it doesn't detect duplicates (Personal Nodelet has the same problem of course);
  • it cannot be accessed by programs if it is marked as 'not public', even if you provide your login and want to access your scratchpad.
Using your brower bookmarks isn't a good solution, because it may be difficult to obtain a 'bookmarkable' address after you voted on a note.
So, I think coreolyn has some reason on his side, but I would ask for something different: a third link to something external and user defined that would receive the id of the node currently showed. This solution would provide a hook to implement your really personal way to set bookmarks.

Ciao, Valerio

update: fixed an error

update2: Coruscate is right, it is possible to access your own scratchpad parsing user info, but the canonical solution remains broken.
In the meanwhile, larsen informed me that there is a patch from belg4mit that would solve the href problem.

update3: clarification for tye: the canonical solution is to use displaytype=xml on a user node. In normal conditions, with scratchpad public, I see the content in the data section; otherwise it is not shown. Using displaytype=raw with node 108949 is not a good solution, because the page would be rendered, altering the original content.

Replies are listed 'Best First'.
Re^3: Personal Nodelet Maintenance (canonical?)
by tye (Sage) on Dec 05, 2003 at 15:40 UTC
    it cannot be accessed by programs if it is marked as 'not public', even if you provide your login and want to access your scratchpad.
    it is possible to access your own scratchpad parsing user info, but the canonical solution remains broken.

    I don't understand this. Perhaps you need to define "the canonical solution" for me because I can't find any solution that cares whether your own scratchpad is public or not (if you provide your login information or cookie).

    I just used a program to access my scratchpad that I had marked as "not public". I did not use "edit user information". I simply pulled down the scratchpad page. It was as easy as:

    perl -S GET "http://perlmonks.org/?node=scratch+pad+viewer;user=tye;di +splaytype=raw;op=login;passwd=yeah,right"
    where "displaytype=raw" is optional, you can replace "node=..." with "node_id=108949", and you can replace "op=login;passwd=..." with a cookie.

    Perhaps you are hoping for "displaytype=xml" to work. It doesn't, even if your scratchpad is public. The solution for that is to split scratchpads out of the 'user' table (which solves several other problems and even reduces DB load).

    What am I missing?

                    - tye

      Let me clarify my previous node, there are at least three ways to read a scratchpad:

      • via node 108949 with displaytype raw, but this will show a rendered scratchpad
      • parsing user's info forms, but you need a parser different from the one you would use for normal nodes (for example XML::Simple)
      • via user's home node with displaytype xml
      The first method will never give the original content of the node; the second is a little tricky compared to the xml solution; the third will not work on your own scratchpad if it is not public.
      I think that the xml displaytype should be corrected to show my scratchpad if I provide the required credentials. Am I wrong?

      Ciao, Valerio

      update: thank you very much tye!!!

        Fixed.

                        - tye
Re^2: Personal Nodelet Maintenance
by Coruscate (Sexton) on Dec 05, 2003 at 06:44 UTC

    it cannot be accessed by programs if it is marked as 'not public', even if you provide your login and want to access your scratchpad.

    Wanna bet? :) (replace 'xxxxxx' in below code with your homenode id)

    use LWP::Simple; use XML::Simple; my $home_id = 'xxxxxx'; my $f = XMLin(get 'http://www.perlmonks.org/index.pl?node_id=' . $home_id . '&displaytype=xml' ); print $f->{data}{field}{scratchpad}{content};

    Update, moments after posting this reply: I am too tired. My eyes read "it cannot be accessed by programs even if it is marked as 'not public'". I still maintain that you can get the scratchpad contents of a non-public scratchpad. Simply parse the textarea from the edit user information page. Also, why do you mention that as a bad side effect of scratchpads? You can't access the personal nodelet in any special outside manner either...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://312253]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-24 01:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found