• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Random Quotes

Scheduled Pinned Locked Moved Utilities
19 Posts 9 Posters 15.1k Views 8 Watching
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.
  • K Offline
    KirAsh4 Moderator
    last edited by Jun 20, 2016, 6:19 PM

    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

    A Life? Cool! Where can I download one of those from?

    1 Reply Last reply Reply Quote 2
    • W Offline
      Wilco89
      last edited by Jun 22, 2016, 6:52 PM

      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
      • K Offline
        KirAsh4 Moderator
        last edited by Jun 22, 2016, 7:18 PM

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

        A Life? Cool! Where can I download one of those from?

        1 Reply Last reply Reply Quote 0
        • P Offline
          pietrodona
          last edited by Aug 7, 2016, 9:02 PM

          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
          • K Offline
            KirAsh4 Moderator
            last edited by Aug 8, 2016, 4:05 AM

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

            A Life? Cool! Where can I download one of those from?

            1 Reply Last reply Reply Quote 0
            • G Offline
              geeflaxx
              last edited by Oct 26, 2016, 6:43 PM

              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
              • K Offline
                KirAsh4 Moderator
                last edited by Oct 26, 2016, 7:05 PM

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

                A Life? Cool! Where can I download one of those from?

                1 Reply Last reply Reply Quote 0
                • G Offline
                  geeflaxx
                  last edited by geeflaxx Oct 26, 2016, 8:36 PM Oct 26, 2016, 8:35 PM

                  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.
                  }
                  }
                  ]’

                  S 1 Reply Last reply Oct 26, 2016, 9:10 PM Reply Quote 0
                  • K Offline
                    KirAsh4 Moderator
                    last edited by Oct 26, 2016, 8:42 PM

                    Correct, as the documentation shows.

                    A Life? Cool! Where can I download one of those from?

                    ? 1 Reply Last reply Apr 27, 2018, 10:11 PM Reply Quote 0
                    • S Offline
                      strawberry 3.141 Project Sponsor Module Developer @geeflaxx
                      last edited by strawberry 3.141 Oct 26, 2016, 9:10 PM Oct 26, 2016, 9:10 PM

                      @geeflaxx you need to write it down like this

                      {
                          module: 'random_quotes',
                          position: 'lower_third',
                          config: {
                              updateIntervall: 500,
                              fadeSpeed: 4,
                              category: 'random'
                          }
                      }
                      

                      Please create a github issue if you need help, so I can keep track

                      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 Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy