Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
喜羊羊3508
Dak
提交
92a2117d
D
Dak
项目概览
喜羊羊3508
/
Dak
11 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Dak
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
92a2117d
编写于
9月 08, 2010
作者:
U
Uli Martens
提交者:
Joerg Jaspert
9月 08, 2010
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
move removals.pl magic constants into config file
上级
e172a4e8
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
31 addition
and
11 deletion
+31
-11
tools/removals.pl
tools/removals.pl
+31
-11
未找到文件。
tools/removals.pl
浏览文件 @
92a2117d
...
...
@@ -26,7 +26,27 @@ use XML::RSS;
use
POSIX
qw(strftime)
;
use
CGI
qw/:standard/
;
open
REMOVALS
,
"
</srv/ftp.debian.org/web/removals.txt
";
die
"
usage: $0 <configfile>
\n
"
unless
scalar
@ARGV
;
my
$config
;
my
$cfgfname
=
$ARGV
[
0
];
open
my
$cfgfile
,
"
<
",
$cfgfname
or
die
"
config file
$cfgfname
not found: $!
\n
";
while
(
<
$cfgfile
>
){
chomp
;
s/#.*//
;
next
if
m/^$/
;
my
(
$key
,
$val
)
=
split
"
:
",
$_
,
2
;
warn
"
$0: warning: redefining config key
$key
\n
"
if
defined
$config
->
{
$key
};
$config
->
{
$key
}
=
$val
;
}
close
$cfgfile
;
for
(
qw/input items title link description subject creator publisher rights language/
)
{
die
"
config option '
$_
' missing in
$cfgfname
\n
"
unless
$config
->
{
$_
};
}
open
REMOVALS
,
"
<
",
$config
->
{
input
};
my
@removals
;
...
...
@@ -37,16 +57,16 @@ my @removals;
my
$rss
=
new
XML::
RSS
(
version
=>
'
1.0
');
$rss
->
channel
(
title
=>
"
Removals from Debian
"
,
link
=>
"
http://ftp-master.debian.org/removals.txt
"
,
description
=>
"
List of all the removals from Debian's archives
"
,
title
=>
$config
->
{
title
}
,
link
=>
$config
->
{
link
}
,
description
=>
$config
->
{
description
}
,
dc
=>
{
date
=>
POSIX::
strftime
("
%FT%R+00:00
",
gmtime
()),
subject
=>
"
Removals from Debian
"
,
creator
=>
'
tfheen@debian.org
'
,
publisher
=>
'
joerg@debian.org
'
,
rights
=>
'
Copyright 2005, Tollef Fog Heen
'
,
language
=>
'
en-us
'
,
subject
=>
$config
->
{
subject
}
,
creator
=>
$config
->
{
creator
}
,
publisher
=>
$config
->
{
publisher
}
,
rights
=>
$config
->
{
rights
}
,
language
=>
$config
->
{
language
}
,
},
syn
=>
{
updatePeriod
=>
"
hourly
",
...
...
@@ -55,7 +75,7 @@ $rss->channel(
}
);
my
$num_to_display
=
16
;
my
$num_to_display
=
$config
->
{
items
}
;
for
my
$removal
(
@removals
)
{
my
(
$null
,
$date
,
$ftpmaster
,
$body
,
$reason
);
$removal
=~
s/=========================================================================//g
;
...
...
@@ -70,7 +90,7 @@ for my $removal (@removals ) {
chomp
(
$link
);
$rss
->
add_item
(
title
=>
"
$reason
",
link
=>
"
http://ftp-master.debian.org/removals.txt
?
"
.
$link
,
link
=>
$config
->
{
link
}
.
"
?
"
.
$link
,
description
=>
qq[<pre>$body</pre>]
,
dc
=>
{
creator
=>
"
$ftpmaster
",
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录