tangled
alpha
login
or
join now
dunkirk.sh
/
soapdump
1
fork
atom
parses paypal soap logs
1
fork
atom
overview
issues
pulls
pipelines
docs: overhaul the user facing text
dunkirk.sh
6 months ago
327e9aae
63b5bff3
verified
This commit was signed with the committer's
known signature
.
dunkirk.sh
SSH Key Fingerprint:
SHA256:DqcG0RXYExE26KiWo3VxJnsxswN1QNfTBvB+bdSpk80=
+72
-70
2 changed files
expand all
collapse all
unified
split
README.md
src
soapdump.cpp
+15
-4
README.md
···
52
52
53
53
### Installation
54
54
55
55
-
Install directly from the flake:
56
56
-
57
55
```bash
58
56
nix profile install github:taciturnaxolotl/soapdump
59
57
```
60
58
59
59
+
or in the flake:
60
60
+
61
61
+
```nix
62
62
+
{
63
63
+
inputs.terminal-wakatime.url = "github:hackclub/terminal-wakatime";
64
64
+
65
65
+
outputs = { self, nixpkgs, terminal-wakatime, ... }: {
66
66
+
# Access the package as:
67
67
+
# terminal-wakatime.packages.${system}.default
68
68
+
};
69
69
+
}
70
70
+
```
71
71
+
61
72
Or run without installing:
62
73
63
74
```bash
···
66
77
67
78
## Output Format
68
79
69
69
-
Tab-separated values with the following fields:
80
80
+
Pipe-separated values with the following fields:
70
81
71
82
```
72
83
TRANS_NUM|AMOUNT|CURRENCY|FIRSTNAME|LASTNAME|STREET|CITY|STATE|ZIP|CCTYPE|CCLAST4|EXPMONTH|EXPYEAR|CVV|TRANSID|STATUS|CORRID|PROC_AMOUNT
···
78
89
79
90
<p align="center">
80
91
<a href="https://github.com/taciturnaxolotl/soapdump/blob/main/LICENSE.md"><img src="https://img.shields.io/static/v1.svg?style=for-the-badge&label=License&message=MIT&logoColor=d9e0ee&colorA=363a4f&colorB=b7bdf8"/></a>
81
81
-
</p>
92
92
+
</p>
+57
-66
src/soapdump.cpp
···
163
163
std::cout << " --generate-zsh-completion Generate Zsh completion script\n";
164
164
std::cout << " --generate-fish-completion Generate Fish completion script\n";
165
165
std::cout << " --man Generate man page\n\n";
166
166
-
std::cout << "OUTPUT FORMAT:\n";
167
167
-
std::cout << " TRANS_NUM|AMOUNT|CURRENCY|FIRSTNAME|LASTNAME|STREET|CITY|STATE|ZIP|CCTYPE|CCLAST4|EXPMONTH|EXPYEAR|CVV|TRANSID|STATUS|CORRID|PROC_AMOUNT\n\n";
168
168
-
std::cout << "FIELD DESCRIPTIONS:\n";
169
169
-
std::cout << " TRANS_NUM - Transaction sequence number\n";
170
170
-
std::cout << " AMOUNT - Order total amount\n";
171
171
-
std::cout << " CURRENCY - Currency code (USD, etc)\n";
172
172
-
std::cout << " FIRSTNAME - Customer first name\n";
173
173
-
std::cout << " LASTNAME - Customer last name\n";
174
174
-
std::cout << " STREET - Street address\n";
175
175
-
std::cout << " CITY - City name\n";
176
176
-
std::cout << " STATE - State/Province code\n";
177
177
-
std::cout << " ZIP - Postal code\n";
178
178
-
std::cout << " CCTYPE - Credit card type (Visa, MasterCard, etc)\n";
179
179
-
std::cout << " CCLAST4 - Last 4 digits of credit card\n";
180
180
-
std::cout << " EXPMONTH - Card expiration month\n";
181
181
-
std::cout << " EXPYEAR - Card expiration year\n";
182
182
-
std::cout << " CVV - CVV code\n";
183
183
-
std::cout << " TRANSID - PayPal transaction ID\n";
184
184
-
std::cout << " STATUS - Transaction status (Success/Failure)\n";
185
185
-
std::cout << " CORRID - Correlation ID\n";
186
186
-
std::cout << " PROC_AMOUNT - Actually processed amount\n\n";
187
187
-
std::cout << "EXAMPLES:\n";
188
188
-
std::cout << " # Get all transactions\n";
189
189
-
std::cout << " " << programName << " payments.log\n\n";
190
190
-
std::cout << " # Get only successful transactions\n";
191
191
-
std::cout << " " << programName << " payments.log | grep Success\n\n";
192
192
-
std::cout << " # Count transactions by state\n";
193
193
-
std::cout << " " << programName << " payments.log | cut -d'|' -f8 | sort | uniq -c | sort -nr\n\n";
194
194
-
std::cout << " # Find largest transaction\n";
195
195
-
std::cout << " " << programName << " payments.log | sort -t'|' -k2 -nr | head -1\n\n";
196
196
-
std::cout << " # Get transactions over $500\n";
197
197
-
std::cout << " " << programName << " payments.log | awk -F'|' '$2 > 500'\n\n";
198
198
-
std::cout << " # Summary stats\n";
199
199
-
std::cout << " " << programName << " -s payments.log\n";
166
166
+
std::cout << "For detailed information, field descriptions, and examples, run:\n";
167
167
+
std::cout << " " << programName << " --man | man -l -\n";
200
168
}
201
169
202
170
void generateBashCompletion() {
···
263
231
}
264
232
265
233
void generateManPage() {
266
266
-
std::cout << R"(.TH SOAPDUMP 1 "September 2025" "soapdump 0.1.0" "User Commands"
234
234
+
std::cout << R"(.TH SOAPDUMP 1 "December 2024" "soapdump 1.0" "User Commands"
267
235
.SH NAME
268
268
-
soapdump \- PayPal SOAP log parser
236
236
+
soapdump \- parse PayPal SOAP transaction logs
269
237
.SH SYNOPSIS
270
238
.B soapdump
271
271
-
[\fIOPTIONS\fR] \fILOGFILE\fR
239
239
+
[\fIOPTIONS\fR] \fIlogfile\fR
272
240
.SH DESCRIPTION
273
241
.B soapdump
274
274
-
is a high-performance PayPal SOAP log parser that extracts transaction data from log files and outputs it in a structured format.
242
242
+
parses PayPal SOAP log files to extract transaction data. It reads log entries containing XML request/response pairs and outputs structured transaction information in pipe-delimited format suitable for further processing with standard Unix tools.
243
243
+
244
244
+
The program matches SOAP requests with their corresponding responses to provide complete transaction records including customer information, payment details, and processing results.
275
245
.SH OPTIONS
276
246
.TP
277
247
.BR \-h ", " \-\-help
278
278
-
Show help message and exit.
248
248
+
Display help information and exit
279
249
.TP
280
250
.BR \-s ", " \-\-summary
281
281
-
Show summary statistics only.
251
251
+
Display summary statistics instead of raw transaction data
282
252
.TP
283
253
.BR \-r ", " \-\-raw
284
284
-
Output raw structured data (default).
254
254
+
Output raw transaction data in pipe-delimited format (default behavior)
285
255
.TP
286
256
.BR \-\-generate-bash-completion
287
287
-
Generate Bash completion script.
257
257
+
Output bash shell completion script
288
258
.TP
289
259
.BR \-\-generate-zsh-completion
290
290
-
Generate Zsh completion script.
260
260
+
Output zsh shell completion script
291
261
.TP
292
262
.BR \-\-generate-fish-completion
293
293
-
Generate Fish completion script.
263
263
+
Output fish shell completion script
294
264
.TP
295
265
.BR \-\-man
296
296
-
Generate this man page.
266
266
+
Output this manual page in troff format
297
267
.SH OUTPUT FORMAT
298
298
-
The output is pipe-separated with the following fields:
299
299
-
.PP
268
268
+
By default, transactions are output one per line with pipe-separated fields:
269
269
+
300
270
TRANS_NUM|AMOUNT|CURRENCY|FIRSTNAME|LASTNAME|STREET|CITY|STATE|ZIP|CCTYPE|CCLAST4|EXPMONTH|EXPYEAR|CVV|TRANSID|STATUS|CORRID|PROC_AMOUNT
271
271
+
272
272
+
Fields may be empty if not present in the source data.
301
273
.SH EXAMPLES
302
302
-
.TP
303
303
-
Get all transactions:
304
304
-
.B soapdump payments.log
305
305
-
.TP
306
306
-
Get only successful transactions:
307
307
-
.B soapdump payments.log | grep Success
308
308
-
.TP
274
274
+
Parse a log file and display all transactions:
275
275
+
.RS
276
276
+
.B soapdump paypal.log
277
277
+
.RE
278
278
+
279
279
+
Show only successful transactions:
280
280
+
.RS
281
281
+
.B soapdump paypal.log | grep '|Success|'
282
282
+
.RE
283
283
+
309
284
Count transactions by state:
310
310
-
.B soapdump payments.log | cut -d'|' -f8 | sort | uniq -c | sort -nr
311
311
-
.TP
312
312
-
Find largest transaction:
313
313
-
.B soapdump payments.log | sort -t'|' -k2 -nr | head -1
314
314
-
.TP
315
315
-
Get transactions over $500:
316
316
-
.B soapdump payments.log | awk -F'|' '$2 > 500'
317
317
-
.TP
318
318
-
Summary stats:
319
319
-
.B soapdump -s payments.log
285
285
+
.RS
286
286
+
.B soapdump paypal.log | cut -d'|' -f8 | sort | uniq -c | sort -rn
287
287
+
.RE
288
288
+
289
289
+
Find the largest transaction amount:
290
290
+
.RS
291
291
+
.B soapdump paypal.log | sort -t'|' -k2 -rn | head -1
292
292
+
.RE
293
293
+
294
294
+
Show transactions over $500:
295
295
+
.RS
296
296
+
.B soapdump paypal.log | awk -F'|' '$2 > 500'
297
297
+
.RE
298
298
+
299
299
+
Display summary statistics:
300
300
+
.RS
301
301
+
.B soapdump --summary paypal.log
302
302
+
.RE
303
303
+
.SH FILES
304
304
+
The input file should contain PayPal SOAP API log entries with request and response XML data.
320
305
.SH AUTHOR
321
321
-
Kieran Klukas <me@dunkirk.sh>
306
306
+
Written by Kieran Klukas.
307
307
+
.SH REPORTING BUGS
308
308
+
Report bugs to <me@dunkirk.sh>
322
309
.SH COPYRIGHT
323
323
-
Copyright \(co 2025 Kieran Klukas. License: MIT.
310
310
+
Copyright \(co 2024 Kieran Klukas.
311
311
+
License MIT: <https://opensource.org/licenses/MIT>
312
312
+
.br
313
313
+
This is free software: you are free to change and redistribute it.
314
314
+
There is NO WARRANTY, to the extent permitted by law.
324
315
)" << std::endl;
325
316
}
326
317