GithubHelp home page GithubHelp logo

shira-3749 / rstpad Goto Github PK

View Code? Open in Web Editor NEW
52.0 4.0 7.0 586 KB

Standalone reStructuredText editor with live preview (native app)

License: MIT License

Python 0.96% CSS 0.56% JavaScript 2.30% QMake 1.61% C++ 94.57%
restructuredtext editor preview side-by-side rst text-editor standalone cross-platform live-preview application windows osx

rstpad's Introduction

RSTPad

reStructuredText editor with live preview.

screenshot.png

  • live preview with autoscroll
  • configurable orientation (horizontal / vertical)
  • search & replace
  • toolbar with common elements:
    • headings
    • bold, italic
    • inline code
    • code blocks
    • horizontal rule
    • lists
    • link
    • image
  • inserting highlighted code blocks (Pygments)
    • autocomplete for known lexer names
  • built-in help pages
    • syntax cheat sheet
    • directives
  • export to PDF
  • UTF-8 documents only
  • the application contains an embedded Python interpreter
    • Python libraries are located in the application's directory / bundle
  • the Docutils library is used to convert RST to HTML on the fly
    • the converstion is done in a separate thread
    • resources/preview/docutils_extensions.py overrides some of the HTML writer's methods to insert additional tags and attributes
  • HTML output is displayed using Qt WebEngine
    • external links are delegated to QDesktopServices
    • autoscroll is implemented in JavaScript
    • the preview is "frozen" during loading and autoscrolling to allow for smooth transitions (a previously rendered frame is used for the duration)
  • QT 5.8 & Qt Creator
  • Python 2.7 (32bit or 64bit depending on the used compiler)
  • Pygments (tested with 2.1.3)
  • Docutils (tested with 0.13, revision 7975)

Note

  • The paths used below (such as C:/python) are just examples. Use actual paths :)
  • Use forward slashes in all paths. Omit trailing slashes.
  • OS X notes and examples assume that Python 2.7 has been installed using Homebrew. Your paths may vary.

Copy rstpad.local.pro.dist, name it rstpad.local.pro and set the following variables:

  • PYTHON_LINK
    • Python linker flags
    • Windows: -LC:/python/libs -lpython27
    • OS X: use the python-config utility to determine linker flags:
      • python2.7-config --ldflags
  • PYTHON_INCLUDE_PATH
    • path to a directory containing Python's header files
      • Windows: C:/python/include
      • OS X: /usr/include/python2.7
  • PYTHON_SYS_PATH
    • path to a directory containing:
      • libs.zip - the Python standard library as a ZIP archive
      • pygments, docutils - library directories (these cannot be inside libs.zip)
      • any .pyd, .dll and .so modules that should be available in a standard Python installation
    • .pyc files should be excluded
  1. Use the Windows Deployment Tool with the release binary to fetch required DLLs.

    Example: windeployqt.exe --release --no-translations rstpad.exe

  2. Locate and copy the correct python27.dll file or the application won't work on machines without Python 2.7 installed.

    • possible locations depend on how you've installed Python and on its version:
      • C:\Windows\System\python27.dll
      • C:\Windows\SysWoW64\python27.dll
    • make sure you're ussing the correct version (32 vs 64bit)

Use the Mac Deployment Tool to convert the resulting application into a .dmg file:

macdeployqt RSTPad.app -dmg

Not tested yet. You're on your own :)

rstpad's People

Contributors

shira-3749 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

Watchers

 avatar  avatar  avatar  avatar

rstpad's Issues

Support for project folder

Hello,
First of all FINALLY i found a tool that does what i want. Been searching a lot for a tool like this.

Second.
I would like to request support for project view that allows you to open a working directory instead of a file. This allows you to switch between files faster.

How to build the project? (on Linux)

Thank your for your cross-platform C++ alternative to reText. ๐Ÿ˜ƒ
But I do not understand how to compile it ๐Ÿ˜ž

I have customized the file rstpad.local.pro on my Linux Fedora 26:

# Python
PYTHON_LINK = -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic
PYTHON_INCLUDE_PATH = /usr/include/python2.7
PYTHON_SYS_PATH = /usr/lib/python2.7/site-packages 

# Web engine
DEBUG_WEBENGINE_REMOTE_PORT = 0
  • But how to open the project using Qt Creator?
  • Is there a way to build the project from command line?

Support for scaling of buttons

Hello,
The buttons are very tiny on my screen(2560x1440). Is it possible to scale them with your resolution and also scale them with a setting in Settings menu?

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.