1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-18 07:44:51 +00:00
Commit Graph

465 Commits

Author SHA1 Message Date
Jermolene
b5482d8dba Remove extraneous console.log
I’ve leaving the one at line 91 because it might be useful for field
debugging…
2017-02-11 12:59:18 +00:00
Jermolene
3708f6c8e4 Major refactoring of filesystemadaptor
The code here had got a bit broken by some PRs that I should have
checked more carefully. I’ve done a major refactoring which will
hopefully make it easier to understand, and fixes a number of problems:

* Problem with eg .md tiddlers not being deleted correctly
* Problem with Windows path separators not being usable within
$:/config/FileSystemPaths on Windows
* Problem with filename clashes not being detected correctly when
saving to a different directory via $:/config/FileSystemPaths
* Enables slashes within tiddler titles to be mapped into folders
* Enables plain text files like .md and .css to be saved with .meta
files instead of as .tid files (see #2558)
* No longer replaces spaces with underscores

As this is such a major update, I’d be grateful if Node.js users could
give it a careful run through — in particular, you’ll need to try
creating new tiddlers of various types and ensure that the expected
files are created.
2017-02-11 12:56:42 +00:00
Jermolene
075d7d76df SaveTrail: Update readme 2017-02-10 07:33:38 +00:00
Jermolene
3d8249dc7a Savetrails: Download before and after files for destructive modifications 2017-02-09 15:45:39 +00:00
Jermolene
f4a015f120 Upgrade to latest version of xmldom 2017-02-07 18:20:30 +00:00
Jermolene
d9fd722e50 Text-slicer: Improve image support
Previously we only worked with base64 data URI images; now we work with
relative URLs as well.
2017-02-07 11:05:08 +00:00
Jermolene
a14b8a94df Fix JSON format for bc61f7eebf
Otherwise the JSON files cannot be imported back into TiddlyWiki
2017-02-04 18:08:47 +00:00
Jermolene
bc61f7eebf Introduce savetrail plugin
See the readme:

“This plugin causes TiddlyWiki to continuously save the contents of
each tiddler that is changed as a JSON file. Configured correctly, the
browser will download the files silently in the background, and they
can be used as a backup in case of accidental data loss.”

Inspired by @telmiger’s comment (3) here:
https://github.com/Jermolene/TiddlyWiki5/issues/2741#issuecomment-276128
871
2017-02-04 17:37:31 +00:00
Jermolene
6c65aa2a6d Make the syncer more configurable, including names for sync adaptors
@danielo515 you may want to add a name to your sync adaptor 😄
2017-02-04 17:25:30 +00:00
Sylvain Comte
c16f96626e Update to latest version of google analytics code (#2671)
* trying to implement new googleanalytics tracker

* trying to put new google tracker. Not working...

* more dev options for testing

still don"t understand wants goes wrong

* New version. Seems to work

* achieved update for new tests
brought back tiddlywiki.com settings value
created a settings tab to make it easier

* adding settings to plugin

add a settings tab to plugin to make it easier to use and see which GA account is in use

* fixes bug with GA_ACCOUNT and GA_DOMAIN tiddlers containing newlines at their end, preventing plugins to work

* soft rebase on jermolene's master

* revert to oldest version of GA_account and GA_domain tiddlers - had been overwritten by ones with a new line at the end

* Integrates some @tobibeer comments

* googleanalytics.js : removed "rebranding", var declaration and console log. Did not manage to get a non-minified version of Google script. But as far as I can see, jermolene's original plugin did same way
* plugin.info : placed "readme" first
* readme : back to previous "legacy" version. No more mention to temporary fork. Added mention and link to google official code.

* signed CLA
2017-01-03 15:43:05 +00:00
Jermolene
a1a4bf0f9d Refactoring the slicer engine for easier reuse 2016-12-22 17:46:42 +00:00
Jermolene
daad0ec142 xlsx-utils: Automatically trim cell values 2016-12-21 12:09:08 +00:00
Jermolene
424b8a1f68 Move QR code view toolbar button 2016-12-17 11:44:24 +00:00
Jermolene
b4dc730575 Fix xlsx-utils startup module name
We were using the same name as one of the core startup modules.
2016-12-15 17:13:32 +00:00
Jermolene
903cdc09cc Improve checking for missing titles 2016-11-14 15:37:55 +00:00
Jermolene
a485eb8588 Two improvements to xlsx-utils plugin
Add support for skipping an entire tiddler if a particular column is
blank

Add support for reading a row by column, making each of the columns
into a fieldname.

Also significantly refactored the code to break up the main, monolithic
function.
2016-11-14 15:23:15 +00:00
Jermolene
fc483abfc8 xlsx-utils control panel: put new entities at the top of their respective lists 2016-11-05 08:35:56 +00:00
Jermolene
cedb953f83 Missed off previous commit (54d0cb2021) 2016-10-23 23:27:35 +01:00
Jermolene
54d0cb2021 Fix background colour of import specification selector 2016-10-23 22:59:58 +01:00
Jermolene
5a361bdadc Fix content type for JSZip plugin license file 2016-10-23 22:50:14 +01:00
Jermolene
8de4583d6c Add first pass at XLSX Utilities plugin
Thanks to @stevesunypoly for help with preparing the demo spreadsheet
2016-10-23 22:49:59 +01:00
Jermolene
cd5366087c Improve QR code plugin docs 2016-10-20 09:45:04 +01:00
Jermolene
c415af13f1 bibtex plugin updates 2016-10-19 10:21:50 +01:00
Jermolene
7f11c151f0 First pass at bibtex importer 2016-10-18 18:00:01 +01:00
Jermolene
5ec7250621 QR code plugin clean ups 2016-10-18 17:59:52 +01:00
Jermolene
28a25be5f7 Marginally improved qrcode icon 2016-10-18 16:39:27 +01:00
Jermolene
8e02bde938 Refinements to 87fa7f972c 2016-10-18 16:39:18 +01:00
Jermolene
22c1b04ee7 Added first version of QR code generator plugin 2016-10-18 09:23:47 +01:00
Jermolene
1b41b44684 Improve support for bulk loading tiddlers under Node.js
Fixes #2610
2016-10-15 16:23:17 +01:00
Jermolene
4be5f0abe8 Switch highlight plugin under Node.js to use DOM rather than raw HTML
Hi @welford I wondered if you could kindly review this commit, since
you authored the original code? Before this commit, I was running into
a crash when running `prerelease-bld.sh` from
`build.jermolene.github.io`, caused by using raw HTML for the
highlighted block. Switching to the fake dom seems to fix things, but
I’d like a second pair of eyes.
2016-09-28 11:34:15 +01:00
Jermolene
d86e4043c2 Some sample .ENEX files for testing 2016-09-26 12:32:57 +01:00
Jermolene
f079b31334 Fix further issue with highlight.js brush handling 2016-08-18 10:32:21 +01:00
Jermolene
ee9d19d299 Fix problem with highlight plugin language brushes
TiddlyWiki passes the MIME type of the tiddler to highlight.js as the
"language brush", but it turns out that highlight.js doesn't actually
understand MIME types. This commit introduces a configuration mapping
between common MIME types and highlight.js language brushes

Fixes #2535
2016-08-18 09:07:06 +01:00
Jermolene
08cfa88249 Fix problem with unsafe use of String.prototype.replace()
We were using `String.prototype.replace()` without addressing the
wrinkle that dollar signs in the replacement string have special
handling. This caused problems in situations where the replacement
string is derived from user input and contains dollar signs.

Fixes #2517
2016-08-06 14:45:33 +01:00
Jermolene
487d6642e3 Fix KaTeX rendering bug on Chrome
Fixes #2500
2016-07-21 08:48:13 +01:00
Jermolene
5cc09d9cd5 Fix some typos from #2504 2016-07-20 16:16:21 +01:00
Devin Weaver
64b7e66675 Prevent adding extra file extensions (#2504)
Fixes #2503

This bug was introduced in commit c4c7b18 where it would append
additional .tid extensions to a file every time the node server was
restarted.

Here we check the filepath does not have the extension already before
appending it.
2016-07-20 16:07:28 +01:00
Jermolene
c4c7b1868c Ensure .tid extension when saving .tid files
Missed off of a4506231a7
2016-07-15 16:55:57 +01:00
Jermolene
a4506231a7 Fix writing non-wikitext text tiddlers
The plan had been to switch template depending on the content type, but
we’d only implemented support for saving wikitext tiddlers. That meant
that creating a tiddler with any non-wikitext content type failed to
write the file correctly under Node.js.

Now we just always save in .tid file format.
2016-07-14 17:42:57 +01:00
Jermolene
b849011d8f Move stacked view control panel into sidebar 2016-07-12 17:22:33 +01:00
Jermolene
14dc8accd6 Blog plugin: Transclude caption so that wikitext works 2016-07-12 13:16:30 +01:00
Devin Weaver
bf74d13df5 Handle binary files better when saving on Node.JS (#2420)
* Save binary tiddlers with meta file

The filesystemadaptor plugin was a little simplistic in its
understanding of a binary file. It was using the typeInfo dictionary to
choose what tiddler types were binary (and hence needed a meta file when
saving).

I looked as if it was trying to be smart by looking for the hasMetaFile
*OR* had the encoding of base64. Unfortunately the typeInfo only defined
image/jpeg and so any other base64 encoded tiddler was assumed to be of
type text/vnd.tiddlywiki.

The net effect was only JPG images got a meta file and everything else
were saved as .tid files with base64 encoding. It all still worked but
made working with binary data in a Git repo a bit daunting.

There is enough information in the $tw.config.contentTypeInfo to
determine if a tiddler type is encoded with base64 or not. A better list
is available from boot/boot.js who registers all the types thorough the
registerFileType and marks then with base64 were appropriate.

This commit uses the typeInfo dictionary first for any filesystem
specific overrides, then the contentTypeInfo, and finally defaults to
the typeInfo["text/vnd.tiddlywiki"]. It also eliminates the now
unnecessary override for image/jpeg.

I think this might have been the original intent from commit 10b192e7.
From my limited testing all files described in boot/boot.js (lines
1832-1856) with an encoding of base64 now save as the original binary
and a meta file. Meaning that when you start the node server and then
drag-n-drop a binary file (i.e. image/png) it will PUT to the server
and then save it on the filesystem as-is allowing the file to be managed
as a binary file and not a text file. (Binary diffs are better and
GitHub supports them as well).

* Prevent duplicate file extensions

A side effects of using the $tw.config.contentFileInfo in the previous
commit is that it will always append a file extension to the tiddler
title when saving. In most cases this is the correct course of action.
However, sometimes that title is already a proper filename with an
extension (for example importing 'foobar.png' would save a file named
'foobar.png.png') which seemed silly.

This commit simply checks to make sure the title does not already end
with the file extension before appending it to the filename. A little
convenience really.

Since IE apparently doesn't have the String endsWith method I took the
liberty to add a helper method to $tw.utils trying to follow the other
polyfill patterns. I figured this was more generic and readable then
attempting to use a one-off solution inline. I got the polyfill code
from MDN.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith#Polyfill

Is strEndsWith the best method name?
2016-07-11 11:18:19 +01:00
Brent Maxwell
19e699d330 Added mobile-web-app-capable meta tag for Android Chrome (#2456)
* Added mobile-web-app-capable meta tag for Android Chrome

* Added "mobile-web-app-capable" meta tag to the rest of the templates.
2016-07-11 11:16:58 +01:00
Jermolene
c3d18364c1 Don't use syncadaptors until they are ready
Fixes #2453
2016-07-05 11:29:59 +01:00
Myeongjin
74db143ee8 Split exporters from miscellaneous language tiddler (#2460) 2016-05-23 12:30:57 -06:00
Myeongjin
99c21232ee Fix referred name of localisable string for recursive transclusion error (#2458) 2016-05-22 15:33:02 -06:00
Myeongjin
fb146bc4b8 Fix readme path of jszip (#2430) 2016-05-20 07:46:29 -06:00
Myeongjin
8afc1e9354 Add localisable strings (#2438)
* Add localisable string for recursive transclusion error

* Add localisable string for count

* Add localisable strings for syncer
2016-05-12 08:44:28 -06:00
Myeongjin
33a569f6ce Fix problem when single tiddler is outputed (#2433) 2016-05-11 11:26:13 -06:00
Jermolene
c5ac10024b Text-slicer: Fix issue with missing destination title 2016-05-11 11:13:15 -06:00