https://github.com/continuous-foundation/intersphinx
Read and write intersphinx `objects.inv` from node or the command line.
https://github.com/continuous-foundation/intersphinx
Last synced: 4 months ago
JSON representation
Read and write intersphinx `objects.inv` from node or the command line.
- Host: GitHub
- URL: https://github.com/continuous-foundation/intersphinx
- Owner: continuous-foundation
- License: mit
- Created: 2023-01-05T19:19:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-29T22:44:20.000Z (over 1 year ago)
- Last Synced: 2025-04-11T15:56:48.913Z (about 1 year ago)
- Language: TypeScript
- Size: 366 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# intersphinx
[](https://www.npmjs.com/package/intersphinx)
[](https://github.com/continuous-foundation/intersphinx/blob/main/LICENSE)
[](https://github.com/continuous-foundation/intersphinx/actions)
Read and write intersphinx `objects.inv` from node or the command line.
To use from the command line, use the `-g` to create a global install.
```
npm install -g intersphinx
```
## From the command line
Commands available:
`parse`: download or unpack a local file into a json or yaml file.
```bash
intersphinx parse https://docs.python.org/3.7 output.yml
```
`list`: list the contents of an objects.inv
```bash
intersphinx list https://docs.python.org/3.7 --summary
intersphinx list https://docs.python.org/3.7 --domain std
intersphinx list https://docs.python.org/3.7 --domain std:doc --includes abc
intersphinx list https://docs.python.org/3.7 --domain std:doc --includes abc --limit 5
```
## Reading an invintory in Node
```typescript
import { Inventory } from 'intersphinx';
const inv = new Inventory({ id: 'python', path: 'https://docs.python.org/3.7' });
await inv.load();
const entry = inv.getEntry({ name: 'zipapp-specifying-the-interpreter' });
// {
// location: https://docs.python.org/3.7/library/zipapp.html#specifying-the-interpreter,
// display: 'Specifying the Interpreter'
// }
```
## Write an invintory
```typescript
import { Inventory, Domains } from 'intersphinx';
const inv = new Inventory({ project: 'Python', version: '3.7' });
inv.setEntry({
type: Domains.stdLabel,
name: 'zipapp-specifying-the-interpreter',
location: 'library/zipapp.html#specifying-the-interpreter',
display: 'Specifying the Interpreter',
});
inv.write('objects.inv');
```
---
As of v1.0.0 this package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
---
Made with love by
Continuous Science Foundation