Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dcpman
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
dcp
dcpman
Commits
22a43ca2
Commit
22a43ca2
authored
10 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
Added simple search and parsing for CPLs (ID and issue date).
parent
fd22da96
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
debian/changelog
+8
-0
8 additions, 0 deletions
debian/changelog
fabfile.py
+1
-2
1 addition, 2 deletions
fabfile.py
source/dcp.py
+16
-0
16 additions, 0 deletions
source/dcp.py
with
25 additions
and
2 deletions
debian/changelog
+
8
−
0
View file @
22a43ca2
dcpman (0.1.5) UNRELEASED; urgency=medium
* Tagged debian/0.1.4
* modified: debian/changelog modified: fabfile.py
* Now logs exception as well.
-- Adar Nimrod <nimrod@shore.co.il> Sun, 28 Sep 2014 10:03:55 +0300
dcpman (0.1.4) unstable; urgency=medium
dcpman (0.1.4) unstable; urgency=medium
* Tagged debian/0.1.4
* Tagged debian/0.1.4
...
...
This diff is collapsed.
Click to expand it.
fabfile.py
+
1
−
2
View file @
22a43ca2
...
@@ -11,7 +11,6 @@ def publish ():
...
@@ -11,7 +11,6 @@ def publish ():
@task
@task
def
build
():
def
build
():
#local ('''git dch -a''')
local
(
'''
dpkg-buildpackage -us -uc
'''
)
local
(
'''
dpkg-buildpackage -us -uc
'''
)
@task
@task
...
@@ -25,4 +24,4 @@ def clean ():
...
@@ -25,4 +24,4 @@ def clean ():
@task
@task
def
push
():
def
push
():
local
(
'''
git push --all git
web
'''
)
local
(
'''
git push --all git
daemon
'''
)
This diff is collapsed.
Click to expand it.
source/dcp.py
+
16
−
0
View file @
22a43ca2
...
@@ -180,6 +180,21 @@ class DCP:
...
@@ -180,6 +180,21 @@ class DCP:
except
BaseException
as
e
:
except
BaseException
as
e
:
raise
RuntimeError
(
'
Failed to parse packinglist file
'
)
from
e
raise
RuntimeError
(
'
Failed to parse packinglist file
'
)
from
e
def
_find_cpl
(
self
):
'''
Goes through the xml files, finds the CPL and extracts the data from
it.
'''
for
asset
in
[
x
for
x
in
self
.
assets
if
hasattr
(
x
,
'
type
'
)
and
x
.
type
.
find
(
'
xml
'
)
>
-
1
]:
elements
=
(
parse
(
asset
.
fullpath
)).
getElementsByTagName
\
(
'
CompositionPlaylist
'
)
if
len
(
elements
)
>
0
:
try
:
self
.
cpl_id
=
elements
[
0
].
getElementsByTagName
\
(
'
Id
'
)[
0
].
firstChild
.
data
self
.
cpl_date
=
elements
[
0
].
getElementsByTagName
\
(
'
IssueDate
'
)[
0
].
firstChild
.
data
except
:
pass
def
__init__
(
self
,
directory
):
def
__init__
(
self
,
directory
):
'''
Parses the DCP in the directory specified.
'''
'''
Parses the DCP in the directory specified.
'''
self
.
directory
=
directory
self
.
directory
=
directory
...
@@ -191,6 +206,7 @@ class DCP:
...
@@ -191,6 +206,7 @@ class DCP:
(
x
,
'
duration
'
)])
(
x
,
'
duration
'
)])
except
:
except
:
self
.
duration
=
'
Unknown
'
self
.
duration
=
'
Unknown
'
self
.
_find_cpl
()
def
copyAndVerify
(
self
,
destination
):
def
copyAndVerify
(
self
,
destination
):
'''
Copies the DCP to the destination directory and verifies during.
'''
'''
Copies the DCP to the destination directory and verifies during.
'''
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment