Skip to content

Instantly share code, notes, and snippets.

View robotman321's full-sized avatar

Brad Riemann robotman321

View GitHub Profile
@robotman321
robotman321 / gist:909255cbdc36fa62b730a953807f7397
Created October 18, 2018 16:29
XML output from the api for the attached CDROM of a vm.
Before, saved from the api:
2018-10-18 16:18:00 DEBUG > <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2018-10-18 16:18:00 DEBUG > <cdroms>
2018-10-18 16:18:00 DEBUG > <cdrom href="/ovirt-engine/api/vms/dfd5aac8-c2e9-485a-a7c3-2bb5f0af978e/cdroms/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000">
2018-10-18 16:18:00 DEBUG > <vm href="/ovirt-engine/api/vms/dfd5aac8-c2e9-485a-a7c3-2bb5f0af978e" id="dfd5aac8-c2e9-485a-a7c3-2bb5f0af978e"/>
2018-10-18 16:18:00 DEBUG > <file id="The-Iso-Installer.iso"/>
2018-10-18 16:18:00 DEBUG > </cdrom>
2018-10-18 16:18:00 DEBUG > </cdroms>
After, saved from the web ui:
#!/usr/bin/env python
import re
import os
pattern = re.compile(r'\[(.*)\] (.*) - (\d*) (\d*p) \[anidb-(\d*)\].mp4')
for i,j,y in os.walk('.'):
#i - directory
#y list of files.

Keybase proof

I hereby claim:

  • I am robotman321 on github.
  • I am robotman321 (https://keybase.io/robotman321) on keybase.
  • I have a public key ASCly2wkIFChGu1EN73sDPpc1SDIuB_2aa_GU7cmrnrA3wo

To claim this, I am signing this object: