Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    Random Quotes

    Utilities
    9
    19
    11885
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • KirAsh4
      KirAsh4 Moderator last edited by

      I forgot who asked me to release my code, it may have been @paviro, but I honestly don’t remember. One of the very first modules I wanted was something that displays a random quote, so I modified the supplied ‘Compliments’ one to my needs. I used the popular http://www.brainyquote.com web site to fetch quotes, however they don’t provide an API. And looking around the web, all of the random quotes web sites that I found with an API only allows you one random quote per day. If you want a random one each time you send a request, then you need to subscribe and pay them. So, in keeping the ‘free’ nature of the module, I decided to hard code a few categories and quotes from each from BrainyQuote. If you want to edit the quotes, you’ll have to do that in the module’s js file.

      http://github.com/KirAsh4/random_quotes/

      0_1466446564627_quote.png

      1 Reply Last reply Reply Quote 2
      • Wilco89
        Wilco89 last edited by

        I just installed it. it’s working fine, Did send you a PR there were some typos in the readme file. some people wouldn’t be able to install it with that typos.

        1 Reply Last reply Reply Quote 0
        • KirAsh4
          KirAsh4 Moderator last edited by

          Thanks, merged into dev. Will push it to master as well.

          1 Reply Last reply Reply Quote 0
          • P
            pietrodona last edited by

            Hi, I am very bad with javascript is it possible to load the quotes from a text file?

            1 Reply Last reply Reply Quote 0
            • KirAsh4
              KirAsh4 Moderator last edited by

              Not as written. It would require a bit of rewriting to allow for a local call to a file. Not impossible, just not written.

              1 Reply Last reply Reply Quote 0
              • G
                geeflaxx last edited by

                so is that right that you put the information from your script not from brainyguote?
                so i can change it in vocal to learn an another language ?
                i mean its only a script what change the text per time ?
                if that is it that i am thanksfull
                that i need it (for example for my english…)

                1 Reply Last reply Reply Quote 0
                • KirAsh4
                  KirAsh4 Moderator last edited by

                  All the quotes are in the random_quotes.js file. You can change them to anything you want.

                  1 Reply Last reply Reply Quote 0
                  • G
                    geeflaxx last edited by geeflaxx

                    so i have to add the paramteres (updateintervall etc) in my config ?

                    because in your example wasn’t that
                    very thank you!

                    ‘modules: [
                    {
                    module: ‘random_quotes’,
                    position: ‘lower_third’,
                    config: {
                    updateIntervall=500 // The config property is optional
                    fadeSpeed=4 // Without a config, a random quote is shown,
                    category=random // selected from all of the categories available.
                    }
                    }
                    ]’

                    strawberry 3.141 1 Reply Last reply Reply Quote 0
                    • KirAsh4
                      KirAsh4 Moderator last edited by

                      Correct, as the documentation shows.

                      ? 1 Reply Last reply Reply Quote 0
                      • strawberry 3.141
                        strawberry 3.141 Project Sponsor Module Developer @geeflaxx last edited by strawberry 3.141

                        @geeflaxx you need to write it down like this

                        {
                            module: 'random_quotes',
                            position: 'lower_third',
                            config: {
                                updateIntervall: 500,
                                fadeSpeed: 4,
                                category: 'random'
                            }
                        }
                        
                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 1 / 2
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy