back to tiddlywiki after 10 years, anwiki skin, question on node.js on ios

345 views
Skip to first unread message

maki aea

unread,
Dec 12, 2020, 11:31:46 AM12/12/20
to TiddlyWiki
happy to be back using tiddlywiki! i cobbled together an ios-oriented skin to anwiki and am using it as an anki replacement, please let me know what you think http://makiaea.org/00045/20201205makiaea-anwiki

currently using quine2, but wanted to try out node.js on ios. tried using ish but got as far as tiddlywiki mynewwiki --listen but then can't see the page in any browser: (please see photo attached). i tried ios 13 and 14, two different ios devices, no dice. ish seemed really slow even just doing tiddlywiki --version so it may be a speed issue?

so i tried cloning tiddlywiki from github and using play.js but haven't got a clue how to get started (no terminal/command line available in play.js?)! should i try jsbox instead? any pointers would be much appreciated. 

warmest wishes, maki



52B3627C-FC5B-403A-A5C7-1F9387550369.jpeg

Mark S.

unread,
Dec 12, 2020, 12:36:11 PM12/12/20
to TiddlyWiki
I don't own any apple products, but looking over google, I see that Apple started requiring all apps to use https back in 2016. I wonder if using http could be the problem?

Jeremy Ruston

unread,
Dec 12, 2020, 2:29:25 PM12/12/20
to tiddl...@googlegroups.com
Hi Maki

iSH is a bit of a hack: it essentially uses an x86 emulator to run Linux as a way to get around the app store rules, and so performance and compatibility are both poor.

Both Play.js and JSBox support Node.js apps, but the difference is that JSBox also offers a rich API for creating native iOS user interfaces and accessing native platform features. In contrast, Play.js apps are pretty much restricted to running a web server or processing files, without deep  integration with the underlying platform. So, I'd generally recommend starting with Play.js unless you plan to explore some exotic platform integration.

I will try to write proper instructions for installing TW5 on Play.js, but the rough outline is:

1. Create a new project in Play.js, with the type set to "Node.js"
2. Play.js will open a file called "index.js" in the root. Paste the following content:

var path = require("path");

var $tw = require("./node_modules/tiddlywiki/boot/boot.js").TiddlyWiki();

bootTW();

function bootTW() {

// Pass the command line arguments to the boot kernel
$tw.boot.argv = Array.prototype.slice.call(process.argv,2);

$tw.boot.argv = [path.resolve(process.cwd(),"./wiki"),"--listen"];

// Boot the TW5 app
$tw.boot.boot(function() {
//  console.log($tw.boot)
});

}

3. Click the "files" button at the top of the sidebar on the left. Choose the file called "package.json" and add a reference to TiddlyWiki:

{
  "name": "My Wiki",
  "version": "1.0.0",
  "dependencies": {
    "tiddlywiki": "^5.1.22"
  }
}

4. Create a file in the root called "index.js" containing:
5. Click the "scripts" button at the bottom left that reads "$ default: node index.js"
6. Tap "Install" in the "Scripts" dialogue that appears
7. Tap the "Resolve modules" button on the "Dependencies" dialogue that appears
8. Tap "Resolve" on the "Resolve modules" dialogue that appears
9. A bunch of text should appear, wait until you see "found 0 vulnerabilities", then you can click "back" and then "X" to back out of the dialogues
10. Create a folder called "wiki" in the root
11. Within that folder, create a file called "tiddlywiki.info" containing:

{
"description": "My great wiki",
"plugins": [
   "tiddlywiki/filesystem",
   "tiddlywiki/tiddlyweb"
],
"themes": [
"tiddlywiki/vanilla",
"tiddlywiki/snowwhite"
]
}


12. Click the "scripts" button again, but this time choose "Default"
13. Click the "play" button at the bottom left
14. Click the globe button to open the web browser
15. Change the URL to http://localhost:8080/ and reload

You should now have a functioning wiki. When you're done, close the browser and click the "stop" button.

Good luck, let us know how you get on,

Best wishes

Jeremy


On 12 Dec 2020, at 17:36, 'Mark S.' via TiddlyWiki <tiddl...@googlegroups.com> wrote:

I don't own any apple products, but looking over google, I see that Apple started requiring all apps to use https back in 2016. I wonder if using http could be the problem?
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/1ffa80c0-b153-49da-afd9-a3d8a240dc65n%40googlegroups.com.

maki aea

unread,
Dec 13, 2020, 4:08:42 PM12/13/20
to TiddlyWiki
thanks so much mark and jeremy for your super instructions — now up and running! i've made a short video to demonstrate for the next person to ask :) (please see links below). hope you'll get to see the meteors tonight! 

warmest wishes, maki

Eric Shulman

unread,
Dec 13, 2020, 4:40:52 PM12/13/20
to TiddlyWiki
On Sunday, December 13, 2020 at 1:08:42 PM UTC-8 ma...@makiaea.org wrote:
...hope you'll get to see the meteors tonight! 

Rocks on the Moon are made of green cheese, but rocks that fall to Earth are made of ground beef, because they are meteor.

:-)

-e

Jeremy Ruston

unread,
Dec 13, 2020, 4:44:54 PM12/13/20
to tiddl...@googlegroups.com
Hi Maki,

That's great, thank you. I've tweeted about it here:


I really love that the video is taken on your phone. May I ask if you do a lot of work on your phone? I'm seeing more and more people who use their phone as a development platform, and I'm optimistic about the implications for lowering the barriers to getting into software development, and for the new working habits that will surely emerge.

Best wishes

Jeremy


On 13 Dec 2020, at 21:08, maki aea <ma...@makiaea.org> wrote:

thanks so much mark and jeremy for your super instructions — now up and running! i've made a short video to demonstrate for the next person to ask :) (please see links below). hope you'll get to see the meteors tonight! 
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

maki aea

unread,
Dec 25, 2020, 5:36:35 PM12/25/20
to TiddlyWiki
great to hear from you eric and jeremy! hope everyone is having a great holiday and congratulations on the new release, it's amazing!
i hadn't realised until your comment that i've been coding first on the phone for a year now, moving only to ipad or pc/mac for checks. it may happen more often for more people now that phones are some of the most powerful machines in the local environment. for me personally it might have been a year ago after ios manual text manipulation improved, and when i realised the text manipulation scripts could be done using pythonista's keyboard (which is still buggy, but worth it) and that may have tipped the scales for me -- is jsbox's keyboard feature similar? it's a little like calling scripts from command line, alfred or keyboardmaestro, manipulating the selection and pasting in one button, for those functions that it supports. (i realise this sounds like a sentence describing tiddlywiki!) once i had such a convenient environment on the ipad it gradually dawned on me i could do the same on the phone. not to say that that's just the way it worked out, and am rationalising it after the fact… i'd love to hear more about the trends you are seeing!

warmest wishes, maki
Reply all
Reply to author
Forward
0 new messages