Giter Club home page Giter Club logo

mdview's Introduction

Banner

I wrote most things here in my spare time.

I am a software engineer from Germany. I work professionally mostly with .Net/C#/WPF but also with Python and sometimes web technologies. In my spare time, I prefer to use Python but I also use web technologies and sometimes other technologies.

mdview's People

Contributors

aurora-dot avatar c3er avatar dependabot[bot] avatar khatastroffik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mdview's Issues

Update winget manifest at each release

It appears that Markdown Viewer is already in the winget software repository. But this entry is not up to date. Because of this, winget has to be notified immediately after a new release.

  • A script and/or Action that updates the winget entry
  • Additional metadata for the Markdown Viewer entry, e.g. a winget search markdown should also yield Markdown Viewer.

Bug: Application crash with ENOENT at trying to open invalid file links

I just tested out this viewer, which is exactly what I wanted! Without all the bell and whistle of an editor!

However, in my use case I had some bad links and when clicked, I get welcomed by an Unhandled error of ENOENT: no such file or directory, which is expected in my use case. However, the app just completely closes afterwards.

Proposed solution: Catch the error, show the error dialog (that is available in the debug tool menu) that the file does not exist and stay on the current page.

Regards! 😄

Application does not render this table.

I don't know why, but the application is not rendering this table:

