Interco Flags

A display of the International Code of Signals (INTERCO) flags, used by vessels to communicate important messages. Demo of a 'Trading card' mini-layout and SVG Cat combining many in one. Emoticons signification in descriptions: [ℹ️ Single] [➕ Numbered] [🎣 Fishing] [🏘️ Harbour]

Revisions
    Adapted to the Raster of 24 by 24, shorter descs, added emoticons.
    

    Full switch to Cat-file, explainations included.
    

    Prototype of Cat-file and fancy card style.
    

    Modifications, clean-up.
    

    Created on (Casselvecchio)
    
  
Cat-Linking
    General Procedure to "Compress" a directory of SVG files into a single "Cat".
    1. Concatenate all SVGs into a "Cat file", of viewBox(0, 0, CW, CH).
      For example, with the command $ cat path/to/dir/*.svg > cat.svg
    2. Remove all XML Processing instructions <?xml ...>
    3. Convert SVG[viewBox=(0,0,W,H)] into G[transform=scale(CW/W, CH/H)]
    4. Assign them IDs - this can be the naming scheme.
    5. Add the style :not(:target) { display: none; }
  
Fetching Flags with Python.
  #!/usr/bin/env -S python3 -B
  from pathlib import Path
  from urllib.request import Request, urlopen
  headers = { "User-Agent": ..., "Accept": "text/html,application/xml..., }
  for l in Path("signals.html").read_text().splitlines():
      if "img src" not in l: continue
      fn = l.split('src="')[1].split('" data')[0]
      if (im := Path(Path(fn).name)).is_file(): print(im, "exists"); continue 
      req = Request("https://upload.wikimedia.org/wikipedia/commons%s" % fn)
      for _ in headers.items(): req.add_header(*_)
      with urlopen(req) as resp: im.write_bytes(resp.read())
  
I have a diver down; keep well clear at slow speed. Azimuth or bearing
I am taking in or discharging or carrying dangerous goods. (Originally used by the Royal Navy specifically for military explosives.)
Affirmative. Course in degrees magnetic (°°°)
Keep clear of me; I am maneuvering with difficulty. Date (ddmmy?y?)
I am altering my course to starboard.
I am disabled; communicate with me.
I require a pilot. I am hauling nets. Longitude (°°°?mm)
I have a pilot on board.
I am altering my course to port.
I am on fire and have dangerous cargo on board: keep well clear of me, or I am leaking dangerous cargo.
I wish to communicate with you. I wish to communicate with you by [1] Morse (arms) [2] Loud hailer [3] Morse (lamp) [4] Sound signals.
You should stop your vessel instantly. Latitude (°°mm)
My vessel is stopped and making no way through the water.
Negative.
Man overboard (often attached to the man overboard pole on boats). With a sinister hoist, the semaphore flag.
The Blue Peter. All persons should report on board as the vessel is about to proceed to sea. My nets have come fast upon an obstruction.
My vessel is 'healthy' and I request free pratique.
Distance (range) in nautical miles.
I am operating astern propulsion. Speed (velocity) in knots.
Keep clear of me; I am engaged in pair trawling. Local time. (hhmm)
You are running into danger.
I require assistance. Speed in kilometres per hour.
I require medical assistance.
Stop carrying out your intentions and watch for my signals.
I am dragging my anchor.
I require a tug. I am shooting nets. UTC (hhmm)
Number one, complementing prior.
Number one, complementing prior.
Number two, complementing prior.
Number three, complementing prior.
Number four, complementing prior.
Number five, complementing prior.
Number six, complementing prior.
Number seven, complementing prior.
Number eight, complementing prior.
Number nine, complementing prior.