r/canadaguns Spectre Ballistics International (Verified) Jun 01 '26

Misc New FRT Tool

Ok, so this is off topic from what I usually do... But over the weekend I decided to make a tool to parse the 108,000 page PDF of the FRT the RCMP publishes a couple times per month. It was pissing rain and windy, so this was more fun than shooting.

Today I'm launching https://gunlink.ca/ The site will let you search the FRT, see classification, cross references, and other info. It will also let you download the pdf for a specific firearm. There's still some features I want to add, but for now it's mostly working.

For the fellow nerds, here's my source code for parsing the PDF: https://github.com/alkalifeldspar/Frt-Parse

It takes an hour and a bit to process the PDF into a MySql DB.

Disclaimer: This is 100% a personal project and not owned or operated by SBI. The site is an unofficial reference only. Data may be incomplete, incorrect, or out of date. Do not rely on this information as a legal or authoritative source — consult the official RCMP Firearms Reference Table for authoritative information.

166 Upvotes

37 comments sorted by

32

u/Claus-Buchi Jun 01 '26

Very very cool project, thank you!

Unrelated: why do some firearms(like the “Simonov Type 56 SKS”) appear more than once?

39

u/SpectreBallistics Spectre Ballistics International (Verified) Jun 01 '26 edited Jun 01 '26

Probably because they're different factories or something. They have different FRNs.

Also, there are probably errors in the FRT.

24

u/Remarkable_Vanilla34 Jun 01 '26

If you ask me theres at least 2500 errors lol

3

u/Acceptable_Visit_115 Jun 01 '26

Different manufacturers have different entries

2

u/BrotherLefthand Jun 02 '26

The FRT features rifles that have been converted to R from NR. You'll find SKS with custom short barrels on the list.

21

u/rastamasta45 Jun 01 '26

Love it! Thanks for making this!!

Also funny to see a G43 is NR and a SVT40 is prohibited….make it make sense 😭

11

u/CallousDisregard13 Jun 01 '26

Germany good, Russia bad? Lol

6

u/rastamasta45 Jun 01 '26

Is this another Anthony Rota moment? They weren’t so good during this time period 👀

9

u/Few_Lynx2224 Jun 01 '26

Is this an improvement on armalytics?

19

u/SpectreBallistics Spectre Ballistics International (Verified) Jun 01 '26

Improvement is subjective. They both work in a similar way. Really I wanted this tool for myself so I can quickly look stuff up. Searching the PDF is pointless, and the business portal also sucks.

4

u/Acceptable_Visit_115 Jun 01 '26

The PDF updates monthly so you can parse and read it as doon as a new one drops. Armalytics is ran by some guy and sometimes the update can be slow.

8

u/IcyManufacturer7480 Jun 01 '26

Ah I see you’re a python man. A man of contemporary culture and class.

9

u/SpectreBallistics Spectre Ballistics International (Verified) Jun 01 '26

I hate tab delimited languages but in this case it was easier than using node or c# to do it. Also I have way too much experience with Python manipulating large datasets.

6

u/KorporalKarnage Jun 01 '26

If you can manage to scrape for updates as soon as they are made this would be great. We can always use more tools!

13

u/SpectreBallistics Spectre Ballistics International (Verified) Jun 01 '26

I scrape the PDF published by the CFP. The latest one is from May 21st. The business portal has more up to data but isn't in a scrapable format. Updating this tool when the CFP publishes a new PDF is as easy as running a single script and waiting an hour or so.

5

u/eldaniay Jun 01 '26

epic. I am currently working on a better method of finding ammunition sales, kinda like maplegun but more parameters.

1

u/BrotherLefthand Jun 02 '26

We need accessory sales too.

0

u/eldaniay Jun 02 '26

not as much as you need ammo

1

u/_Armpit AlmostProhibited.ca Jun 02 '26

Like ammoscout then?

1

u/eldaniay Jun 02 '26

something like that

4

u/Batsinvic888 Bats888 on YouTube Jun 01 '26

I really like the design, and it's really nice to have an actually shareable link for FRT entries.

It would be nice to have a set of search filters. That’s the part of Armalytics that makes it easy to navigate. Can't search for something if you don't know it exists.

6

u/SpectreBallistics Spectre Ballistics International (Verified) Jun 01 '26

Filters will be added shortly. Just finishing them off now.

3

u/Dill_Pickle_Tears Jun 01 '26 edited Jun 01 '26

Heck yeah man. I’ve been looking for something like this!

ETA: If you could add a “Action” option to your sort by function it’d be perfect

2

u/SpectreBallistics Spectre Ballistics International (Verified) Jun 02 '26

Filters are coming asap.

2

u/Upstairs-Zebra8115 Jun 01 '26

This is really cool. So much easier to read.

2

u/coiine Jun 01 '26

Awesome. And the third reminder in a week I have in mind buying SBI.

2

u/TescoValueSoup Jun 03 '26 edited Jun 03 '26

Nice little tool, parsed the latest FRT in 2h20m on an Macbook Pro M1 Max.
If you took it out of Python you could have a multithreaded process to cut it down considerably?

Did you evaluate PDFPlumber compared to PyMuPDF? pdfplumber themself says PyMuPDF is considerably faster

2

u/SpectreBallistics Spectre Ballistics International (Verified) Jun 03 '26 edited Jun 03 '26

When it extracts the data into JSON it's already multi-threaded, but will use a shit load of ram. The default is 4 threads. Ideal is let it use all of your cores if you have enough ram.

There's also some multi-threading when it splits the pdf into chunks. One thread scans for the start and end of each FRT and dumps the page numbers into a queue. Other threads then split and write the chunks.

I could do some more optimization in this area and maybe get some better performance. The scanning on a single thread is an area where some performance gains would be nice.

Inserting into the db is still single threaded. This can be multi threaded and inserting the pdfs would probably benefit, but I suspect disk IO might limit it pretty quick.

I run this on an i5-12600k with 96gb or ram and it takes about 1.5 hrs start to finish.

My M5 MacBook Air takes a bit longer.

Edit: I will look into PyMuPDF

2

u/TescoValueSoup Jun 03 '26

I couldn't understand the gap in our times so went back to try again.
I must have not included --workers the first time.

With workers set to auto the Macbook went down to 29 minutes (9 workers, M1 Max)
Tried it on my Windows machine and got it parsed in 14 minutes (31 workers, R9 9950X3D w/ 64GB)

Looks like I'll tinker with this project on Windows instead, thanks again for sharing.

1

u/SpectreBallistics Spectre Ballistics International (Verified) Jun 03 '26

That 9950X3D is a beast.

My main PC is currently running a i7-13700k /w 64gb ddr5 and it's about time for an upgrade. Maybe I'll go team red again this time. I'm about 25 mins to do the parsing on that.

1

u/goodfleance Jun 02 '26

Hero work, that's awesome

1

u/Wolframuranium Jun 02 '26

I can smell the LLM though git. 

Gimme a few days I'll make a pull request 

3

u/SpectreBallistics Spectre Ballistics International (Verified) Jun 02 '26

Oh hell yes I used AI to crank this out fast. I just wrote the pseudo code mostly and had a local model convert it to python. Got it like 90% of the way there which is awesome.

I'm pushing some changes tonight that fix a few bugs.

1

u/LumberjackCDN Gold'n Loan Outfitters & Pawn Jun 02 '26

Hell yeah brother this is awesome.

1

u/DoctorRobertsGMOs2 Jun 02 '26

That is super cool thank you! Perhaps you could resurrect arsenalforce.ca or something like it.

ammoscout.ca is the closest I can find

0

u/AdeptArt Jun 01 '26

Thanks! From what I know armslytics is out of date, so it's very useful for us to have this. And yeah, as usual, you provide no warranties etc.

1

u/No-Inspector6242 Jun 10 '26

I hope that your business can continue on and that this stupidity won't effect you too much