Asper Header  1.0.14
The header injector extension
Loading...
Searching...
No Matches
AsperHeader

AsperHeader Logo

AsperHeader is a Visual Studio Code extension built primarily for the Asperguide development team. It provides an easy and standardized way to generate, insert, and maintain structured file headers across projects.

Although tailored for Asperguide, it is available on the VS Code Marketplace for anyone who may find it useful.


Source repository

The source repository can be found here: github.com


Developper documentation

You can find the developper documentation here (generated by doxygen): https://asperguide.github.io/asper-header/


Features

  • Insert structured headers into your source files with a single command.
  • Embed an ASCII logo at the top of the header.
  • Automatically include:
    • Project name
    • File name
    • Creation date
    • Last modified date (auto-updates on save)
    • Description block (supports multiline)
    • Copyright
    • Tags / keywords (optional)
    • Purpose section
    • Watermark
  • Configurable formatting:
    • Customize comment styles and separators.
    • Adjust scan length for detecting headers.
    • Random ASCII logo option.
  • Commands available via Command Palette or keyboard shortcuts:
    • AsperHeader: Add a header to the file (Ctrl+Alt+H), for Mac: (Cmd+Alt+H)
    • AsperHeader: Refresh the header (Ctrl+Alt+U), for Mac: (Cmd+Alt+U)
    • AsperHeader: Display a random logo (in a new window) (Ctrl+Alt+Shift+L), for Mac: (Cmd+Alt+Shift+L)
    • AsperHeader: easter egg (Ctrl+Alt+Shift+D), for Mac: (Cmd+Alt+Shift+D)
    • AsperHeader: diplay the author's name (Ctrl+Alt+Shift+A), for Mac: (Cmd+Alt+Shift+A)
    • AsperHeader: To Morse
    • AsperHeader: From Morse

Demo

Bellow is a video demoing the different features of the extension: (sorry for the low quality, github filesize restrictions oblige)

If animation fails to load, click here (gif) or here (mp4) Extension demo


Requirements

None. The extension works out of the box with Visual Studio Code.


Extension Settings

AsperHeader contributes the following settings:

Setting Type Default Description
asperheader.extensionName string "AsperHeader" Name of the extension being used.
asperheader.projectCopyright string "(c) Asperguide" Copyright message for the header.
asperheader.headerOpenerDecorationOpen string "+==== " Opening text for the header frame.
asperheader.headerOpenerDecorationClose string " =================+" Closing text for the header frame.
asperheader.headerCommentSpacing string " " Spacing between the comment symbol and the header text.
asperheader.telegraphBegin string "BEGIN" Text used for header begin marker.
asperheader.telegraphEnd string "END" Text used for header end marker.
asperheader.telegraphBlockStop string "/STOP" Marks the end of a header block section.
asperheader.telegraphEndOfTransmission string "// AR" End-of-transmission marker.
asperheader.headerAddBlankLineAfterMultiline boolean false Insert a blank line after multiline blocks.
asperheader.headerKeyDefinitionSeparator string ": " Separator between key and value in header.
asperheader.headerLogoKey string "LOGO" Header key for ASCII logo.
asperheader.headerProjectKey string "PROJECT" Header key for project name.
asperheader.headerFileKey string "FILE" Header key for file name.
asperheader.headerCreationDateKey string "CREATION DATE" Header key for creation date.
asperheader.headerLastModifiedKey string "LAST Modified" Header key for last modified date.
asperheader.headerDescriptionKey string "DESCRIPTION" Header key for file description.
asperheader.headerCopyrightKey string "COPYRIGHT" Header key for copyright.
asperheader.headerTagKey string "TAG" Header key for tags.
asperheader.headerPurposeKey string "PURPOSE" Header key for purpose section.
asperheader.headerTimeSeperatorHour string ":" Separator for hours in timestamps.
asperheader.headerTimeSeperatorMinute string ":" Separator for minutes in timestamps.
asperheader.headerTimeSeperatorSecond string "" Separator for seconds in timestamps.
asperheader.headerTimeAndDateSeperator string " " Separator between time and date.
asperheader.headerDateSeperatorDay string "-" Separator for day in dates.
asperheader.headerDateSeperatorMonth string "-" Separator for month in dates.
asperheader.headerDateSeperatorYear string "" Separator for year in dates.
asperheader.headerLogo array [ASCII logo default] Default ASCII logo array.
asperheader.maxScanLength number 100 Maximum lines scanned for existing headers.
asperheader.enableDebug boolean true Enable debug logging.
asperheader.refreshOnSave boolean true Automatically refresh header on file save.
asperheader.promptToCreateIfMissing boolean true Prompt to create header if missing.
asperheader.randomLogo boolean false Insert a random ASCII logo on each header generation.
asperheader.extensionIgnore array [] File extensions to ignore when saving.
asperheader.useWorkspaceNameWhenAvailable boolean false Use the workspace name when available.
asperheader.projectDescription string "" The description to use instead of asking the user every time.

