Coder Social home page Coder Social logo

hackjutsu / lepton Goto Github PK

View Code? Open in Web Editor NEW
10.1K 169.0 479.0 41.69 MB

💻 Democratizing Snippet Management (macOS/Win/Linux)

Home Page: https://hackjutsu.com/Lepton

License: MIT License

JavaScript 80.41% HTML 0.17% SCSS 19.42%
electron redux gists desktop-client electron-builder react markdown-editor notes snippets electron-app

lepton's Introduction

All Contributors

Build Status Dependency Status MIT Licensed lepton

Lepton is a lean code snippet manager powered by GitHub Gist. Check out the latest release.

Features

  • Unlimited public/secret snippets
  • Unlimited tags
  • Language groups
  • Markdown/JupyterNotebook
  • GitHub Enterprise
  • GitHub token
  • Immersive mode
  • Customizable
  • Light/Dark theme
  • macOS/Win/Linux
  • Dashboard
  • Search
  • Proxy
  • Free

Screenshot

Light Theme Dark Theme
Screenshot Screenshot
Organize Markdown Jupyter Notebook
Screenshot Screenshot Screenshot
Search (⇧ + Space) Immersive Mode (⌘/Ctrl + i) Dashboard (⌘/Ctrl + d)
Screenshot Screenshot Screenshot

Shortcuts

Function Shortcut Note
New Snippet Cmd/Ctrl + N Create a snippet
Edit Snippet Cmd/Ctrl + E Edit a snippet
Delete Snippet Cmd/Ctrl + Del Delete selected snippet
Submit Cmd/Ctrl + S Submit the changes from the editor
Cancel Cmd/Ctrl + ESC Exit the editor without saving
Sync Cmd/Ctrl + R Sync with remote Gist server
Immersive Mode Cmd/Ctrl + I Toggle the Immersive mode
Dashboard Cmd/Ctrl + D Toggle the dashboard
About Page Cmd/Ctrl + , Toggle the About page
Search Shift + Space Toggle the search bar

Customization

Lepton's can be customized by <home_dir>/.leptonrc! You can find its exact path in the About page by Command/Ctrl + ,. Create the file if it does not exist.

  • Theme (light/dark)
  • Snippet
  • Editor
  • Logger
  • Proxy
  • Shortcuts
  • Enterprise
  • Notifications

Check out the configuration docs to explore different customization options.

Tech Stack

Based on

  1. Framework: Electron
  2. Bundler: Webpack, Babel, electron-builder
  3. Language: ES6, Sass
  4. Library: React, Redux, Redux Thunk, Redux Form
  5. Lint: ESLint

Installation

brew install --cask lepton
snap install lepton

Based on

Development

Install dependencies

$ git clone https://github.com/hackjutsu/Lepton.git
$ cd Lepton && yarn install
# inspect stale dependencies
$ yarn check-outdated

Client ID/Secret

Register your application, and put your client id and client secret in ./configs/account.js.

module.exports = {
  client_id: <your_client_id>,
  client_secret: <your_client_secret>
}

Run

$ yarn build && yarn start

Build Installer App

Read electron-builder docs and check out the code signing wiki before building the installer app.

Build apps for macOS.

$ yarn dist -m

Build apps for Windows.

$ yarn dist -w

Build apps for Linux.

Need a running Docker daemon to build a snap package.

$ yarn dist -l

Build apps for macOS, Windows and Linux.

$ yarn dist -wml

Build apps for the current OS with the current arch.

$ yarn dist

FAQ

--> Wiki FAQ

Contributors

CosmoX
CosmoX

💻 🎨 ⚠️ 🚧 📦 🤔
Jiaye Wu
Jiaye Wu

💻 🚧 🤔
Danila
Danila

💻 🎨 🚧
Meilin Zhan
Meilin Zhan

💻 🤔 🚧
lcgforever
lcgforever

💻
Yuer Lee
Yuer Lee

📖 📦
Su,Yen-Yun
Su,Yen-Yun

📖
Chen Tong
Chen Tong

💻 🤔 🚧
Jason Jiang
Jason Jiang

💻
Alan Pope
Alan Pope

📦
Tony Xu
Tony Xu

📦
Tegan Churchill
Tegan Churchill

💻
Angie Wang
Angie Wang

🎨
Batuhan Bayrakci
Batuhan Bayrakci

💻
Samuel Meuli
Samuel Meuli

💻
Alexandre Amado de Castro
Alexandre Amado de Castro

