Git Product home page Git Product logo

polly's People

Contributors

marxsal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

zhangaz1

polly's Issues

Steps Towards easier PS Core

In my latest polly-01Na-TT.ps1

  • one thing I did was go through the code and where there was hard-code of pathing I changed it from Windows to Unix/Mac style. Windows works fine with it so why not?

  • I updated lots of "aliases" in code to full cmdlet names.

  • an issue is how #CONSOLE settings are handled on different platforms. I haven't found much documentation on the topic yet. I treat it as an open issue.

  • It matters in the sense that whilst you can natively just run PS scripts, the ability to launch them from shell scripts like .bat & .sh helps unify the experience.

  • Its actually, on Windows, the console settings that permit a smooth transition, and harmonisation of look, between bat and PS script. Bat sets up run conditions.

  • I don't use either Linux or Mac so I'm a bit limited in knowing options around both the console thing or command lines in their .sh files.

O/S Settings Containment

I'm looking at shifting part of # INTERNAL SETTINGS to .\lib scripts for each o/s.

One PS script per platform. But ONLY components that can't be shared.

It would NOT be an ".ini", as I suggested previously on GG, but rather a hard-coded ".ps1" with a settings section at the start. Invoked from main script on startup.

As part of this I will see if I can shift window scaling initial settings out of the batch files for Win into the # CONSOLE section. Then all window settings are in one place. And other platforms we can work out as needed. Not sure yet how much of # CONSOLE generalises & how much is Win specific.

Hope this is clear.

I updated this note.

End User Issues

  • Coping with BACKUP EXCESS GROWTH

There is STRONG correlation between growth of excess backups and Auto-Restore timing.

IF a user is a happy typist with auto-save on to downloads, with very regular Polly restore, they may well have a red-face in the morning--with vast numbers of backups.

Q: IS this about advising them or setting different defaults?

Polly Once, in some ways makes much sense. More than Auto Restore, in a way.

Of course you need to KNOW to run it. But it keeps backups and restores but of just what you need when you need it.

Since download saving is already occurring the merits of "auto" could be over-stated. Its distinct downside is potential vast proliferation of redundant backups & zips.

The Mac, Linux problem where I know f* all.

@Marxsal

Whilst on Reggie Holiday I realised ... I don't think we should bend over backwards for Mac or Linux?

We are getting no platform specific feedback. And creating something via second-guessing I think is a formula for endless hassle.

The MAIN issue is Mac & Linux setting for specific functions like "editor".

I SUGGEST we abandon handling that. Too many indefinites.

Rather, in do-settings.ps1, there is a test IF "platform.ps1" exists which could contain any platform specific variables. Load if exists. Otherwise not and they need edit manually via their OS?

Everything would work as is.

I think you and I should concentrate on working with "commonalities", not differences, between platforms.

Hope this is clear? What do you think?

TiddlyWiki Classic & Polly

Placeholder for notes on any specifics on running TWC with Polly.

  1. Need do a bit more basic testing with TWC

Action once, Return to menu

Mark S. wrote:
I would like to incorporate this branch going forward as quickly as possible, so developments
in polly will immediately carry over to the other major platforms.

One thing I need your help with is to understand how to add to your "while" Magic Loops "action once, return to menu".

If I can see one example of that I should be able to work out the rest.

I want to add "menu-once" to allow restore "once" to run and return to menu.

Also, more ambitiously "menu-parrot" to allow (only) a full Parrot Now (i.e. files not in downloads also get cloned to the secondary location).

I'd like, if possible, to do that soonish.

TT

TT & "Dev" sort-out

@Marxsal The reason my .\dev stuff is confusing is largely because I've been using it for stuff inside .\dev\test\ that I think would now be confusing.
If we had more than 3.25 potential users I could use it to make a nice interactive demo. But, as is, its far too time consuming to document.

The items of mine that are likely most worth having in .\dev are ...

  • .\dev\do-pathcheck.ps1 flexible tool to check any path to dirs or files, allows relative addressing on check plus wildcards;

  • .\dev\do-grabwiki.ps1 in process experimental tool to capture directory listings for wikis and bulk convert into .ini data, allows relative addressing on check and wildcards; (works through piping directory listing to file and running a regex over it).

  • .\dev\permissions.bat that Windows tool that may at some point have value. We'd need users to know that. (I have an update of it I'll include in my next)

My feeling is that, unless you actually use the test system, (including "P" and all "polly-test*.bat") can be removed.

Q: Cross-Platform ":Env" variables?

You did a lot of thinking and work on Win %env% variables for easier setting of "Downloads" folder.

What I'm now wondering is how compatible is the approach with Lin & Mac?

TT: Query about dev. process

I can understand how to do issues on GH.

But I'm slightly at a loss on how to work on my own code changes in the best way to co-ordinate with you and the somewhat more complex, branching, repository system in GH.

In some ways I think its probably easiest I just work the way I did before. In any case, I largely work inside the Powershell (5) IDE because I can live test code easily in it. And I don't see how I could do that via GH.

Your thoughts?

Q: What is our bottom line PS5 or PSx?

I'm writing code where I need to be clearer if we support only 5+, or support lower versions. It matters in that its either "-eq 5" OR "-lt 6". Are we clear what happens on 4? And if its worth supporting?

Ideas Corner ... placeholder for potentials ...

  • Use Polly as a framework for self-contained "wiki system" ... for instance single zip consisting of Polly, settings.ini of relative paths pointing to a set wiki that would be auto-launched, backed up and restored with minimal setup by end user. A package. (I run a long-term project on the films of and discussions of the novel Great Expectations. 3 inter-linked wiki. Used by people who'd never otherwise use TW. Its currently a PITA having to everytime explain TW setup).

  • Currently TiddlyDesktop is not portable. I'm thinking Polly might be used to behave a bit like it, but properly portable.

  • Have ability to auto-update Polly using "Invoke-WebRequest" + Unblock + Permissions change

Launch in browser per ini list

The problem is that there is likely no universal, reliable way to launch using any browser other than the default browser (which may not be the browser and profile that the user regularly wants).

Linux Queries

  1. Does Linux have a universally reliably available editor like Windows "notepad.exe" in-built in all releases?

Allow break-out from restore loop with return to menu

Currently the restore loop requires a user to press ctrl-c to break the loop and terminate the batch file. I think it would be possible to allow the user to exit by "hitting any key" and then returning to the menu. From the menu they can really, truly exit.

TT: PSCore / PS6 -- Windows

I will soonish install PSCore for Windows so I can (hopefully) follow your innovations better.

Test PS5 code in it for compliance.

And, particularly, try to better grasp platform specific nuances.

Initial settings.ini & bat/sh files automation?

I'd hope we can produce (fingers crossed) a reliable cross-platform system. So, right now I'm thinking a "universal" release might look like this ...

polly.sh
polly.bat
polly.ps1

.\lib 

According to platform appropriate settings.ini and polly-once.'platform' and polly-auto.'platform' "batch" files would be created on first run. (This assumes ".sh" won't run on Win & ".bat" won't run on Linux or Mac [it might???])

Rename "Restore" to "Roost"?

@Marxsal Unless you have objections, I favour using "Roost" to replace "Restore". I think it fits and will be understood (at least in English)? But dimmi (let me know your thoughts.)

Performance Notes

PERFORMANCE: Basic test on performance & trying to break restore ...

  • Win 10 tablet 64-bit.
  • Maybe above average speed USB stick on T:
  • PS5

Test 1 -- Touch 8 wiki each of 5mb wiki in downloads.
Drive C: internally. Check restore & zip & backup.

WORKED

Test 2 -- Touch 8 wiki each of 5mb wiki in downloads.
Drive C: for Downloads & Backup.
Drive T: for wiki and Zips.
Check restore & zip & backup.

WORKED

Test 3 -- CHALLENGE TEST
Auto Touch 8 wiki in Downloads, each 5mb, on C: every 10 seconds (assumes user has 8 keyboards and 8 writing hands)
Auto Run Polly from T: every 3 seconds
Drive C: for Downloads & Backup.
Drive T: for wiki and Zips.
Check restore & zip & backup.

WORKED

COMMENTS:

  1. Running from T: USB slowed the process a bit but not in a way that was disruptive.
  2. Since the script issues orders sequentially and waits till completion timing conflicts did not arise.
  3. No sign of "locked-file" problems.

VERDICT: So far so good.

!!!WARNING!!! -- Don't try this on a small disk. The Breeding of backup files occupies a lot of space very quickly.

Maintenance of backup dirs

The backup dirs may become untidy. I'm thinking a menu item that will trim the directory to one file a week. But I regard this as a useful enhancement, not as a must-have. Also, there is the liability that occurs whenever files are deleted.

Delete from Downloads

Deleting all the objects in downloads would be scary. I'm thinking there could be a download safety value (e.g. DownloadSafetyNet=4). When a file is restored, all it's kindred (matched by regexp) would be deleted more than the DownloadSafetyNet value.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.