Software Heritage for VS CodeA Software Heritage (SWH) client for VS Code. Use it to archive your code, cite it with a SWHID, and see which of your files are already archived. This project is inspired by swh.el, the Software Heritage client for Emacs. Install it from the Visual Studio Marketplace, or in VS Code: open the Extensions view, search for Software Heritage, and install it. From a terminal: ContentsThe side barThe activity bar has a Software Heritage icon (the SWH logo). It opens two views:
CommandsAll commands are in the Command Palette under Software Heritage:. Most of them are also in the Software Heritage submenu of the editor's and the Explorer's context menus.
Status, Visits, Save and Cite ask for the URL of a public repository when there is no public origin here. To ask about another repository anyway, use the … of another repository… variants. In the Explorer, the commands act on the file or folder you clicked. In an editor, they act on the file and its selected lines. With no file open, they act on the workspace folder. Context or no contextBy default, the SWHID commands give a qualified SWHID, with its context:
Status barThe status bar shows whether the current file is archived, with the same icons as the Scan view. With no file open, it shows the same for the workspace folder:
The status is checked when you switch to a file and each time you save it. An archived file that has not changed is not checked again; any other status is, as it may have changed since. Click the item to copy the SWHID. Without a token, the item also shows how many API requests you have used this hour, e.g. Scan viewScan fills the Scan view of the Software Heritage side bar with the tracked working tree. Each file and directory is marked as archived, partially archived or not archived, and each directory shows how many of its files are archived. Archived directories start folded. Click a file to open it. Each item's context menu lets you:
SWHID linksSWHIDs in any document become clickable links that open in the archive. This includes the Visits and Cite reports. Turn it off with Token or no tokenWithout a token, the archive allows 120 requests per hour. With a token from your archive account, it allows 1200. Either set the Settings
RequirementsYou need VS Code 1.90 or later and ContributingContributions are welcome! See CONTRIBUTING.md to report a bug, suggest a feature, or set up the project: the branches (Git Flow), the commit messages (Conventional Commits), the tests, the changelog, the releases, and the architecture. LicenseThis project is licensed under GPL-3.0. See LICENSE. |