https://github.com/chicunic/pdf-date-fixer
https://github.com/chicunic/pdf-date-fixer
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/chicunic/pdf-date-fixer
- Owner: chicunic
- License: mit
- Created: 2025-02-27T01:48:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-27T07:02:54.000Z (over 1 year ago)
- Last Synced: 2025-02-27T09:42:54.770Z (over 1 year ago)
- Language: Go
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PDF Date Fixer
PDF Date Fixer is a macOS application designed for Apple Silicon devices that extracts text from PDF files using a Swift-based parser and organizes them based on extracted content.
## Project Structure
```
pdf-date-fixer/
├── main.go
├── libs/
│ ├── libPDFParser.a # Compiled static library
│ ├── PDFParser.h # Header file for integration
│ └── PDFParser.swift # Swift source file (optional, for recompilation)
├── pdfs/
│ └── filename.pdf # Sample PDF file
```
## Prerequisites
- macOS (Apple Silicon)
- Go 1.20 or later
- Xcode Command Line Tools
## Compiling the Swift Library
If you need to recompile `libPDFParser.a`, use the following command:
```sh
swiftc -emit-library -static -target arm64-apple-macos12.0 -module-name PDFParser -o libs/libPDFParser.a libs/PDFParser.swift
```
## Building and Running the Project
To run the Go program, use:
```sh
go run main.go pdfs/filename.pdf
```
To build an executable:
```sh
go build -o pdf-date-fixer main.go
```
Then execute:
```sh
./pdf-date-fixer pdfs/filename.pdf
```
## Error Handling
- If the program is not running on an Apple Silicon macOS device, it will terminate with an error.
- Ensure `libPDFParser.a` and `PDFParser.h` are correctly placed in the `libs/` directory before running the program.
## License
MIT License