• Moose
  • Announcements

    • Dirktator

      March goal: We're almost there!   03/20/2017

      Hi Community! We're almost there for our March goals!  I just wanted to keep the momentum going so if you are able to help, please donate and get some gifts in exchange! Thanks so much to those who have helped out this month, we really appreciate it.
CorinaMarie

RedNotebook SC4 Linkys Idea

44 posts in this topic

OK, earlier I also ran a test install of Zim for Windows inside Sandboxie.

A few general observations:

  • Nice clean simple interface.
  • Comprehensive, well presented help documentation (shows the devs care).
  • Edit and read only modes.
  • Quick navigation options to switch between pages.
  • Each page is saved as a plain text file.
  • Search is useful, and there are a lots of options for queries.
  • A range of plugins to extend the features. E.g. Tags / enhanced search
  • Basic formatting options.
  • Wiki type markup is used in the source.
  • HTML an option for exports.

 

Yeah, didn't have any success either with embedding an external image. Trying source edits and numerous combinations was to no avail:

Ym8H44e.png


This included an effort to 'attach' a Windows shortcut linking to an online image. Nope, nothing, nada.

Even if there was a workaround, there's clearly no built in feature for this anyway as desired -- like a simple paste URL to embed. I'm guessing because the program just doesn't connect to the internet, so isn't able to retrieve & load the image into memory. It'd need some sort of browser rendering ability for this to function, like how the post editor works here on ST. With so many files in the installation, all kinds of DLLs and such, you'd expect this to be included, but surprisingly it isn't.

Yes, it seems editing an exported HTML file is the only option, but that wouldn't be an automatic process and adds unneeded hassle. I think the whole purpose here is to edit and view all pages in a single interface. Therefore, everything needs to be functional from the outset.

 

Other observations:

Spoiler

When installing, the first thing I noticed was a whole load of bloat. The desktop version expands from an 18MB download to 130MB and includes close to 7,000 files in the installation. Funnily enough, a good proportion of these are images inside the "share\icons" folder. Also there are locale files for practically every language on the planet!

All this is very well for user choice, but is it really necessary by default, with no option to disable when installing? Hmm... :meh:

Also for what it's worth, the portable installation was slightly larger. It even needed installing and took just as long. Isn't the whole point of a portable app to run standalone with limited dependencies? The only difference seemed the data files are placed inside an "App" folder, making it appear like there are fewer files (when actually there are slightly more). Couldn't notice any immediate differences in them either. The main executables (zim.exe) were identical in both versions.

I see Zim hasn't received recent updates (latest was in Jan 2016). Usually when projects remain in a state of "prolonged stable beta", it's rarely a good sign for the future development of new features.

 

Oh well, this one did have potential and still isn't a bad piece of software. But for the intended use here, doesn't quite make the cut.

Never mind, RedNotebook it is then after all. *;)

If it does the intended task well enough, given the others have reached a dead end, I guess there's not much point in pursuing something else. Will try it out later and see how it performs...

4 people like this

Share this post


Link to post
Share on other sites
21 hours ago, RandyE said:

I went ahead and grabbed the installer. Then I went for the Documentation, but all 8 linkys for downloads are broken. (Yes, the text seems to be there on their site. It's just I cannot trust it'll be there part way into a project.) Since RN will already do what I want, it's a bit of a moot point. The idea of modifying the program was more to make @RandyE happy.

 

31 minutes ago, Cyclone Boom said:

RedNotebook it is then after all. *;)

I keep coming back to this conclusion as well.

 

1 person likes this

Share this post


Link to post
Share on other sites

Before digging around in the source, it's probably worth getting the basic structure first in place. At least to properly understand what the program can and can't do. Maybe we can find some workarounds? Then if possible, making a few tweaks could always be done as a side project. The data sounds easy enough to import and test on different installations, so that shouldn't be a problem.

1 person likes this

Share this post


Link to post
Share on other sites
7 minutes ago, Handyman said:

Sweet. The sub linkys there do work so I got the PDF version.

 

Ok, how about the Full instructions and list of dependencies from the RedNotebook source code page? (I did get the source itself.)

1 person likes this

Share this post


Link to post
Share on other sites
1 hour ago, CorinaMarie said:

The idea of modifying the program was more to make @RandyE happy.