|Included:|Excluded:|
|:--|:--|
|Released Games|Cancelled or Not yet released Games
|[Compilations](https://gamefaqs.gamespot.com/cpc/category/233-miscellaneous-compilation)|


Maybe the parser fails to recognize the table due the blank white spaces at the start of each line?. I don't know if that could be the issue, but I can say that table renders fine with web-based things like when using the typical web-extensions in the web-browser to read markdown files, or when using other stand-alone applications like Markdown Monster or Sublime Text (Markdown​Live​Preview plugin), and in this GitHub comment:

  • The following table of platform exclusive games was generated programmatically by scraping content from Gamefaqs website:

    Included: Excluded:
    Released Games Cancelled or Not yet released Games
    Compilations

I attach the original markdown file here:

Support for Task lists/Checklists missing

I noticed mdview do not support displaying checklists, that are extremaly useful in some cases.

Task lists/Checklists are made with the following structure:

- [ ] unchecked item
- [x] checked item

and give the following output:

  • unchecked item
  • checked item

markdown-it doesn't support it itself but some community-written plugins are available npmjs.com : lists

Thank you for your hard work.

Make the application trustworthy for Microsoft

Currently, the application is not trusted by Microsoft. This causes these (known) problems:

  • Scary Smart Screen warning that the application may be malicious
  • A delay at application start, caused by Windows Defender (other virus protections on Windows may also cause problems)

As long as this application is only a hobby project without budget, it is no option to buy a certificate by an authority that is trusted by Microsoft.

Use graphics for butons in Table of Content

Currently, UTF-8 symbols are used for the buttons in the TOC. But the appearance of them is depended on the OS and the current default sans-serif font. Instead the buttons should consist of actual graphics that appear identical on al platforms.

Current state:

Screenshot of TOC with ugly buttons

Remember encoding for opened files

If the user sets an encoding other than the default, this encoding shall be remembered for that particular file. So the user does not need to set the encoding again every time, the file is opened again.

Blocked by #4

'Esc to exit' option request

Close the program when Escape key is pressed. There are several known viewers that do have this option in preferences, e.g. WinDjView, SumatraPDF, etc. I think it would be really appreciated to get this option also in mdview.

For example, I'm currently using mdview as the main quick markdown-viewer in conjunction with Total Commander. I call mdview with the Alt+F3 — native TC hotkey, which send the file under the cursor to an external viewer (customized by extension). It's very comfortable. In this case, the ability to close the program by Esc would be very useful.

Support additional, usual ways to zoom the content

I just noticed that the hotkey to zoom out it does not recognize the minus key from the numeric pad. Although it works fine for the other minus key.

I'm referring to this code:

Note: the hot key to zoom in, it properly recognizes both "+" keys in the keyboard.

I don't have enough experience with javascript, but I've tried to research a little bit and I think the solution could be to handle the key with id. NumpadSubtract (among with - and Minus to catch also the other minus key) as mentioned here:

Also, to avoid opening a new issue and being annoying, I take the opportunity to suggest to add CONTROL+MOUSE SCROLL BUTTON too. This key combination is available in almost all file viewers and editors, including web-browsers. It would be a tiny Quality of Life improvement.

Thanks for your attention.

Improve window handling in Mac OS

The application currently only allows one window per process. From the user's perspective, that means that Markdown files opened in Finder will always open in the same window as the previously opened document.

Expected behavior:

  • Files that are opened in Finder shall always open in a new window
  • All windows shall open in the same process
    • The dock has to only show one icon for the application
    • This is actually an optimization that would also be a benefit in other OSs

REQUEST: Can you please make the rendering not dependent of file extension [right now only renders properly files with .md and .markdown extensions]

First of all thank you for this.

I searched far and wide for a Markdown Viewer-only for some time now. There are but a few and almost all fall short of delivering the bare minimum acceptable functionality.

When I first embarked in that quest it seemed a fairly easy proposition: find an Markdown Reader- or Viewer-only for those files that are not to be edited because they represent a final, storable record of a Text-based work . Articles, essays and other writings authored by me or others that are not to be accidentally "corrupted" by me opening it in a Editor and, by mistake or lack of attention, unintentionally saving it with some edits (probably, I dare to venture it, this same rationale counted towards you own motivation to build this).

This is almost an Egg of Columbus kind of thing: pretty obvious in hindsight while not quite so much before. Or at least that is the most logical explanation I can summon for having found so few Viewers -- and of subpar quality -- while Editors (of increasingly good quality) seem to abound and prosper.

I was already contemplating rolling out my own when I, luckily, managed to serendipitously bump into mdview.

It does exactly what it says in the box (so to speak) and was quite elated when I tested with a handful of .md files I had just lying about.

However the feeling quickly subsided when I tried the Markdown files I described above (the final, non-editable, read-only ones), which, for convenience and to keep them visibly/clearly differentiated and differentiable from the others, have a different extension from the ones I mentioned in the title (which seem to be the only ones that trigger the rendering from the markup into the intended presentation format).

When I tried with those it only presented me back with the Text version of it (as if opened by any regular Text Editor/Viewer). Not the formatted one I was expecting and hoping for,

And so.

My request is: can you, please, kindly consider, in your next development cycle, to make this tool a more universal one, by giving more power and control back to the user -- by letting her/him decide which files can contain Markdown content (in other words, make it ignore the extension completely and try to render it as if the input was Markdown, regardless)?

Thank you so much.

Header named `Content` breaks the viewer

Issue

When a markdown file with a header named Content, it breaks the viewer (unable to scroll and the header gets the #content style) by having its HTML id attribute set to <h2 id="content" tabindex="-1">Content</h2>, conflicting with the container <div id="content"></div>.

Proposal

Either:

  1. Add a prefix to mdview id, such as the container will be <div id="mdview-content"></div>.
  2. Add a prefix to generated id from markdown such as the header will be <h2 id="mdh-content" tabindex="-1">Content</h2> (used mdh for markdown header 🤷‍♂️).

Example

# Main Header

Text here

## Content1

Text here

## Content2

Text here

## Content

Text here

## Content

Text here

Markdown with oversized table is not printed correctly

Hello,

If you export a markdown to PDF via printing which contains a very large table, the table is cropped incorrectly:
grafik
This is an example from a PDF that was created through a md file with a very large table.
Hint: The scrollbar seems to be an image or something? The column to the right is cropped.
Expectation: Everything is resized so it all fits into a page.

Can you please look into this?

Best regards
Caradhras

Feature request: make line breaks configurable

Hello,

Markdown-it has an option breaks that is false by default. See the details here. I prefer to have it true, and rebuild the app for my needs every time. Would you mind to make this option configurable? Thank you.

[Win] Error message at the first launch

Every day when I start the mdview for the first time (from the command line with the path to the file), I get this error msg:

Uncaught Exception:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be one of type string, Buffer, or URL. Received type undefined
    at stat (fs.js:828:10)
    at fs.stat (electron/js2c/asar.js:291:27)
    at Object.fs.stat (electron/js2c/asar.js:291:27)
    at Timeout._onTimeout (C:\totalcmd\Profile\utils\mdview\resources\app.asar\main.js:276:12)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)

The second and subsequent launches are normal. I'm on the Windows 8.1 x64.

Remove minimum window width

What changed

In previous versions (like 2.4.0) I was able to resize window however I liked, making it even as thin as 161px.
Now it is impossible to make it thinner than 609px.

Why is it important

I am used to split my desktop in 3 windows: middle one (browser or MS Teams) is the biggest and those on the sides (mdview and notepad) are small and used to make notes. It just make it easier to organize your workspace when there is no minimum width limitation.


PS. I am not sure if it's something that can be easily changed but I would really appreciate it.
And as always: Thanks for your hard work 🙏

Interface "File > Open" does not open the file

Hey there!

So one minor thing I have run into is that attempting to open a file via File > Open does not seem to function.

On the other hand, I can open a file as an argument at the command line (or opening the file through a shell association).

However, when I open mdview first, and then use the File menu to open a file interactively, while I can select one through the pop-up shell window, it then closes but README.md continues to be displayed.

This is the only other thing I have seen as of yet.

Suggestion: Organize root folder / optimization of release size?

Hello,

not really an issue, but it might give the application a more clean / professional appearance if all the files would be organized into subfolders with only exe and license file residing in root?

A more practical thing: Is it possible to shrink the release container a bit? 100 MB for a viewer seems to be a bit much. My guess is that most of it comes from Electron? I am not familiar with how much is realistic, but maybe there is a bit room for improvement.

Best regards and thanks for the effort!

Improve CLI behavior

The application is blocking the command line and outputting debug logs after start.

Instead, it has to free the command line to enable the user to use it again for other stuff and also there shall no output appear on the command line.

Try to detect the encoding automatically

The tool shall try to detect the encoding automatically.

Blocked by #4
There is no algorithm known that detects the encoding reliably in all cases. Because of that, it shall be possible to set the encoding manually.

Mac package

There is apparantly a need for a Mac package.

The maintainer doesn't currently own a Mac computer, so someone is needed to extend the package build script and provide the package or packages for each release.

Requirements:

  • The electron-builder part for the Mac build is extended
  • It runs under MacOS that it can be used in practice
  • A MacOS package is released

Suggestion to avoid Windows Smart Screen warning

I readed the Docs, this is only a sugestion

My Windows version is 10 21H1 1v9043.1766 I search the web for Markdown viewer, a lot of times in a lot of sites. This work as I espect but the samartscreen...

So, you try InnoSetup?
https://jrsoftware.org/
Source code https://github.com/jrsoftware/issrc

The problem with SmartScreen is the unknown publisher, and with innosetup you can set a publiser like your installers has your name. But may be can help, I dont know, im not expert on installers. Is just a suggestion.

Thread closed by author (ChyBeat), beacuse is just a suggestion and i don't know where can I write one.

Thanks for program, is goooood for that I needs! :)

LaTeX math support

Hi, I would like to propose LaTeX math support that is usually done with MathJax by other note taking apps. As an engineering student I need to render a lot of formulas, and this is the only feature that I really miss in this fantastic app.

There are also other "extensions" that other note taking apps provide that you may want to implement later on, like

Hopefully these would not add too much complexity.

Thank you for your hard work!

Feature Request: Drag & Drop support

Hello :)

as requested in #39 here my feature request as a separate thread / issue:

  1. drag & drop support
  2. a preference for "open in new instance" vs "reuse instance" vs "ask what to do" would be nice.

Thanks and best regards

Suggestion: Search function

Hello,

first kudos for the development of the app and the responsiveness. :)

What about a search function? 😀

Best regards!

Some minor mermaid issues

Hello,

I just tested the new mermaid extension. Really nice extension that makes generation of graphics a lot easier!

The readibility of some of the supported diagrams in dark mode could be improved. Here you have a sample:
test.md with an example:
grafik

(All sample code taken from here: https://mermaid.live) Also maybe include more demo code into your readme to show the capabilities of mermaid.

Two small requests/ideas not related to graph generation (but too small for separate issues): I would welcome drag & drop support for mdview :) and a menu for reciently opened files. For the drag & drop support, maybe a preference for "open in new instance" vs "reuse instance" vs "ask what to do" would be nice.

Thx & Best regards

No focus on content by default

Hello!
I just moved from v2.5.1 to v2.6.1 and noticed that content does not get focus by default. Previously I was able to press Page Down key right after opening a file and see the next block of content. New version does not react to Page Down until I click somewhere on the content with mouse. Of course, this is minor thing, but hopefully easy to fix.

Feature Request: tabs for opened documents

