Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loopline premis #158

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5baca3b
tapepremis - adds placeholder tape premis workflow
kieranjol Mar 6, 2017
16df6da
tapepremis/premis extract md5 from manifest
kieranjol Mar 6, 2017
fe6dea4
tapepremis.py - adds workstation interview placeholder and manifest c…
kieranjol Mar 6, 2017
b23bb6c
tapepremis - adds some placeholder capture agents/events
kieranjol Mar 7, 2017
ac27c65
premis_agents - adds dvw-m2000p
kieranjol Mar 7, 2017
9a76550
tapepremis - guesses which capture used based on metadata
kieranjol Mar 7, 2017
9717bce
premis_agents - adds some more tape hardware
kieranjol Mar 7, 2017
00a229b
tapepremis - makes a bit more progress w/ interview
kieranjol Mar 7, 2017
b056658
tapepremis - few more events placeholders
kieranjol Mar 7, 2017
c679f48
tapepremis/premis_agents - more events and agents
kieranjol Mar 8, 2017
88a80cf
tapepremis - hacky method for getting source capture time
kieranjol Mar 8, 2017
6a8c69f
tapepremis/premis_agents - adds a few more agents
kieranjol Mar 10, 2017
02c0d66
tapepremis - adds a very broken but promising representation
kieranjol Mar 10, 2017
cd8c093
tapepremis - pull capture and ffv1 times from mediainfo
kieranjol Mar 11, 2017
348b22d
tapepremis - remove redundant modules and some housekeeping
kieranjol Mar 11, 2017
d702362
tapepremis - tries to be more PEP 8 compliant
kieranjol Mar 11, 2017
fd2d9d1
tapepremis - fixes capture_station interview
kieranjol Mar 11, 2017
0b67148
tapepremis - implements agents/events refactored - needs cleanup
kieranjol Mar 12, 2017
5215d0e
tapepremis - add users to premis/cleanup
kieranjol Mar 12, 2017
c3628f6
tapepremis - adds some more pep 8 improvements
kieranjol Mar 12, 2017
3748919
tapepremis - adds log file datetime extraction
kieranjol Mar 12, 2017
bb91c4c
premis - removes debug prints
kieranjol Mar 12, 2017
b986a6d
tapepremis - adds intellectual entity
kieranjol Mar 16, 2017
5fd2f7c
tapepremis - adds a bunch of placeholders to be updated later in work…
kieranjol Mar 16, 2017
e538380
tapepremis - add deck interview for ingest1
kieranjol Mar 16, 2017
24aa0f0
tapepremis - accepts folder as input
kieranjol Mar 16, 2017
a7b8864
tapepremis - moves create_object() into tapepremis, adds pbCore2 exte…
kieranjol Mar 17, 2017
a601573
premis - revert to master
kieranjol Mar 17, 2017
6865628
premis_agents - adds uvw1200p
kieranjol Mar 17, 2017
a061ea7
tapepremis - moves create_representation into tapepremis/guesses work…
kieranjol Mar 19, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tapepremis - makes a bit more progress w/ interview
  • Loading branch information
kieranjol committed Mar 7, 2017
commit 00a229bf893da81956838f164e0d35614fd9e95c
47 changes: 29 additions & 18 deletions tapepremis.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from premis import create_intellectual_entity


def capture_description(premis, xml_info):
def capture_description(premis, xml_info,capture_station):
'''
Events:
1. capture - glean from v210 mediainfo xml
Expand All @@ -35,9 +35,9 @@ def capture_description(premis, xml_info):
framemd5_uuid = str(uuid.uuid4())
manifest_uuid = str(uuid.uuid4())
ffmpegAgent = make_agent(premis,[transcode_uuid] , 'ee83e19e-cdb1-4d83-91fb-7faf7eff738e')
m200pAgent = make_agent(premis,[transcode_uuid] , '60ae3a85-b595-45e0-8e4a-b95e90a6c422')
m2000pAgent = make_agent(premis,[transcode_uuid] , '60ae3a85-b595-45e0-8e4a-b95e90a6c422')

capture_agents = [ffmpegAgent, m200pAgent]
capture_agents = [ffmpegAgent, m2000pAgent]
make_event(premis, 'creation', 'transcode to ffv1 (figure out wording later)', capture_agents, transcode_uuid,xml_info[4], 'outcome', 'now-placeholder')


Expand All @@ -57,25 +57,33 @@ def get_capture_workstation(mediaxml):
fcp7_check = len(mxml.xpath('//COMAPPLEFINALCUTSTUDIOMEDIAUUID'))
if mediaExpress_check > 0:
print 'this was probably Media Express?'
capture_station = 'es2'
elif fcp7_check > 0:
print 'this was probably FCP7?'
capture_station = 'loopline'
else:
# i can't find any meaningful distinctive metadata that control room writes.
print 'this was probably Control Room?'
capture_station = 'ingest1'
print 'Does this sound ok? Y/N?'
station_confirm = ''
while station_confirm not in ('Y','y','N','n'):
station_confirm = raw_input()
if station_confirm not in ('Y','y','N','n'):
print 'Incorrect input. Please enter Y or N'

sys.exit()
capture_station = ''
if not capture_station == '1' or capture_station == '2' or capture_station == '3':
capture_station = raw_input('\n\n**** Where was tape captured?\nPress 1, 2 or 3\n\n1. es2\n2. loopline\n3. ingest 1\n' )
while capture_station not in ('1','2','3'):
capture_station = raw_input('\n\n**** Where was tape captured?\nPress 1, 2 or 3\n\n1. es2\n2. loopline\n3. ingest 1\n' )
if capture_station == '1':
capture_station = 'telecine'
elif capture_station == '2':
capture_station = 'ca_machine'
elif capture_station == '3':
capture_station = 'ca_machine'
return capture_station
capture_station = ''
if not capture_station == '1' or capture_station == '2' or capture_station == '3':
capture_station = raw_input('\n\n**** Where was tape captured?\nPress 1, 2 or 3\n\n1. es2\n2. loopline\n3. ingest 1\n' )
while capture_station not in ('1','2','3'):
capture_station = raw_input('\n\n**** Where was tape captured?\nPress 1, 2 or 3\n\n1. es2\n2. loopline\n3. ingest 1\n' )
if capture_station == '1':
capture_station = 'es2'
elif capture_station == '2':
capture_station = 'loopline'
elif capture_station == '3':
capture_station = 'ingest1'
return capture_station


def main():
Expand All @@ -87,7 +95,10 @@ def main():
metadata_dir = os.path.join(parent_dir, 'metadata')
ffv1_xml = os.path.join(metadata_dir, os.path.basename(sys.argv[1] + '_mediainfo.xml'))
if os.path.isfile(ffv1_xml):
get_capture_workstation(ffv1_xml)
capture_sation = get_capture_workstation(ffv1_xml)
else:
print('Can\'t find XML of FFv1 file. Exiting!')
sys.exit()
'''
/home/kieranjol/ifigit/ifiscripts/massive/objects sip
/home/kieranjol/ifigit/ifiscripts/massive parent
Expand All @@ -102,7 +113,7 @@ def main():
representation_uuid = str(uuid.uuid4())
# the final argument here is 'loopline' which tells premis.py to not generate a checksum
xml_info = make_premis(source_file, items, premis, premis_namespace, premisxml,representation_uuid,md5)
capture_description(premis, xml_info)
capture_description(premis, xml_info, capture_station)



Expand Down