💻
Abner Soares Alves Junior
Abner Soares Alves Junior

💻
Sean
Sean

💻
Ole
Ole

💻
Gabriel Nicolas Avellaneda
Gabriel Nicolas Avellaneda

💻 📖
Dennis Ideler
Dennis Ideler

💻 🤔 📖
Anthony Attard
Anthony Attard

💻
ArLE
ArLE

💻
Pol Maresma
Pol Maresma

💻
PM Extra
PM Extra

💻
Zava
Zava

💻
Jason R Alexander
Jason R Alexander

💻
Sebastian Hojas
Sebastian Hojas

📖
董雨航
董雨航

💻
sxyazi
sxyazi

📦
Brian Zalewski
Brian Zalewski

📦

License

MIT © hackjutsu

lepton's People

Contributors

abnersajr avatar acastro2 avatar allcontributors[bot] avatar anthonyattard avatar arlequin64 avatar baybatu avatar calinou avatar cixuuz avatar dideler avatar dnlhc avatar edzava avatar gabrielnicolasavellaneda avatar gisonrg avatar hackjutsu avatar imgbotapp avatar lcgforever avatar meilinz avatar moia-sven-ole avatar pmextra avatar polnetwork avatar professormanhattan avatar rawrmonstar avatar samuelmeuli avatar seancheung avatar sebastian-hojas avatar sunxyw avatar sxyazi avatar tonyxu-io avatar vviikk avatar wujysh 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  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

lepton's Issues

Unit tests

I don't know how to apply unit tests for a redux app. Help wanted.

New feature: offline mode

As stated in the title... But what's the definition of offline mode?

A minimum implementation would be to save the redux state to disk each time we perform a sync, and initialize the redux with said persistent state(if any) when launch.

Snippet thumbnail shows gist description smartly

Currently, the snippet thumbnail shows gist description completely, which sometimes is too long for a thumbnail card.

image

Proposal:

  1. Only pick up the title. However, GitHub Gist doesn't provide the "title" concept in its Gist description section. We need to invent the concept ourselves, like putting the title inside brackets[title] description.
  2. Set a maximum lines and truncate the rest.

Custom tags support

It would be better if we can apply custom tags to the gist, not just the language tags.

Sharing button?

What benefit will it provide if there is a sharing button?

  • How
    • Email (Gmail)
    • Embedded link
  • Content
    • Plain text/ Rich text
    • Gist link

Login Fail

Version:
macOS 10.12.3
Lepton 1.0.0-beta.4

Problem:

After login my github, Lepton give a Sync Sucess notify and show loading progress, But after few seconds, the window change to login page again!

Some Log:

2017-02-04T04:41:14.519Z - info: Found user profile null
2017-02-04T04:41:16.296Z - info: [Dispatch] updateAuthWindowStatus ON
2017-02-04T04:41:34.326Z - info: [Dispatch] updateAuthWindowStatus OFF
2017-02-04T04:41:34.330Z - info: [Dispatch] updateUserSession IN_PROGRESS
2017-02-04T04:41:35.579Z - info: [Dispatch] updateUserSession IN_PROGRESS
2017-02-04T04:41:35.580Z - info: [Dispatch] updateAccessToken
2017-02-04T04:41:38.165Z - debug: The gist number on this page is 6
2017-02-04T04:41:39.134Z - debug: The gist number on this page is 0
2017-02-04T04:41:39.141Z - info: [Dispatch] updateSyncTime
2017-02-04T04:41:39.142Z - info: [Dispatch] updateGists
2017-02-04T04:41:39.142Z - info: [Dispatch] updateGistTags
2017-02-04T04:41:39.144Z - info: [Dispatch] selectGistTag
2017-02-04T04:41:39.145Z - info: [Dispatch] fetchSingleGist 5d84822a5b0d707c53d8
2017-02-04T04:41:39.148Z - info: [Dispatch] selectGist 5d84822a5b0d707c53d8
2017-02-04T04:41:39.149Z - info: [Dispatch] updateUserSession ACTIVE

Sync failed: please check your network connection.

I use Version 1.0.0-beta.3 (1.0.0-beta.3), and CAN connect to Github gist, but this message keep coming, DevTool console told me

