ethanpartida / MMM-MyStudyLife

Module to display info from the website MyStudyLife
MIT License
10 stars 1 forks source link

MMM-MyStudyLife not working #1

Closed tmartinez28 closed 4 years ago

tmartinez28 commented 4 years ago

So I put my custom code to match your example, with all my classes with the right dates, and the custom code from MyStudyLife, and when I run the code, it doesn't show up with any errors when it runs, it just shows the magic mirror without anything on that part of the screen.

ethanpartida commented 4 years ago

Are you able to post your config here, omitting the code for privacy, so I can look at it? Also are any errors appearing in the terminal/developer console of electron, there are two different consoles that errors might go to. Otherwise I will look closer at this code tomorrow.

tmartinez28 commented 4 years ago

ss 1 ss 2

This is the area of the code I have in my config { module: "MMM-Study", position: "bottom_left", config: { code: "my code", showSchedule: true, showExams: true, showTasks: true, classes: { "Accounting 202": [1,3,5], "Business Administration 300W": [2,4], "Business Law 203": [2,4], "Economics 340W": [2,4], "Math 107": [4] } } }, I'm not getting any errors stopping me from running the actual mirror, I can run the mirror successfully with the code in the config file. Let me know if you need to see anything else, the code is the log from the file, before and after I ran it.

ethanpartida commented 4 years ago

Just looking at your terminal log it seems like there is an error in your config file. MagicMirror when it detects an error in the config will launch to a default config file and just log it to console which is why nothing shows up when you launch the mirror. It seems to be on line 87 you have a '{' where you are not supposed to. Just looking at the bit of your MMM-Study specific config it looks good to me though...

ethanpartida commented 4 years ago

If you are still having issues you can put your config file here (minus any personal data) and I can try looking at it

ethanpartida commented 4 years ago

I have found an error in my uploaded code too, I have changed it now. If you want to change it yourself just rename the MMM-Study.js file to MMM-MyStudyLife.js and in your config change

module: "MMM-Study" to module: "MMM-MyStudyLife"

tmartinez28 commented 4 years ago

It was the small change of the javascript file to the right name that made it work! I also caught the error in the config file before but when I changed it before it still didn't work so I just assumed it wasn't a problem. Side note, do you know how to change the time from military to american? it shows my class at 14:00, and also how to make the module slightly smaller and more to one side?, its bigger than my other modules and looks a little off. I also really appreciate the people like you who take the time out of their day to help others

ethanpartida commented 4 years ago

Hi it looks like that is on MyStudyLife's end. There should be a setting where you can change that to make it a 12hr time format 12hour example. If this doesn't work let me know, I can then write a quick function to allow people to change time format in the config.

As far as making the module smaller and more to the right, I know how to effectively fix one of those. To make the module smaller you should open the styles1.css file and find the code that looks like this:

.myStudyWrapper {
 margin-top: 0;
 padding-top: 0;
 transform: scale(0.8);
}


Then change the number in scale to scale the whole module (1->100% size, 0.8->80% size, etc.). As far as moving the module to the right, I don't have as precise of an answer. I know on my own personal version I was able to adjust the margins but can't remember what worked. CSS is really weird with margins and padding but if you want to try adding margin-right: 0 and padding-right: 0 to the .myStudyWrapper class that might work. I can look tomorrow again to see what I had done to fix the margins on my end.

Also I'm glad people are finding some use for my code, I am more than happy to help!

tmartinez28 commented 4 years ago

It seems like changing on the website didn't work to correct it to normal time. Also the module seems to wander more in the middle of the screen when you scale it down, don't know if that helps at all with trying to figure out the margins or not

ethanpartida commented 4 years ago

I've added a branch to this project with a changed MMM-MyStudyLife.js that should include a fix for the times. I don't have my pi with me so I won't be able to check if it works till tomorrow but feel free to try it on your own.

Also to do with the shifting, yeah I think CSS has the module centered at the point in the top left of the module so scaling messes it up. I will be able to try to figure it out tomorrow when I get access to my pi but can't think of anything off the top of my head right now.

ethanpartida commented 4 years ago

I actually tried adding something to the css to fix the scaling issue, let me know if that works out too

tmartinez28 commented 4 years ago

The edit for the margin works fine but the military time switch doesn't work for me

tmartinez28 commented 4 years ago

image Side Note: when you only have 1 class for the day the scaling is a bit awkward

ethanpartida commented 4 years ago

Try the pull request now, I think I fixed both issues. I will let you try them first before I commit them to master though