There are some advantages in using an external editor:
You need three parts to be able to do this:
I can recommend two editors
I'm currently using visual studio code due to its great extensions e.g. Grammarly. Let's focus on this one.
I'm using the following extensions for writing posts:
The YAML extension is not visible.
Open your command pallete (strg+shif+p) and select Markdown Paste
or press strg+alt+v
You can now change the file name. The image from clipboard is stored to your disk and a link to the stored image is pasted into your markdown document.
You can set new rules for smart link pasting. At the moment, only a rule for creating a screenshot for pasting youtube videos has been added:
This embeds an image when pasting a youtube link with strg+alt+v
When you made a mistake, Grammarly shows it and it can be corrected by pressing strg+. The automatic correction has a time delay, so have to be patient for grammarly to react on your edits.
The following wrong sentence will be highlighted and useful hints are shown:
Sometames I has wrong grammer.
Just type : and the :emojisense: addon will show you all available emojis.
It is possible to embed some html code as <center>
or <div class="pull-right">:
Or <br>
line brake.
<h3> works also:
As you can see all HTML tags are correctly shown in the preview:
Table creating is not very convenient with visual studio code, it is solved better in typora. So I'm switching to typora for table editing.
You can easily add more rows or columns by right clicking and selecting table.
This is only be possible with Typora.
The WYSIWYG is solved great in Typora.
Instead of
you see directly what you will get in Typora
Title, author, community, tags... are defined in the YAML preamble. Such an preamble consists of two --- and parameter: value fields in the middle. --- must be the first chars in the markdown file.
---
title: "Howto to use beempy for posting"
author: holger80
community: hive-108365
tags: beempy,editor,howto,python
---
Possible parameters:
title - The post title should be set in quotesauthor - Hive account name from the post authorpermlink - If not set, the permlink is derived from titlecommunity - Community creation account, e.g. hive-10865, when set post appears in this communitytags - comma separated tags, can be up to 10beneficiaries - Post beneficiaries (komma separated, e.g. a:10%,b:20%) that will receive parts of the author rewardsreply_identifier - Should only set, when you are writing a comment, this is then the parent authorperm e.g. @author/great-postpercent_steem_dollars - 0 or 10000, 0 means 100% HP and 10000 means 50/50 in HIVE/HBD and HP. Default is 10000.max_accepted_payout - Can be set to 0, for declining payout. Default is 1000000 HBDparse_body - Can be set to false, in this case mentions, links and used images are not written into the json_metadata. Default is true.---
title: "My statement"
author: hiveuser
tags: hive,statement
percent_steem_dollars: 0
---
---
title: "My statement"
author: hiveuser
tags: hive,statement
max_accepted_payout: 0
---
---
title: "My statement"
author: hiveuser
tags: hive,statement
beneficiaries: null:100%
---
---
title: "My statement"
author: hiveuser
tags: hive,statement
beneficiaries: steem.dao:5%
---
You can download the markdown with
beempy download -a hiveuser -e my-post.md my-statement
When you open the saved markdown, it should have a permlink parameter:
---
title: "My statement"
permlink: my-statement
author: hiveuser
tags: hive,statement
---
When broadcasting the markdown file, the already posted content is modified. Parameter as
community
beneficiaries
max_accepted_payout
percent_steem_dollars
reply_identifier
will be ignored, as these parameters cannot be set when a post is already existing.
You need to find out the community owner account name.
If you want to post in OCD, go to the community site:
created/hive-174578
/trending/hive-174578
and copy the shown account name in the URL.
hive-174578 for OCD.
---
title: "My statement"
author: hiveuser
tags: hive,statement
community: hive-174578
---
beempy postNow you have two choices: either copy everything to peakd or hive.blog or use beempy.
The advantages of beempy is that all locally stored images are automatically uploaded and the image urls are set to the new URL. Title, community, tags and all other settings in the YAML-header needs not to be copied by hand into the editing fields in peakd/hive.blog.
beempy is part of beem, a python library for hive. You need to install python (version >= 3.5) on your system and can then install beem with:
pip install beem
You may need to install same packages, which are listed in the readme at beem.
When you are using linux, you need to replace pip with pip3.
When using Windows you can install python 3.7 (3.8 does not work due to scrypt) with the Microsoft store.
and then beem by
python -m pip install beem
You will now see a warning beginning with WARNING: The script beempy.exe is installed in. Copy the path ending with Script and put it into your path environment. You can find help here in how to add path in windows.
A
beempy --version
entered in a cmd window should now work.
A good choice is also to use Anaconda/Miniconda. beempy can then installed with
conda config --add channels conda-forge
conda install beem
When you selecting that python is registered to the path, you should be able to run beempy in a terminal.
Please use always the newest version. Updating beem is easy with:
pip install beem -U
or
python -m pip install beem -U
(replace pip with pip3 on linux).
On anaconda/miniconda it is
conda update beem
You can check your install version with
beempy --version
beempy updatenodes --hive
This step can be skipped and the posting key can be entered each time when broadcasting.
A new wallet is created with
beempy createwallet
and a posting key can be added with
beempy addkey
You can test if you have correctly created a wallet with
beempy walletinfo -u
After entering your wallet password, you should see that number of stored keys is greater than 0.
When you have added the author and the title in the YAML header you can just enter:
beempy post your_great_post.md
If you are not sure if you entered everything in a correct why do a test with -d (or --no-broadcast)
beempy -d post your_great_post.md
All your embedded local images should be uploaded to the hive imageserver and you should see them on peakd/hive.blog.
You can create a new task for directly posting from visual studio code.
Go to Terminal/Configure Tasks.. and add the following to taks.json in the tasks array:
{
"label": "post",
"type": "shell",
"command": "beempy",
"args": ["post", "${file}"],
"problemMatcher": [
"$eslint-stylish"
]
}
You can now Run a task and select post
.
and you will be asks in the terminal for your wallet password or your posting wif:
You are welcome to asks questions or provide feedback in the comments.
If you like what I do, consider casting a vote for me as witness on Hivesigner or on PeakD