AminetAminet
Search:
84739 packages online
About
Recent
Browse
Search
Upload
Setup
Services

text/edit/earmark.lha

Mirror:Random
Showing: m68k-amigaos iconppc-amigaos iconppc-morphos iconi386-aros iconi386-amithlon iconppc-warpup iconppc-powerup icongeneric icon
No screenshot available
Short:Edit and view Markdown documents
Author: tyrrell.simon at gmail.com (Simon Tyrrell)
Type:text/edit
Version:1.1
Architecture:ppc-amigaos
Date:2021-01-21
Requires:dev/mui/MCC_TextEditor; dev/mui/MCC_BetterString; dev/mui/MCC_TheBar; dev/c/jansson_library.lha, Launch-Handler
Replaces:text/edit/ami-markdown.lha
Distribution:Aminet
Download:text/edit/earmark.lha - View contents
Readme:text/edit/earmark.readme
Downloads:480

This is a tool to allow you to edit and view Markdown documents. It uses a 
customised version of md4c at https://github.com/mity/md4c by Martin Mitas
available to do the actual conversion of Markdown to HTML.

## Usage:

The program can either be started from a Shell or from Workbench. 

### Shell Arguments

Earmark has the arguments template  SETTINGS/K,FILENAME

 * **SETTINGS**: Set this to the path of the settings file that you wish to 
 load when the program starts. 
 * **FILENAME**: This is the initial markdown file to load into the editor.
 
 
### Tooltypes

The icon can take a single tooltype:
 
 * **SETTINGS**: Set this to the path of the settings file that you wish to 
 load when the program starts.

### Program layout

The window consists of two pages; an Editor page and a Settings page.

### Editor:

