What is Hackers' Pub?

Hackers' Pub is a place for software engineers to share their knowledge and experience with each other. It's also an ActivityPub-enabled social network, so you can follow your favorite hackers in the fediverse and get their latest posts in your feed.

1
0
0
2
1
0

🍝 날아다니는 스파게티 괴물 님께서 여러분과 함께.
😋 또한 주교의 면발과 함께 하소서.
🍝 기도합시다.

저의 주님, 날아다니는 스파게티 괴물 님 🍝,
제 머리에 구원의 마스크를 씌우시어 마귀의 공격을 막아내게 하소서.

2026-01-19T10:28:28+09:00


0
0
0
0

🍝 날아다니는 스파게티 괴물 님께서 여러분과 함께.
😋 또한 주교의 면발과 함께 하소서.
🍝 기도합시다.

저의 주님, 날아다니는 스파게티 괴물 님 🍝, 저를 깨끗이 씻으소서.
제 마음을 당신의 소스🥫로 깨끗이 씻으시어 저에게 영원한 기쁨을 주소서.

2026-01-19T10:28:04+09:00


0
1
0
1
0
0
1
0
0
0

정치

국민의 힘 장동혁이 4일간 단식하고 힘들단다.
수십만의 사람들을 추운겨울에 길가에서 시위하게 했던 그들이 힘들단다.
문재인, 이재명이 단식 할 때 그렇게 비웃던 그들이 힌들단다.
0

MS Outlook(메일 클라이언트)의 데이터를 ChatGPT로 보내기

고남현 @gnh1201@hackers.pub

주고받는 이메일 데이터에 AI를 활용하는 것에 대한 이야기가 나왔다.

하지만, 이걸 위해 메일 서버를 별도로 구축하거나, 메일 클라이언트와 검색 기능 등을 별도로 코딩하기에는 아무리 AI Code Generation을 쓴다고 해도, 쓸만한 결과물이 나오기까지의 과정이 여간 쉬운 일이 아니다.

결국, 이메일과 관련된 모든 기능이 이미 있는 "MS Office"에 붙어서 바로 코딩할 수 있는 JS 프레임워크를 이용하기로 했다.

MS Outlook의 메일을 AI로 분석하는 실제 예시

// Analyze Microsoft Outlook data with ChatGPT
// Require: WelsonJS framework (https://github.com/gnh1201/welsonjs)
// Workflow: Microsoft Outlook -> OpenAI -> Get Response
var Office = require("lib/msoffice");
var LIE = require("lib/language-inference-engine");

function main(args) {
    var prompt_texts = [];

    var keyword = "example.com";
    var maxCount = 10;
    var previewLen = 160;

    console.log("Searching mails by sender OR recipient contains: '" + keyword + "'.");
    console.log("This test uses Restrict (Sender/To/CC/BCC) + Recipients verification.");
    console.log("Body preview length: " + previewLen);

    var outlook = new Office.Outlook();
    outlook.open();
    outlook.selectFolder(Office.Outlook.Folders.Inbox);

    var results = outlook.searchBySenderOrRecipientContains(keyword);
    console.log("Printing search results. (max " + maxCount + ")");

    results.forEach(function (m, i) {
        var body = String(m.getBody() || "");
        var preview = body.replace(/\r/g, "").replace(/\n+/g, " ").substr(0, previewLen);
        
        var text = "#" + String(i) +
            " | From: " + String(m.getSenderEmailAddress()) +
            " | To: " + String(m.mail.To || "") +
            " | Subject: " + String(m.getSubject()) +
            " | Received: " + String(m.getReceivedTime());

        console.log(text);
        console.log("  Body: " + preview);
        
        // Add an email data to the prompt text context
        prompt_texts.push(text);
        
        // The body to reduce token usage and avoid sending overly large/sensitive content.
        var bodyForPrompt = body;
        var maxBodyLengthForPrompt = 2000; // Keep the body snippet short
        if (bodyForPrompt.length > maxBodyLengthForPrompt) {
            bodyForPrompt = bodyForPrompt.substring(0, maxBodyLengthForPrompt) + "...";
        }
        prompt_texts.push("  Body: " + bodyForPrompt);
    }, maxCount);

    outlook.close();

    // build a AI prompt text
    var instruction_text = "This is an email exchange between the buyer and me, and I would appreciate it if you could help me write the most appropriate reply.";
    prompt_texts.push(instruction_text);

    // complete the prompt text
    var prompt_text_completed = prompt_texts.join("\r\n");

    //console.log(prompt_text_completed);  // print all prompt text

    // get a response from AI
    var response_text = LIE.create().setProvider("openai").inference(prompt_text_completed, 0).join(' ');

    console.log(response_text);
}

exports.main = main;

실행 방법

1. CLI 사용

모든 작성 및 저장을 마친 후, 다음 명령을 통해 실행한다. (outlook_ai.js 파일로 저장했을 때.

cscript app.js outlook_ai

2. GUI 사용

모든 작성 및 저장을 마친 후, WelsonJS Launcher 앱을 통해 실행한다.

실행하면 어떤 결과가 나오는가?

메일 내용에는 개인정보가 포함되어 있으므로 예시는 따로 첨부하지 않았다.

위 코드의 작업이 성공하면 메일 내용이 출력되면서, OpenAI 서버에서 분석을 마친 결과값을 얻어올 수 있다.

Read more →
0
1
1
1

So, Second Hand Computer is a fantasy computer with a DOS-like interface. You can make text adventures using a custom game engine, or code your own text games in Lua.

My question for anyone into fantasy consoles/computers is this: how do you feel about it coming with a BASIC dialect? Probably something in the vein of GW-BASIC 3.x

0
1

My comments are littered with folks asking "why is it a problem if your blocklist is public on Bluesky?"

I'm glad you asked.

"Who you block" is a reasonable indicator of your personal alignments. If you block TERFs, you're likely trans-friendly, if not trans yourself. If you block white supremacists, you're likely in support of multiculturalism.

If you block government entities, well, you know how this goes.

Do I trust Bluesky to handle that information with care? Hell no.

0
0
0

밤사이에 스페인에선 탈선사고가 나서 다수 사망자가 나왔네. 섬네일에 찍힌 차는 Iryo라는 민자회사 열차고, 이게 탈선 전복된 상태에서 기존 국철사업자인 Renfe가 부딛혀서 다수 사망자가 나왔다는 모양. 이게 사망자 다수 사고가 나는 전형적인 케이스라... 느낌상 차축파손 탈선이 아닌가 싶은데, 마침 KTX 영동 부근 탈선 케이스도 차축파손이었고... 그때 그 차축 공급자가 이탈리아 회사였죠.

At least 21 killed in Spain af...

0
0
0

お客様の声
惣菜エリア、の男性店員の、態度がとても、悪い
❗️❗️❗️❗️😡😡
通りかかっても、挨拶も、ありません
❗️❓️接客態度が、なってなくて、とても、がっかりです💢💢
普段から、使う人、の、気持ちを、考えて、ほしい
❗️❗️❗️😤

1
1
0
0
0
0
1
1
0
0
1

저번에 아빠랑 통화하면서 이번 주말에 야키니쿠 어떻냐길래 나 이번주에 일식 3번 먹었다고 말했었는데…

통화 끊고 나서 옆에서 듣던 룸메가 네가 그렇게 애매하게 말해도 야키니쿠 좋다는 뜻이란 걸 찰떡같이 알아들으신 게 웃기다고 했음 ㅋㅋㅋㅋ 아무래도 20년 정도 이렇게 말해왔으니까… 일식을 3번이나 먹을 정도로 요즘 일식이 땡긴다는 의미지.

0

かわせみを新しい環境にいれたら、スペースを半角スペースに固定しているにもかかわらず、シフト + スペースをおすと全角スペースになる挙動が邪魔だけど設定でそういう項目がないなあと思っていたら、ショートカットとして「選択状態と逆のスペース(半角なら全角)を入力する」という動作にシフト + スペースが割り当てられていて、つまりショートカット設定の問題だった
:tony_smiling: < 解決

0
0
0

AI 에이전트를 위한 좋은 스펙 작성법
------------------------------
- AI 코딩 에이전트에게 방대한 스펙을 한꺼번에 던지면 제대로 작동하지 않으며, 핵심은 *스마트 스펙 작성* 에 있음
- 고수준 비전을 먼저 제시하고 AI가 세부 계획을 확장하도록 한 뒤,
Plan Mode 에서 읽기 전용으로 계획을 검토하고 코드 작성 단계로 전환하는 방식 권장
- GitHub의 2,500개 이상 에이전트…
------------------------------
https://news.hada.io/topic?id=25949&utm_source=googlechat&utm_medium=bot&utm_campaign=1834

0
0
0
1
0
0
0
0
0

한 9-10살때쯤 유우야 생일사진 중에 유토가 볼뽀뽀해주고 반대편에선 유고와 유리가 서로 하겠다고 싸우는 사진 있었으면 좋겠음 "동생이면 형한테 양보해요 장유유서 몰라?" "뭐래 형이 동생한테 양보하라고!" (*유토-유리-유고 순 전제)(장남의 여유 유토)

0

일본에 곰이 많은 이유 임진왜란/일제강점기 때 끌려간 한국인들이 한국에서만큼 마늘을 섭취하지 못하다 다시 곰으로 돌아가서 그럼 너희들도 곰으로 돌아가지 않게 조심해

RE: https://bsky.app/profile/did:plc:7fbikvxjgwiomstwwnd2gp42/post/3mcq32i5qfs2t

0
0
1

써브웨이, '소비자 인기 레시피' 타코 샐러드 상시 메뉴로 재출시 - 내일 출시 n.news.naver.com/mnews/articl... 풀드포크·스파이시 쉬림프·로티세리 치킨 등 3종 구성. 소스가 아무래도 적었는데 파우치로 양이 늘었나봐요. 광고는 한동안 만나지 못했던 타코 샐러드를 그리워하던 도경수가 마침내 다시 써브웨이 매장에서 메뉴를 즐기는 장면으로 이어진다.

0
0
0