通过桌面应用程序的博客界面
我不确定如何标题这个问题...
基本上,我下载了一些“桌面博客应用程序”,这是一个允许您发布到博客的桌面应用程序。您可以获得通常的标题/文本形式,并且可以添加图像和内容。
使用这些应用程序时,您可以设置博客设置、URL,然后告诉它您的博客使用什么“博客软件”,然后它会为您的博客使用正确的 API 来获取您的博客、创建一个新博客,编辑旧的等等。
好吧,我是一个(PHP)CMS 的作者,我没有使用任何预制的博客框架,而是编写了我自己的框架,该框架使用我的数据库和我的方式来处理成员、回复、评论等。
好吧,有没有什么方法可以在这些博客软件和我的软件之间建立一座桥梁,以便我可以告诉用户他们可以下载“MarsEdit”(例如),然后将其指向 url X 并将其设置为博客软件 Y然后它就会起作用吗?
我需要的是某种形式的中间层 API,我可以使用它根据开放且良好/有能力的博客界面向用户应用程序发送和接收博客内容。
有什么想法,还是我没有任何意义?
I was unsure as to how to title this question...
Basically, I've downloaded some "Desktop Blog Applications" which is a desktop applications that lets you post to your blog. You get the usual headline/text form and you can add images and stuff.
When using these application, you get to set up your blog settings, your URL, and then tell it what "blog software" your blog uses and then it will use the correct API's for your blog to fetch your blogs, create a new one, edit old ones and so on.
Well, I'm the author of an (PHP) CMS and I'm not utilizing any pre-made blogging framework but have written my own that uses my databases and my ways to handle members, replies, comments and such.
Well, is there ANY way to build a bridge between any of these blog softwares and my software so that I could tell users that they can download "MarsEdit" (for instance) and then point it to url X and set it to blog software Y and then it will just work?
What I need is some form a middle-layer API that I can use to send and receive blog content from and to the users application according to an open and nice/competent blog interface.
Any ideas, or am I not making any sense?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您绝对应该为您的 CMS 实现标准的 XML-RPC API。然后,任何与此 API 兼容的软件都将能够连接您的博客。
我建议实施 MetaWeblog :http://www.xmlrpc.com/metaWeblogApi。所有主要博客软件和网站都支持它。
来自维基百科:
正如其他答案中所述,MetaWeblog 的替代方案是 AtomPub (Atom 发布协议) 。
恕我直言,AtomPub 更复杂且具有更多功能,实现起来也更复杂。此外,我认为 MetaWeblog 比 AtomPub 得到了更广泛的实现,并且具有大量兼容客户端。
编辑:这里有一些实现示例:
You should definitely implement a standard XML-RPC API for your CMS. Then, any software compatible with this API will be able to interface your blog.
I suggest implementing MetaWeblog : http://www.xmlrpc.com/metaWeblogApi. It is supported by all the major blogging softwares and websites.
From Wikipedia :
As said in other answers, the alternative to MetaWeblog is AtomPub (The Atom Publishing Protocol).
IMHO, being more complex and having more features, AtomPub is more complicated to implement. Moreover, I think that MetaWeblog is more widely implemented than AtomPub, and has a crapload of compatible clients.
EDIT: Here a a few implementations examples :
他们可能使用 Atom 发布协议。该规范描述了您需要实现的 API 功能。
They probably use the Atom Publishing Protocol. The spec describes the API features you need to implement.
完美的感觉,但你可能需要支持一个标准,所有这些都有指向更多信息的链接,但基本上我使用过的大多数“主流”CMS(drupal、joomla、postnuke 等)都使用 xml-rpc 和某种形式博主API。假设您精通 PHP,drupal 的代码库通常很容易浏览以获取提示和重用代码。
http://code.google.com/intl/en/apis/blogger/< /a>
http://code.blogger.com/
http://codex.wordpress.org/XML-RPC_Support
http://www.sixapart.com/developers/xmlrpc/blogger_api/
http://www.xmlrpc.com/metaWeblogApi
由于您是在 PHP 中执行此操作,因此这里有一个 drupal 模块,可以对其进行改编或反向工程,以获得有关使用 xml-rpc 的三个“主要”博客 API 的足够信息。
Perfect sense, but you need to possibly support a standard, all of these have links to more information, but basically most "mainstream" CMSs I've worked with(drupal, joomla, postnuke, etc) all use xml-rpc and some form of blogger api. Assuming you're proficient in PHP, drupal's codebase is usually pretty easy to walk through for hints and code to reuse.
http://code.google.com/intl/en/apis/blogger/
http://code.blogger.com/
http://codex.wordpress.org/XML-RPC_Support
http://www.sixapart.com/developers/xmlrpc/blogger_api/
http://www.xmlrpc.com/metaWeblogApi
Since you're doing it in PHP, here's a drupal module that could be adapted or reverse engineered to get enough info on the three "main" blog apis that use xml-rpc.
查看 Movable 类型 API (http://www.sixapart.com/developers/ xmlrpc/movable_type_api/)以及 WordPress 支持的所有 API (http://codex .wordpress.org/XML-RPC_Support)
Have a look at the Movable type API (http://www.sixapart.com/developers/xmlrpc/movable_type_api/) and in general all the APIs supported by WordPress (http://codex.wordpress.org/XML-RPC_Support)
您可以运行 Fiddler 并准确查看桌面应用程序正在执行的操作。
You can run Fiddler and see exactly what the desktop applications are doing.