First time here? Check out the FAQ!

dnozay's profile - activity

2014-10-15 19:10:17 -0600 answered a question Email subscription in plain text with markdown

discussed this a bit at: ask.fedoraproject.org/en/question/55354/email-subscription-in-plain-text/


I checked the RSS feed, and it looks like legit markdown. so maybe it's just the emails.

  • celery task [send_instant_notifications_about_activity_in_post](https:// github.com/ASKBOT/askbot-devel/blob/master/askbot/tasks.py#L213-L283) send the email and calls
  • [askbot.models.format_instant_notification_email](https:// github.com/ASKBOT/askbot-devel/blob/master/askbot/models/__init__.py#L3198) which in turn calls
  • [askbot.mail.send_mail](https:// github.com/ASKBOT/askbot-devel/blob/master/askbot/mail/__init__.py#L108-L116) which in turn calls
  • [askbot.utils.html.get_text_from_html](https:// github.com/ASKBOT/askbot-devel/blob/master/askbot/utils/html.py#L148-L175) which
  • uses BeautifulSoup to transform the html into text; that's the part that strips html tags and that you would want to edit if you wanted to give the markdown syntax instead.

If you were going that route I would suggest to have footer notes e.g.

This is some email content with [some text][1].
Please check [your answer][2] or visit [your profile][3].

Links:
[1]: http://...
[2]: https://...
[3]: https://...

... rather than inline links.

2014-10-15 19:05:05 -0600 asked a question karma calculation is wrong.

see ask.fedoraproject.org/en/question/55449/karma-calculation-is-wrong/ which I will update once I get enough karma to upload pics.

I think it is related to accepted answers.

2014-10-12 15:41:51 -0600 answered a question mark tags as aliases

note: karma=1 is too low to post links - will fix later.

I looked at the code for askbot and this is referred to as a tag synonym: github.com/ASKBOT/askbot-devel/search?q=TagSynonym

This questions also covers synonyms a bit: askbot.org/en/question/2773/who-pre-sets-the-tags-admin-or-users/. There are 3 management commands you can use:

  • rename_tags_id - updates all questions tagged, changing its tags with new ones.
  • rename_tags - takes 2 sets of tags (old and new), looks them up and calls rename_tags_id.
  • create_tag_synonyms - creates a TagSynonym then calls rename_tags to update questions.

Different approaches are possible (ranked in order of complexity):

  1. add a form to the Tag admin interface with new name for a tag, and use call_command

    from django.core.management import call_command
    call_command('create_tag_synonyms', *args, **options)
    
  2. add a celery task in askbot/tasks.py which would do the same, and rather than calling the command from the admin UI (and freeze for minutes potentially since this would be synchronous), you would just kick off a celery task which would do it for you. Job is done in the background, UI is still snappy, everybody is happy.

  3. add admin approval workflow on top of that:

    • user suggests a synonym,
    • somewhere down the line, and administrator approves the request,
    • upon clicking approve, the celery task is started.

    The benefit of that approach is that you would have a better audit trail.

  4. add an admin workflow on top of that (not referring to django admin panel):

    • in site, admin would go to tags list,
    • click on a tag to change,
    • form to rename the tag.

Things I saw were missing:

  • adding information about a tag (Post with post_type == tag_wiki),
    • as long as you create a question with a tag, it creates it / associates the tag, and couldn't see where you edit the tag info / description / synonyms.
  • no template / url for accessing a tag wiki,
    • when clicking on the tag list, then on a tag, it takes you to the questions tagged with it, and there are no links to the tag wiki.
  • no template for tag synonyms, link to synonyms is also missing from the tags template
2014-10-12 14:58:19 -0600 commented answer Who pre-sets the tags - admin or users?

updated link: `https://api.stackexchange.com/docs/synonyms-by-tags`