The Editor page consists of a tool bar and a text editor gadget which is where
 the Markdown source code will be shown. The text editor is a subclass of the 
 [text editor custom class](https://github.com/amiga-mui/texteditor) so all of 
 its key shortcuts are available too.

#### Toolbar

 * **Load**: Load a Markdown file. Alternatively you can either drag and drop 
 a markdown file onto the window.
 * **Save**: Save the contents of the text editor to a file.
 * **Convert**: Convert to HTML and view in a browser. This will save a new 
 file with ".html" appended to the name of the markdown file and open it in a 
 browser.
 * **Undo**: Undo the latest changes.
 * **Redo**: Redo the latest reverted changes.
 * **Cut**: Cut the selected text to the clipboard.
 * **Copy**: Copy the selected text to the clipboard.
 * **Paste**: Paste the selected text from the clipboard. 
 * **Bold**: Make the selected text bold.
 * **Italic**: Make the selected text italic.
 * **Strikethrough**: Strike through the selected text.
 * **Code**: Make the selected text code.
 * **Search**: Search within the text. This will open a new window where you 
 can enter a search string and choose where to search from within the 
 editor, whether to do case sensitive search and whether to search forwards
 or backwards.
 * **Horizontal Rule**: Insert a Horizontal Rule.
 * **Fenced Code**: Make a fenced code block.
 * **Blockquote**: This will either insert a blockquote or if you have some 
 selected text it will insert a blockquote marker at the start of each of the 
 selected lines.
 * **Hyperlink**: Insert a hyperlink. This will open a new window where you 
 can enter the link text and address. 
 * **Image**: Insert an image. This will open a new window where you can 
 enter the image path, its alternative text and an optional title. 
 * **Table**: Insert a table. This will open a new window where you can enter 
 the number of rows and columns that you require. Also there is an 
 *Alignments* string gadget where you can specify the alignment for each 
 column. 
 By default, each column is left-aligned, however you can alter that here. The 
 string here will be read where the first character defines the alignment for 
 the first column, the second character for the second column, *etc.* 
    * *l* will make the column left-aligned, 
    * *r* will make the column right-aligned
    * *c* will make the column centre-aligned.

If *Alignments* is empty or has fewer characters than the number of 
specified  columns, the remaining columns will default to being left-aligned. 
For example *crlc* would specify that the first four columns of the table 
would be centre-, right-, left- and centre-aligned respectively.
 
At the bottom of this page is an information bar which shows the following
information:

 * **Row**: Current row that the cursor is on.
 * **Column**: Current column that the cursor is on.
 * **Changed**: A checkmark that will be ticked if the file is changed from 
 its last saved position.

 
### Settings:

On this page you can configure some of the options for converting the md4c 
Markdown to HTML. For more information on these, view the 
[md4c documentation](https://github.com/mity/md4c).You can use the 
*Save Settings* and *Load Settings* buttons to save and load any customised 
conversion settings if you wish. 


### Menu

The menu options mostly duplicate the options available on the toolbar. There
are however some exceptions:

 * **Edit - Heading**: This submenu has the options for inserting a heading 
 tag into the document. These range from H1, H2 through to H6 with their 
 shortuct keys being 1, 2, through to 6.
 * **View - Toolbar rows**: This submenu allows you to specify the number
 of rows that the toolbar will use. This can be useful if you find that the
 window is too wide for your display.

## Future:

 * Getting the buttons to become selected for given bits of text, *e.g.* the 
 bold button being highlighted when the cursor is in a piece of bold 
 text, *etc.* 
 * Syntax highlighting would be nice too. 
 * Adding more elements to the md4c Markdown to HTML conversion code such as 
 definition lists, footnotes, *etc.* This would then get added to md4c via pull 
 requests.
 * Get the *Convert* function to re-use an existing browser window rather than 
 launch a new one each time.

Any other ideas are welcome. :-)

## Changes

### 1.1 - (19/01/2021)
 * Added command line arguments and icon tooltypes.
 * Set a default name for saved settings files. Also added a tooltype where 
 the user can set the default config file. (@walkero)
 * Added option for setting the number of rows that the toolbar spans so
 the window can require less width (@capehill).
 * Added shortcuts for inserting any of the H1, H2, ..., H6 tags into the
 editor.
 * Added Edit and View menus including option for changing the number of rows
 in the toolbar to reduce the minimum window width if needed (@capehill)
 * Added status bar gadget for showing current cursor position and whether the
 file has been changed. (@walkero)
 * Menu images added. 
 * BUGFIX: The convert button had the same shortcut as the Hyperlink button 
(@walkero)
 * BUGFIX: Fenced code blocks were automatically adding opening and closing 
braces (@walkero)
 * BUGFIX: The table button bubble had a semicolon after the shortcut, 
instead of a colon (@walkero)
 * BUGFIX: Menu Quit option was not working (@Capehill)
 * BUGFIX: If you marked a line, then chose bold, italic, *etc.* and that
 line started/ended with a space, then the markdown was broken. This was 
 because md4c included that space and the asterisks were staying as 
 characters. 

 *E.g.*

\*\*this is a broken bold line, not translated by md4c \*\* 

\*\* this is also a broken bold line, not translated by md4c\*\*

 (@walkero)
* BUGFIX: The filename for converting to html was getting ".html" 
 appended upon each conversion.

### 1.0 - (14/01/2021)
 * Added Blockquote function.
 * Added Search functionality.
 * Added Cut, Copy and Paste buttons.
 * Added shortucut for Update, now named Convert (@walkero).
 * Image, table and link editors now close when you click OK (@walkero).
 * Conversion settings can be saved/loaded (@walkero). 
 * The editor button shortcuts are now shown on the help bubbles as well 
 (@walkero).
 * Gladly accepted a much better name for the program :-) (@trixie).
 * BUGFIX: Choosing the Github dialect conversion setting wasn't being set.
 * BUGFIX: New projects would not save the converted html and launch the 
 preview. (@walkero).
 * BUGFIX: Load and Save menu options had the same shortcut (@walkero). 
 * BUGFIX: "Allow blocks" and "Allow spans" had the same help bubble text
 (@walkero).
  
### 0.8 - (10/01/2021)
 * Moved to using TheBar to give a graphical toolbar along with many more 
 functions.
 * Added Undo, Redo, Strikethrough, Code, Fenced Code Blocks, Horizontal 
 Rule, Table, Image and Link functions.
	
### 0.5 - (07/01/2021):
 * Changed from using HTMLview to using Launch-Handler which comes with OS4.
 * Added the settings page to allow configuration of the Markdown to HTML 
 conversion settings. 
 * Added a (very!) :-)) rudimentary set of buttons on the toolbar to allow the 
 setting of bold, italic and code sections. 
 * Added a test Markdown file.
 * Bug fixes.

