This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
Find an mkv file, move all sibling files up one directory. only use once as it will keep moving up forever. | |
``` | |
import sys | |
import os | |
import shutil | |
source = sys.argv[1] | |
for root, dirnames, filenames in os.walk(source): | |
for filename in filenames: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import sys | |
from bs4 import BeautifulSoup | |
brunnhilde_report = sys.argv[1] | |
with open(brunnhilde_report, 'r', encoding='utf8') as fo: | |
bla = fo.read() | |
soup = BeautifulSoup(bla, 'html.parser') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "00000000-0000-0000-0000-000000000000", | |
"appSettings": [], | |
"bagItProfiles": [ | |
{ | |
"id": "9f828a16-96b2-4f00-9a50-45009e6fb8d2", | |
"name": "NLI_test", | |
"description": "Customized version of Empty Profile", | |
"acceptBagItVersion": [ | |
"0.97", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:focal | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
curl \ | |
ca-certificates \ | |
build-essential \ | |
devscripts \ | |
fakeroot \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
''' | |
Tests our ingest process with fake testfiles. | |
''' | |
import sys | |
import os | |
import time | |
import sipcreator | |
import ififuncs | |
import testfiles |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import subprocess | |
import datetime | |
import csv | |
import os | |
def create_csv(csv_file, *args): | |
f = open(csv_file, 'w') | |
try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
''' | |
WORK IN PROGRESS WORKSHOP SCRIPT!!! | |
''' | |
import sys | |
import os | |
import csv | |
import hashlib | |
from datetime import datetime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env/python3 | |
import sys | |
import ififuncs | |
# accept the csv file | |
csv_file = sys.argv[1] | |
#process the csv data into a python-friendly format | |
data = ififuncs.extract_metadata(csv_file) | |
for traffic in data[0]: | |
''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import shutil | |
import ififuncs | |
inputs = sys.argv[1] | |
for dirs in os.listdir(inputs): | |
full_path = os.path.join(inputs, dirs) | |
new_dir, ext = (os.path.splitext(full_path)) | |
if not os.path.isdir(new_dir): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
''' | |
WORK IN PROGRESS WORKSHOP SCRIPT!!! | |
''' | |
import sys | |
import os | |
import csv | |
import hashlib | |
from datetime import datetime |
NewerOlder