Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bt5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Yusei Tahara
bt5
Commits
0ef2c900
Commit
0ef2c900
authored
8 years ago
by
Yusei Tahara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a very simple rss checker.
parents
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
277 additions
and
0 deletions
+277
-0
yusei_simple_rss/ExtensionTemplateItem/portal_components/ERP5Site_getSimpleRSSDataFromWeb.py
...tem/portal_components/ERP5Site_getSimpleRSSDataFromWeb.py
+8
-0
yusei_simple_rss/ExtensionTemplateItem/portal_components/ERP5Site_getSimpleRSSDataFromWeb.xml
...em/portal_components/ERP5Site_getSimpleRSSDataFromWeb.xml
+125
-0
yusei_simple_rss/SkinTemplateItem/portal_skins/yusei_simple_rss.xml
...le_rss/SkinTemplateItem/portal_skins/yusei_simple_rss.xml
+26
-0
yusei_simple_rss/SkinTemplateItem/portal_skins/yusei_simple_rss/ERP5Site_getSimpleRSSCheckResult.py
...kins/yusei_simple_rss/ERP5Site_getSimpleRSSCheckResult.py
+18
-0
yusei_simple_rss/SkinTemplateItem/portal_skins/yusei_simple_rss/ERP5Site_getSimpleRSSCheckResult.xml
...ins/yusei_simple_rss/ERP5Site_getSimpleRSSCheckResult.xml
+62
-0
yusei_simple_rss/SkinTemplateItem/portal_skins/yusei_simple_rss/ERP5Site_getSimpleRSSDataFromWeb.xml
...ins/yusei_simple_rss/ERP5Site_getSimpleRSSDataFromWeb.xml
+28
-0
yusei_simple_rss/bt/template_extension_id_list
yusei_simple_rss/bt/template_extension_id_list
+2
-0
yusei_simple_rss/bt/template_format_version
yusei_simple_rss/bt/template_format_version
+2
-0
yusei_simple_rss/bt/template_skin_id_list
yusei_simple_rss/bt/template_skin_id_list
+2
-0
yusei_simple_rss/bt/title
yusei_simple_rss/bt/title
+2
-0
yusei_simple_rss/bt/version
yusei_simple_rss/bt/version
+2
-0
No files found.
yusei_simple_rss/ExtensionTemplateItem/portal_components/ERP5Site_getSimpleRSSDataFromWeb.py
0 → 100644
View file @
0ef2c900
import
urllib2
def
ERP5Site_getSimpleRSSDataFromWeb
(
url
):
try
:
return
urllib2
.
urlopen
(
url
,
timeout
=
5
).
read
()
except
:
return
''
\ No newline at end of file
This diff is collapsed.
Click to expand it.
yusei_simple_rss/ExtensionTemplateItem/portal_components/ERP5Site_getSimpleRSSDataFromWeb.xml
0 → 100644
View file @
0ef2c900
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Extension Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
ERP5Site_getSimpleRSSDataFromWeb
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_getSimpleRSSDataFromWeb
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Extension Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 6, 2: No exception type(s) specified (bare-except)
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
This diff is collapsed.
Click to expand it.
yusei_simple_rss/SkinTemplateItem/portal_skins/yusei_simple_rss.xml
0 → 100644
View file @
0ef2c900
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Folder"
module=
"OFS.Folder"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
yusei_simple_rss
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
This diff is collapsed.
Click to expand it.
yusei_simple_rss/SkinTemplateItem/portal_skins/yusei_simple_rss/ERP5Site_getSimpleRSSCheckResult.py
0 → 100644
View file @
0ef2c900
import
re
url_list
=
context
.
ERP5Site_getRSSUrlList
()
now
=
DateTime
()
for
url
in
url_list
:
data
=
context
.
ERP5Site_getSimpleRSSDataFromWeb
(
url
)
result
=
re
.
search
(
"<pubDate>(?P<date>[0-9a-zA-Z:+, ]*.)</pubDate>"
,
data
)
date
=
result
.
groupdict
().
get
(
'date'
)
old
=
int
(
now
-
DateTime
(
date
))
if
old
<
30
:
print
old
,
url
[:
60
]
return
printed
This diff is collapsed.
Click to expand it.
yusei_simple_rss/SkinTemplateItem/portal_skins/yusei_simple_rss/ERP5Site_getSimpleRSSCheckResult.xml
0 → 100644
View file @
0ef2c900
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_getSimpleRSSCheckResult
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
This diff is collapsed.
Click to expand it.
yusei_simple_rss/SkinTemplateItem/portal_skins/yusei_simple_rss/ERP5Site_getSimpleRSSDataFromWeb.xml
0 → 100644
View file @
0ef2c900
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ExternalMethod"
module=
"Products.ExternalMethod.ExternalMethod"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_function
</string>
</key>
<value>
<string>
ERP5Site_getSimpleRSSDataFromWeb
</string>
</value>
</item>
<item>
<key>
<string>
_module
</string>
</key>
<value>
<string>
ERP5Site_getSimpleRSSDataFromWeb
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_getSimpleRSSDataFromWeb
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
This diff is collapsed.
Click to expand it.
yusei_simple_rss/bt/template_extension_id_list
0 → 100644
View file @
0ef2c900
ERP5Site_getSimpleRSSDataFromWeb
\ No newline at end of file
This diff is collapsed.
Click to expand it.
yusei_simple_rss/bt/template_format_version
0 → 100644
View file @
0ef2c900
1
\ No newline at end of file
This diff is collapsed.
Click to expand it.
yusei_simple_rss/bt/template_skin_id_list
0 → 100644
View file @
0ef2c900
yusei_simple_rss
\ No newline at end of file
This diff is collapsed.
Click to expand it.
yusei_simple_rss/bt/title
0 → 100644
View file @
0ef2c900
yusei_simple_rss
\ No newline at end of file
This diff is collapsed.
Click to expand it.
yusei_simple_rss/bt/version
0 → 100644
View file @
0ef2c900
1.0
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment