Stories
Slash Boxes
Comments

SoylentNews is people

The Fine print: The following are owned by whoever posted them. We are not responsible for them in any way.

Journal by fyngyrz

General

This is a post / TFS text pre-processor designed specifically for use with soylent.org

It is Python CGI that must be installed upon a webserver, and is then used via the web page it generates.

Capabilities:

• Generates <abbr> tag pairs with terminology expansions for caps / numbers / caps+numbers sequences
• 677 term expansions (as of Dec 7, 2018)
• Built-in macro language
• Can list available macros (on by default)
• Can list all expandable terms (off by default)
• Multiple random/selected signature generator
• Flags unknown terminology that may be expandable on the web page
• Handles pre-existing <abbr> tag pairs when you want to add one-off uses
• Handles HTML and won't try to expand within HTML tags
• Handles unicode posting
• Includes test code to verify file containing expansions
• Incorporates self-test when run from command line
• Includes command line tool to check to see if acronym already present in expansion list

The project can be found here on Github.

--
Entropy is a bitch.

Display Options Threshold/Breakthrough Reply to Article Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1)
  • (Score: 0) by Anonymous Coward on Friday December 07 2018, @08:04PM (4 children)

    by Anonymous Coward on Friday December 07 2018, @08:04PM (#771285)

    What is with that line at the bottom?

    • (Score: 2) by fyngyrz on Saturday December 08 2018, @12:02AM (3 children)

      by fyngyrz (6567) on Saturday December 08 2018, @12:02AM (#771347) Journal

      What is with that line at the bottom?

      AC, point your mouse at any word with the dotted underline, such as AC, here, and let the mouse pointer hover there for a moment.

      That's what the <abbr title="expansion">text</abbr> HTML tags are for.

      --
      Money can't buy love, but it can sure buy a yacht to pull up next to it on.

      • (Score: 1, Interesting) by Anonymous Coward on Saturday December 08 2018, @02:00AM (2 children)

        by Anonymous Coward on Saturday December 08 2018, @02:00AM (#771393)

        heh nono I got that part, and cool addition btw!

        I meant

        The project can be found here on Github.

        --
        Entropy is a bitch.

        I could have sworn I checked your posts to see if it was your sig, maybe it was one you used for a very short time?

        • (Score: 2) by acid andy on Saturday December 08 2018, @01:05PM (1 child)

          by acid andy (1683) on Saturday December 08 2018, @01:05PM (#771515) Homepage Journal

          RTFM [github.com]

          --
          If a cat has kittens, does a rat have rittens, a bat bittens and a mat mittens?
          • (Score: 2) by acid andy on Saturday December 08 2018, @01:15PM

            by acid andy (1683) on Saturday December 08 2018, @01:15PM (#771517) Homepage Journal

            Hmm odd. I used github's link button next to the title "The signature generator" to make that link, but when I click on it, my browser doesn't navigate to that anchor. This is because the id is actually "user-content-the-signature-generator"! This link [github.com] works for me. I'm guessing it's some stupid Javascript dependency on github that I've got blocked. I wonder if this is something M$ did to the site.

            --
            If a cat has kittens, does a rat have rittens, a bat bittens and a mat mittens?
  • (Score: 2) by acid andy on Saturday December 08 2018, @01:56PM (1 child)

    by acid andy (1683) on Saturday December 08 2018, @01:56PM (#771524) Homepage Journal

    I for one like what you've done. Is it live on the site now or did you run it offline to generate this entry? Can I suggest having a simple way to disable it for a block of text in cases where it would get it wrong? Apologies if I missed a way to already do that.

    --
    If a cat has kittens, does a rat have rittens, a bat bittens and a mat mittens?
    • (Score: 2) by fyngyrz on Saturday December 08 2018, @03:22PM

      by fyngyrz (6567) on Saturday December 08 2018, @03:22PM (#771540) Journal

      I for one like what you've done.

      Thankee. :)

      Is it live on the site now or did you run it offline to generate this entry?

      It's live on the webserver here in my own LAN. LAN-based use is the target for this, as it's really a tech demo, or at least, that's what it began life as. It's not live on soylentnews.org, nor is it really intended to be. My hope is that the expansion list can be used by soylentnews.org to implement a native capability for this for at least TFS, so that the front page is improved.

      If you have a webserver (and pretty much anyone with a reasonable amount of technical chops can have one, just run it on your own machine at 127.0.0.1) and Python 2.7 installed, you can run this locally. I just prep my remarks in it, run it once, copy from there into the soylentnews.org comment / story box, and preview. If I like it, I post. If I don't, I edit in the generator and repeat the other steps. The macros save quite a bit of typing and HTML geekery, and I like the <abbr> handling too. Predictably. 😊

      Can I suggest having a simple way to disable it for a block of text in cases where it would get it wrong? Apologies if I missed a way to already do that.

      Well, the way it works now, you get HTML source to paste into the soylentnews.org comment / story box. So just do that, then remove or alter anything you need to.

      If you add your own <abbr> tags, it will ignore them, so you can override it ahead of time if you think of it.

      --
      I'd get my mind up from the gutter, but you know, I've never been up there, and it frightens me.

  • (Score: 0) by Anonymous Coward on Monday December 10 2018, @07:34AM (4 children)

    by Anonymous Coward on Monday December 10 2018, @07:34AM (#772265)

    That way your terms would become machine readable and people would see the terms in the standard spot at a glance.

    Here's one entrypoint to the rabbit hole https://developer.github.com/v3/licenses/ [github.com]

    • (Score: 2) by fyngyrz on Monday December 10 2018, @02:34PM (3 children)

      by fyngyrz (6567) on Monday December 10 2018, @02:34PM (#772368) Journal

      The project is public domain. There's no license. See the last section of the readme.

      • (Score: 0) by Anonymous Coward on Tuesday December 11 2018, @10:44PM (2 children)

        by Anonymous Coward on Tuesday December 11 2018, @10:44PM (#773151)

        I know that! But to bots don't so add a file named COPYING that contains:

        This is free and unencumbered software released into the public domain.

        Anyone is free to copy, modify, publish, use, compile, sell, or
        distribute this software, either in source code form or as a compiled
        binary, for any purpose, commercial or non-commercial, and by any
        means.

        In jurisdictions that recognize copyright laws, the author or authors
        of this software dedicate any and all copyright interest in the
        software to the public domain. We make this dedication for the benefit
        of the public at large and to the detriment of our heirs and
        successors. We intend this dedication to be an overt act of
        relinquishment in perpetuity of all present and future rights to this
        software under copyright law.

        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
        EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
        MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
        IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
        OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
        ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
        OTHER DEALINGS IN THE SOFTWARE.

(1)