I know you don't have much time, but I would like to know if it would be possible to implement tabs to be able to open multiple documents within the same instance of the program.

This is what I mean for tabs:

Currently, when I drop an MD file into the Markdown View window, the program displays a dialog box asking if I want to load the document into that window, or to open a new, separated window. The ideal behavior in my opinion would be that when selecting to load the document in the same window, a tab should be added with the content of the new loaded document, instead of replacing the rendered content of the previously loaded file.

And then a new option "Open file in a new tab" could be added here:

In fact, if tabs could be implemented, I think there would no longer be a good reason to want to open a new window separately to open/load new MD documents. Although there may always be someone who prefers to have multiple windows floating around, I think tabs would make it a lot simpler.


This may be off topic, but I just want to say that your Markdown View program is the fastest and most responsive (among other things when scrolling the window) when loading tables with thousands of items. I've tried almost every option to reach that conclusion, from Markdown Monster, Markdown Pad, MarkText and more.

Congratulations for your hard work, and thank you for sharing this program.

Auto refresh

Love to see the render refresh as the file is saved.

Anchor Links Open a Subprocess Instead of Jumping to the Anchor

Hey there, c3er!

I hope your holidays were good. I am still loving and using your program almost every day to view my writing and notes. Of course, thank you again for your hard work!

Recently, I noticed an interesting behavior when clicking on anchor links.

Here's how I tend to implement them in my text:

[Link Text](#html-anchor)

# html anchor

What happens when I click on an anchor link is that another process starts, opens the file, and then jumps to the anchor, instead of just jumping to the anchor alone.

A small issue that is has not impeded my work, but I thought you would like to know.

Thank you again and happy new years!

Mermaid diagramming/visualization support?

REQUEST: Are there any plans to implement rendering of Mermaid diagramming and visualization extensions to Markdown?

Just curious as this would be nice to have, but I understand if something like this would complicate an already very useful tool. Thanks for all your work on this viewer -- I use it pretty much every day.

displaying local image file

I'm in the (very) early stages of designing a standalone bookmark viewer (not a manager, not an editor, not tied to a specific browser) and mdview is perfect for my needs.

One issue I'm having is trying to use local image files. mdview is displaying them as the generic broken link/image.

I have been successful in converting image files to base64 and mdview does display the base64 image as expected.

Before I jump through the hoops to convert all image files to base64 I'm trying to find out if there's something I'm doing wrong or if I've run up against a limit of mdview.

My sample: sample.md

NOTE: If I change the file extension to .html and load into my browser then all images (base64, local file) display properly.

Thanks,
Mark

Personalized theme

Font, color and etc are statics and can't be changed by the user. An easy improvement could be simply to add some settings in the Theme Panel, like the font, and the color of titles.

Suggestion: Option to hide YAML header

Hello Christ,

This is not really an issue. Since many markdown editors support the YAML header, is it possible to add an option to hide the header in MDView?

Huge thanks

Unable to deploy mdview MSI with Intune

Thank you for MSI-file. Because of missing ProductCode or ProductVersion mdview deployment fail.

The selected app package does not appear to have either a ProductCode or ProductVersion.

Name: mdview-3.1.1-x64.msi
Platform: Windows
Size: 85.59 MiB
MAM Enabled: No

Make the application trustworthy for Apple

Currently, the application is not trusted by Apple. Since the macOS version is not tested properly, it is not exactly known yet, which problems this causes except that installation of the DMG package is more difficult (1).

As long as this application is only a hobby project without budget, it is no option to pay Apple any money.

(1) The author tried once to install the DMG downloaded from the internet but didn't take any notes of the process.

Support for external fonts

Hey there!

First of all, as a vim user, your project is my preferred markdown viewer. Thank you so much for your hard work and support of this tool!

One feature that would be very handy is support for loading external font files.

Generally in Markdown, I can declare fonts by using in-line CSS like so:

<style>
@font-face {
    font-family: MyFont;
    src: url("/path/to/font.ttf") format('truetype');
    font-weight: medium;
    font-style: normal;
}
</style>

However, in mdview, it appears that I can only load images as external resources. However, I am able to load a font if I embed it as base64 within my style tag like so:

src: url(data:font/truetype;charset=utf-8;base64,<BASE64_CONTENTS>) format('truetype');

So base64 fonts embedded within the markdown file will load, but external files will not.

Again, thank you so much for mdview and thanks for your time and consideration!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.