Posts
536
Following
717
Followers
99
Rogue system administrator of GravityWell.xyz - UGH.IM - and other services.

Interests include: Self-Hosting, ๐Ÿดโ€โ˜ ๏ธ Data Hoarding, Hacking, (Retro)Gaming, Music (esp Metal ๐Ÿค˜, Industrial, EDM)

Politics: Anarcho-Syndaclist and AntiCapitalist

Location: Cascadia, PNW

Occupation: Professional Slacker, Unprofessional System Administrator, Freelance Hacker, Mother of Cats.

Punch Nazis

All Cats Are Beautiful ๐Ÿ˜ผ All Cops Are Bastards

โ–‘โ–’โ–“โ–ˆ ๐•˜๏ผฒฮฑแฏ๐•€ั‚๐€ั• โ–ˆโ–“โ–’โ–‘

Attachments such as images are in base64 and have to be extracted, you can use this python script to do that:

import os  
import email  
from email import policy  
import mimetypes  
import sys  


def extract_attachments(folder_path, output_root):  
    output_abs = os.path.abspath(output_root)  
    if not os.path.exists(output_root):  
        os.makedirs(output_root, exist_ok=True)  

    for sd in ["images", "videos", "documents"]:  
        os.makedirs(os.path.join(output_root, sd), exist_ok=True)  

    eml_files = []  
    for root, _, files in os.walk(folder_path):  
        if os.path.abspath(root).startswith(output_abs):  
            continue  
        for file in files:  
            if file.endswith(".eml"):  
                eml_files.append(os.path.join(root, file))  

    total_files = len(eml_files)  
    print(f"Found {total_files} .eml files to process.")  

    total_extracted = 0  
    for i, file_path in enumerate(eml_files, 1):  
        rel_path = os.path.relpath(file_path, folder_path)  
        print(f"[{i}/{total_files}] Processing: {rel_path}", end="\r", flush=True)  

        extracted_from_file = 0  
        try:  
            with open(file_path, "rb") as f:  
                msg = email.message_from_binary_file(f, policy=policy.default)  

                for part in msg.walk():  
                    if part.get_content_maintype() == "multipart":  
                        continue  

                    is_base64 = (  
                        part.get("Content-Transfer-Encoding", "").lower() == "base64"  
                    )  
                    is_media = part.get_content_maintype() in ["image", "video"]  

                    if is_base64 or is_media:  
                        filename = part.get_filename()  
                        if not filename:  
                            ext = (  
                                mimetypes.guess_extension(part.get_content_type())  
                                or ".bin"  
                            )  
                            filename = f"extracted_{hash(file_path)}_{id(part)}{ext}"  

                        maintype = part.get_content_maintype()  
                        target_dir = "documents"  
                        if maintype == "image":  
                            target_dir = "images"  
                        elif maintype == "video":  
                            target_dir = "videos"  

                        dest_path = os.path.join(output_root, target_dir, filename)  

                        base, extension = os.path.splitext(dest_path)  
                        counter = 1  
                        while os.path.exists(dest_path):  
                            dest_path = f"{base}_{counter}{extension}"  
                            counter += 1  

                        try:  
                            payload = part.get_payload(decode=True)  
                            if payload:  
                                with open(dest_path, "wb") as out_f:  
                                    out_f.write(payload)  
                                extracted_from_file += 1  
                                total_extracted += 1  
                        except Exception:  
                            pass  

        except Exception:  
            pass  

        if extracted_from_file > 0:  
            print(  
                f"[{i}/{total_files}] Extracted {extracted_from_file} from: {rel_path}"  
            )  

    print("\n" + "=" * 50)  
    return total_extracted  


if __name__ == "__main__":  
    SOURCE_DIR = "."  
    OUTPUT_DIR = "./extracted_attachments"  

    extracted_count = extract_attachments(SOURCE_DIR, OUTPUT_DIR)  
    print(f"Extraction complete. Total files extracted: {extracted_count}")  
    print(f"Files saved to: {os.path.abspath(OUTPUT_DIR)}")  

0
0
0

โ–‘โ–’โ–“โ–ˆ ๐•˜๏ผฒฮฑแฏ๐•€ั‚๐€ั• โ–ˆโ–“โ–’โ–‘

Iโ€™m so fucking over gatekeepers

0
0
0

โ–‘โ–’โ–“โ–ˆ ๐•˜๏ผฒฮฑแฏ๐•€ั‚๐€ั• โ–ˆโ–“โ–’โ–‘

1
0
2

โ–‘โ–’โ–“โ–ˆ ๐•˜๏ผฒฮฑแฏ๐•€ั‚๐€ั• โ–ˆโ–“โ–’โ–‘

Edited 2 months ago

Well so far so good

2
1
3

โ–‘โ–’โ–“โ–ˆ ๐•˜๏ผฒฮฑแฏ๐•€ั‚๐€ั• โ–ˆโ–“โ–’โ–‘

@aac1122 These corporate LLMs are trained to encourage user interaction so its no surprise you find yourself in agreement often, thats by design. Be careful how much you get into with these things, they can be very detrimental as well.

Always make sure you get feedback from humans to check that you arenโ€™t just being told what the LLM thinks you want to hear.

0
0
0

โ–‘โ–’โ–“โ–ˆ ๐•˜๏ผฒฮฑแฏ๐•€ั‚๐€ั• โ–ˆโ–“โ–’โ–‘

Well itโ€™s that time again, System keeps freezing up every once in a while for not much reason i can decern other then either bad RAM or bad SSD, replaced the SSD and it still froze so now here we areโ€ฆ

1
0
0

โ–‘โ–’โ–“โ–ˆ ๐•˜๏ผฒฮฑแฏ๐•€ั‚๐€ั• โ–ˆโ–“โ–’โ–‘

Other then having to figure out manual booting by commands in grub for the first time, homeserverโ€™s migration to new SSD was great success!

0
0
0

George Takei verified ๐Ÿณ๏ธโ€๐ŸŒˆ๐Ÿ––๐Ÿฝ

The church has no place in how a state should be run. That's why we must separate religion from politics.

7
3
0

โ–‘โ–’โ–“โ–ˆ ๐•˜๏ผฒฮฑแฏ๐•€ั‚๐€ั• โ–ˆโ–“โ–’โ–‘

The cascadia #Meshcore is looking awesome.

0
1
4

เคฎเฅ‡เค‚เคฅเฅ€

Edited 2 months ago

Local folk: check this out (and enable the Audio checkbox ๐Ÿ™‚):

https://cascadiamesh.org/map/

0
2
0

my favourite part about open source is where you canโ€™t contribute unless you subject yourself to using github and other corporate services.

0
2
1

โ–‘โ–’โ–“โ–ˆ ๐•˜๏ผฒฮฑแฏ๐•€ั‚๐€ั• โ–ˆโ–“โ–’โ–‘

I think about 90% of peoples problems with AI would go away if it wasnt being controlled by the absolute worst people for the absolute worst reasons, at the expense of everyone, while stealing everythingโ€ฆ.

LLMs are good tools, but anything these corporations do with it is the product of massive theft and exploitation and thats why so many people have such an averse reaction to it.

Take away the capitalism-demands-infinite-growth motive to LLMs and instead of data centers being build off a massive pyramid scheme of IOUs youโ€™d have open community projects refining LLMs to make them more efficient and less demanding, but thatโ€™s not what drives hardware sales for Nvidia, so its not what the market wants.

1
1
0

โ–‘โ–’โ–“โ–ˆ ๐•˜๏ผฒฮฑแฏ๐•€ั‚๐€ั• โ–ˆโ–“โ–’โ–‘

Do you think Microsoft understands consent?

0% Yes
100% Remind me in 3 days
0
3
0

โ–‘โ–’โ–“โ–ˆ ๐•˜๏ผฒฮฑแฏ๐•€ั‚๐€ั• โ–ˆโ–“โ–’โ–‘

Iโ€™ve added Gitea and a handful of Nostr related services to GravityWell.xYz

0
0
0

fuck off.

imagine if windows required you to wait 24hrs before you could install programs outside of the MS store.

your phone is a computer, and this is an anti-competitive move that has the intentional side effect of incentivizing consumers to install apps from google instead of other markets.

โ€œyou canโ€™t do this!โ€

โ€œbut iโ€™ve always been able to do this!โ€

waits a year

โ€œfine, but now you have to wait 24 hours because because because i said so!โ€

โ€œoh! well in that case, i guess itโ€™s not so bad!โ€

everyone that is happy about this is an easily manipulated buttbrain

2
3
1

โ–‘โ–’โ–“โ–ˆ ๐•˜๏ผฒฮฑแฏ๐•€ั‚๐€ั• โ–ˆโ–“โ–’โ–‘

@YoungBlood
Bro will claim they are so violent and unmanageable they might kill people at an airport but refuse to abolish them and keep giving them funding. What a worthless party full of worthless people.
0
2
1

โ–‘โ–’โ–“โ–ˆ ๐•˜๏ผฒฮฑแฏ๐•€ั‚๐€ั• โ–ˆโ–“โ–’โ–‘

after about 25 years of Midnight Commander I think I might finally be ready to make the switch to something new. Superfile is enough of an improvement that iโ€™m willing to learn new hotkeys to use it.

0
0
0

Stop flirting in my 404 OMG /lh dragn_happy

1
2
0

โ–‘โ–’โ–“โ–ˆ ๐•˜๏ผฒฮฑแฏ๐•€ั‚๐€ั• โ–ˆโ–“โ–’โ–‘

I do think whenever this whole AI Bubble does pop we will end up with some very legit and useful applications for LLMs. They just wont be the sort of uses youโ€™d be able to put directly into production without an amount of human oversight equal or greater to the amount of money youโ€™d save by โ€œeliminatingโ€ lower skilled workers. Like maybe you can hire less people maybe, but the people you do need will be much more expensive.

0
0
0

โ–‘โ–’โ–“โ–ˆ ๐•˜๏ผฒฮฑแฏ๐•€ั‚๐€ั• โ–ˆโ–“โ–’โ–‘

Iโ€™m not at all saying this makes LLMs worth paying for, in fact the only reason I even use Gemini over anything is because unlike similar tools it works for free and more over I was able to buy a google account on the darknet with a year of access to their ProAI for under $10 (none of which goes to google, its a free student account made by someone in someplace like Pakistan or Nigeria).

0
0
0
Show older