Code Monkey home page Code Monkey logo

pine's Introduction

Pine

Swift 5 Platform Github Github All Releases 简体中文

Pine is lightweight macOS markdown editor. It's currently a work in progress.

It is a document based application, and aims to follow Apple's Human Interface Guidelines

Installing

Pine is still in its very early stages, so if you encounter any bugs or have a feature request please raise an issue!

Install via Homebrew

$ brew tap lukakerr/things
$ brew install pine

Manual Download

Visit the releases page to download manually.

Uninstalling

Installed via Homebrew

$ brew remove pine

Downloaded Manually

$ rm -r /Applications/Pine.app ~/Library/Caches/io.github.lukakerr.pine

Building

Make

$ git clone [email protected]:lukakerr/pine.git
$ cd pine
$ make

Xcode

$ git clone [email protected]:lukakerr/pine.git
$ cd pine
$ open Pine.xcworkspace

Testing

Make

$ make test

Xcode

Hit U

Contributing

See CONTRIBUTING.md for details on how to contribute.

Features

  • Themeable
  • Math support (LaTeX subset)
  • GitHub Flavored Markdown
  • GitHub Emoji support
  • LaTeX, Markdown and HTML autocomplete
  • Local image support
  • Toggleable split view (horizontal and vertical split)
  • Full screen support
  • Tab support
  • Folder support
  • Ability to create custom .css themes
  • Ability to share .md files
  • Syntax highlighting for source and preview
  • Autosaving
  • Version control and history recovery
  • Markdown shortcuts (keyboard and Touch Bar shortcuts)
  • Auto pair markdown tags
  • Enable/disable markdown extensions
  • Custom font
  • Word count

Todo

  • Add ability to edit preview .css
  • Improve sidebar
    • Folder watching
    • More actions in contextual menu

Screenshots

pine's People

Contributors

ch4ot1c avatar charlottefallices avatar goooler avatar gynekolog avatar hamin avatar lukakerr avatar nhoizey avatar palaniraja avatar ryanbloom 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  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  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

pine's Issues

can you release a compiled app that can directly run under macOS

Release A Compiled App

Hi, thanks for your excellent work!

Can you release a compiled app that can directly run under macOS(most famous repo will offer this kind of things), so users can just drag and drop the app in the Application Folder, compiling from the source is a little bit harder for normal user.

Thanks in advance!

Auto Complete won't work when typing in single line $$

Trying to use latex auto complete, it works when typing as plain text.
It works in multi-line $$.
But when I try to type between in single line $$, the auto complete just does not pop out.

For example, auto complete works in:

$$
\A
$$

but does not work in :

$\A  $

Support RTL documents

Just downloaded Twig, and I have to say it looks awesome! Thanks for making it @lukakerr 🔥

However, currently when editing RTL documents, the text stays oriented to the left (instead of to the right).

Preview doesn't render local images

Hello!

I can't find a way for local image to render properly in preview window.

I use three files for testing:

/Users/johndoe/tmp/aaa.md 
/Users/johndoe/tmp/aaa.png
/Users/johndoe/tmp/aaa/aaa.png - for testing relative subfolder

Nothing of the following seems to work:

![test png 1](aaa.png)
![test png 2](aaa/aaa.png)
![test png 3](file:///Users/johndoe/tmp/aaa.png)
<img src="aaa.png" alt="test png 4">
<img src="aaa/aaa.png" alt="test png 5">

Web link works as it should:

![web png](https://johndoe.com/aaa.png)

I tried to preview same aaa.md in MacDown and it works for all cases.

Am I missing something?

Thank you for your time,
Aljoša

Twig events cause Safari Web Inspector to open

When I open Twig and/or type a few keystrokes (enough for the preview to update, I'm guessing), the Safari web inspector opens in a new Safari window with title "Web Inspector - [Hostname] - Twig - JSContext". Many windows end up opening so the app is unusable for me. I'm on macOS 10.13.6 with Safari 12. This wasn't a problem when I used Twig a few weeks ago, although I had Safari 11 at the time. When I close Safari, the inspector windows aren't created, but Twig is slow to update the preview and the cursor jumps around when it does.

Lists should autocomplete on return

When you start a list (using *, -, +, or a number followed by a period), type an item, and hit return the editor should (at least have the option to) autocomplete a new list element for the next line.

For instance, if I type * Milk and hit return, the next line should immediately have a * and a space so I can easily continue adding to the list. Same for ordinal lists; the next line should have the next number in sequential order.

Additionally, if I hit return again, it should remove the * space it inserted and return again, discontinuing the list.

Separate Editor themes and Preview themes

It would be helpful to have separate Editor themes and Preview themes. The editor is just for me, and I want to see Markdown syntax (usually with a dark theme). The preview pane is what will be published and others will see (typically with a light theme). It seems like these should be two different preferences, and possibly two different sets of themes.

Exported file is illegible

In working on a new export format, I ran into the following issue: if I select a dark theme, then export HTML, the resulting file has white text and a white background. Here are a few ways I could imagine resolving it:

  1. Use the same theme for previewing and exporting. In HTML, changing the background is one line of code, but it's potentially difficult for other formats.
  2. Use a standard theme for exporting, regardless of the user's settings. Every export has black text, white background, and default syntax highlighting. This is probably fine if people use a separate tool for publishing anyway.
  3. Let the user choose. Have a separate pop-up menu for "export theme", either in preferences or in the export window.

The theme system might need a bit of refactoring to accommodate the last two.

Highlighting on imports

So far, pine looks really nice. There's one tiny thing that caught my eye though, which is the syntax highlighting on typescript code snippets. Specifically imports.

Screenshot 2019-03-27 09 38 28

The original code snippet is:

import { field } from 'wetland';
import { translatable } from 'wetland-i18n';

export class Place {
  @translatable
  @field({ type: 'string' })
  public name: string;
}

As you can see, the destructed imports aren't visible. They're there though, when selected they're visible.

Screenshot 2019-03-27 09 41 00

Sync sidebars across windows/tabs

Currently when a new tab or window is opened, the root folder is collapsed. The folder structure should be maintained across sidebars, as well as the selected file

Question on features

I'm submitting a

  • bug report
  • feature request
  • question

Other information

One of the unsupported features is what you call "Markdown shortcuts/auto pair". What exactly do you mean with that? If you're referring to what I think, which is to have shortcuts to make eg. some text bold or wrap it as a url, take a look at the implementation from GitHawk; that might be a good starting point.

Add option to use theme color as sidebar background color

Add a preferences option to use the theme background color as the sidebar background color. Currently a transparent appearance is set on the background, which doesn't look great when the theme is not close to the white/black color of the transparent appearance

Preview doesn't reflect changes made while hidden

I'm submitting a

  • bug report
  • feature request

Steps to reproduce:

  1. Hide the preview window
  2. Make some changes to the file
  3. Show the preview window

The preview doesn't show the changes from (2) until the file is edited again.

Feature Request: Wiki links

Would it be possible to allow links between .md files in the form of Wikilinks, i.e. [[Other Note.md|Description]]?
That would make twig a perfect Markdown-Wiki app, which I've been looking for for ages.
I've never worked with Swift before, otherwise I'd offer to help implement it.
It's kinda possible to do this with Atom, and here's how the logic works in JS, but Twig looks much nicer.

Any chance this feature would be possible?

Better preview for yaml header

Hi! Thanks for this lightweight markdown editor! I completely love it! In using it to write blog posts, I noticed that the yaml header was rendered like this:

Screen Shot 2019-04-18 at 15 54 58

Do you have plans for better display of the header?

Thanks again :)

App crashes when using emojis

When I tried to add an emoji to a document (using the latest version of Pine), the app crashed. This happens every time I try to use an emoji.

If typing fast cursor goes between characters

While trying the app I was typing a bunch of chars really fast and suddenly the cursor went backwodrd(1 char in the beginning, the more chars I've entered more the cursor goes backward)

Syncing with Gist

I'm submitting a

  • bug report
  • feature request
  • question

Other information

Hello! I'm a really big fan of Twig. Been using at work for the past days and it's awesome!
I think it would be cool if Twig could sync with Gist using Github's API.

Newbie - error when building from source

I'm a complete newbie to xcode/swift so this is probably a stupid error but I'm interested in learning via this project.

I followed the instructions for building and using latest XCode Version 9.4.1 (9F2000) but getting an error within several Highlightr files.

'Key' is not a member type of 'NSAttributedString'

Be grateful for any guidance to why this is happening and how to fix.

Math not fully supported

It appears to me that i.e. $$\begin{align}...\end{align}$$ is not supported. I am not aware of the underlaying rendering process but I believe that mathjax / katex is somewhat sensible to white spaces around $$ - in particular when using \begin{align}.

Install via home brew

Hey there! The project is really cool!

I'd love to be able to install (and update) through homebrew. Are you thinking about supporting it any time soon?

Pod install error

pod install then error:

Error

RuntimeError - [!] Xcodeproj doesn't know about the following attributes {"inputFileListPaths"=>[], "outputFileListPaths"=>[]} for the 'PBXShellScriptBuildPhase' isa.
If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:321:in `configure_with_plist'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project.rb:262:in `new_from_plist'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:350:in `object_with_uuid'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:300:in `block (2 levels) in configure_with_plist'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:299:in `each'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:299:in `block in configure_with_plist'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:296:in `each'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:296:in `configure_with_plist'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project.rb:262:in `new_from_plist'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:350:in `object_with_uuid'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:300:in `block (2 levels) in configure_with_plist'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:299:in `each'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:299:in `block in configure_with_plist'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:296:in `each'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:296:in `configure_with_plist'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project.rb:262:in `new_from_plist'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project.rb:203:in `initialize_from_file'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project.rb:103:in `open'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/installer/analyzer.rb:918:in `block (2 levels) in inspect_targets_to_integrate'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/installer/analyzer.rb:917:in `each'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/installer/analyzer.rb:917:in `block in inspect_targets_to_integrate'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/user_interface.rb:64:in `section'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/installer/analyzer.rb:912:in `inspect_targets_to_integrate'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/installer/analyzer.rb:78:in `analyze'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/installer.rb:243:in `analyze'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/installer.rb:154:in `block in resolve_dependencies'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/user_interface.rb:64:in `section'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/installer.rb:153:in `resolve_dependencies'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/installer.rb:116:in `install!'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/command/install.rb:41:in `run'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0@global/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/command.rb:52:in `run'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/gems/cocoapods-1.5.0/bin/pod:55:in `<top (required)>'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/bin/pod:23:in `load'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/bin/pod:23:in `<main>'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
/Users/nc-wudb/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'

Colon disables some Markdown-Formatting

Some Markdown-Formatting like bold and italic gets disabled if a colon is within the asterisks:

This: **i am a test** produces: i am a test
but
This: **i am a test:** just produces: **i am a test:**

Bildschirmfoto 2019-05-03 um 07 49 34

Theme for GitLab

Do you have a theme for GitLab?
I also found that GitHub and GitLab did not support the markdown in the same way
So the rendering is not exactly the same
Suggestion: Add in preferences a "compatibility" option with the possibility of choosing "GitHub" or "GitLab" (or something else)

Typing "</div" exposes JS in preview

Pretty self-explanatory, see screenshot below.

Screenshot 2019-03-22 at 22 06 39

It also works for other HTML tags (I tested <table, <tr, <div, <blockquote, <pre, <p and their closing equivalents), but not all (e.g. <a, <span, <b, <s, <i).

Filename with square brackets

My File [Testdatei].md can be opened fine, but is (after the first autosave?) shown as %5BTestdatei%5D.md in the titlebar, the tabs and the sitebar:

bildschirmfoto 2019-02-19 um 22 28 26

Also, it seems that Twig is trying to save the file under the renamed name and fails:

bildschirmfoto 2019-02-19 um 22 29 05

Nested numeric lists get flattened

Whether in the right-pane preview or exporting to either PDF or HTML, Twig can't tell that indenting some list items relative to others has significance.

Here's a selection of Markdown content that will demonstrate the problem:

First, we'll build out the basic, as-generated Hanami app in a Docker image. Initially starting from a Debian base, we'll build an image that

1. installs the Debian packages we've been using for our Ruby-development images, including the requirements (Qt5's `qmake`, `xvfb`, etc) for an image hosting `capybara-webkit` and/or `selenium`;
2. installs the current versions of Gems for
  1. Hanami 1.2; and
  2. Our evolving-standard suite of development tools, including
    1. `awesome_print`,
    2. `flay`,
    3. `flog`,
    4. `reek`,
    5. `rubocop`,
    6. `pry-byebug`,
    7. `simplecov`,
    8. various MiniTest add-ons.

(GitHub's Markdown renderer sees that's a numbered list with three levels of indentation.

How Twig renders that content can be seen here:

capturfiles

Obviously not what the markup specifies.

(Possibly related to #18.)

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.