Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Need Opinions/Suggestions on quickie project a program that emails game manuals  (Read 3106 times)

0 Members and 1 Guest are viewing this topic.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Ok I've been waaaay too busy to code right now, but atm my focus is treating the rust on my car and I got rained out today.  So I had the inspiration to write a quickie (read done in a day or so) project.

As some of you may know, I've been obsessed over the past few months in regards to having mamehooker interface with tablets and portable devices to display supplimentary info.  That's kind of stalled mamehooker progress to be honest.  Doing the programming on the MH end of things is quite simple, but I'd have to write an android app, an IOS app and a pc app and that would just take too much of my time atm.  I wanted to do this for real-time interaction, but honestly there aren't a whole lot of instances in which real time interaction would be needed. 

Thus the idea for this stand-alone app. 

I'm thinking of calling it "You've Got Manuals!" because I'm a sucker for puns.  Basically it's a command line app that allows you to email manuals (or whatever really) to a portable device. 

How it would work is like this:

1.  You have a host email address, preferably a dedicated gmail account (because it's web-based).  This is the account that actually sends out the emails and manages accounts. 

2.  To "register" a device, you would simply send an email entitled "Register Me!" to this account from your mobile device.  The next time the command line app runs, it will check the email and add this address to it's sender's list.  Likewise, to unregister a device you would send a email entitled "UnRegister Me!".

3.  The command line app could be run from any number of devices (frontend, mamehooker, ect) whenever mame or any other emulator is launched.  The CL would be "YGM.exe P1=\manuals\pacman P2=\manuals\puckman P3=\manuals\puckman_c\"  where p1=p3 references three potential folders.  This is for rom/parent/driver relationships.  It would email the contents of the first folder found to all registed addresses.

4.  By "email the contents" I mean it would search for either body.txt, body.html, or a series of images or pdfs.  If it finds body.txt it uses that file as the message for the email to be sent.  If it uses body.html... it uses the html file for a html email and embeds any locally linked images into the email.  If there are images or pdfs, they are added as attachments if a body is defined, or embedded into a blank html email if no body is available.  Of course the fact that you can send a html email gives the whole system a lot of flexability.... one could link to an online manual for the game... or embed a youtube video, ect...


I've already sent some test emails with embedded images to my outlook (home) address, my gmail account, and my hotmail account.  In all three instances the html shows up just fine and so long as I embed images, they show up in the email, even if images are blocked by the email client.  Even my android tablet, linked to my hotmail account, has no problem displaying html images. 


So opinions or suggestions would be welcomed, but make em fast because I've already started on it.  I think the only real drawback of this system besides the lag (email can sometimes take a while) would be the fact that your mame cab would need an internet connection. 

Nephasth

  • Guest
  • Trade Count: (0)
Just print that ---steaming pile of meadow muffin--- out. Trees... they're a renewable resource. >:D

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Yeah man but that takes an awful lot of time and money (ink ain't free). 

Nephasth

  • Guest
  • Trade Count: (0)
...(ink ain't free). 

Depends on where you work. :dunno

I don't own a tablet, but being able to carry around the pdf versions of manuals and other stuff has really been tempting me to get one lately.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
...(ink ain't free). 

Depends on where you work. :dunno

I don't own a tablet, but being able to carry around the pdf versions of manuals and other stuff has really been tempting me to get one lately.

Regardless, it isn't very convenient.  One or two manuals or move lists sure, but once you go past that, you have to store them somewhere and worse yet, find them when needed. 

I would highly reccomend one.  I've got a p.o.s. kyros I'm using for my experiments because it's literally about the slowest tablet you can get and still do something useful with it and even it's great for viewing pdfs, websites and e-books as well as a game or two.  Even those trashy ones you see at your local Big Lots for 70 bucks work really well as e-readers providing the screen is viewable. 

The reason I think this app would be useful is that the smaller tablets and smart phones are kind of hard to browse the web on.... text is small and hard to click and because they are wireless, browsing can be slow.  On the other hand once you actually navigate to the page/image you are looking for they do a pretty good job of viewing the info.  So this basically allows you to skip the searching step. 

I made some progress.  I implemented bulk email sending for the message system.  I also wrote the code to read a text file from a folder and send it as email and/or send a series of images.  Obviously if they are large images it takes a while to send and recieve messages, but other than that, the system works beautifully!

I need to add functions to parse and prepare html files as well.  They'll be a bit tricky because I'll have to find and  modify any images in the file.  It's doable though. 

Then I'll implement the email reading system.  This will be a bit harder than sending emails for some reason.  I can do it but I'm trying to make sure that I don't have to make outlook or "email program X" a requirement.  I should be done with this thing by sunday.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
I might actually get this one done when I said I would for a change!

Added html manual support.  Html files are checked for basic images (src= or background=) and those images, if found on the local harddrive, are embedded into the email.  It doesn't support fancy things like style sheets or cascading html links, but neither does your average email program, so that's intentional. 

So I need to add pdf attachment support, which is really easy and then deal with the email server end of things (which is less easy). 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
It looks like I'm pretty much done with this one.  I still need to add email reading, but that part is trivial.  I'll wait until next weekend to release it so I can debug in my extremely limited spare time this week. 

It doesn't look like there is a whole lot of interest in this app, but I wanted to mention it anyway just to keep people updated.  Then maybe I'll go ahead and finish mamehooker.

nullPointer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • Last login:January 23, 2021, 10:09:31 pm
Hi Howard.  It’s always great to hear about one of your new projects!  Quite a few of us over at the GameEx forums are using your Visual Pinball wrapper and loving it.  Thanks!

I think this current project is a great idea for a small app.  It’s something I’ve wondered about for a while actually, and it seems like it could be a great ‘gateway’ for sending additional game meta-data to the client tablet.  The email idea is pretty slick as it provides an end-around to the alternative of using a direct network interface over LAN.

So I’ve got just a couple questions and comments about this app.  Are there any plans in place to expand upon the types of information able to be sent?  I tend to keep manuals and full strategy guides separate, and the possibility of choosing one or the other would be awesome.  The other bit of information that would be awesome is sending controller / CP layout information to the client tablet (I usually create controller images for each emulated system, and in some more complex cases on a per game basis).  Sending the controller layout information to the client tablet would be awesome (and particularly handy for guests).

Regarding the network interface, have you ever used Dropbox (or some other cloud sync service)?  I think another cool feature would be to give the user the option of using email or cloud sync.  For my part I think I’d generally prefer to just have the desired files transferred to my Dropbox where I could henceforth access them on my tablet, rather than have the files emailed to me.

Please take any of the above questions and comments with a grain of salt, as I know this is a quickie project for you (and I’m sure the last thing you’re looking for is feature creep).  Thanks again Howard, and keep fighting the good fight!

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Hi Howard.  It’s always great to hear about one of your new projects!  Quite a few of us over at the GameEx forums are using your Visual Pinball wrapper and loving it.  Thanks!

I think this current project is a great idea for a small app.  It’s something I’ve wondered about for a while actually, and it seems like it could be a great ‘gateway’ for sending additional game meta-data to the client tablet.  The email idea is pretty slick as it provides an end-around to the alternative of using a direct network interface over LAN.

So I’ve got just a couple questions and comments about this app.  Are there any plans in place to expand upon the types of information able to be sent?  I tend to keep manuals and full strategy guides separate, and the possibility of choosing one or the other would be awesome.  The other bit of information that would be awesome is sending controller / CP layout information to the client tablet (I usually create controller images for each emulated system, and in some more complex cases on a per game basis).  Sending the controller layout information to the client tablet would be awesome (and particularly handy for guests).

Regarding the network interface, have you ever used Dropbox (or some other cloud sync service)?  I think another cool feature would be to give the user the option of using email or cloud sync.  For my part I think I’d generally prefer to just have the desired files transferred to my Dropbox where I could henceforth access them on my tablet, rather than have the files emailed to me.

Please take any of the above questions and comments with a grain of salt, as I know this is a quickie project for you (and I’m sure the last thing you’re looking for is feature creep).  Thanks again Howard, and keep fighting the good fight!


Thanks for the support!

You can send all file types and most text/image based sources are optionally converted to html, so you can basically send whatever info you like. The way to send multiple items from different folders is to make a html page for the game.  You can link to other images/items that are locally stored on your harddrive and if the program can find them (read no fancy scripting in your html) then they'll be attached and embedded in your email. I did a test html page with all a game's artwork (snap,flyers, ect) and it sent it just fine, and all of those art sources are in completely different folders.   

Of course if your email client will actually display them is another story.  From my testing embedded images and text show up universally, but other files usually don't show up and have to be added as an attachment.

I think that cloud support is doable, so long as it can be done via the command line or a stock api and not some custom, per application deal.  Just as an example, you can STILL ftp items in windows via the command line.  Mind you I wouldn't reccomend it as it's clunky, but programatically it can be done.  So ftp support can be added. 

It adds a bunch of potential headaches though.  Image embedding is done via microsoft's CDO interface, so I don't have to do it manually (whew!) I think that the embedded part of the email is stored internally.  If I can get to it then no problem, I can just ftp over the emaill as a html file, but if I can't then I would have to build a folder structure for any locally stored files on your cloud and edit the html to point to these folders instead of the local ones.  Mind you I already alter the html for the embedding process, but all I do is essentially delete the link and add a CID reference instead.

I'll look  into it if I get time. 

nullPointer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • Last login:January 23, 2021, 10:09:31 pm
Quote
I think that cloud support is doable, so long as it can be done via the command line or a stock api and not some custom, per application deal.  Just as an example, you can STILL ftp items in windows via the command line.  Mind you I wouldn't reccomend it as it's clunky, but programatically it can be done.  So ftp support can be added.

At least in terms of Dropbox, it should be as easy as a copying the requested file to the Dropbox folder on the users host machine, at which point the file would sync to the Dropbox folder on the tablet.  I’ve only used Dropbox for cloud syncing, but I believe Google Drive (and SkyDrive?) operates in the same fashion (although naturally full operation would be dependent upon the availability of a client app for the tablet).  Having said that, I believe Dropbox tends to be the most popular of this sort of app, and I know they’ve got clients for just about every platform I know of (that’s still in use).

Naturally, ‘easy’ is an extremely relative term in cases like this.  The host app would need to know about the location of the users Dropbox folder in order to successfully move files into it.  That bit would likely be an extra piece of configuration.

Once again, this is more for the sake of discussion than anything.  I’m looking forward to seeing this app in action whatever shape it takes.   :applaud:

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
I downloaded it and gave it a try.  Fortunately it uses a "normal" folder so yeah it is as simple as copying things over. 

I doubt I'll get that functionality in the first release beause I would have to add in folder managment, but it seems well worth the effort to add it. 

What I was worried about was if it was a real folder or a virtual one.  Lots of these sharing services throw a virtual folder on your desktop instead of a real one.  They work just fine for the end user, but they often either don't show up in code, or show up in some oddball way that makes it difficult to use. 

But yeah, so long as the cloud servie uses a real path and not a virtual one, I should be able to support it.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
This post inspired me to write my own solution to this problem. It's called PdfServer.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Cool man.  It's nice to see to spit out an app once in a while as well. ;) 

I think I'm just gonna go with nullpointer's idea about cloud support in regards to html access.  Because webservers also use a local folder to serve files, it could be used in conjunction with a stand-alone webserver to achive what you are doing to a degree. 

I got the reading email stuff working.  Sort of.  Apparentlly all the web-based email services use SSL anymore and ssl is a ---smurfette--- to access without dependencies (in other words outlook).  So what I did is support ATOM  feeds, which gmail and a few of the other popular email clients use for twitter feeds.  It's read only, but that's ok for what I need, which is basically reading emails for certain headers to activate commands. 

It's just wednesday, and I said I would wait until this weekend to release it.  So I might go ahead and add cloud support as well as a few other goodies assuming I have time.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
This thing is moving right along. 

I added functions to check for individual files instead of just folders, since it's silly to put a single text file, html file, pdf, or image in a folder unless other files are going to be attached. 

I also added the settings for cloud(dropbox) and webserver support.  Cloud support is easy, I just copy the things over and if it's a html manual modify it to read the images locally.  Webserver functions will be slightly more complex because I'll have to encapsulate everything in a html file even if it's a text-based manual or pdf.  It isn't hard, it's just an extra step. 

But this is thursday, and I don't have much left to finish so we are still ok.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Man the new forum is bright!  It BURNS! It BURNS!  ;)

I got cloud support added last night.  It works great in terms of transferring the files, but I ran into an issue.  Apparently android devicesdon't read locally stored images in html files.  It boggles my mind that after all of these years of linux being around this is actually a common problem.  I mean if a image link doesn't include a path check the folder whre the html is found... seems like common sense to me.  I'll try to embed the images like I did with the email.

I'll go ahead and add webserver support as well.  I'm requiring you to use a third party webserver... mostly because I don't want to deal  with supporting a webserver and there are many free ones out on the net.  But my app will move the files over for you, link/embed the manual into "index.html" and modify the local html's image links ect.... 
It actually works almost exactly like the cloud support, only I won't have to deal with images not showing up.  ;)

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
I found a solution to the cloud problem, but it's sort of annoying.....

I essentially make an email with embedded images via cdo... then I capture the stream and save it as a mht (mhtml) file.  Then on the android end of things you have to install "MHT Viewer" because android doesn't natively support mhtml.  THEN and only then when you try to view the file in drop box on your tablet it'll show up with the images intact.

So yeah it works..... I think I'm adding that one as an option becaue mhtml is wierd and I sure wouldn't want to use it on a device if I didn't have to. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Alright I've got that implemented. 

Now it's just a matter of doing the webserver things, which are essentially the same, just less of a headache.  I'm not going to test webserver usage because... well I don't have a webserver setup on this machine and it's too much of a hassle, but the WS would do all of the heavy lifting anyway.

I should have this thing done tonight,  I'll make a webpage for it tomorrow and it'll be out the door by sunday.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Just added webserver support. 

It works really well... I went ahead and added a few nice touches to the webserver function, like having the webpage auto-direct if the manual happens to be in pdf format and ect....

I think that takes care of about everything.  I wish I had gotten a little more time to really test things about, but as expected, my free time was limited this weekend.  I'll probably release it later tonight or tomorrow, depending upon what's on tv and how much time I have tomorrow.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
I'm really glad that nullpointer mentioned dropbox, because at least for me, it's going to be the preferred method of using my new app.

I was messing around with the android version and it has a "create text file" option, which is very convenient for two-way communication.  So I added the option to have YGM read a "sendme.txt" from the cloud folder and send the appropriate file, similar to how I've got email communication setup.  Although the cloud obviously takes a while to sync on larger files, unlike email the cloud requests are pretty much immediately detected. 

So now you've got three ways to remotely view files (email, cloud, and webserver) and two ways to ask for files (email and cloud). 

I think aside from a dedicated server app and a slew of custom pc, android and ios client apps this is about as good as it's going to get in terms of sending things easily to remote devices. 

I want to write a listener app, which constantly sits in the taskbar and listens for requests (totally optional) so it might be another day, but it'll be out soon.

nullPointer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • Last login:January 23, 2021, 10:09:31 pm
This app is really sounding great Howard.  Choice is a good thing, and your apps never disappoint.  Thanks for all the work you’ve put into this.  I'm looking forward to taking taking this for a test drive!

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Ugh!  Our power was out yet again all yesterday and most of this morning.  I'll get back to this app once I get time.... sorry for the delay.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Well saint and woogie are hard at work ironing out the upgrade, which makes my site partially broken atm.  I'll go ahead and try to finish this app so that it'll be done and waiting.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Ok I added taskbar support to the optional listen server.  I'll need to add two or three lines of code to load/save the server's settings, but that essentially completes the app! 

The problem now comes in the icons and such.  I'm at a loss in terms of the design.  I tried a mailbox and some letters, but when scaled down to the teensy 16x16 quick launch icon, it just looks like mush.  If anyone has a concept, just let me know.


Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Alright, everything is done but the icons and corresponding webpage/manual.  I'll do that when I get a chance. 

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Check out IconFinder

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Well that's pretty cool.

Wouldn't that be illegal though?   I generally make my icons from scratch.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Well that's pretty cool.

Wouldn't that be illegal though?   I generally make my icons from scratch.

All icons have a license attached. I believe most are free to use though.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
That's not too bad then. 

Thanks for the link, I'll check em out tonight.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
I found an icon... it's fairly generic, but for the server it'll do. 

All my favorite shows come on tonight and that's the only time I have to work on this, so I'll probably release it tomorrow now that DK is up and running again.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 01:05:18 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Just an update.... the reason I haven't released this is because we are still having server issues.  It's done though, so don't worry about it.