如何将数据从ZODB导出到文本文件 [英] how to export data from ZODB to text files

查看:98
本文介绍了如何将数据从ZODB导出到文本文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我正在寻找ZODB数据导出到文本文件的帮助。我有文件

Data.fs(文件来自Plone CMS)我必须显示内容

结构,数据如介绍,文章正文等,并保存在

简单文件。但是我不能使用Plone XML导出因为坏了,

Zope Corp.为这个bug设置了低优先级,所以我必须找到其他方式

如何挖掘数据。


你能指点我一些Python代码示例,代码贡献

等等。


感谢您的任何建议,


Lukasz

Hi All,

I looking for help with ZODB data export to text file. I have file
Data.fs (file becomes from Plone CMS) and I have to display content
structure, data like intro, body of article, etc and save it in to
simple file. However I can''t use Plone XML export because is broken,
Zope Corp. set low priority for this bug, so I have to find other way
how to digg in to data.

Could you point me in to some Python code examples, code contributions
and so on.

Thank you for any suggestions,

Lukasz

推荐答案

ls写道:
我在寻找ZODB数据导出到文本文件的帮助。我有文件
Data.fs
[snip]
你能指点我一些Python代码示例,代码贡献
等等。
I looking for help with ZODB data export to text file. I have file
Data.fs
[snip]
Could you point me in to some Python code examples, code contributions
and so on.




您可以下载独立版本。 ZODB代码并在常规

Python下运行,不需要安装或参与Zope,并使用它直接访问您的

Data.fs文件。请参阅 http://www.zope.org/Products/StandaloneZODB


此页面列出了大量文档(靠近底部):
http://www.zope.org/Wikis/ZODB/FrontPage


-Peter



You can download the "standalone" ZODB code and run it under regular
Python without Zope installed or involved, and use that to access your
Data.fs file directly. See http://www.zope.org/Products/StandaloneZODB

This page lists much documentation (near the bottom):
http://www.zope.org/Wikis/ZODB/FrontPage

-Peter


嗨彼得,


感谢您的回复。我已经可以使用代码访问文件

Hi Peter,

Thank you for your reply. I already can access file using code

来自ZODB import FileStorage,DB
存储=
FileStorage.FileStorage(''mydatabase.fs'')db = DB(存储)
connection = db.open()
root = connection.root()
from ZODB import FileStorage, DB
storage = FileStorage.FileStorage(''mydatabase.fs'') db = DB(storage)
connection = db.open()
root = connection.root()



但是这是我的知识结束的地方,因为我不是一个Python

程序员。


我不知道ZODB的结构是什么,我只是在寻找代码,

或一些工具,我可以用来将数据从Data.ts文件导出到

纯文本文件。


我正在寻找从ZODB导出数据的最简单方法,然后将它放到

MySQL之后。 br />

你知道我应该选择什么方式吗?我必须知道Python语言

来完成这项任务吗?


-

Lukasz


But this is the point where my konwledge ends since I`m not a Python
programmer.

I don`t know what is the structure of ZODB, I`m just looking for code,
or some tool, which I can use to export data from Data.ts file to
plain text file.

I`m looking for easiest way to export data from ZODB and put it to
MySQL later.

Do you know what way I should choose? I have to know Python language
to finish this task?

--
Lukasz


2005年6月7日星期二14:48:34 +0000(UTC),
l。******** @ gazeta-dot-pl.no-spam.inva lid(ls)在

comp.lang.python:
On Tue, 7 Jun 2005 14:48:34 +0000 (UTC),
l.********@gazeta-dot-pl.no-spam.invalid (ls) declaimed the following in
comp.lang.python:

我不知道ZODB的结构是什么,我只是在寻找代码,或者一些工具,我可以使用它将数据从Data.ts文件导出到纯文本文件。

我正在寻找从ZODB导出数据并将其放入的最简单方法
MySQL以后。

我没有直接查看ZODB,但据我所知...


ZODB是一个对象存储,就RDBM表而言,它并没有真正的结构

。据我了解,加载数据,来自ZODB

创建各种类的实例;你可能(如果你还没有
/知道/类的性质)将不得不调查每个实例

来查找属性等。


- ===================================== ============= ============<
wl ***** @ ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG<
wu******@dm.net | Bestiaria支持人员<
========================================= ========= ============<
主页:< http://www.dm.net/~wulfraed/> <
溢出页面:< http://wlfraed.home.netcom.com/> <

I don`t know what is the structure of ZODB, I`m just looking for code,
or some tool, which I can use to export data from Data.ts file to
plain text file.

I`m looking for easiest way to export data from ZODB and put it to
MySQL later.
I''ve not looked into ZODB directly, but as I understand it...

ZODB is an object store, so it doesn''t really have a "structure"
in terms of RDBM tables. As I understand it, loading "data" from ZODB
creates instances of various classes; you probably (if you don''t already
/know/ the nature of the classes) will have to look into each instance
to find the attributes, etc.

-- ================================================== ============ <
wl*****@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
wu******@dm.net | Bestiaria Support Staff <
================================================== ============ <
Home Page: <http://www.dm.net/~wulfraed/> <
Overflow Page: <http://wlfraed.home.netcom.com/> <



这篇关于如何将数据从ZODB导出到文本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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