Standardised Formatting for Motions

ps : @assistant tip 2 @woolly_sammoth

Good questions.
The verify scan the thread for any post which contains the hidden html tags that denote a motion or custodial proposal. It expects each to be produced by the private message command to Assistant and so each to contain it’s own unique hash. I did it this way as I have seen several threads where the motion is tweaked and posted again with a new hash. If it is felt that this is unnecessary I can change it to just pull the first post of a thread and check that.

the easiest way for a shareholder to promote a motion in another post would be to use the
assistant motion vote [hash]
command as that will pull in most of the detail of the motion and link to the original post.

Oh, my bad, I meant promote=propose. Do shareholders need to create a new topic and copy the raw text showed in the “verify” page?

:slight_smile: no problem.
Yeah, that’s how I saw it working.

  1. Shareholder wishes to propose a motion.
  2. Shareholder composes motion away from site.
  3. Shareholder sends Pm to Assistant motion hash [momotion text]
  4. Shareholder clicks on ‘verify’ link in the reply from Assistant and copies the entire thing.
  5. Shareholder starts new topic and pastes the copied text into the post. They can then add any other text they want but that won’t be included in the hash

The instruction next to the verify link, to copy everything including the tags in instruction for if you want to independently verify the hash with a tool that isn’t Assistant bot.
When calculating the hash, assistant uses the raw text contained by the tags. By copying just that portion of the raw text, any other tool that calculates RIPEMD160 hashes should return the same value.

2 Likes

Got it.

When is polished up and verified then must go to the documentation :wink:

If I send in this (a blank line between paragraphs) to assistant

foo
   
bar

to get motion hash I get this back

foo


bar

There is one extra blank line added.
The “verify” text uses <p>foo</p><br><p>bar</p> which adds the extra new line.

if i send this

foo
bar

I get

foo
bar

How can I have exactly blank line ?

you can just write
html

<p>you can just write <br>html</p>

1 Like

Yes I can but I thought there is a better way that all needed to be done is copy and paste?

I don’t think so, why are you so picky with the newlines? :smile: I think discourse will always make a paragraph out of the line when you just hit enter. The assistant bot could perform some postprocessing to avoid this, but does it look so terrible with the additional line spacing?

I can certainly take a look when I next do some maintenance on Assistant. As @creon says, it would need to do some postprocessing before calculating the hash but it should be doable. It’s not going to be for a while yet though I’m afraid.

I think so :wink:

I thought all it needed is having every enter translated to a <br> and skip all the <p></p>?

Looking at the code it seems I was replacing line breaks (\n) with html breaks (<br />). I’ve switched to replace them with blank strings instead.
that new code is now running, would you like to give it another go?

Thanks @wolly_sammoth for looking into this.

Now the blank line case is solved. But in the second case shown above, i.e. if i send this (press enter then start new paragraph with no blank line)

foo
bar

I get

foobar

If you don’t have time to look into this now I can just do with html by hand as creon suggested.

Markdown interprets it as a single line.

Add two spaces after the word you want to finish the line with, e.g. "foo ", and then break to the next line.

Any way I would like the text shown exactly like this


This is the first paragraph.

This is the second paragraph. It has two points,
a) one;
b) two.

This is the third paragraph.


Markdown doesn’t support alphabetic ordered lists. You can do it with CSS, but I’ll be honest, I’m not clear what you are trying to do. I’ll re-read the last few comments but I feel like I’m missing the context of your use case.

That is OK . I typed a) and b) in by hand. They are not the point.

It’s all about extra or missing line breaks. Sorry I didn’t expect it to take this much complication

@assistant motion hash this is my motion

@assistant help

@crypto_coiner, These commands need to be in Private messages to work.