### 0.1 - (05/01/2021):
 * Initial release

## LICENSE:

The code is available under the MIT license. The md4c parts are copyright 
Martin Mitas. The program icon and emoticon_bigsmile image are copyright to 
Martin Merz, go to http://www.masonicons.info for more information and to 
get his awesome artwork. The rest is copyright (c) 2021 by Simon Tyrrell. 


 


Contents of text/edit/earmark.lha
PERMISSION  UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP     NAME
---------- ----------- ------- ------- ------ ---------- ------------ ----------
[unknown]                 9540   11420  83.5% -lh5- b206 Jan 19 23:01 earmark.info
[unknown]               120011  272188  44.1% -lh5- 1912 Jan 19 23:05 earmark/earmark
[unknown]               444751 1472439  30.2% -lh5- 6021 Jan 19 23:05 earmark/earmark.debug
[unknown]               100856  206996  48.7% -lh5- de3a Jan 19 23:06 earmark/earmark.debug.info
[unknown]               100858  206996  48.7% -lh5- 6382 Jan 19 22:17 earmark/earmark.info
[unknown]                  768     768 100.0% -lh0- d7c5 Jan 10 19:15 earmark/emoticon_bigsmile
[unknown]                41065   97087  42.3% -lh5- ef78 Apr 21  2020 earmark/libs/jansson.library
[unknown]                  628    1070  58.7% -lh5- 544a Jan 10 19:15 earmark/LICENSE
[unknown]                  389     661  58.9% -lh5- 4fe2 Jan 10 19:15 earmark/md4c/.gitignore
[unknown]                  601    1156  52.0% -lh5- 47df Jan 10 19:15 earmark/md4c/.travis.yml
[unknown]                  340     560  60.7% -lh5- e0c8 Jan 10 19:15 earmark/md4c/appveyor.yml
[unknown]                 4786   12375  38.7% -lh5- e92c Jan 10 19:15 earmark/md4c/CHANGELOG.md
[unknown]                  802    2040  39.3% -lh5- 5b01 Jan 10 19:15 earmark/md4c/CMakeLists.txt
[unknown]                   74      81  91.4% -lh5- 455e Jan 10 19:15 earmark/md4c/codecov.yml
[unknown]                  115     178  64.6% -lh5- ea08 Jan 10 19:15 earmark/md4c/compile
[unknown]                  669    1096  61.0% -lh5- 693c Jan 10 19:15 earmark/md4c/LICENSE.md
[unknown]                  304     576  52.8% -lh5- 9305 Jan 10 19:15 earmark/md4c/md2html/CMakeLists.txt
[unknown]                 2253    8313  27.1% -lh5- cfce Jan 10 19:15 earmark/md4c/md2html/cmdline.c
[unknown]                 2492    6155  40.5% -lh5- c3ff Jan 10 19:15 earmark/md4c/md2html/cmdline.h
[unknown]                  774    1746  44.3% -lh5- d696 Jan 10 19:15 earmark/md4c/md2html/md2html.1
[unknown]                 5192   12578  41.3% -lh5- 48d4 Jan 10 19:15 earmark/md4c/README.md
[unknown]                 1402    4351  32.2% -lh5- 6229 Jan 10 19:15 earmark/md4c/scripts/build_folding_map.py
[unknown]                  697    1781  39.1% -lh5- fb87 Jan 10 19:15 earmark/md4c/scripts/build_punct_map.py
[unknown]                  690    1750  39.4% -lh5- 9294 Jan 10 19:15 earmark/md4c/scripts/build_whitespace_map.py
[unknown]                  648    1488  43.5% -lh5- 2164 Jan 10 19:15 earmark/md4c/scripts/coverity.sh
[unknown]                  597    2160  27.6% -lh5- 3884 Jan 10 19:15 earmark/md4c/scripts/run-tests.sh
[unknown]                15232   82810  18.4% -lh5- c6ec Jan 10 19:15 earmark/md4c/scripts/unicode/CaseFolding.txt
[unknown]                55778  259503  21.5% -lh5- 664b Jan 10 19:15 earmark/md4c/scripts/unicode/DerivedGeneralCategory.txt
[unknown]                  543    1697  32.0% -lh5- e814 Jan 10 19:15 earmark/md4c/src/CMakeLists.txt
[unknown]                14197   74111  19.2% -lh5- b9d1 Jan 13 13:52 earmark/md4c/src/entity.c
[unknown]                  897    1573  57.0% -lh5- e564 Jan 10 19:15 earmark/md4c/src/entity.h
[unknown]                 5218   19734  26.4% -lh5- a9ff Jan 13 13:52 earmark/md4c/src/md4c-html.c
[unknown]                 1289    2508  51.4% -lh5- 8ce1 Jan 10 19:15 earmark/md4c/src/md4c-html.h
[unknown]                  227     379  59.9% -lh5- 0553 Jan 10 19:15 earmark/md4c/src/md4c-html.pc.in
[unknown]                51630  221000  23.4% -lh5- 6648 Jan 19 22:29 earmark/md4c/src/md4c.c
[unknown]                 5515   15458  35.7% -lh5- a257 Jan 10 19:15 earmark/md4c/src/md4c.h
[unknown]                  232     365  63.6% -lh5- 29ff Jan 10 19:15 earmark/md4c/src/md4c.pc.in
[unknown]                  548    1372  39.9% -lh5- 20f4 Jan 10 19:15 earmark/md4c/test/cmark.py
[unknown]                 2679   10295  26.0% -lh5- 137a Jan 10 19:15 earmark/md4c/test/coverage.txt
[unknown]                  251     424  59.2% -lh5- 5be8 Jan 10 19:15 earmark/md4c/test/fuzz-input/commonmark.md
[unknown]                   99     133  74.4% -lh5- 6521 Jan 10 19:15 earmark/md4c/test/fuzz-input/gfm.md
[unknown]                   27      30  90.0% -lh5- c02a Jan 10 19:15 earmark/md4c/test/fuzz-input/latex-math.md
[unknown]                   24      24 100.0% -lh0- ab8f Jan 10 19:15 earmark/md4c/test/fuzz-input/wiki.md
[unknown]                  504    1136  44.4% -lh5- f43a Jan 10 19:15 earmark/md4c/test/latex-math.txt
[unknown]                 1319    2791  47.3% -lh5- 6e4d Jan 10 19:15 earmark/md4c/test/LICENSE
[unknown]                 2044    6508  31.4% -lh5- a069 Jan 10 19:15 earmark/md4c/test/normalize.py
[unknown]                 1597    4905  32.6% -lh5- f288 Jan 10 19:15 earmark/md4c/test/pathological_tests.py
[unknown]                  538    1511  35.6% -lh5- 0745 Jan 10 19:15 earmark/md4c/test/permissive-email-autolinks.txt
[unknown]                  853    2855  29.9% -lh5- 28f9 Jan 10 19:15 earmark/md4c/test/permissive-url-autolinks.txt
[unknown]                 1270    4049  31.4% -lh5- 02a5 Jan 10 19:15 earmark/md4c/test/permissive-www-autolinks.txt
[unknown]                48672  202651  24.0% -lh5- cb9e Jan 10 19:15 earmark/md4c/test/spec.txt
[unknown]                 1842    5924  31.1% -lh5- 2ef9 Jan 10 19:15 earmark/md4c/test/spec_tests.py
[unknown]                  595    1677  35.5% -lh5- 4509 Jan 10 19:15 earmark/md4c/test/strikethrough.txt
[unknown]                 1638    7641  21.4% -lh5- 4dd5 Jan 10 19:15 earmark/md4c/test/tables.txt
[unknown]                  502    3590  14.0% -lh5- 4719 Jan 10 19:15 earmark/md4c/test/tasklists.txt
[unknown]                  401     983  40.8% -lh5- e967 Jan 10 19:15 earmark/md4c/test/underline.txt
[unknown]                 1184    5994  19.8% -lh5- 6e98 Jan 10 19:15 earmark/md4c/test/wiki-links.txt
[unknown]                 3517    8913  39.5% -lh5- ff3b Jan 19 22:58 earmark/readme.md
[unknown]                  470     929  50.6% -lh5- dce0 Jan 10 19:15 earmark/test.md
---------- ----------- ------- ------- ------ ---------- ------------ ----------
 Total        59 files 1062634 3281482  32.4%            Jan 21 04:00
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>