Known Issues

None so far.


Supported Languages

AsperHeader now provides comprehensive multilingual support for user interface messages, error reporting, and interactive elements. Each language includes full translations with culturally appropriate phrasing and proper handling of technical terminology.

The extension currently supports the following languages:

Language Locale Code
English (US) en
French fr
Italian it
Spanish es
German de
Japanese ja
Korean ko
Russian ru
Portuguese (Brazil) pt-br
Turkish tr
Polish pl
Czech cs
Hungarian hu
Simplified Chinese zh-cn
Traditional Chinese zh-tw

Note: If a message is missing in a given language, it will automatically fall back to English (en) to ensure consistent functionality across all locales.

Release Notes

1.0.0

  • Initial release of AsperHeader.
  • Supports injecting structured headers with ASCII logos.
  • Automatic last modified date updates on save.
  • Configurable settings for flexible formatting.
  • Optional random logo insertion.

1.0.1

  • Add the missing .tsx file format to the comment identification logic

1.0.2

  • Fix file format parsing error
  • Add more supported vscode languages
  • Add the mac equivalent in keybindings

1.0.3

  • Fix esbuild script to fail on missing files
  • Update the modules logo
  • Update functions to work with older versions of the vscode library

1.0.4

  • Fix the copy button functionality
  • Update the logger so that the non-gui based can be visible in non-debug mode
  • Fix import path in the file regarding the required json file as the name had changed but not been reflected in the code
  • Update the doxygen comments to make the code clearer
  • Refactor some minor sections of the code
  • Add more unit tests for module stability

1.0.5

  • Add 12 more languages to the module (es, zh-cn, zh-tw, de, ja, ko, ru, pt-br, tr, pl, cs, hu)
  • Update messageReference.ts in order to support such languages

1.0.6

  • Fix the debug check
  • Fix test with the logger

1.0.7

  • Update the package dependency versions
  • Update the comment choices in the comment dictionnary so that they are as silent as possible

1.0.8

  • Add a text to morse and morse to text translator.
  • Update the doxygen documentation

1.0.9

  • Add additional debug lines to help track the program evolution when running.

1.0.10

  • Fix the indefinite hang when a file does not exist, it now errors out after 5 seconds/attempt if the file is not found
  • Update the program to check 2 different paths due to possible alterations of how the module packaging could shift.
  • Refactor the lazyFileLoad class to be more robust to different file types and paths.
  • Add the missing translations for the recently added sentences (v1.0.8, v1.0.9, v1.0.10)
  • Add jsonc file loading suppport
  • Add a script to help make sure that the languages all have the same amount of entries (so that the program will not throw a sentence not found due to a missing text entry).

1.0.11

  • Add the missing translations

1.0.12

  • Fix the types in the user settings for the extension.

1.0.13

  • Add support for .env, pip requirements, .gitignore, LICENSE, code-workspace files

1.0.14

  • Add an option to provide a default description to avoid having to ask the user for it at every trigger.

Following Extension Guidelines

This extension follows VS Code Extension Guidelines.


For More Information


Enjoy using AsperHeader!