ibnishak / timimi Goto Github PK
View Code? Open in Web Editor NEWWebextension to save Tiddlywiki
Home Page: https://ibnishak.github.io/Timimi/
License: GNU Affero General Public License v3.0
Webextension to save Tiddlywiki
Home Page: https://ibnishak.github.io/Timimi/
License: GNU Affero General Public License v3.0
Hello, this extension would be really useful for me.
However, I'm having the same issue as described in #4
but I am using OSX. I drag and drop timimi-1.4-an+fx.xpi onto my about:addons page and Timimi seems to be installed. The "wiki saved" message shows up, but the file isn't saved.
I tried changing timimi.py to reference python3, as suggested in the other issue, but it didn't work in my case. Typing python3 --version gives
Python 3.6.1 :: Anaconda custom (64-bit)
I'm using Firefox 59.0.1.
My timimi.json file says
{
"name": "timimi",
"description": "Native messaging host to save TW5",
"path": "HOST_PATH",
"type": "stdio",
"allowed_extensions": [ "[email protected]" ]
}
Thanks for any suggestions!
like Chrome:)
Using Ubuntu 18.04, running the install script install-linux-mac-firefox.sh
gives the following error:
./install-linux-mac-firefox.sh: 28: ./install-linux-mac-firefox.sh: Bad substitution
I found that a simple solution would be to replace the separators for sed by another character than /
, for instance *
(since it's very unlikely to appear in a path). This way there's no need to protect the slashes.
HOST_PATH="$TARGET_DIR/$HOST_NAME.py"
#ESCAPED_HOST_PATH=${HOST_PATH////\\/}
sed -i -e "s*HOST_PATH*$HOST_PATH*" "$TARGET_DIR/$HOST_NAME.json"
Hi,
I just wanted to point out It would be nice if we could get Timimi for FireFox on Android and or iPhones
No Pressure, Just thought it worthy of mention and perhaps finding some insight to the new methods on the mobile platform.
Regards
Tony
When I save a Tiddly, or changes to it, it initially shows as saved in the "Recent" sidebar tab, but when I refresh the wiki, this vanishes and nothing has been saved. Also no backups are being created, though I have made a folder for them. (System: Windows 8.1, Firefox Quantum portable 64.0.2 64-bit, Portable Apps version)
I'm currently using Timimi with Firefox on macOS and it works great. Thank you!
I would just like to register my interest in a Safari extension as well since that's my primary browser on macOS.
Reproduce (macOS, TWC, FireFox) (I guess this issue does not apply only to TWC files):
Suppose there are two folders "backup1" and "backup2" relative to your TWC file.
Suppose you have originally set the "Backup location" to be "backup1".
Open a TWC file in FireFox.
You now change the "Backup location" to be "backup2" and then click "Save" to store the settings of Timimi.
You save your TWC file.
You can see the latest backup appear in "backup1" in stead of "backup2".
Hi, it would be nice to be able to view version of the currently installed native messaging host so that users can check it before updating :)
I recently upgraded my MacOS from HighSierra to Catalina, skipping over Mojave.
I have been using Timimi for awhile to save my tiddlywiki file changes and it has been working perfectly for me.
Unfortunately, after this change, it gave an error when I tried to save:
"timimi" cannot be opened because the developer cannot be verified.
A brief effort to resolve this issue was unsuccessful, and I am not yet able to use Timimi again for saving.
Currently, saving in Chrome doesn't work for TWC. Here's a quick note from #32, I'll expand it at some point (additional research required):
mozillaLoadFile
andmozillaSaveFile
are js functions that are defined in TWC that were used when Firefox was able to save changes to file system by itself. Like in TiddlyFox, the adjustments in Timimi that I've proposed include overwriting these functions.In Chrome, however, restrictions are stronger and extension code has no direct access to the page JS so the functions can not be modified this way. I have to re-read some stuff to tell confidently, but as far as I understand, saving TWC in Chrome can only be implemented after modifying its core.
Hi, I have being working with other savers and hosting mechanisms of late including the new local storage plugin. I had the following idea you may be interested in, to extend Timimi or introduce a new FireFox plugin. This is purely optional and if you are interested.
Background
There are limitations to the local storage plugin, it does not save to the original file but into temporary browser storage which is not guaranteed. However it basically makes it possible for a user to save changes to any wiki read only or otherwise hosted at a http/s address. Timimi effectively does the same for TiddlyWiki files found at a File:// address. It works very well and leverages the new services available in modern browsers.
Idea
Would it be feasible for Timimi or another plugin to identify Tiddlywikis found at a URI rather than only at a file address and offer the facility to save the wiki (or only the changes) to a permanent local storage equivalent? Returning to the same address would lookup the local storage and import it as does the local storage plugin. A facility to save to disk the served wiki plus changes or not, would also be a great feature. This will need to be sellectable similar to the old tiddlyfox such as when TiddlyWikis are on a host which can save the wiki it can be switched off.
Why
With such a plugin TiddlyWiki users will be able to "Save to" any wiki on the internet or open any file based wiki with out any concern for the saving mechanism in use. This would enhance adoption perhaps more than any other saving mechanism ever for TiddlyWiki, which Timimi already comes close to doing.
Useful notes ?
Just dreaming
Tony
Riz,
I believe we discussed this previously, but I hope to persuade you to take account of this in Timimi, I expect it to be a minor change with extensive benefits. I am trying to persuade all stakeholders.
Please consider my TiddlyWiki issue Alternative File Extension for TiddlyWiki Files #3719
PS I am currently asking BTC, TiddlyDesktop, TiddlyServer, Bob and Tiddlywiki itself to account for .tw files
Regards
Tony
I believe I've figured out the reason behind #4. The while True
loop for Python 2.x has the following code:
file=open(receivedMessage["path"],"w", encoding='utf-8')
file.write("%s" % (receivedMessage["content"]))
file.close()
But running file = open("/tmp/example.json", "w", encoding='utf-8')
in Python 2 gives the error TypeError: 'encoding' is an invalid keyword argument for this function
.
According to https://stackoverflow.com/questions/10971033/backporting-python-3-openencoding-utf-8-to-python-2, the simplest solution is to (in the Python 2 block) do import io
, then use io.open
instead of plain open
. Then you just need to make sure that receivedMessage["content"]
is a Unicode object rather than a string (simplest way is to do file.write(unicode(receivedMessage["content"]))
) and the rest should work. (Tested locally on Mint 18 / Ubuntu 16.04 with Python 2.7).
I have installed the plugin on firefox 66 on ubuntu. I have also ran the command ./install-linux-firefox
and it worked without error.
I'm just unsure of what to do next. (I have tried running the ./timimi
binary, but it doesn't seem to do anything.)
How do I tell the plugin where my tiddlers are (on the file system)? How do I open those tiddlers in the browser?
When I work it all out I'd be more than happy to make a PR making the explanation clearer for anyone else.
Every time I modify a tiddler and I click on the icon to confirm changes I get this notification (running on Firefox Pop!_OS):
Error: attempt to postMessage on disconnected port
The changes aren’t saved as I reload I get the old contents. I’ve had a look at the browser console and couldn’t see anything unusual. E.g.:
saver-handler: Saving wiki with method autosave through saver tiddlyfox $:/core/modules/utils/logger.js:30:25
Message ID is tiddlywiki-save-file-response-1
Is there anything I can do to troubleshoot the issue?
Currently, if for some reason Timimi fails to save the tiddlywiki, it doesn't give any warning: "Saved wiki" is displayed as if working correctly, even if it's not.
I see you have added support for Chrome, that is wonderful and much appreciated!
With the new release of Microsoft Edge which is based on Chromium I may recommend to add Edge-add-on. I know Chrome add-ons are supported by Edge!
Eagerly waiting for new release!
Despite saying "saved" in the little popup when I click the save button, my changes do not appear after closing and re-opening the file. Quite frustrated, just lost about 2 hours of work to this.
Latest version Tiddly file and Firefox 74, Win10
Timimi version is whatever is on Firefox's addon site currently.
folder names like "Téléchargement" fails to be resolved
As requested from the Google Forums.
WHen Timimi was restricted to my FireFox I just new I would not use it in Chrome. I was always careful not to open the same wiki in a single tab, but now this is more likely although very welcome.
My thought given there is a host based component to this if Timimi could register and open wiki and at least warn if it is open and Timimi is active on this wiki elsewhere. This is a feature of Bob that it does not matter because if opened in more than one location edited tiddlers are locked until the server save them. With single file wikis locking the wiki would be more than enough to ensure there is no overwrite unless actively bypassed. Of course this would not protect a Wiki stored on a Shared Network location but that makes sense since Timimi is about local files.
Thanks for considering this,
No presure at all
Hi Rizwan,
could you also help a bit with building the apps themselves? I'm new to the ecosystem of Go and also I'm not aware of the toolchain used for creating native installers, so it would be lovely if you at least give some links or keywords so simplify this a bit. (I can see that Timimi.go files have different length for different OSes so I wonder if one has to test each one on the corresponding OS which is quite.. complicated thing to maintain; but may be I just don't understand something)
Best regards,
Yakov.
Because Go's os.rename
does not work across file systems, attempting to install from a seperate file system (such as a usb drive or the HDD in a SSD+HDD setup) fails with the following error:
2018/12/26 12:53:49 Move: rename timimi /home/somkun/.mozilla/native-messaging-hosts/timimi: invalid cross-device link
Hello There
Starting Timimi Installation
Created host directory: /home/somkun/.mozilla/native-messaging-hosts
Created host manifest: /home/somkun/.mozilla/native-messaging-hosts/timimi.json
Created host executable: /home/somkun/.mozilla/native-messaging-hosts/timimi
Hello There
Starting Timimi Installation
Created host directory: /home/somkun/.mozilla/native-messaging-hosts
Created host manifest: /home/somkun/.mozilla/native-messaging-hosts/timimi.json
2018/12/26 12:53:49 Move: rename timimi /home/somkun/.mozilla/native-messaging-hosts/timimi: invalid cross-device link
I don't have my dev machine available to make a PR at the moment, but the fix should be pretty easy. If rename fails, we should copy then delete instead. That should work across file systems.
Hi,
I am currently building a utility that needs to call tiddlywiki with additional parameters on the URL
eg:
file:///C:/Data/TW5/scratch/QuickUserTest.html?checkout=TW%20Tones?checkin=TW%20Tones?checkout=TW%20Tones
However it seems once I load the wiki the existence of the query, ie that including and following the "?" is causing timimi's save to fail.
I expect the issue is using the value in
It may also be possible to remove the suffix
Loving Timimi now on Chrome and FirefFox, I think its the best saver solutions.
Regards
Tony
Hi!
I've just switched to Ubuntu 20.04. Formerly I used Timimi for Firefox on Windows and stored my backup files on an external drive. Now it doesn't work. I get an error message: Timimi save failed: attempt to postmessage on disconnected port
. I think there are several things which might be wrong, but I don't know which ones and I am not familiar with changing everything on Linux, so I need an advice:
/media
, so I write my path in Timimi like this /media/username/volume name/folder/
./media/username/русские символы/
. Should I use quotes? Should I rename volumes? I tried quotes though with no success, but maybe I was doing it wrong.~/Documents
and the same error was raised.Thank you in advance!
Sincerely, Boris.
It took me while to discover why, now finally I think I've got it: Timimi doesn't work though symlinks.
In Firefox I have in my bookmarks the same tiddlywiki twice: one points at file:///mnt/data/…
, and one at file:///D:/…
, where - in Linux - /D:
is a symlink to /mnt/data
that I set up to help me smooth the friction of jumping between Windows and Linux.
If I open my tiddliwiki though the direct bookmark (file:///mnt/data/…
), it gets saved correctly, but if it's open through the symlink (file:///D:/…
), then it doesn't get saved. To make things worse, it won't give any warning at all: I click save, it happily shows "Saved wiki", and I go on with my work, only to discover later that I wasted an afternoon.
Thank you @YakovL and @ibnishak for making Timimi and making it work for TiddlyWiki classic (#23).
Though, there're some problems in the resulting TWC file what the previous plugins (although they don't work any more) won't produce. In short, the original clean TWC file is "contaminated" somewhat. Although it doesn't block TWC or Timimi from working, it's still better if we keep the file content to be original.
If you compare the original clean TWC file and a updated file saved by Timimi, you will see 3 unwanted differences (other than the <storeArea>
):
<title>
element is filled in with "My TiddlyWiki - a reusable ...".patch-classic-io.js
appears in <head>
.tiddlyfox-message-box
<div>
appears at the end of <body>
.Like the title says...
Win10, Firefox v64
This is a shiny new Firefox install so there are no likely add-on clashes.
The files are located on the local hard disk C: but the locations are "mapped" to drives like W: and P:
Tiddlywiki "Saved" notification appears but the file on disk is not updated.
Tried: Enabling and disabling backups. Same result.
Tried: Enabling and disabling Scripts. Same result.
Here are the messages posted to the console:
saver-handler: Saving wiki with method save through saver tiddlyfox $:/core/modules/utils/logger.js
Message ID is tiddlywiki-save-file-response-3
Hi Ibnishak
First of all thank you for your extension.
I try to installl to my mac (catalina 10-15) firefox but i couldnt do it. I installed firefox extension . But in the second step when i dowload timimi-2-1-1-Mac on my computer, it is opening with text.app and nothing running it just open a text file. Where i am doing wrong. Thank you very much.
Download timimi-2-1-1-Mac from Github . Run it by double clicking [If your OS asks for confirmation, choose "Run"]. Select the appropriate browser when asked.>
The extension seems correctly installed in Firefox, and I can see the "saved wiki" message when I try to save, but the changes are not written to the file.
Content of $HOME/.mozilla/native-messaging-hosts/timimi.json
is:
{
"name": "timimi",
"description": "Native messaging host to save TW5",
"path": "/home/erwan/.mozilla/native-messaging-hosts/timimi.py",
"type": "stdio",
"allowed_extensions": [ "[email protected]" ]
}
Let me know if there's more info I can provide
Hello Rizwan,
Recently I've successfully adapted Timimi to TiddlyWiki Classic via a plugin and would like to suggest changes so that Timimi works with TWC without a plugin. However, before creating a PR, I'd like to test it myself.
To do so, I need to figure out how to build-install-test an updated code/extension. Could you point me a direction on this? I wonder if I can build the extension and install it into FireFox without verifying and uploading it to the store, is that possible?
Best regards,
Yakov.
Hi, As in my Post here if we double click on a tiddlywiki html file it opens it in the default browser and Timimi will allow you to save single file wikis.
If however you double click on a tiddlywiki html file a second time it will open in a new window, changes made in one may overwrite the other. I am also keen to allow *.tw files to be opened this way (as discussed previously).
Would there be a way to enhance Timimi or a Browser setting such that it would warn the user the same wiki is open in another tab, especially when opened from the file explorer. Perhaps this would be a Plugin?
If this mechanism is possible it may be extended to allow a file to be checked out, such that timimi would not save the tiddlywiki if that instance is already open, not just by the same user, but by another user. Clearly a Check in method would be required. This would allow multi-user access to single file tiddlers using what I call serial multi-user access not simultaneous multi-user (update) access (ie open but do not allow save).
Design considerations
If TiddlyWiki can identify it is able to save due to Timimi - Timimi could potentially offer the ability to check in and out via Timimi or at a minimum Timimi may manage the check in/out itself.
If something like this where possible it would further strengthen the use of TiddlyWiki as a file based smart document. It seems to me extending the browser to open *.tw files (File association) via the Timimi installer would also make sense. SInce the key here would be the operation of Timimi anyway.
Food for though, no pressure.
Regards
Tony
I'am trying to install Timimi on Ubuntu. After ./install-linux-firefox
I get
bash: ./install-linux-firefox: cannot execute binary file: Exec format error
Does Timimi only work on 64-bit systems?
I've installed timini file on my mac with success, the ff extension as well, but each time I try to save my tiddly file, I get an error message:
Automatic saving not possible.
As your TW is not within the contolled directory a manual save is required
and then I get the menu to save it in the download folder !
Any idea ?
With Firefox 70.0.1 (64-bit), saving takes a long time (~20s) and freezes the computer (no keyboard or mouse response) when saving large Tiddlywikis. The wiki size threshold seems to be about 26MB on my Ubuntu laptop with about 8GB of RAM. Below this size, saving works fine. There is some evidence that computers with more RAM do not have the same problem (or maybe the size threshold is higher). See this discussion in the Tiddlywiki forum.
I've seen the same problem with a Macbook running FF 70.0.1.
With FF version 68.2.0esr on the Ubuntu laptop, my large wikis save normally.
This is an odd one. I'm on OS X (Catalina) using Firefox Developer Edition 78.0b9 (64-bit). I install the Timimi extension and go to the preferences to configure backups. I click on the "backup method" dropdown and nothing happens. It's stuck on "None". Clicking on the words, clicking on the arrow, tabbing into the field and hitting space, return, down-arrow, nothing.
I didn't have this problem when I installed on another machine using ordinary Firefox (not Developer Edition) so I'm not sure if this is something specific to that.
Reproduce (macOS, TWC, FireFox) (I guess this issue does not apply only to TWC files):
Suppose there is no a folder named "backup" relative to your TWC file.
Set the "Backup location" to be "backup".
Open a TWC file in FireFox, save it.
You can see a new folder "backup" created, but there's no backup files saved there. The reason is that the new folder is created without the "x" permission.
I love Timimi and use it as a rule. I love FireFox in which Timimi runs. However I sometimes want to use other save methods when I open a TiddlyWiki from the File:// addresses, these now include
Otherwise I need to turn off Timimi for the Whole browser, or use a different browser. It is nice to update with Timimi then if I could turn it off the next save will occur via the other method. Other methods can be disabled as they come as plugins but Timimis minimum config (Which is great) has no plugin or switch since it exist only in the browser add ons.
I was wondering if there were a way to configure a wiki in someway that Timimi would ignore the fact its a tiddleywiki file and not save it as it would normally.
Perhaps a raw tiddler of some form with an appropriate parameter could be tested before each save or load via timimi? Such that it will use another saver, ultimately reverting to the default file save by download.
Thanks in advance
Tony
Docs at Readme.md read ...
Supported OS
OSX
Windows >7
Actually Windows 7 works with it. Did you mean ...
Windows 7+ ?
The second backup onwards the process is normal. Reported in Windows.
Great chrome add on!
Just there is no backup! Is it possible to have a small control panel when click on the fish icon to set an interval for making backup?
This is very important to keep wikis from sudden crash or unwanted changes!
Thanks again for all your efforts
Due to security issues, putting executable files in the Roaming directory is not allowed in my business environment. Editing the registry is feasible though.
When the new Chrome be released, would it be possible to have the .exe, .json, and other files in a flash drive and the registry line include the path to the flash drive?
Please have a look at: https://en.wikipedia.org/wiki/Backup_rotation_scheme#Tower_of_Hanoi
What you describe is something completely different. Please fix the description or the functionality.
Hi Rizwan,
I noted that when I use FF 64.0.2 and Timimi 2.0.2, saving to tiddlyspot.com does not work!
It seems pressing the save button in wiki try to upload to tiddlyspot.com but fails.
I checked the username and pass are corrected on $:/ControlPanel / Tiddlyspot Saver.
Hello,
I've installed timimi on brave and I get the following error when saving : Error on contacting timimi host.
I tried to install it on firefox and it works. What could be the problem with brave ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.