Okay Here I am inside the Python Shell with Rednotebook source loaded... where do we go Cori?  *:thumb:

Image2.jpg

Share this post


Link to post
Share on other sites
9 hours ago, RandyE said:

Okay Here I am inside the Python Shell with Rednotebook source loaded... where do we go Cori?  *:thumb:

Well, the first step is to make sure we can compile the whole thing and get the same .exe as the original. I suspect right now you'd get about a zillion and three errors unless you have the dependencies installed too. Ergo,

  • PyYaml (>=3.05)
  • PyGTK (>=2.16)
  • pywebkitgtk (>=1.1.5)
  • python-enchant (optional, needed for spell checking)

Once we've achieved compileability, then it's time to take a few baby steps and see how difficult it is to add or change things. One really simple thing I want is to add a hotkey to the insert menu for Title.

Insert%20Menu%20Org_zps2zgxppga.jpg

I'd like Ctrl+T to do that for me and put the cursor right in the middle ready to type. It's nothing big cause I can type the appropriate amount of = signs, but it'd be a nice easy step.

I'd also like to have Ctrl+Something pop up the Insert Picture dialog. Then add a new entry of Ctrl+W for a web picture. This latter one would just pop up a box like the Insert Link does, but one would then paste the URL into the top part and the bottom would make an insert entry with the ["" and ""?800 and ] parts in the right places. The 800 happens to be the size I downsize my pics to so they show without a side to side scroll bar on my monitor at 1280 x 1024.

This, ofc, brings up the idea that I'd like to add a preference entry for the default resizing size. So, I'd make all mine 800, but someone else might like 960 or whatever. My idea here is that whatever one sets the default to would override the text files if it is different than what I post online. (Prolly have to have a conversion option which would do them all in one fell swoop.)

Next on my wish list is that the Forward and Back buttons will act like they do now going from one entry to the next only if the search box is empty. If I have searched for something, such as #SC4_Mapping, then I want the buttons to jump forward or back to only entries which match the search. Right now it still just goes to the next entry. (I tested by adding random posts in between my map entries.) If I can do this then there will be no need to group things in consecutive posts. (Btw, I'm using the words posts and entries synonymously.)

So, if I can actually accomplish the above I feel I'll prolly have gained enough knowledge to then tackle bigger things.

3 people like this

Share this post


Link to post
Share on other sites
On ‎2017‎-‎03‎-‎21 at 4:47 AM, CorinaMarie said:

I did search on their site thru some of the questions and found that the Category option used to be over there and it was removed.

I'll go collect all the dependencies and as well make sure we've got the same complete build.  As quoted above, if the Category option was removed, maybe I can find it and we can put it back in?    Yes, 800 by default is good, not too big, not too small.   Maybe search parameters could be added,  so you could search within a keyword or relative to an entry or date, etc.   Wow, so much stuff... baby steps...       

2 people like this

Share this post


Link to post
Share on other sites
37 minutes ago, RandyE said:

I'll go collect all the dependencies and as well make sure we've got the same complete build.

You know, this is really cool. *:) I feel like I'm the auto mechanic saying: Ok, I need a ¾" deep-well 6 point socket, a ratchet, a jeweler's flat blade screwdriver, a BFH, (and another beer) and you are getting them for me. *:lol:

I'm wondering if we should get the exact version listed (if older ones are available) rather than the or > part. Sometimes later things bork something. Like I have some very old games off eBay that say they need Win 3.1 or later and won't run at all in Win XP. (They lied to me.) :O

Share this post


Link to post
Share on other sites
37 minutes ago, CorinaMarie said:

You know, this is really cool. *:) I feel like I'm the auto mechanic saying: Ok, I need a ¾" deep-well 6 point socket, a ratchet, a jeweler's flat blade screwdriver, a BFH, (and another beer) and you are getting them for me. *:lol:

It gets even more interesting, we don't know what make or model the car is and there's no standard manufacturer's specs.   I sure hope the programmer commented throughout the code and doesn't have a PhD in computer science.

Okay, so an exact version with no transitional bits --maybe the one with the category option still in.  Got it.

EDIT:  The first thing I'll make sure it can be compiled into an .exe.  Without that its 'game over' anyway.

1 person likes this

Share this post


Link to post
Share on other sites

Random thought:

If possible, as they'd be minor additions or tweaks, maybe it'd be worth incorporating such changes as DLL plugins. Otherwise I'm guessing the whole program would need to be recompiled each time. Should there be official updates to RedNotebook adding useful features, a plugin could still function alongside. Whereas creating an updated EXE may "lock down" the possibility of updating, since custom changes would need merging or re-evaluating in a new release.

Interestingly after installing RN, I noticed the installation is distinctly similar to Zim. This I think is because both are written in Python. For example, it shares many of the same libraries and modules (some identical, others slightly different in version). I'm wondering since that supported plugins, whether the same also applies here for RN.

I don't know, just something which came to mind. Take it for what it's worth...

Although I'd be willing to explore it further, programming isn't so much my current area of expertise. I've really only played around in VB, figuring things out to a limited extent through trial and error. Never used Python or the like, so whatever works and gets the job done is fine with me. *;)

1 person likes this

Share this post


Link to post
Share on other sites
56 minutes ago, RandyE said:

I sure hope the programmer commented throughout the code

Yes, there's decent comments. For example:

def search(self, text, tags):
        """
        This method is only called for days that have all given tags.
        Search in date first, then in the text, then in the tags.
        Uses case-insensitive search.
        """
        results = []
        if not text:
            # Only add text result once for all tags.
            add_text_to_results = False
            for day_tag, entries in self.get_category_content_pairs().items():
                for tag in tags:
                    # We know that all tags are present, but we loop through
                    # day_tags nonetheless, to escape the day_tags.
                    if escape_tag(day_tag) != tag:
                        continue
                    if entries:
                        results.extend(entries)
                    else:
                        add_text_to_results = True
            if add_text_to_results:
                results.append(get_text_with_dots(self.text, 0, TEXT_RESULT_LENGTH))
        elif text in str(self):
            # Date contains searched text.
            results.append(get_text_with_dots(self.text, 0, TEXT_RESULT_LENGTH))
        else:
            text_result = self.search_in_text(text)
            if text_result:
                results.append(text_result)
            results.extend(self.search_in_categories(text))
        return str(self), results

Here it seems that search is a 3 dimensional array which references itself for the name and then can contain the text found and the associated tags. The results.extend(entries) is the function to add the text to the results array which match the search criteria.

I'll need to find the variables definitions to see if they are allocated as static size or dynamically extendable for the number of entries. I would guess by now only dynamic would be used, but back when I did that COBOL thing they had space limitations and used a fixed length array. The whole program collapsed cause the thinger got full. (You've prolly already seen that convo between Granpa Moose and me, but if not let me know and I can find the linky.) Anyhow, one concern is that we won't break the program at the 1000th or 10,000th or whatever entry.

Anyhow, tho the syntax is different than what I've programmed before the concepts themselves don't change a whole lot. Like elif is prolly what I know as elseif. Any variable (sub something else) is an array of data of one dimension. Variable (sub, sub) is two dimensional and so on. So the main loop here is that we are deliberately saying if there is text for day_tag that matches then we add it to the list. From there we'd want the Forward and Back buttons to search thru that list and not just the next entry which contains text.

Or something like that. (I'm getting a wee bit intoxicated atm and this may not make any sense at all.)

:O

P.S. And yes, I've considered looking at the older version source for the Category part too.


  Edited by Cyclone Boom

Fixed the auto-acronym that showed "str" as Single Track Rail. This is now case sensitive. ;)
1 person likes this

Share this post


Link to post
Share on other sites
2 hours ago, Cyclone Boom said:

Interestingly after installing RN, I noticed the installation is distinctly similar to Zim.

I was going to mention Zim again too.  Weren't we happy with it except for the one thing that it didn't go online and embed pics from URLS?  It also is GNU GPL open source written in Python, and if we really only need to change one thing...

2 hours ago, CorinaMarie said:

Or something like that. (I'm getting a wee bit intoxicated atm and this may not make any sense at all.)

Scary how I actually almost understand almost all of it...  Its a scripting based language like Cobol, BASIC, HTML <-- where we started :} 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an Account  

Sign up to join our friendly community. It's easy!  :thumb:


Register a New Account

Sign In  

Already have an account? Sign in here.


Sign In Now


  •  
  • Similar Content

    • By boformer
      Yesterday @TimTheTerrible[NL]
      asked me a few questions about Sub-Buildings Enabler and modular buildings, such as train stations with varying platform counts.
      Right now "modular" just means that there are multiple separate buildings which are hard to align correctly, just like network puzzle pieces in SC4. The modules are cluttering the menus of the game.
      SBE's purpose is the grouping of multiple small buildings into one large building. Only the main building is displayed in the menu. The mod only executes on startup, not while buildings are placed. There is no way to customize the placement of the building.
      It would be possible to add a building customizer window similar to the NetworkSkins window. And with that, different options could be selected, for example the platform count of a train station, or the configuration of an airport terminal. Technically, asset creators would supply multiple SBE XML files, and the player can choose between them.
      Advantages: Only one menu item, simple placement and only a single selectable building that can easily be removed and bulldozed.
      The mod could go even further: There could be an option to place airorts without integrated runways, or to place buildings without the integrated props and trees. The stats of a building could also depend on the selected placement option.
      That comes very close to SimCity's modular buildings.
    • By boformer
      What are your thoughts? Ideas?
    • By VeeTHis
      Is it possible to make 1x1, 2x2, 3x3, and 4x4 "invisible" park lots that you can plop and use to make Districts? You can have up to 3 districts in small city tiles, 4 districts in medium-sized city tiles, and 6 districts in large city tiles. In order to seperate districts, you need to place a 1-tile gap around the whole district to make it a separate district and not make it one huge thing if you have multiple districts. The way to name these districts is simply get the "question mark tool" thingy, and hover over parts of your city to find a district you want to rename, click on the district, and rename it. The default name for districts will be "A Simple District". Like I said earlier, the actual lots you have to place down to make districts will be invisible, so you can still see your city.
      So, is it possible to make this kind of mod? I got the idea from the ability to make districts in Cities: Skylines.
      If someone does make this or has already made something like this, please send me a link to the mod.
    • By Zeticulij
      I was wondering, would it be possibly to create a mod which created a floating city? Perhaps a platform that can be placed, even if it had to be connected to the ground by a beam, which would allow you to build a city in the air? I'm starting to get into the idea of futuristic cities and this idea is one that I've had for quite some time. Is such a thing possible, and if it is, does it exist?
    • By boformer
      Here are my thoughts about a free-form farm and area filler mod:
      The first thing to understand is how the ground texture system works in CS. Everything is based on quads with 4 edge points. There are methods to fill a quad with a certain texture. The available textures are:
      None (grass) Clip (world hole used for subway station entrances etc.) PavementA (road pavement) PavementB (building pavement) Ruined Gravel Field The sidewalks of roads are made of quad segments:

      Then there is also the tool renderer that outlines buildings and roads when you hover them. This tool renderer supplies methods for quads, circles and Bézier curves or combinations of these.
      So a mod for farm fields and area fillers must also be based on quads.
      Quad Farm Fields
      It would be relatively simple to make a mod where you select 4 points to create a field (or any other area filler). The quad could be completely or partially filled with Farm, Gravel or Ruined Texture, and trees and props (that do not count to the tree limit) could be placed automatically.

      In many cases, that's still better than a square farm field and gives you more flexibility. The farm field could be placed anywhere, with no need for a road connection, and it could be huge!
      But such a quad field is still not the most elegant solution. What I would really like to see is a filler tool or a polygon tool that creates :
      Complex-shaped farm fields and area fillers
      Creating a system like that would be 20x more complex than a quad-based system. First all the vertices for the fields have to be found. You could either supply these with a polygon tool where you just select a number of points, or with a filler tool. Then the whole area has to be split into tris or quads, which is quite complex (there are algorithms for that).After that, the area can be filled with a ground texture, quad by quad (or tri by tri).

      You can imagine how hard this would be.
      Simulation & AI
      No matter what shape the field has, an AI could be attached to generate goods or to create workplaces for citizens. The AI could be similar to the industrial extractor AI that is used by the vanilla farms. Maybe it would even be possible to have tractors driving on the fields. Spawning animals like cows and pigs is also easy.
      Other Industries
      It would be awesome to have a similar system for the other industrial specialisations. The first thing that comes to my mind are forestries. Or how about large open-cast mines which slowly dig into the ground? It's all possible!
  • Recently Browsing   0 members

    No registered users viewing this page.