Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export listing to markdown #5

Closed
masukomi opened this issue Oct 7, 2022 · 2 comments
Closed

export listing to markdown #5

masukomi opened this issue Oct 7, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@masukomi
Copy link
Member

masukomi commented Oct 7, 2022

Having a lot of helpful scripts is great, but not having a way to share a listing of what you have with others sucks. Clu gives us a listing, but it's not in a particularly shareable way.

Goal: to output the results similar to clu list in such a format that people can easily incorporate into the README of their dotfile repos.

New command

clu export <format>

Initially there will only be one supported format: markdown.
Markdown because that's what almost everyone uses for their Readme.

Since the database contains the source url of each script I think that the format should be as follows (still sorted alphabetically by script name)

| script name                        | description                                     |
|------------------------------------|-------------------------------------------------|
|[script-name](https://example.com)  | description text here which may be notably wide.|
|[next](https://example.com/1)       | another description here                        |     

Rather than taking the width from the terminal output it should just be calculated to fit the longest link in the first column and longest description in the second. This will be ridiculously wide, but that's ok, markdown tables are kinda crap, and it's not actually intended to be read in this format.

Output should be send to standard out. Users can always clu export markdown > my.md

@masukomi masukomi added enhancement New feature or request good first issue Good for newcomers labels Oct 7, 2022
@masukomi
Copy link
Member Author

masukomi commented Nov 6, 2022

This will be coming in v2

I've added Prettier::Table and used it to display lists and command details (in the v2_staging branch).

Prettier::Table allows you to specify the specific characters used for the surrounding table. I intend to make a .to-markdown method in Prettier::Table to support the generation of GitHub Flavored Markdown tables, which most static blogging tools seem to support.

@masukomi masukomi added this to the 2.0.0 milestone Nov 6, 2022
@masukomi masukomi self-assigned this Nov 25, 2022
@masukomi
Copy link
Member Author

  • completed in the v2_staging branch.
  • exports to files for ingestion in hugo
  • command is export hugo
  • expects, but doesn't require, that you'll be using our custom hugo theme / site setup
  • templates are customizable
  • other static blog systems will be supported if there's enough demand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant