Skip to content

Instantly share code, notes, and snippets.

@a-a
Created December 5, 2024 23:53
Show Gist options
  • Save a-a/ee6e7c5ff3ff790b1849588523bae380 to your computer and use it in GitHub Desktop.
Save a-a/ee6e7c5ff3ff790b1849588523bae380 to your computer and use it in GitHub Desktop.
rancid_juulpod.py
batchnumber series strength flavour region copyright podrev code podmodel
KK11SAS1D Juul 2 1.8 Polar Menthol GB 2021 A 455-01929 PSP001
KL18SAS1D Juul 2 1.8 Polar Menthol GB 2021 A 455-01929 PSP001
LJ09SAS2D Juul 2 1.8 Polar Menthol GB 2022 B 455-01929 PSP001
MG14SAS2D Juul 2 1.8 Polar Menthol GB 2023 C 455-01929 PSP001
MH08SAS2D Juul 2 1.8 Polar Menthol GB 2023 C 455-01929 PSP001
MJ11SAS2D Juul 2 1.8 Polar Menthol GB 2023 C 455-01929 PSP001
ML27SAS2D Juul 2 1.8 Polar Menthol GB 2023 C 455-01929 PSP001
MM29SBS2D Juul 2 1.8 Polar Menthol GB 2023 C 455-01929 PSP001
NB23SAS2D Juul 2 1.8 Polar Menthol GB 2023 C 455-01929 PSP001
NC01SAS2D Juul 2 1.8 Polar Menthol GB 2023 C 455-01929 PSP001
NC17SAS2D Juul 2 1.8 Polar Menthol GB 2023 C 455-01929 PSP001
NC25SAS2D Juul 2 1.8 Ruby Menthol GB 2023 B 455-01935 PSP001
ND09SAS2D Juul 2 1.8 Polar Menthol GB 2023 C 455-01929 PSP001
ND18SAS2D Juul 2 1.8 Polar Menthol GB 2023 C 455-01929 PSP001
NE22SBS2D Juul 2 1.8 Ruby Menthol GB 2023 B 455-01935 PSP001
NE30SAS2D Juul 2 1.8 Polar Menthol GB 2023 C 455-01929 PSP001
NG18SAS2D Juul 2 1.8 Polar Menthol GB 2023 C 455-01929 PSP001
NK15SAS2D Juul 2 1.8 Polar Menthol GB 2023 C 455-01929 PSP001
#! /usr/bin/env python3
import argparse, re
# bossman movin mad sellin bare rancid juulpods and claimin theyre fresh, mans chattin pure wass
p=argparse.ArgumentParser( prog='rancid_juulpod', description='decode juul pod', epilog='when life sux feed the ducks')
p.add_argument('batchnumber')
a = p.parse_args()
# A0000AA-0
if re.search("([A-Z])(\d{4})([A-Z]{2})-(\d)", a.batchnumber):
print("bossman lowkey criminal")
exit()
# A0000AA
if re.search("([A-Z])(\d{4})([A-Z]{2})", a.batchnumber):
print("bossman violated you fam")
exit()
# AA00AA00A
if re.search("([E-Z])([A-L])([0-3])([0-9])([A-Z]{2})([0-9]{2})([A-Z])", a.batchnumber): print("juul 1 pod")
# AA00AAA0A
if re.search("([E-Z])([A-L])([0-3])([0-9])([A-Z]{3})([0-9])([A-Z])", a.batchnumber): print("juul 2 pod")
# Y M D[0] D[1] ? ? series ? ?
if re.search( "([G-Z])([A-L])([0-3])([0-9])([A-Z]{2})([0-9,A-Z])([0-9])([A-Z])", a.batchnumber) is None:
print("invalid batch number but yolo we move")
yearcode={'E': '2015', 'F': '2016', 'G': '2017', 'H': '2018', 'I': '2019', 'J': '2020', 'K': '2021', 'L': '2022', 'M': '2023', 'N': '2024', 'O': '2025', 'P': '2026', 'Q': '2027', 'R': '2028', 'S': '2029', 'T': '2030', 'U': '2031', 'V': '2031', 'W': '2033', 'X': '2034', 'Y': '2035', 'Z': '2036'}
monthcode={'A': 'January', 'B': 'February', 'C': 'March', 'D': 'April', 'E': 'May', 'F': 'June', 'G': 'July', 'H': 'August', 'I': 'September', 'J': 'October', 'K': 'November', 'L': 'December'}
podyear=yearcode.get(a.batchnumber[0],'Unknown')
podmonth=monthcode.get(a.batchnumber[1],'Unknown')
podday=str(a.batchnumber[2])+str(a.batchnumber[3])
print("pod manufactured on: " + podmonth + " " + podday + " " + podyear)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment