Reddit Posts on Archaic Binary BBS

I have been asked on the BBS how I pulled reddit links into the BBS for callers to see. As you might know, I have been using RMLib to make some simple door utilities with C#.

My latest utility pulls some headlines from reddit, as well as showing recent activity on the board.

Here is the code that does this… I don’t want to release the full program source yet, as it has other stuff I need to finish up. Sorry.
Using this though you should be able to get a C# door running with RMLib.

WebClient w = new WebClient();
            string s = w.DownloadString("http://www.reddit.com/r/tech");
            string cleanString = "";
            string cleanURL = "";

            foreach (LinkItem i in LinkFinder.Find(s))
            {
                cleanString = Regex.Replace(i.Text.ToString(), @"[^\u0000-\u007F]", string.Empty);
                cleanURL = Regex.Replace(i.Href.ToString(), @"[^\u0000-\u007F]", string.Empty);
                Door.WriteLn(StringUtils.PadRight(cleanString, ' ', 57) + " | ");
                Door.WriteLn(StringUtils.PadRight(cleanURL, ' ', 57) + " | ");
                Door.WriteLn(StringUtils.PadRight(" ", ' ', 57) + " | ");
            }

---

public struct LinkItem
        {
            public string Href;
            public string Text;

            public override string ToString()
            {
                return Text + Href;
            }
        }

static class LinkFinder
        {
            public static List<LinkItem> Find(string file)
            {
                List<LinkItem> list = new List<LinkItem>();
                int j = 0;

                MatchCollection m1 = Regex.Matches(file, @"(<a class=""title may-blank "".*?>.*?</a>)", RegexOptions.Singleline);

                foreach (Match m in m1)
                {
                    if (j <= 6)
                    {
                        string value = m.Groups[1].Value;
                        LinkItem i = new LinkItem();

                        Match m2 = Regex.Match(value, @"href=""(.*?)""", RegexOptions.Singleline);
                        if (m2.Success)
                        {
                            i.Href = m2.Groups[1].Value;

                        }

                        string t = Regex.Replace(value, @"\s*<.*?>\s*", "", RegexOptions.Singleline);
                        i.Text = t;

                        list.Add(i);
                        j++;
                    }
                }

                j = 0;
                return list;
            }
        }

Outlook Error: There was an error when printing started

Had this obscure error come up at work today on a Windows 7 machine running Outlook 2010. Only a specific email would not print.

Went through some google results and found the fix.

I deleted the file: “outlprnt” from C:\Users\username\AppData\Roaming\Microsoft\Outlook\

Restarted Outlook, all emails now print.

Windows 8.1 KB2919355 Failed

I got an error installing KB2919355 on a Windows 8.1 Pro clean install.

Most people can fix this error by doing the following in the console:

First

64bit: DISM /online /remove-package /packagename:Package_for_KB2919355~31bf3856ad364e35~amd64~~6.3.1.14
32bit: DISM /online /remove-package /packagename:Package_for_KB2919355~31bf3856ad364e35~x86~~6.3.1.14
RT: DISM /online /remove-package /packagename:Package_for_KB2919355~31bf3856ad364e35~arm~~6.3.1.14

Second

DISM /online /cleanup-image /startcomponentcleanup

Third

DISM /online /cleanup-Image /restorehealth

After searching up the error and running through log files, running all of the commands Microsoft suggests, and all of the tools they suggest I run, I found the log file this update creates.

After digging through it, I found the line saying that the folder “C:\ProgramData\Microsoft\Windows\Start Menu\Programs\System Tools” was missing. Well I remember that I removed this empty folder while cleaning up the Start Menu.

I recreated this empty folder and the update installed instantly. I believe this should re-create the folder automatically, but if your having this issue, check the folders.

Writing 32bit BBS Doors

I got a post on Archaic Binary BBS about how to write a BBS door.

Well I am fairly new to this still, and have only written two small 32bit BBS doors that I use on my own system.

Firstly I used a copy of Rick Parrish’s RMLib to write them, it’s not a very complete SDK or anything but it does give the basic IO functions we need for communication over the socket connection.

Then you need a IDE for C#. I suppose one of the best is Microsoft’s Visual Studio 2012 C# Express. It’s free and the project files worked for me.

If you can write in C# then you should be fine.

I have also attached the source code for a little door to help you. Remember my File Download door also comes with source you can check out.

32bit File Download BBS Door

I have been looking around for a file transfer door, that is 32bit compatible and can utilize a 32bit file transfer protocol instead of relying on old DSZ 16bit programs to send files over YModem and ZModem.

Without much luck I took the RMLib and developed a very simple door program for 32bit BBSs’ that lets users download files. It’s a very simple interface, using XML as a storage medium for filenames and descriptions. Then passes all the information needed to transfer the file to Synchronets’ SEXYZ.EXE program since it’s able to transfer files using X/Y/ZModem and it’s already 32bit.

Still needs work, and I’m adding and cleaning it up still but you can grab a copy of the source and program if you want to do something similar with your BBS.

Post Navigation