Unhandled rejection TypeError: Cannot convert undefined or null to object
    at NavigationPanel.renderLangTags (file:///Applications/Lepton.app/Contents/Resources/app.asar/bundle/app.bundle.js:1962:14)
    at NavigationPanel.renderTagSection (file:///Applications/Lepton.app/Contents/Resources/app.asar/bundle/app.bundle.js:2019:16)
    at NavigationPanel.render (file:///Applications/Lepton.app/Contents/Resources/app.asar/bundle/app.bundle.js:2052:14)
    at /Applications/Lepton.app/Contents/Resources/app.asar/node_modules/react-dom/lib/ReactCompositeComponent.js:796:21
    at measureLifeCyclePerf (/Applications/Lepton.app/Contents/Resources/app.asar/node_modules/react-dom/lib/ReactCompositeComponent.js:75:12)
    at ReactCompositeComponentWrapper._renderValidatedComponentWithoutOwnerOrContext (/Applications/Lepton.app/Contents/Resources/app.asar/node_modules/react-dom/lib/ReactCompositeComponent.js:795:25)
    at ReactCompositeComponentWrapper._renderValidatedComponent (/Applications/Lepton.app/Contents/Resources/app.asar/node_modules/react-dom/lib/ReactCompositeComponent.js:822:32)
    at ReactCompositeComponentWrapper.performInitialMount (/Applications/Lepton.app/Contents/Resources/app.asar/node_modules/react-dom/lib/ReactCompositeComponent.js:362:30)
    at ReactCompositeComponentWrapper.mountComponent (/Applications/Lepton.app/Contents/Resources/app.asar/node_modules/react-dom/lib/ReactCompositeComponent.js:258:21)
    at Object.mountComponent (/Applications/Lepton.app/Contents/Resources/app.asar/node_modules/react-dom/lib/ReactReconciler.js:46:35)
    at ReactCompositeComponentWrapper.performInitialMount (/Applications/Lepton.app/Contents/Resources/app.asar/node_modules/react-dom/lib/ReactCompositeComponent.js:371:34)
    at ReactCompositeComponentWrapper.mountComponent (/Applications/Lepton.app/Contents/Resources/app.asar/node_modules/react-dom/lib/ReactCompositeComponent.js:258:21)
    at Object.mountComponent (/Applications/Lepton.app/Contents/Resources/app.asar/node_modules/react-dom/lib/ReactReconciler.js:46:35)
    at Object.updateChildren (/Applications/Lepton.app/Contents/Resources/app.asar/node_modules/react-dom/lib/ReactChildReconciler.js:121:51)
    at ReactDOMComponent._reconcilerUpdateChildren (/Applications/Lepton.app/Contents/Resources/app.asar/node_modules/react-dom/lib/ReactMultiChild.js:208:32)
    at ReactDOMComponent._updateChildren (/Applications/Lepton.app/Contents/Resources/app.asar/node_modules/react-dom/lib/ReactMultiChild.js:312:31)
    at ReactDOMComponent.updateChildren (/Applications/Lepton.app/Contents/Resources/app.asar/node_modules/react-dom/lib/ReactMultiChild.js:299:12)
    at ReactDOMComponent._updateDOMChildren (/Applications/Lepton.app/Contents/Resources/app.asar/node_modules/react-dom/lib/ReactDOMComponent.js:936:12)
    at ReactDOMComponent.updateComponent (/Applications/Lepton.app/Contents/Resources/app.asar/node_modules/react-dom/lib/ReactDOMComponent.js:754:10)
    at ReactDOMComponent.receiveComponent (/Applications/Lepton.app/Contents/Resources/app.asar/node_modules/react-dom/lib/ReactDOMComponent.js:716:10)
    at Object.receiveComponent (/Applications/Lepton.app/Contents/Resources/app.asar/node_modules/react-dom/lib/ReactReconciler.js:125:22)
    at ReactCompositeComponentWrapper._updateRenderedComponent (/Applications/Lepton.app/Contents/Resources/app.asar/node_modules/react-dom/lib/ReactCompositeComponent.js:754:23)

App not updated after creating the first gist?

We notice that the app is not updated if the user creates his/her first gist. This issue seems to exist only for the first gist.

Investigate this corner case and fix any bugs if necessary.

In-app notification system

I would like to implement an in-app notification/toast system, rather than calling the OS's specific one.

But this is not a critical issue at this moment.

代码高亮问题

感谢作者的项目,挺好用的。
发现对Objective-C没有高亮支持,另外Github Gist本身是支持Markdown的,但在Lepton中显示的是纯文本。

AuthWindow should be frameless

The AuthWindow's control bar only complicates the app state management without providing any benefits for either developers and users. Just change it to a frameless window.

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.