On 2014-10-01 06:29-0400 Chris Marshall wrote: > You could also do it manually with a shell session or use rsync. > > --Chris > > On Wed, Oct 1, 2014 at 2:01 AM, David MacMahon > <dav...@astro.berkeley.edu> wrote: >> Hi, Alan, >> >> On Sep 30, 2014, at 10:46 PM, Alan W. Irwin wrote: >> >>> POST /rest/p/project_name/mount_point/title - creates or updates the >>> titled page >>> parameter text: page text >>> parameter labels: comma-separated list of page labels >>> >>>> From a one-line comment further on I can infer that >>> for the PLplot wiki, the full URL corresponding to the above is >>> >>> https://sourceforge.net/rest/p/plplot/wiki >> >> I think curl will do what you need. Take a look at: >> >> http://curl.haxx.se/docs/httpscripting.html#File_Upload_POST >> >> To upload a "foo.md" file with wiki title "Foo" and labels >> "whatare","labels" (what are labels?), I think you could do: >> >> curl --form text=@foo.md --form labels="whatare,labels" >> https://sourceforge.new/rest/p/plplot/wiki/Foo >> >> or something like that.
Thanks to both of you for responding. To get the biggest question out of the way first ( :-) ), the wiki edit form at SF allows you to apply arbitrary labels to any wiki page you are updating there. I assume such labels could be used to classify each page with a subject to help users navigate through those pages. For example, you can browse through pages of our wiki by page title or by label. Currently I am not bothering with labels, but since the gui has a form for entering them by hand, the POST method presumably needs a method to do that as well. I have now read and explored a lot more, and indeed it looks like curl or wget is the solution here, but not shell or rsync. The latter two give authorized users write access to our website and our file release area, and also some other areas like my personal website at SF, but I used the temporary shell access that SF supplies to explore for anything more, and they provide no access to the wiki that way (at least at the present time). Note the SF shell access is very limited (probably for reasons of security). For example, it looks like they actually generate access on the fly to just what they think you need with a FUSE filesystem generated on your behalf when you request shell access. So the "df" command, for example, showed all sorts of FUSE partitions having to do with what I mentioned, but nothing to do with the wiki. That limitation is a shame though, since rsync is my preferred method of uploading material to SF. Others I asked off list suggested wget, but its syntax for doing the foo.md part of the above curl command is a lot more complicated. For example, you must write the "text=" part into the file, and you cannot even do that on the fly for some reason (say with a pipe and cat). The text=@foo.md syntax above is much more convenient so I will now take a closer look at curl. The only real area left of concern is the method I use to authenticate the POST by wget or curl. SF login is by form, and that complicates matters tremendously as you can see from <http://wget.addictivecode.org/FrequentlyAskedQuestions#How_do_I_use_wget_to_download_pages_or_files_that_require_login.2Fpassword.3F> That link mentions the possibility of 4 different quantities (username and password, but also two others) that typically must be specified, but when I look at the text of the SF login page, with ctrl-U, it looks like there are 6 quantities (6 <input> tags) to specify. However, under certain circumstances (no "session" cookies where cookie information is kept in browser memory rather than in a file) you can take over an already existing login done by GUI by using its cookie file. So I will try that simpler method first. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel