npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

outlook-parser

v1.2.13

Published

A tool for parsing PST files.

Downloads

1,484

Readme

PST Extractor

  • Sử dụng để đọc hàng loạt file Outlook PST và lấy ra tệp đính kèm. Lưu ý: Chỉ đọc được những file nhỏ hơn 4GB, nếu file lớn hơn 4GB, hãy dùng Microsoft Outlook hoặc công cụ Split Outlook để tách ra thành nhiều file nhỏ.
  • Được tham khảo từ @calvin-commer/pst-parserIJMacD/pst-parser

Môi trường

  1. Tải và cài đặt Node.js tại Node.js Official Website.
  • Sau khi cài đặt xong, chạy cmd để kiểm tra version và biến môi trường node có chưa, đảm bảo là phiên bản mới, hiện tại đang là node v20 LTS:
    node -v
    npm -v
  • Nếu chưa có git thì tải tại Git Offical Website.
  1. Install package global để có thể dùng ở bất cứ đâu (nếu ko được thì chạy với quyền admin)
    npm install -g outlook-parser
    

Chạy package

  1. Tạo thư mục PSTFolder tại vị trí muốn chạy cmd, copy toàn bộ file PST vào thư mục PSTFolder. Toàn bộ output sẽ được lưu vào thư mục PSTOutput.
  2. Tham số:
  • --dir=<đường dẫn đọc file PST> (mặc định là PSTFolder)
  • --rm (cờ để xóa PSTOutput, ErrorLog trước khi chạy, mặc định là false)`
  • --rt (cờ để chạy lại những file PST đã lỗi trước đó trong folder ErrorLog, mặc định là false. Khi cờ này được bật, --dir sẽ đọc mặc định ở PSTFolder, --rm sẽ là false)
  • --ct (cờ để đếm số lượng file theo định dạng trogn folder PSTOutput sau khi chạy để thống kê)
  • --help (cờ để mở hướng dẫn sử dụng)
  1. Mở Command Prompt (CMD) và chạy lệnh:
    outlook-parser
  • Câu lệnh này sẽ đọc file PST ở thư mục PSTFolder, không xóa log cũ ở PSTOutput.

  • Lưu ý: nếu ko install package global mà chỉ install ở dev thì thêm npx vào đầu mỗi câu lệnh:

     npx outlook-parser
  • Nếu chỉ cần test 1 hoặc 2 file .pst (trong trường hợp file bị lỗi), copy chúng vào một thư mục cùng cấp và chạy lệnh:

    outlook-parser --dir=<thư mục vừa tạo>
    
  • Ví dụ, khi cần test file abc.pst, tạo một thư mục tên test và copy file đó vào, sau đó chạy lệnh:

    outlook-parser --dir=test
      
  • Trường hợp muốn đọc pst ở folder test xóa đi log ở PSTOutput:

    outlook-parser --dir=test --rm
  • Trường hợp muốn retry những file đã bị lỗi trước đó ở ErrorLog:

    outlook-parser --rt
  • Khi chạy đủ 3 arguments như câu lệnh dưới đây, 2 argument --dir và --rm sẽ bị vô hiệu hóa và đọc giá trị mặc định để tiến hành retry ở folder ErrorLog:

    outlook-parser --dir=test --rm --rt
  • Khi chạy xong quá trình phân tích file PST và đã có data ở PSTOutput, dùng argument --ct để đếm file theo định dạng, sau khi chạy log sẽ ghi vào folder Reports:

    outlook-parser --ct
    
  1. Trong PSTOutput có:
  • File ghi lại toàn bộ nội dung của tệp PST.
  • Folder MailContents chứa nội dung của toàn bộ email đã gửi và nhận, thư rác, thư nháp,...
  • Folder Attachments chứa toàn bộ tệp đính kèm từ email. Vì một số lý do liên quan đến encode, nên file .word, .pptx mở lên bị lỗi encode cần phải xác nhận OK để bật.
  1. Trường hợp muốn phát triển thêm chức năng, tham khảo file test.js hoặc đọc file JS core trong folder ./src.
  • Logic chỉnh sửa chủ yếu là từ PSTInternal.js.
  • XXBlock bao gồm nhiều tập hợp XBlock, XBlock bao gồm nhiều DataBlock, Datablock chính là class chứa thông tin của Mail, XXBlock thường xuất hiện ở các file lớn.
  • SubnodeIntermediateBlock bao gồm nhiều tập hợp SubnodeLeafBlock, logic #getSubNodeAccessor(bidSub) getSubEntry được chỉnh sửa để bổ sung thêm 1 vòng lặp lớn tìm kiếm internalNid.

image