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.

    Module to display information from a text file on a locally shared folder

    Scheduled Pinned Locked Moved Requests
    14 Posts 3 Posters 3.4k Views 3 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.
    • T Offline
      TomBrown
      last edited by

      I am looking for some type of way to display information from a text file that is saved to a local network share.

      We have six year old twins who are starting second grade. I am looking for a way to have a list of “sight words” (common words they are learning) displayed on the screen where the default newsfeed is at. I could edit the compliments list but I would rather have a module that would pull the words from a text file that is saved to a local network share so that I can update it as needed. The words could rotate after a set time period.

      Is there any current module that is capable of this? If not, would anyone be willing work on one? I am nto a programmer and have no idea where to even start with creating something like this.

      Thanks.

      S A 2 Replies Last reply Reply Quote 0
      • S Offline
        sdetweil @TomBrown
        last edited by

        @TomBrown compliments can read from a file, and u can link that file to be on a file server.

        and u can run two instances of compliments showing different info.

        only issue is that it reads the file only on startup.

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 1
        • T Offline
          TomBrown
          last edited by

          Sam,
          Thanks for the reply! I will have to read up on configuring that module then and figure out how to link to a file. Reading it only on startup is alright as I could restart daily or weekly.

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @TomBrown
            last edited by sdetweil

            @TomBrown see the ln command for link

            the compliments file MUST be in the compliments folder or subfolder. it cannot just be anywhere

            the module config entry is

            remoteFile: 'my_comp.json',
            

            so, you could make a link like this

            ln -s my_comp.json /mount_location/path/filename.xxx
            

            that means make a file entry in the current folder called my_comp.json
            and map it to the mounted file filename.xxx

            i use this approach for linking pictures from my file server to be shown by the MMM-ImagesPhotos module

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            T 1 Reply Last reply Reply Quote 1
            • T Offline
              TomBrown @sdetweil
              last edited by

              @sdetweil said in Module to display information from a text file on a locally shared folder:

              @TomBrown see the ln command for link

              the compliments file MUST be in the compliments folder or subfolder. it cannot just be anywhere

              the module config entry is

              remoteFile: 'my_comp.json',
              

              so, you could make a link like this

              ln -s my_comp.json /mount_location/path/filename.xxx
              

              that means make a file entry in the current folder called my_comp.json
              and map it to the mounted file filename.xxx

              i use this approach for linking pictures from my file server to be shown by the MMM-ImagesPhotos module

              I have not tried any of this yet (have not had the time yet) but trying to make sure I understand.
              If I created the word list file called “wordlist.txt”, saved that file to a share of “\server\share\wordlist.txt”.
              I would create a file named “my_comp.json” in the compliments folder.
              Then link it to the text file with

              ln -s my_comp.json /server/share/wordlist.txt
              

              And the wordlist.txt would look something like this.

              {
                  "anytime" : [
                      "Band",
                      "Firetruck",
                      "Movie",
                  ],
                  "morning" : [
                      "Good morning, sunshine!",
                  ],
                  "afternoon" : [
                      "Hitting your stride!",
                  ],
                  "evening" : [
                      "See you tomorrow!",
                  ],
              }
              

              Or would it be easier all around to just set the “remotefile:” and save it locally on the pi. I will be connecting to the pi over vnc.

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @TomBrown
                last edited by sdetweil

                @TomBrown the ln command ‘creates’ the local file.
                and the file can contain just words in each of the time slots.

                make it work with an actual file, and then see if that is what u want. if so, then you can move the real file to the server. mount the drive into the pi, and then link the local file to the server file

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 1
                • T Offline
                  TomBrown
                  last edited by

                  OK. Just an update. Finally got back to this. Have it installed and mounted. Kids like it!

                  20200830_0933051.jpg

                  S 1 Reply Last reply Reply Quote 1
                  • S Offline
                    sdetweil @TomBrown
                    last edited by sdetweil

                    @TomBrown cool, thx for the feedback

                    is the file on the.pi, or on a server like u had originally wanted?

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    T 1 Reply Last reply Reply Quote 0
                    • T Offline
                      TomBrown @sdetweil
                      last edited by

                      @sdetweil Right now the file is on the pi. This has been on hold since I originally posted as other things came up.

                      S 1 Reply Last reply Reply Quote 0
                      • S Offline
                        sdetweil @TomBrown
                        last edited by

                        @TomBrown no. just interested… good work

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        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