typora / typora-issues

Bugs, suggestions or free discussions about the minimal markdown editor — Typora

Home Page:https://typora.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Summary] Advanced command line interface support

abnerlee opened this issue · comments

Use command line to let Typora:

  • Export file #715
  • Open files in one window (multi-tabs) #979
  • Create file if not exist #721
  • Option for keep foreground (e.g: support edit git commit message) #649
  • Option for showing/hiding views (like sidebar)
commented

One slightly strange use case of mine of "Create file if not exists" i'd like to add to consideration:
Do not create the new file directly on disk. Only create a buffer (or whatever the typora equivalent is), and only create the file if it is saved.
I use this with sublime text to create possibly temporary notes via a keyboard shortcut.
When i want to save the note, I have already specified a name programmatically so I don't have to bother giving it a name.
I'd love to replace sublime text with typora for my notes.

One note about this: the main reason I need CLI support is to integrate Typora's non-markdown features, like mermaid charts. Ideally, a simple way to programatically replicate the "File->Export->HTML" option.

Desire the command line export feature

commented

Me too, desire the command line export feature.
It's awesome tool, we are using it to replace MS word :-), for document automation.

Open the file and jump to a specific line number, like Notepad++ does:
start notepad++ "some file.txt" -n100 -c8
start typora "some file.md" -n100 -c8
It is extremly useful to be called by text file searching tools like FileLocator!!!

I'm very disappointed that there's been little to no official follow up on this issue for almost two (edit: three) years. As I've mentioned, this is not just an annoyance or a nice feature request: not having these features exposed in a practical way (and the absence of CLI options for conversion and processing) makes Typora markdown files nonstandard and non-portable, which really defeats the purpose.

I'm disappointed and frustrated, and I'm going to have to look into converting all my markdown documents into a standard, useful form. With no support or even a commitment of support, I can no longer even recommend Typora.

Yeah that would be one of the greatest features ever. I've implemented once a Powershell-script to export my Word documents to PDF (I need PDFs to read them on my E-Book Reader and Smartphone):

https://github.com/AlexanderMattheis/relationship-enhancement-scripts/blob/master/src/RecursiveDocToPdfConverter.ps1

Now, I want write me a a Bash script for Typora, since I've switched to Linux Mint.

I traced all issues about CLI export option to this one. Is there any followup or any final decision on whether it will be implemented?

commented

Use command line to let Typora:

  • Export file #715
  • Open files in one window (multi-tabs) #979
  • Create file if not exist #721
  • Option for keep foreground (e.g: support edit git commit message) #649

If the Typora CLI comes up, that could be a really nice feature to use, thanks a lot !!!!!

@abnerlee is there any followup on this? I want to be able to use Typora's HTML generation to publish web docs, but without a way to build from the command line, it's essentially useless.

commented

As Typora seems to support document conversion through Pandoc, as a workaround for conversion, you can use Pandoc directly: https://pandoc.org/MANUAL.html
For me it was already installed and is accessible through the Terminal (on macOS), I guess because it's installed via Typora? If that's not the case, you can install it separately.

Would be nice to have an update on the status, please?

I'm currently working on creating an unofficial exporter for typora, it aims to have the exact same output as typora, with some more options for advanced usage. It is written in nodejs (so I can use the same libraries as typora). However it is still in early stages, I'll put it on Github and share it here when I finish basic functions.

I suspect it'll take me 1-2 months from now to release the first version (though it's nothing compared to this 3-years-old issue), be patient!:)

commented

Would be nice to have an update on the status, please?

Depends on for what you're here (this issue seems to be very multi-purpose). I recently discovered, there the are new export feature, one being a custom export option, where you can supply your own export scripts, etc. Also existing ones can be customized there – see the custom export feature documentation. This fulfils my needs, others might have different requirements.

Hi, just a status update on my typora cli. I know I'm behind the schedule :) I've finished all the architectural and algorithm heavy lifting stuff, the rest is pretty trival. Expect to see the first version in 2 weeks!

PegasisForever/typora-parser Thanks for yall's patience, let's gooo!

I'm very disappointed that there's been little to no official follow up on this issue for almost two (edit: three) years. As I've mentioned, this is not just an annoyance or a nice feature request: not having these features exposed in a practical way (and the absence of CLI options for conversion and processing) makes Typora markdown files nonstandard and non-portable, which really defeats the purpose.

I'm disappointed and frustrated, and I'm going to have to look into converting all my markdown documents into a standard, useful form. With no support or even a commitment of support, I can no longer even recommend Typora.

I couldn't agree more. Currently Typora is not completely compatible with GitHub Flavored Markdown (#1789), making it a world of pain to publish a document written in Typora to my blog.

Hope you can support "export file via command line" feature soon!

They're not going to. They've decided to make this hostile software. Stop using it.

Does anyone know how to export markdown to PDF in command line that looks exactly like Typora's? I really love its style

@abnerlee when will you add command line support for md to pdf on Linux?

@WayneYam Not a complete answer but if you use PegasisForever/typora-parser from above in this thread you get html that is formatted exactly the same and then for going html->pdf you could probably use pandoc

It will be great to have this feature. Currently I'm writing md using Typora, export to PDF to share the document. Would like to make the pdf generation as a part of CI/CD to automatically update the PDF file. I tried the PegasisForever/typora-parser above, which has some differences as the vanilla Typora, especially the mathjs part, e.g. formula number, references, and etc. I feel it's great to be able to use the Typora cli directly. Thanks!

Generating pdf with typora from command line would be amazing for our CI too.
Can't wait to see this feature coming !

as a part of CI/CD

In my humble opinion, using Typora in CI/CD is a separate and more complicated issue. How to pass the license code to activate? What about the 3-device limit? Can other people trigger the CI (e.g. in PR)? Maybe self-hosted runners are required.

We precisely have self-hosted runners, our documentary environment is heavy because of CE and FDA appliances and the simple operation of exporting each document in pdf is painful. it would be so nice to have a CI exporting it on each release or on each merge request.