https://github.com/jdkato/pb
A command-line tool to facilitate a multi-platform, scientific publishing workflow.
https://github.com/jdkato/pb
markdown math-typesetting
Last synced: about 1 month ago
JSON representation
A command-line tool to facilitate a multi-platform, scientific publishing workflow.
- Host: GitHub
- URL: https://github.com/jdkato/pb
- Owner: jdkato
- License: mit
- Created: 2021-10-18T07:48:59.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-11-12T23:39:22.000Z (over 4 years ago)
- Last Synced: 2025-01-24T07:08:16.971Z (over 1 year ago)
- Topics: markdown, math-typesetting
- Language: Go
- Homepage: https://jdkato.medium.com/an-automated-workflow-for-scientific-writing-on-medium-ac9b74e08849?sk=e2f6d49eb4538c84d59a1b158a632015
- Size: 85.9 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `pb`: Write once, publish anywhere
`pb` is a command-line tool designed to facilitate a multi-platform, scientific
publishing workflow.
It allows you to write your posts locally using scientific-styled Markdown
(tables, code blocks, footnotes, and math formulas) *and* publish to external
hosts[^1] while maintaining the structure of the original post.
## Installation
If you have the [Go toolchain][4] installed, then you can use `go get`:
```
go get github.com/jdkato/pb
```
Otherwise, download one of the [pre-built binaries][1].
## Configuration
### Medium
Uploading content to Medium requires an [Integration token][2]. To generate one, go to your [settings page][3], select "Integration tokens" from the sidebar, and create one:
Select 'Integrations tokens' from the sidebar.
Create an Integration token; the description can be anything you want.
Then, enter the `pb configure` command, follow the instructions, and enter your token. For math formulas on Medium, you also need to have [Inkscape][5] installed and available on your `$PATH`.
## Usage
```
pb - A multi-platform publishing workflow.
Usage: pb [options] [command] [arguments...]
pb --to medium file.md
pb configure
pb is a tool for cross-posting Markdown content while preserving structural
elements (math typesetting, syntax highlighting, diagrams, etc.) across
multiple platforms.
Flags:
-h, --help Print this help message.
-d, --image-dir Search directory for local images.
-t, --to Comma-delimited list of destination platforms.
-v, --version Print the current version.
Commands:
configure Run an interactive configuration wizard.
```
The basic command is
```
pb -d
```
Where `` is the directory where your local images are stored. For example, if you have an image definition like
```markdown

```
and the file is stored at `/some/path/static/img/medium-upload.gif`, then you'd use:
```
pb -d /some/path/static
```
[1]: https://github.com/jdkato/pb/releases
[2]: https://help.medium.com/hc/en-us/articles/213480228-Get-an-integration-token-for-your-writing-app
[3]: https://medium.com/me/settings
[4]: https://golang.org/
[5]: https://inkscape.org/
[^1]: Currently, only [Medium](https://medium.com/) is supported. Other hosts, like DEV and Hashnode, will be added in a future release.