-
Notifications
You must be signed in to change notification settings - Fork 3
/
README
118 lines (79 loc) · 3.77 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
NAME
XML::NewsML_G2 - generate NewsML-G2 news items
VERSION
0.3.4
INSTALLATION
To install this module, run the following commands:
perl Build.PL
./Build
./Build test
./Build install
SYNOPSIS
use XML::NewsML_G2;
my $provider = XML::NewsML_G2::Provider->new
(qcode => 'nsa', name => 'News Somewhere Agency');
my $ni = XML::NewsML_G2::News_Item_Text->new
(title => 'My first NewsML-G2 news item',
language => 'en', provider => $provider);
my $writer = XML::NewsML_G2::Writer::News_Item->new(news_item => $ni);
my $dom = $writer->create_dom();
print $dom->serialize(1);
DESCRIPTION
This module tries to implement the creation of XML files conforming to
the NewsML-G2 specification as published by the IPTC. It does not aim
to implement the complete standard, but to cover the most common use
cases in a best-practice manner.
For the full specification of the format, visit
http://www.newsml-g2.org/. For a quick introduction, you might prefer
the Quick Start Guides
<http://www.iptc.org/download?g2quickstartguides>.
GETTING STARTED
To start, you need to create an instance of the item class of your
choice, e.g. XML::NewsML_G2::News_Item_Text for a text story, or
XML::NewsML_G2::News_Item_Picture for an image. Each of these classes
might have some required attributes (e.g. title, language, provider),
which you will have to provide when creating the instance, as well as a
number of optional ones (e.g. note). While for some attributes scalar
values will do, others will require further instances of classes, e.g.
for provider you will need an instance of XML::NewsML_G2::Provider.
Please see each class' documentation for details.
Once you're done setting up your data structure, you have to create a
writer instance in order to retrieve your DOM. For simple news items
like text or picture, XML::NewsML_G2::Writer::News_Item will be the
writer class to use.
CURRENT STATUS
The implementation currently supports text, picture, video, audio,
graphics, as well as multimedia packages, slideshows and events.
Version 2.28 is the latest version of the standard supported by this
software, and should be your first choice. Using versions 2.9, 2.12
2.15 and 2.18 is deprecated, and support for it will beremoved in future
releases.
DEPENDENCIES
Moose, XML::LibXML, DateTime, DateTime::Format::XSD, UUID::Tiny,
Module::Runtime
BUGS AND LIMITATIONS
No bugs have been reported.
Please report any bugs or feature requests at
https://github.com/apa-it/xml-newsml-g2/issues.
Be aware that the API for this module will change with each upcoming
release.
SEE ALSO
XML::NewsML - Simple interface for creating NewsML documents
AUTHORS
Philipp Gortan <[email protected]>
Mario Paumann <[email protected]>
Christian Eder <[email protected]>
Stefan Hrdlicka <[email protected]>
Jozef Kutej <[email protected]>
LICENCE AND COPYRIGHT
Copyright (c) 2013-2019, APA-IT. All rights reserved.
This module is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This module is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this module. If not, see http://www.gnu.org/licenses/.