如何使用 Perl 将文档上传到 SharePoint? [英] How can I upload a document to SharePoint with Perl?

查看:71
本文介绍了如何使用 Perl 将文档上传到 SharePoint?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行一些 perforce 操作的 Perl 应用程序,最后我希望它将结果上传到 SharePoint 网站.

I have a Perl app that runs some perforce operations, in the end I would like it to upload the results to SharePoint website.

  • 可以完成将文档添加到 SharePoint 的任务的最简单的 Perl 脚本是什么?

脚本需要在 Solaris 上运行并尽可能少地使用外部库(绝对是纯经典 Perl)在这些 un​​ix 机器上安装任何额外的东西是一件痛苦的事情,必须由远程团队完成.

The script would need to run on Solaris and use as few as possible external libraries as possible (definitely pure classic Perl) getting anything additional installed on these unix boxes is a pain and would have to be done by remote team.

如果可以使用 wget 轻松完成上传文档,那也会很有趣.无论如何,我正在寻找易于理解的 1 个或几个班轮.

If this can uploading document can easily be done with wget, that would be of interest too. Anyways, I am looking for 1 or a couple liner that's easy to understand.

基于评论的更新:

  • Perl Mechanize 听起来是个好主意,但由于某种原因我无法进行身份验证,Error GETing http://sharepoint Unauthorized ....

我有这个:

my $m = WWW::Mechanize->new(); 
$m->credentials($user => $pass); 
$m->get($url);

但由于某种原因,机械化不会对共享点进行身份验证.

But mechanize won't authenticate against sharepoint for some reason.

  • 有人有关于如何通过 perl 从 unix 使用 sharepoint webdav 的链接或示例吗?

我安装并尝试通过dave"webdav 浏览器打开我的典型共享点网站,但我获取 ** 未经授权.** 错误.

I installed and tried to open my typical sharepoint site via "dave" webdav browser, but I get ** Unauthorized. ** error.

  • 如何在 unix 上使用 perl 的 webdav 方法解决它?

推荐答案

刚刚从 perlmonks 论坛上找到了一个在 windows 上的简单方法:

Just found an easy way on windows from perlmonks forum:

http://www.perlmonks.org/?node_id=527182
under Windows, you can access a sharepoint site via a UNC name. The URL:
sharepoint.domain.dom/sites/Roboticus/Test
is accessible via:
\\sharepoint.domain.com\sites\Roboticus\Test

只是作为对自己的回答,现在我必须弄清楚如何从 Perl 编写脚本,以及是否有办法从在 unix 上运行的脚本执行相同的操作.

just adding as answer to myself, now I got to figure out how to script this from Perl and whether there is way to do the same from script running on unix.

这篇关于如何使用 Perl 将文档上传到 SharePoint?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